chore 📦: Simplified and standardized system CA store detection
Refactored the setupacdc.yml to use a more consistent and efficient approach for detecting the system's CA store path, reducing redundancy and improving maintainability.
This commit is contained in:
@@ -8,29 +8,29 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Detect the system's CA store path for Debian/Ubuntu
|
# - name: Detect the system's CA store path for Debian/Ubuntu
|
||||||
ansible.builtin.set_fact:
|
# ansible.builtin.set_fact:
|
||||||
ca_store_path: "/etc/ssl/certs/"
|
# ca_store_path: "/etc/ssl/certs/"
|
||||||
when: ansible_facts.os_family == "Debian"
|
# when: ansible_facts.os_family == "Debian"
|
||||||
|
|
||||||
- name: Detect the system's CA store path for RedHat/CentOS/Fedora
|
# - name: Detect the system's CA store path for RedHat/CentOS/Fedora
|
||||||
ansible.builtin.set_fact:
|
# ansible.builtin.set_fact:
|
||||||
ca_store_path: "/etc/pki/tls/certs/"
|
# ca_store_path: "/etc/pki/tls/certs/"
|
||||||
when: ansible_facts.os_family == "RedHat"
|
# when: ansible_facts.os_family == "RedHat"
|
||||||
|
|
||||||
- name: Detect the system's CA store path for macOS
|
# - name: Detect the system's CA store path for macOS
|
||||||
ansible.builtin.set_fact:
|
# ansible.builtin.set_fact:
|
||||||
ca_store_path: "/System/Library/Keychains/SystemRootCertificates.keychain"
|
# ca_store_path: "/System/Library/Keychains/SystemRootCertificates.keychain"
|
||||||
when: ansible_facts.system == "Darwin"
|
# when: ansible_facts.system == "Darwin"
|
||||||
|
|
||||||
- name: Detect the system's CA store path for Windows
|
# - name: Detect the system's CA store path for Windows
|
||||||
ansible.builtin.set_fact:
|
# ansible.builtin.set_fact:
|
||||||
ca_store_path: "Windows Certificate Store (use certmgr.msc)"
|
# ca_store_path: "Windows Certificate Store (use certmgr.msc)"
|
||||||
when: ansible_facts.system == "Windows"
|
# when: ansible_facts.system == "Windows"
|
||||||
|
|
||||||
- name: Show the detected CA store path
|
# - name: Show the detected CA store path
|
||||||
ansible.builtin.debug:
|
# ansible.builtin.debug:
|
||||||
msg: "The trusted CA store path is: {{ ca_store_path }}"
|
# msg: "The trusted CA store path is: {{ ca_store_path }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user