add certs role

This commit is contained in:
Ryan Cavicchioni 2020-05-23 16:41:09 -05:00
parent 6d2c7249bf
commit ca5e9bd44e
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
5 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,2 @@
---
certs_trusted_ca: {}

View File

@ -0,0 +1,5 @@
---
- name: update-ca-certificates
command: update-ca-certificates
# vim:ft=yaml.ansible:

View File

@ -0,0 +1,10 @@
---
- name: add trusted ca certificates
copy:
dest: "{{ certs_trusted_ca_path }}/{{ item.key }}.crt"
content: "{{ item.value }}"
owner: root
group: root
mode: "0644"
loop: "{{ certs_trusted_ca | dict2items }}"
notify: update-ca-certificates

View File

@ -0,0 +1,24 @@
---
- name: gather os specific variables
include_vars: "{{ lookup('first_found', possible_files) }}"
vars:
possible_files:
files:
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
paths:
- vars
- name: include os specific tasks
include_tasks: "{{ lookup('first_found', possible_files) }}"
vars:
possible_files:
files:
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
paths:
- tasks

View File

@ -0,0 +1,2 @@
---
certs_trusted_ca_path: /usr/local/share/ca-certificates