ansible-playbook 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.5 (default, Nov 14 2023, 16:14:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] Using /etc/ansible/ansible.cfg as config file [WARNING]: running playbook inside collection fedora.linux_system_roles Skipping callback 'actionable', as we already have a stdout callback. Skipping callback 'counter_enabled', as we already have a stdout callback. Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'dense', as we already have a stdout callback. Skipping callback 'dense', as we already have a stdout callback. Skipping callback 'full_skip', as we already have a stdout callback. Skipping callback 'json', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'null', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. Skipping callback 'selective', as we already have a stdout callback. Skipping callback 'skippy', as we already have a stdout callback. Skipping callback 'stderr', as we already have a stdout callback. Skipping callback 'unixy', as we already have a stdout callback. Skipping callback 'yaml', as we already have a stdout callback. PLAYBOOK: tests_subject.yml **************************************************** 2 plays in /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:2 Friday 20 September 2024 20:14:55 -0400 (0:00:00.028) 0:00:00.028 ****** ok: [managed_node2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Friday 20 September 2024 20:14:56 -0400 (0:00:00.809) 0:00:00.837 ****** included: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for managed_node2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Friday 20 September 2024 20:14:56 -0400 (0:00:00.027) 0:00:00.864 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Check if system is ostree] ******* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 Friday 20 September 2024 20:14:56 -0400 (0:00:00.040) 0:00:00.905 ****** ok: [managed_node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.certificate : Set flag to indicate system is ostree] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Friday 20 September 2024 20:14:56 -0400 (0:00:00.407) 0:00:01.313 ****** ok: [managed_node2] => { "ansible_facts": { "__certificate_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Friday 20 September 2024 20:14:56 -0400 (0:00:00.053) 0:00:01.367 ****** skipping: [managed_node2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed_node2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [managed_node2] => (item=CentOS_7.yml) => { "ansible_facts": { "__certificate_default_directory": "/etc/pki/tls", "__certificate_packages": [ "python-pyasn1", "python-cryptography", "python-dbus" ] }, "ansible_included_var_files": [ "/tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [managed_node2] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Friday 20 September 2024 20:14:56 -0400 (0:00:00.115) 0:00:01.482 ****** ok: [managed_node2] => { "changed": false, "rc": 0, "results": [ "python2-pyasn1-0.1.9-7.el7.noarch providing python-pyasn1 is already installed", "python2-cryptography-1.7.2-2.el7.x86_64 providing python-cryptography is already installed", "dbus-python-1.1.1-9.el7.x86_64 providing python-dbus is already installed" ] } TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Friday 20 September 2024 20:14:58 -0400 (0:00:01.630) 0:00:03.113 ****** ok: [managed_node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [ "certmonger-0.78.4-17.el7_9.x86_64 providing certmonger is already installed" ] } TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Friday 20 September 2024 20:14:59 -0400 (0:00:00.572) 0:00:03.686 ****** ok: [managed_node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Friday 20 September 2024 20:14:59 -0400 (0:00:00.490) 0:00:04.177 ****** ok: [managed_node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Friday 20 September 2024 20:15:00 -0400 (0:00:00.407) 0:00:04.585 ****** ok: [managed_node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Fri 2024-09-20 20:13:56 EDT", "ActiveEnterTimestampMonotonic": "283809105", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "basic.target system.slice syslog.target network.target systemd-journald.socket dbus.service", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Fri 2024-09-20 20:13:56 EDT", "AssertTimestampMonotonic": "283783968", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "18446744073709551615", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "18446744073709551615", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Fri 2024-09-20 20:13:56 EDT", "ConditionTimestampMonotonic": "283783966", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "EnvironmentFile": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "9755", "ExecMainStartTimestamp": "Fri 2024-09-20 20:13:56 EDT", "ExecMainStartTimestampMonotonic": "283784555", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /var/run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[Fri 2024-09-20 20:13:56 EDT] ; stop_time=[n/a] ; pid=9755 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Fri 2024-09-20 20:13:56 EDT", "InactiveExitTimestampMonotonic": "283784583", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "65536", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "4096", "LimitNPROC": "14311", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "14311", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "9755", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/var/run/certmonger.pid", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "system.slice basic.target", "Restart": "no", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Fri 2024-09-20 20:13:56 EDT", "WatchdogTimestampMonotonic": "283809071", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Friday 20 September 2024 20:15:00 -0400 (0:00:00.772) 0:00:05.357 ****** changed: [managed_node2] => (item={u'name': u'mycert_subject', u'locality': u'Raleigh', u'country': u'US', u'ca': u'self-sign', u'state': u'NC', u'organizational_unit': u'Linux', u'dns': u'www.example.com', u'common_name': u'Some other common name', u'organization': u'Red Hat'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } } MSG: Certificate requested (new). TASK [fedora.linux_system_roles.certificate : Slurp the contents of the files] *** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Friday 20 September 2024 20:15:01 -0400 (0:00:00.914) 0:00:06.271 ****** skipping: [managed_node2] => (item=[u'cert', {u'name': u'mycert_subject', u'locality': u'Raleigh', u'country': u'US', u'ca': u'self-sign', u'state': u'NC', u'organizational_unit': u'Linux', u'dns': u'www.example.com', u'common_name': u'Some other common name', u'organization': u'Red Hat'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "cert", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } skipping: [managed_node2] => (item=[u'key', {u'name': u'mycert_subject', u'locality': u'Raleigh', u'country': u'US', u'ca': u'self-sign', u'state': u'NC', u'organizational_unit': u'Linux', u'dns': u'www.example.com', u'common_name': u'Some other common name', u'organization': u'Red Hat'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "key", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } skipping: [managed_node2] => (item=[u'ca', {u'name': u'mycert_subject', u'locality': u'Raleigh', u'country': u'US', u'ca': u'self-sign', u'state': u'NC', u'organizational_unit': u'Linux', u'dns': u'www.example.com', u'common_name': u'Some other common name', u'organization': u'Red Hat'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "ca", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Create return data] ************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:160 Friday 20 September 2024 20:15:01 -0400 (0:00:00.055) 0:00:06.327 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Stop tracking certificates] ****** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:176 Friday 20 September 2024 20:15:01 -0400 (0:00:00.039) 0:00:06.367 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Remove files] ******************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:181 Friday 20 September 2024 20:15:01 -0400 (0:00:00.040) 0:00:06.407 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:19 Friday 20 September 2024 20:15:01 -0400 (0:00:00.050) 0:00:06.457 ****** ok: [managed_node2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:48 Friday 20 September 2024 20:15:02 -0400 (0:00:00.508) 0:00:06.966 ****** included: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml for managed_node2 TASK [Set virtualenv_path] ***************************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:2 Friday 20 September 2024 20:15:02 -0400 (0:00:00.070) 0:00:07.036 ****** ok: [managed_node2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Check if system is ostree] *********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:9 Friday 20 September 2024 20:15:02 -0400 (0:00:00.020) 0:00:07.057 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Set flag to indicate system is ostree] *********************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:14 Friday 20 September 2024 20:15:02 -0400 (0:00:00.041) 0:00:07.099 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:18 Friday 20 September 2024 20:15:02 -0400 (0:00:00.040) 0:00:07.139 ****** ok: [managed_node2] => { "changed": false, "rc": 0, "results": [ "python2-cryptography-1.7.2-2.el7.x86_64 providing python2-cryptography is already installed", "python2-cryptography-1.7.2-2.el7.x86_64 providing python2-cryptography is already installed" ] } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:28 Friday 20 September 2024 20:15:03 -0400 (0:00:00.518) 0:00:07.658 ****** skipping: [managed_node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:38 Friday 20 September 2024 20:15:03 -0400 (0:00:00.039) 0:00:07.698 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877701.5924618, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "65e93a97e8d3e8965f2169e45427f2f89dd529b9", "ctime": 1726877701.5884619, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172759, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1726877701.5884619, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_subject.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1407, "uid": 0, "version": "1699536860", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:43 Friday 20 September 2024 20:15:03 -0400 (0:00:00.375) 0:00:08.074 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:49 Friday 20 September 2024 20:15:03 -0400 (0:00:00.044) 0:00:08.118 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:59 Friday 20 September 2024 20:15:03 -0400 (0:00:00.049) 0:00:08.168 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:65 Friday 20 September 2024 20:15:03 -0400 (0:00:00.046) 0:00:08.214 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877701.547462, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "83a16f733af85553922cb0d8f385eab5f95ce7a3", "ctime": 1726877701.5884619, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172758, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1726877701.5884619, "nlink": 1, "path": "/etc/pki/tls/private/mycert_subject.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1699536847", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:70 Friday 20 September 2024 20:15:03 -0400 (0:00:00.293) 0:00:08.508 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:76 Friday 20 September 2024 20:15:04 -0400 (0:00:00.045) 0:00:08.553 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:86 Friday 20 September 2024 20:15:04 -0400 (0:00:00.048) 0:00:08.602 ****** ok: [managed_node2] => { "certificate": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "04:C3:AC:86:D8:CE:87:65:2A:71:08:BE:81:CC:C2:D6:0F:C2:85:FF" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "key_encipherment", "digital_signature" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "3E:CA:E1:17:94:E6:5B:F5:3B:13:C7:C2:C3:83:76:F9:0D:09:E7:16" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7D:CC:0E:68:73:42:0F:CA:BA:C1:A6:75:12:33:A2:A6:0D:6A:9A:B3:F7:0D:93:10:3A:02:AD:E0:76:AE:98:D1:39:D2:0E:4F:40:FB:1A:B9:11:87:1E:25:72:44:1B:87:40:92:59:8E:EB:08:4A:FF:7E:6E:5F:A3:56:FB:A8:59:40:49:5C:53:98:05:1A:21:47:4F:00:B0:25:35:E5:5C:7E:2A:A0:39:0D:AA:C9:09:36:67:88:2B:76:3B:46:4C:5C:AB:1E:2A:48:B2:CC:0A:02:EE:E7:00:B8:4F:17:09:BC:25:68:F6:A3:27:F7:32:1E:38:38:5A:A8:5C:FC:E3:64:77:C3:09:95:75:7F:5F:E5:23:64:EE:CD:6E:90:99:EE:49:E5:4E:8A:1A:C0:5D:C1:6E:35:60:CB:69:E4:2F:B2:EA:F5:EF:57:C1:35:6C:2F:BD:D6:AC:8D:68:DF:55:82:00:55:C7:2D:FE:A4:BB:BC:6D:97:17:B6:E9:48:23:BF:9D:8B:43:3F:AF:1F:10:7B:44:F0:D9:9B:E1:16:D3:4F:5A:B6:71:57:95:3A:04:98:6B:EF:4B:54:74:1E:85:81:29:73:BB:AD:ED:B5:41:71:DD:E9:FA:0D:D3:CD:49:09:6A:3D:46:AD:4D:CE:5D:F2:E7:04:AE:55:BA:24:CC" }, "subject": [ { "name": "localityName", "oid": "2.5.4.7", "value": "Raleigh" }, { "name": "countryName", "oid": "2.5.4.6", "value": "US" }, { "name": "stateOrProvinceName", "oid": "2.5.4.8", "value": "NC" }, { "name": "commonName", "oid": "2.5.4.3", "value": "Some other common name" }, { "name": "organizationName", "oid": "2.5.4.10", "value": "Red Hat" }, { "name": "organizationalUnitName", "oid": "2.5.4.11", "value": "Linux" } ], "validity": { "not_valid_after": "20250921001356Z", "not_valid_before": "20240921001501Z" } }, "changed": false } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:92 Friday 20 September 2024 20:15:04 -0400 (0:00:00.479) 0:00:09.081 ****** ok: [managed_node2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "04:C3:AC:86:D8:CE:87:65:2A:71:08:BE:81:CC:C2:D6:0F:C2:85:FF" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "key_encipherment", "digital_signature" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "3E:CA:E1:17:94:E6:5B:F5:3B:13:C7:C2:C3:83:76:F9:0D:09:E7:16" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7D:CC:0E:68:73:42:0F:CA:BA:C1:A6:75:12:33:A2:A6:0D:6A:9A:B3:F7:0D:93:10:3A:02:AD:E0:76:AE:98:D1:39:D2:0E:4F:40:FB:1A:B9:11:87:1E:25:72:44:1B:87:40:92:59:8E:EB:08:4A:FF:7E:6E:5F:A3:56:FB:A8:59:40:49:5C:53:98:05:1A:21:47:4F:00:B0:25:35:E5:5C:7E:2A:A0:39:0D:AA:C9:09:36:67:88:2B:76:3B:46:4C:5C:AB:1E:2A:48:B2:CC:0A:02:EE:E7:00:B8:4F:17:09:BC:25:68:F6:A3:27:F7:32:1E:38:38:5A:A8:5C:FC:E3:64:77:C3:09:95:75:7F:5F:E5:23:64:EE:CD:6E:90:99:EE:49:E5:4E:8A:1A:C0:5D:C1:6E:35:60:CB:69:E4:2F:B2:EA:F5:EF:57:C1:35:6C:2F:BD:D6:AC:8D:68:DF:55:82:00:55:C7:2D:FE:A4:BB:BC:6D:97:17:B6:E9:48:23:BF:9D:8B:43:3F:AF:1F:10:7B:44:F0:D9:9B:E1:16:D3:4F:5A:B6:71:57:95:3A:04:98:6B:EF:4B:54:74:1E:85:81:29:73:BB:AD:ED:B5:41:71:DD:E9:FA:0D:D3:CD:49:09:6A:3D:46:AD:4D:CE:5D:F2:E7:04:AE:55:BA:24:CC" }, "subject": [ { "name": "localityName", "oid": "2.5.4.7", "value": "Raleigh" }, { "name": "countryName", "oid": "2.5.4.6", "value": "US" }, { "name": "stateOrProvinceName", "oid": "2.5.4.8", "value": "NC" }, { "name": "commonName", "oid": "2.5.4.3", "value": "Some other common name" }, { "name": "organizationName", "oid": "2.5.4.10", "value": "Red Hat" }, { "name": "organizationalUnitName", "oid": "2.5.4.11", "value": "Linux" } ], "validity": { "not_valid_after": "20250921001356Z", "not_valid_before": "20240921001501Z" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:96 Friday 20 September 2024 20:15:04 -0400 (0:00:00.047) 0:00:09.129 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:104 Friday 20 September 2024 20:15:04 -0400 (0:00:00.048) 0:00:09.177 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:112 Friday 20 September 2024 20:15:04 -0400 (0:00:00.049) 0:00:09.226 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:119 Friday 20 September 2024 20:15:04 -0400 (0:00:00.046) 0:00:09.273 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:130 Friday 20 September 2024 20:15:04 -0400 (0:00:00.052) 0:00:09.326 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:143 Friday 20 September 2024 20:15:04 -0400 (0:00:00.053) 0:00:09.379 ****** ok: [managed_node2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_subject.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.047530", "end": "2024-09-20 20:15:05.262492", "rc": 0, "start": "2024-09-20 20:15:05.214962" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:152 Friday 20 September 2024 20:15:05 -0400 (0:00:00.463) 0:00:09.843 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* managed_node2 : ok=31 changed=1 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0 Friday 20 September 2024 20:15:05 -0400 (0:00:00.042) 0:00:09.885 ****** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.63s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 0.91s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Gathering Facts --------------------------------------------------------- 0.81s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:2 fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.77s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.57s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Ensure python3 is installed --------------------------------------------- 0.52s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:18 Gathering Facts --------------------------------------------------------- 0.51s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:19 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.49s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Parse certificate ------------------------------------------------------- 0.48s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:86 Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:143 fedora.linux_system_roles.certificate : Check if system is ostree ------- 0.41s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.41s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Retrieve certificate file stats ----------------------------------------- 0.38s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:38 Retrieve key file stats ------------------------------------------------- 0.29s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:65 fedora.linux_system_roles.certificate : Set platform/version specific variables --- 0.12s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Verify each certificate ------------------------------------------------- 0.07s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:48 fedora.linux_system_roles.certificate : Slurp the contents of the files --- 0.06s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 fedora.linux_system_roles.certificate : Set flag to indicate system is ostree --- 0.05s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Verify certificate Extended Key Usage ----------------------------------- 0.05s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:130 Verify certificate Key Usage -------------------------------------------- 0.05s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:119