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:
2025-11-01 12:31:07 +01:00
parent c4d76c5cb1
commit 95a0fa3b87

View File

@@ -8,29 +8,29 @@
tasks:
- name: Detect the system's CA store path for Debian/Ubuntu
ansible.builtin.set_fact:
ca_store_path: "/etc/ssl/certs/"
when: ansible_facts.os_family == "Debian"
# - name: Detect the system's CA store path for Debian/Ubuntu
# ansible.builtin.set_fact:
# ca_store_path: "/etc/ssl/certs/"
# when: ansible_facts.os_family == "Debian"
- name: Detect the system's CA store path for RedHat/CentOS/Fedora
ansible.builtin.set_fact:
ca_store_path: "/etc/pki/tls/certs/"
when: ansible_facts.os_family == "RedHat"
# - name: Detect the system's CA store path for RedHat/CentOS/Fedora
# ansible.builtin.set_fact:
# ca_store_path: "/etc/pki/tls/certs/"
# when: ansible_facts.os_family == "RedHat"
- name: Detect the system's CA store path for macOS
ansible.builtin.set_fact:
ca_store_path: "/System/Library/Keychains/SystemRootCertificates.keychain"
when: ansible_facts.system == "Darwin"
# - name: Detect the system's CA store path for macOS
# ansible.builtin.set_fact:
# ca_store_path: "/System/Library/Keychains/SystemRootCertificates.keychain"
# when: ansible_facts.system == "Darwin"
- name: Detect the system's CA store path for Windows
ansible.builtin.set_fact:
ca_store_path: "Windows Certificate Store (use certmgr.msc)"
when: ansible_facts.system == "Windows"
# - name: Detect the system's CA store path for Windows
# ansible.builtin.set_fact:
# ca_store_path: "Windows Certificate Store (use certmgr.msc)"
# when: ansible_facts.system == "Windows"
- name: Show the detected CA store path
ansible.builtin.debug:
msg: "The trusted CA store path is: {{ ca_store_path }}"
# - name: Show the detected CA store path
# ansible.builtin.debug:
# msg: "The trusted CA store path is: {{ ca_store_path }}"