27 lines
897 B
YAML
27 lines
897 B
YAML
---
|
|
- set_fact:
|
|
install_root_cert_tmp_path: "{{ install_root_cert_tmp_folder }}/{{ install_root_cert_pem | basename }}"
|
|
|
|
- block:
|
|
- name: Copy certificate to temporary location
|
|
ansible.builtin.copy:
|
|
src: "{{ install_root_cert_pem }}"
|
|
dest: "{{ install_root_cert_tmp_path }}"
|
|
|
|
- name: Add certificate to Mac OS keychain
|
|
ansible.builtin.command: security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "{{ install_root_cert_tmp_path }}"
|
|
|
|
# - name: Add certificate to Mac OS (openssl)
|
|
# copy:
|
|
# src: "{{ install_root_cert_pem }}"
|
|
# dest: "/usr/local/etc/openssl/certs/{{ install_root_cert_pem | basename }}"
|
|
# owner: root
|
|
# group: wheel
|
|
# mode: "0644"
|
|
|
|
always:
|
|
- name: Remove temporary certificate
|
|
ansible.builtin.file:
|
|
path: "{{ install_root_cert_tmp_path }}"
|
|
state: absent
|