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-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:2 Monday 11 November 2024 20:08:39 -0500 (0:00:00.032) 0:00:00.032 ******* ok: [managed-node3] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Monday 11 November 2024 20:08:40 -0500 (0:00:00.926) 0:00:00.959 ******* included: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for managed-node3 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Monday 11 November 2024 20:08:40 -0500 (0:00:00.037) 0:00:00.997 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Check if system is ostree] ******* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 Monday 11 November 2024 20:08:40 -0500 (0:00:00.045) 0:00:01.042 ******* ok: [managed-node3] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.certificate : Set flag to indicate system is ostree] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Monday 11 November 2024 20:08:40 -0500 (0:00:00.439) 0:00:01.482 ******* ok: [managed-node3] => { "ansible_facts": { "__certificate_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Monday 11 November 2024 20:08:40 -0500 (0:00:00.068) 0:00:01.551 ******* skipping: [managed-node3] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node3] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [managed-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [managed-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Monday 11 November 2024 20:08:40 -0500 (0:00:00.113) 0:00:01.665 ******* ok: [managed-node3] => { "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" ] } lsrpackages: python-cryptography python-dbus python-pyasn1 TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Monday 11 November 2024 20:08:45 -0500 (0:00:04.273) 0:00:05.938 ******* ok: [managed-node3] => (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" ] } lsrpackages: certmonger TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Monday 11 November 2024 20:08:45 -0500 (0:00:00.563) 0:00:06.502 ******* ok: [managed-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Monday 11 November 2024 20:08:46 -0500 (0:00:00.500) 0:00:07.002 ******* ok: [managed-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Monday 11 November 2024 20:08:46 -0500 (0:00:00.348) 0:00:07.351 ******* ok: [managed-node3] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Mon 2024-11-11 20:07:22 EST", "ActiveEnterTimestampMonotonic": "307157903", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.service basic.target system.slice network.target syslog.target systemd-journald.socket", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Mon 2024-11-11 20:07:22 EST", "AssertTimestampMonotonic": "307135829", "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": "Mon 2024-11-11 20:07:22 EST", "ConditionTimestampMonotonic": "307135828", "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": "9686", "ExecMainStartTimestamp": "Mon 2024-11-11 20:07:22 EST", "ExecMainStartTimestampMonotonic": "307136512", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /var/run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[Mon 2024-11-11 20:07:22 EST] ; stop_time=[n/a] ; pid=9686 ; 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": "Mon 2024-11-11 20:07:22 EST", "InactiveExitTimestampMonotonic": "307136550", "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": "9686", "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": "basic.target system.slice", "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": "Mon 2024-11-11 20:07:22 EST", "WatchdogTimestampMonotonic": "307157704", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Monday 11 November 2024 20:08:47 -0500 (0:00:00.800) 0:00:08.151 ******* changed: [managed-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Monday 11 November 2024 20:08:48 -0500 (0:00:00.876) 0:00:09.028 ******* skipping: [managed-node3] => (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-node3] => (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-node3] => (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-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:160 Monday 11 November 2024 20:08:48 -0500 (0:00:00.059) 0:00:09.087 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Stop tracking certificates] ****** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:176 Monday 11 November 2024 20:08:48 -0500 (0:00:00.040) 0:00:09.128 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Remove files] ******************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:181 Monday 11 November 2024 20:08:48 -0500 (0:00:00.041) 0:00:09.169 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:19 Monday 11 November 2024 20:08:48 -0500 (0:00:00.046) 0:00:09.216 ******* ok: [managed-node3] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:48 Monday 11 November 2024 20:08:48 -0500 (0:00:00.495) 0:00:09.712 ******* included: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml for managed-node3 TASK [Set virtualenv_path] ***************************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:2 Monday 11 November 2024 20:08:48 -0500 (0:00:00.069) 0:00:09.782 ******* ok: [managed-node3] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Check if system is ostree] *********************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:9 Monday 11 November 2024 20:08:48 -0500 (0:00:00.019) 0:00:09.802 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Set flag to indicate system is ostree] *********************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:14 Monday 11 November 2024 20:08:48 -0500 (0:00:00.043) 0:00:09.845 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:18 Monday 11 November 2024 20:08:48 -0500 (0:00:00.042) 0:00:09.888 ******* ok: [managed-node3] => { "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" ] } lsrpackages: python2-cryptography TASK [Ensure python3 is installed] ********************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:28 Monday 11 November 2024 20:08:49 -0500 (0:00:00.536) 0:00:10.424 ******* skipping: [managed-node3] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:38 Monday 11 November 2024 20:08:49 -0500 (0:00:00.041) 0:00:10.465 ******* ok: [managed-node3] => { "changed": false, "stat": { "atime": 1731373727.939147, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "ff4df6bc57a70a7adfe181f70a9b32492a06282f", "ctime": 1731373727.9351468, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172755, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1731373727.9351468, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_subject.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1411, "uid": 0, "version": "18446744072653066221", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:43 Monday 11 November 2024 20:08:49 -0500 (0:00:00.292) 0:00:10.758 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:49 Monday 11 November 2024 20:08:49 -0500 (0:00:00.046) 0:00:10.805 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:59 Monday 11 November 2024 20:08:49 -0500 (0:00:00.050) 0:00:10.855 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:65 Monday 11 November 2024 20:08:49 -0500 (0:00:00.046) 0:00:10.902 ******* ok: [managed-node3] => { "changed": false, "stat": { "atime": 1731373727.897147, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "725d97e8712b293b743d1ece1afbf28f53a45c19", "ctime": 1731373727.9351468, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172754, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1731373727.9351468, "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": "18446744072653066208", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:70 Monday 11 November 2024 20:08:50 -0500 (0:00:00.307) 0:00:11.209 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:76 Monday 11 November 2024 20:08:50 -0500 (0:00:00.046) 0:00:11.255 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:86 Monday 11 November 2024 20:08:50 -0500 (0:00:00.051) 0:00:11.306 ******* ok: [managed-node3] => { "certificate": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "41:2B:4C:5A:01:77:5A:DB:45:67:DC:5B:B6:8A:70:21:BB:59:3C:1B" }, "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": "D8:7E:70:5F:B9:B0:E5:B4:A9:32:C9:D4:FC:E0:0C:C8:41:F7:C0:8D" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "3B:5D:04:58:DC:4B:0A:BD:C2:E6:78:48:87:7D:F8:98:8F:37:A1:70:0A:EA:7F:9C:0A:EE:9B:F9:2C:B2:4C:08:F4:1A:35:CD:2C:EA:44:09:6F:1A:17:42:98:04:3D:19:4F:49:C5:3C:C4:7B:49:DA:E3:1F:90:B3:B2:F2:3C:78:C1:E6:61:F4:0E:EA:75:62:F0:93:75:6A:22:4D:22:F6:FB:AC:1B:54:21:5C:86:54:F8:82:05:CB:01:39:FE:63:76:6B:1E:1B:07:D1:8A:54:AA:E6:BF:BC:9F:0F:31:54:1E:7D:BB:B6:1D:A5:AD:7B:14:C8:9C:44:9D:45:36:4C:8F:90:13:FF:CF:B3:53:48:AF:1C:29:D1:BE:40:13:B3:99:53:08:12:B7:F2:FD:16:CA:88:11:D6:1A:03:4D:60:78:61:B3:93:58:EA:76:3E:5C:64:00:00:B2:1D:88:4E:12:5A:71:1B:56:EC:2A:69:61:57:69:14:5A:09:B7:1B:8F:F1:CE:84:DA:E9:16:A1:1C:82:82:BB:9E:BC:7D:71:68:76:13:D2:2E:C6:3D:1A:3B:86:3E:31:96:44:05:82:36:19:6C:0D:53:BB:46:43:ED:04:C0:06:32:6A:8B:9F:9E:31:89:54:0E:9D:C1:40:C1:26:8E:8F:90:B1:F5:25" }, "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": "20251112010723Z", "not_valid_before": "20241112010847Z" } }, "changed": false } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:92 Monday 11 November 2024 20:08:50 -0500 (0:00:00.562) 0:00:11.869 ******* ok: [managed-node3] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "41:2B:4C:5A:01:77:5A:DB:45:67:DC:5B:B6:8A:70:21:BB:59:3C:1B" }, "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": "D8:7E:70:5F:B9:B0:E5:B4:A9:32:C9:D4:FC:E0:0C:C8:41:F7:C0:8D" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "3B:5D:04:58:DC:4B:0A:BD:C2:E6:78:48:87:7D:F8:98:8F:37:A1:70:0A:EA:7F:9C:0A:EE:9B:F9:2C:B2:4C:08:F4:1A:35:CD:2C:EA:44:09:6F:1A:17:42:98:04:3D:19:4F:49:C5:3C:C4:7B:49:DA:E3:1F:90:B3:B2:F2:3C:78:C1:E6:61:F4:0E:EA:75:62:F0:93:75:6A:22:4D:22:F6:FB:AC:1B:54:21:5C:86:54:F8:82:05:CB:01:39:FE:63:76:6B:1E:1B:07:D1:8A:54:AA:E6:BF:BC:9F:0F:31:54:1E:7D:BB:B6:1D:A5:AD:7B:14:C8:9C:44:9D:45:36:4C:8F:90:13:FF:CF:B3:53:48:AF:1C:29:D1:BE:40:13:B3:99:53:08:12:B7:F2:FD:16:CA:88:11:D6:1A:03:4D:60:78:61:B3:93:58:EA:76:3E:5C:64:00:00:B2:1D:88:4E:12:5A:71:1B:56:EC:2A:69:61:57:69:14:5A:09:B7:1B:8F:F1:CE:84:DA:E9:16:A1:1C:82:82:BB:9E:BC:7D:71:68:76:13:D2:2E:C6:3D:1A:3B:86:3E:31:96:44:05:82:36:19:6C:0D:53:BB:46:43:ED:04:C0:06:32:6A:8B:9F:9E:31:89:54:0E:9D:C1:40:C1:26:8E:8F:90:B1:F5:25" }, "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": "20251112010723Z", "not_valid_before": "20241112010847Z" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:96 Monday 11 November 2024 20:08:51 -0500 (0:00:00.059) 0:00:11.928 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:104 Monday 11 November 2024 20:08:51 -0500 (0:00:00.050) 0:00:11.978 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:112 Monday 11 November 2024 20:08:51 -0500 (0:00:00.046) 0:00:12.025 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:119 Monday 11 November 2024 20:08:51 -0500 (0:00:00.046) 0:00:12.071 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:130 Monday 11 November 2024 20:08:51 -0500 (0:00:00.048) 0:00:12.119 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:143 Monday 11 November 2024 20:08:51 -0500 (0:00:00.051) 0:00:12.171 ******* ok: [managed-node3] => { "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.048345", "end": "2024-11-11 20:08:51.686980", "rc": 0, "start": "2024-11-11 20:08:51.638635" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:152 Monday 11 November 2024 20:08:51 -0500 (0:00:00.466) 0:00:12.637 ******* ok: [managed-node3] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* managed-node3 : ok=31 changed=1 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0 Monday 11 November 2024 20:08:51 -0500 (0:00:00.041) 0:00:12.679 ******* =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 4.27s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Gathering Facts --------------------------------------------------------- 0.93s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:2 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 0.88s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.80s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.56s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Parse certificate ------------------------------------------------------- 0.56s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:86 Ensure python3 is installed --------------------------------------------- 0.54s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:18 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.50s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Gathering Facts --------------------------------------------------------- 0.50s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:19 Retrieve auto-renew flag ------------------------------------------------ 0.47s /tmp/collections-RgL/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.44s /tmp/collections-RgL/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.35s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Retrieve key file stats ------------------------------------------------- 0.31s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:65 Retrieve certificate file stats ----------------------------------------- 0.29s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:38 fedora.linux_system_roles.certificate : Set platform/version specific variables --- 0.11s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Verify each certificate ------------------------------------------------- 0.07s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_subject.yml:48 fedora.linux_system_roles.certificate : Set flag to indicate system is ostree --- 0.07s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Load certificate YAML to cert_issued variable --------------------------- 0.06s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:92 fedora.linux_system_roles.certificate : Slurp the contents of the files --- 0.06s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Verify certificate Extended Key Usage ----------------------------------- 0.05s /tmp/collections-RgL/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:130