Files
configpolicy/roles/trustca/tasks/main.yml
Dustin C. Hatch 861c6f4fe1 roles/trustca: Generic role for adding CA certs
The `trustca` role can be used to add CA certificates to the system
trust store. It requires a variable, `ca`, to be defined, referring to
the name of a file containing a CA certificate to install.
2018-06-04 20:03:55 -05:00

17 lines
414 B
YAML

- name: load distribution-specific variables
include_vars: '{{ item }}'
with_first_found:
- '{{ ansible_distribution }}.yml'
- '{{ ansible_os_family }}.yml'
- defaults.yml
- name: ensure ca cert dir exists
file:
path={{ ca_store_dir }}
state=directory
- name: ensure ca cert is installed
copy:
src={{ ca }}.crt
dest={{ ca_store_dir }}
notify: update ca certs
- meta: flush_handlers