|
1 | 1 | --- |
2 | | -- name: Copy CA certificate and update trust |
| 2 | +- name: Install certificate authorities and update trust |
3 | 3 | hosts: overcloud:seed:seed-hypervisor |
4 | 4 | become: true |
5 | | - vars: |
6 | | - cert_path: "{{ kayobe_env_config_path }}/vault/OS-TLS-ROOT.pem" |
7 | | - |
8 | 5 | tasks: |
9 | | - - name: Copy certificate on RedHat family systems (Rocky, RHEL, CentOS) |
10 | | - ansible.builtin.copy: |
11 | | - src: "{{ cert_path }}" |
12 | | - dest: "/etc/pki/ca-trust/source/anchors/OS-TLS-ROOT.pem" |
13 | | - mode: "0644" |
| 6 | + - name: Install certificate authorities on RedHat based distributions |
14 | 7 | when: ansible_facts.os_family == 'RedHat' |
| 8 | + block: |
| 9 | + - name: Copy certificate authorities on RedHat family systems (Rocky, RHEL, CentOS) |
| 10 | + ansible.builtin.copy: |
| 11 | + src: "{{ kayobe_env_config_path }}/openbao/{{ item }}.pem" |
| 12 | + dest: "/etc/pki/ca-trust/source/anchors/{{ item }}.crt" |
| 13 | + mode: "0644" |
| 14 | + loop: |
| 15 | + - "OS-TLS-ROOT" |
| 16 | + - "OS-TLS-INT" |
15 | 17 |
|
16 | | - - name: Update CA trust on RedHat family systems |
17 | | - ansible.builtin.command: "update-ca-trust" |
18 | | - when: ansible_facts.os_family == 'RedHat' |
| 18 | + - name: Update CA trust on RedHat family systems |
| 19 | + ansible.builtin.command: "update-ca-trust" |
19 | 20 |
|
20 | | - - name: Copy certificate on Debian family systems (Ubuntu, Debian) |
21 | | - ansible.builtin.copy: |
22 | | - src: "{{ cert_path }}" |
23 | | - dest: "/usr/local/share/ca-certificates/OS-TLS-ROOT.crt" |
24 | | - mode: "0644" |
| 21 | + - name: Install certificate authorities on Debian based distributions |
25 | 22 | when: ansible_facts.os_family == 'Debian' |
| 23 | + block: |
| 24 | + - name: Copy certificate authorities on Debian family systems (Ubuntu, Debian) |
| 25 | + ansible.builtin.copy: |
| 26 | + src: "{{ kayobe_env_config_path }}/openbao/{{ item }}.pem" |
| 27 | + dest: "/usr/local/share/ca-certificates/{{ item }}.crt" |
| 28 | + mode: "0644" |
| 29 | + loop: |
| 30 | + - "OS-TLS-ROOT" |
| 31 | + - "OS-TLS-INT" |
26 | 32 |
|
27 | | - - name: Update CA trust on Debian family systems |
28 | | - ansible.builtin.command: "update-ca-certificates" |
29 | | - when: ansible_facts.os_family == 'Debian' |
| 33 | + - name: Update CA trust on Debian family systems |
| 34 | + ansible.builtin.command: "update-ca-certificates" |
0 commit comments