31 lines
807 B
YAML
31 lines
807 B
YAML
|
---
|
||
|
- block:
|
||
|
- name: Install required packages
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
loop: "{{ cacerts_packages_extra + cacerts_packages }}"
|
||
|
|
||
|
- name: Ensure ca path at '{{ __cacerts_ca_trust_source }}' exists
|
||
|
file:
|
||
|
path: "{{ __cacerts_ca_trust_source }}"
|
||
|
state: directory
|
||
|
|
||
|
- name: Install custom ca certs
|
||
|
copy:
|
||
|
src: "{{ item.path }}"
|
||
|
dest: "{{ __cacerts_ca_trust_source }}/{{ item.name }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0640
|
||
|
register: __ca_add
|
||
|
loop: "{{ cacerts_ca_certs }}"
|
||
|
loop_control:
|
||
|
label: "{{ item.name }}"
|
||
|
|
||
|
- name: Update cert index
|
||
|
command: "{{ __cacerts_ca_update_command }}"
|
||
|
changed_when: __ca_add.changed
|
||
|
become: True
|
||
|
become_user: root
|