Download the letsencrypt CA files.

This commit is contained in:
Andrea Dell'Amico 2021-09-29 18:54:30 +02:00
parent c4abe8cdd8
commit 5a89b571cd
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 17 additions and 6 deletions

View File

@ -78,6 +78,7 @@ no_proxy_targets:
trusted_ca_el_anchors_path: '/etc/pki/ca-trust/source/anchors' trusted_ca_el_anchors_path: '/etc/pki/ca-trust/source/anchors'
# it shoudn't be needed # it shoudn't be needed
trusted_ca_letsencrypt_install: False trusted_ca_letsencrypt_install: False
trusted_ca_letsencrypt_ca_certificates_url: https://letsencrypt.org/certificates/
trusted_ca_letsencrypt_ca_files: trusted_ca_letsencrypt_ca_files:
- { ca: 'isrgrootx1.pem', name: 'isrg-root-x1' } - { ca: 'isrgrootx1.pem', name: 'isrg-root-x1' }
- { ca: 'isrg-root-x2.pem', name: 'isrg-root-x2-not-cross' } - { ca: 'isrg-root-x2.pem', name: 'isrg-root-x2-not-cross' }

View File

@ -15,9 +15,14 @@
- name: Manage the Letsencrypt CA files on EL - name: Manage the Letsencrypt CA files on EL
block: block:
- name: Copy the letsencrypt CA files on EL - name: Download the letsencrypt CA files on EL
copy: src=letsencrypt_ca_files/{{ item.ca }} dest=/etc/pki/ca-trust/source/anchors/{{ item.ca }} owner=root group=root mode='0444' get_url:
with_items: '{{ trusted_ca_letsencrypt_ca_files }}' url: '{{ trusted_ca_letsencrypt_ca_certificates_url }}/{{ item.ca }}'
dest: '/etc/pki/ca-trust/source/anchors/{{ item.ca }}'
owner: root
group: root
mode: 0444
loop: '{{ trusted_ca_letsencrypt_ca_files }}'
register: letsencrypt_ca_files_installation register: letsencrypt_ca_files_installation
- name: Rebuild the trust CA files on EL - name: Rebuild the trust CA files on EL
@ -59,9 +64,14 @@
- name: Manage the Letsencrypt CA files on deb - name: Manage the Letsencrypt CA files on deb
block: block:
- name: Copy the letsencrypt CA files on deb - name: Download the letsencrypt CA files on deb
copy: src=letsencrypt_ca_files/{{ item.ca }} dest=/etc/ssl/certs/{{ item.ca }} owner=root group=root mode='0444' get_url:
with_items: '{{ trusted_ca_letsencrypt_ca_files }}' url: '{{ trusted_ca_letsencrypt_ca_certificates_url }}/{{ item.ca }}'
dest: '/etc/ssl/certs/{{ item.ca }}'
owner: root
group: root
mode: 0444
loop: '{{ trusted_ca_letsencrypt_ca_files }}'
register: letsencrypt_ca_files_installation register: letsencrypt_ca_files_installation
- name: Trust the CA files on deb - name: Trust the CA files on deb