Skip to content

Instantly share code, notes, and snippets.

@phmLabs
Created December 3, 2018 17:25
Show Gist options
  • Save phmLabs/e81d19a2c69534a48fe6241d94bc31ae to your computer and use it in GitHub Desktop.
Save phmLabs/e81d19a2c69534a48fe6241d94bc31ae to your computer and use it in GitHub Desktop.
- name: make cert extra dir
file: state=directory path=/usr/share/ca-certificates/extra
- name: Install cert
copy: src=../../templates/worker/certificates/entrust_l1k.cer dest=/usr/share/ca-certificates/extra/entrust_l1k.cer
- name: Cert exists
shell: grep "^entrust_l1k.cer" /etc/ca-certificates.conf | cat
register: cert_exists
- name: Add certificates to config
lineinfile:
dest: /etc/ca-certificates.conf
line: extra/entrust_l1k.cer
when: cert_exists.stdout == ""
- name: Update cert index
shell: /usr/sbin/update-ca-certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment