Role - tripleo_update_trusted_cas¶
Role Documentation¶
Welcome to the “tripleo_update_trusted_cas” role documentation.
Role Defaults¶
This section highlights all of the defaults and variables set within the “tripleo_update_trusted_cas” role.
# All variables intended for modification should be placed in this file.
tripleo_update_trusted_cas_ca_map: {}
Molecule Scenarios¶
Molecule is being used to test the “tripleo_update_trusted_cas” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.
- Driver: podman
Scenario: default¶
Molecule Inventory¶
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
Example default playbook¶
- name: Converge
hosts: all
vars:
tripleo_update_trusted_cas_ca_map:
ca1:
content: |
-----BEGIN CERTIFICATE-----
MIIDkTCCAnmgAwIBAgIUbRyjH5xf0yGj7larMhEDIrvOgo4wDQYJKoZIhvcNAQEL
BQAwWDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5DMRAwDgYDVQQHDAdSYWxlaWdo
MRQwEgYDVQQKDAtleGFtcGxlLmNvbTEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcN
MjAwNzI4MTYxNDM0WhcNMjUwNzI3MTYxNDM0WjBYMQswCQYDVQQGEwJVUzELMAkG
A1UECAwCTkMxEDAOBgNVBAcMB1JhbGVpZ2gxFDASBgNVBAoMC2V4YW1wbGUuY29t
MRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAOqk0OJOAa64bjF0k4MFJNZrzEsv1/UBReUF3c7NiYLayy5uk9DJghOH
Ic2Nphyafd4EvcoMkoBUe802iOW5zKjIgza/hVtcC6PPWbhkBdGpx832idjrXnWj
EBSbBZLY3Usikp3va9+7mCLcjnBQZ6ngSiqGnSpWhqvtm4eEIi9+CbmfBtWiBBK+
w1glCQY/FZdGcJ0W0XgHLI06muSMujENMjSHiODqCx7QA/aNnW0RiYTENtS1yRdd
8CIGGEf3HkvFFfwrZH6Qj4KW+0GXPkI6VzJCDsVL1YRuayTZl9rn9uGZD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name: check if anchor file created
stat:
path: /etc/pki/ca-trust/source/anchors/{{item}}.pem
register: stat_ca
failed_when: not stat_ca.stat.exists
loop: [ca1, ca2, ca3]
- name: check if contents in extracted pem
lineinfile:
name: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
line: '# {{item}}'
state: present
check_mode: true
register: conf
failed_when: (conf is changed) or (conf is failed)
loop: [example.com, example2.com, example3.com]