xoxys.cacerts/tasks/cacerts.yml

32 lines
826 B
YAML
Raw Normal View History

2019-11-09 15:48:19 +00:00
---
- 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
2021-02-06 14:11:48 +00:00
mode: 0755
2019-11-09 15:48:19 +00:00
- 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