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_run_hooks.yml ************************************************** 2 plays in /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:2 Friday 20 September 2024 20:14:37 -0400 (0:00:00.027) 0:00:00.027 ****** 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:39 -0400 (0:00:01.223) 0:00:01.250 ****** 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:39 -0400 (0:00:00.051) 0:00:01.302 ****** 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:39 -0400 (0:00:00.073) 0:00:01.375 ****** 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:39 -0400 (0:00:00.533) 0:00:01.909 ****** 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:39 -0400 (0:00:00.067) 0:00:01.976 ****** 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:39 -0400 (0:00:00.108) 0:00:02.085 ****** 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:41 -0400 (0:00:01.866) 0:00:03.951 ****** 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:42 -0400 (0:00:00.586) 0:00:04.538 ****** 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:42 -0400 (0:00:00.530) 0:00:05.068 ****** 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:14:43 -0400 (0:00:00.437) 0:00:05.506 ****** 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:14:43 -0400 (0:00:00.644) 0:00:06.151 ****** changed: [managed_node2] => (item={u'run_before': u'touch /etc/pki/before_cert.tmp\n', u'ca': u'self-sign', u'name': u'mycert_run_hooks', u'dns': u'www.example.com', u'run_after': u'touch /etc/pki/after_cert.tmp\n'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } } MSG: Certificate requested (new). Pre/Post run hooks updated. 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:14:45 -0400 (0:00:01.159) 0:00:07.310 ****** skipping: [managed_node2] => (item=[u'cert', {u'run_before': u'touch /etc/pki/before_cert.tmp\n', u'ca': u'self-sign', u'name': u'mycert_run_hooks', u'dns': u'www.example.com', u'run_after': u'touch /etc/pki/after_cert.tmp\n'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "cert", { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } ], "skip_reason": "Conditional result was False" } skipping: [managed_node2] => (item=[u'key', {u'run_before': u'touch /etc/pki/before_cert.tmp\n', u'ca': u'self-sign', u'name': u'mycert_run_hooks', u'dns': u'www.example.com', u'run_after': u'touch /etc/pki/after_cert.tmp\n'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "key", { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } ], "skip_reason": "Conditional result was False" } skipping: [managed_node2] => (item=[u'ca', {u'run_before': u'touch /etc/pki/before_cert.tmp\n', u'ca': u'self-sign', u'name': u'mycert_run_hooks', u'dns': u'www.example.com', u'run_after': u'touch /etc/pki/after_cert.tmp\n'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "ca", { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } ], "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:14:45 -0400 (0:00:00.097) 0:00:07.407 ****** 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:14:45 -0400 (0:00:00.065) 0:00:07.473 ****** 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:14:45 -0400 (0:00:00.070) 0:00:07.544 ****** 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_run_hooks.yml:17 Friday 20 September 2024 20:14:45 -0400 (0:00:00.077) 0:00:07.621 ****** ok: [managed_node2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:31 Friday 20 September 2024 20:14:45 -0400 (0:00:00.549) 0:00:08.171 ****** 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:14:46 -0400 (0:00:00.100) 0:00:08.272 ****** 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:14:46 -0400 (0:00:00.031) 0:00:08.304 ****** 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:14:46 -0400 (0:00:00.064) 0:00:08.369 ****** 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:14:46 -0400 (0:00:00.074) 0:00:08.443 ****** 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:14:47 -0400 (0:00:00.735) 0:00:09.179 ****** 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:14:47 -0400 (0:00:00.061) 0:00:09.241 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877684.9164777, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5ed101d1c29e6915aa24299182212c13a0f849b8", "ctime": 1726877684.9124777, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172756, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1726877684.9124777, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1699536723", "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:14:47 -0400 (0:00:00.519) 0:00:09.760 ****** 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:14:47 -0400 (0:00:00.066) 0:00:09.827 ****** 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:14:47 -0400 (0:00:00.079) 0:00:09.906 ****** 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:14:47 -0400 (0:00:00.098) 0:00:10.004 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877684.8694777, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9edad738a97ff841426c66a3fde4d8c9f35489c3", "ctime": 1726877684.9124777, "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": 1726877684.9124777, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1699536708", "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:14:48 -0400 (0:00:00.448) 0:00:10.453 ****** 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:14:48 -0400 (0:00:00.094) 0:00:10.547 ****** 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:14:48 -0400 (0:00:00.107) 0:00:10.655 ****** 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": "7F:D5:00:11:1E:D9:F6:5D:FB:5D:D1:ED:11:8A:E0:58:84:D0:8D:5A" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "77:CE:2D:48:85:16:89:E3:36:11:58:69:C8:01:41:C7:C2:9E:3A:0F:0B:49:9E:23:44:08:78:70:6D:DE:B5:7C:70:AC:BB:3D:E9:D6:7B:F0:0E:90:82:DB:19:F2:5B:13:1A:F5:06:D6:D4:6E:79:3B:84:FF:78:02:4F:93:FA:EF:17:AB:88:3F:9E:60:5C:6E:DE:07:8F:3F:76:B3:4D:C1:4C:4B:EF:2F:37:98:81:76:0A:C1:90:A7:AF:47:01:43:64:D3:01:C4:C5:87:88:5B:4F:2B:F1:51:55:B0:B2:11:83:35:E7:AC:16:D3:59:8A:66:6B:23:3B:85:79:56:DE:BD:76:6E:CE:05:6F:8F:13:63:C9:05:B1:2C:5D:9C:28:91:A7:D0:DE:C1:9E:9E:8B:FD:4E:3E:8C:CE:20:9A:27:BD:E7:0C:7C:5F:2E:03:2D:3C:96:2F:47:E9:2F:7F:C2:CD:14:D0:43:FD:91:0A:C1:94:B2:90:1C:3A:32:3A:1C:BB:F2:91:36:00:D0:FB:23:FB:AE:42:99:C4:E8:1C:83:C4:52:89:A4:C4:6A:73:B1:04:C0:94:52:D2:87:F6:1C:0C:62:00:1D:1A:5C:4E:B6:4A:3C:E6:92:23:88:63:B0:DF:5C:DF:02:DD:2A:D1:5A:99:21:D9:BA:E8:84:9A:A2" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "20250921001356Z", "not_valid_before": "20240921001444Z" } }, "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:14:49 -0400 (0:00:00.812) 0:00:11.467 ****** 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": "7F:D5:00:11:1E:D9:F6:5D:FB:5D:D1:ED:11:8A:E0:58:84:D0:8D:5A" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "77:CE:2D:48:85:16:89:E3:36:11:58:69:C8:01:41:C7:C2:9E:3A:0F:0B:49:9E:23:44:08:78:70:6D:DE:B5:7C:70:AC:BB:3D:E9:D6:7B:F0:0E:90:82:DB:19:F2:5B:13:1A:F5:06:D6:D4:6E:79:3B:84:FF:78:02:4F:93:FA:EF:17:AB:88:3F:9E:60:5C:6E:DE:07:8F:3F:76:B3:4D:C1:4C:4B:EF:2F:37:98:81:76:0A:C1:90:A7:AF:47:01:43:64:D3:01:C4:C5:87:88:5B:4F:2B:F1:51:55:B0:B2:11:83:35:E7:AC:16:D3:59:8A:66:6B:23:3B:85:79:56:DE:BD:76:6E:CE:05:6F:8F:13:63:C9:05:B1:2C:5D:9C:28:91:A7:D0:DE:C1:9E:9E:8B:FD:4E:3E:8C:CE:20:9A:27:BD:E7:0C:7C:5F:2E:03:2D:3C:96:2F:47:E9:2F:7F:C2:CD:14:D0:43:FD:91:0A:C1:94:B2:90:1C:3A:32:3A:1C:BB:F2:91:36:00:D0:FB:23:FB:AE:42:99:C4:E8:1C:83:C4:52:89:A4:C4:6A:73:B1:04:C0:94:52:D2:87:F6:1C:0C:62:00:1D:1A:5C:4E:B6:4A:3C:E6:92:23:88:63:B0:DF:5C:DF:02:DD:2A:D1:5A:99:21:D9:BA:E8:84:9A:A2" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "20250921001356Z", "not_valid_before": "20240921001444Z" } } }, "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:14:49 -0400 (0:00:00.098) 0:00:11.565 ****** 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:14:49 -0400 (0:00:00.123) 0:00:11.689 ****** 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:14:49 -0400 (0:00:00.137) 0:00:11.826 ****** 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:14:49 -0400 (0:00:00.086) 0:00:11.913 ****** 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:14:49 -0400 (0:00:00.085) 0:00:11.998 ****** 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:14:49 -0400 (0:00:00.061) 0:00:12.060 ****** ok: [managed_node2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_run_hooks.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.046211", "end": "2024-09-20 20:14:50.380812", "rc": 0, "start": "2024-09-20 20:14:50.334601" } 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:14:50 -0400 (0:00:00.603) 0:00:12.664 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:39 Friday 20 September 2024 20:14:50 -0400 (0:00:00.107) 0:00:12.771 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877684.9164777, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5ed101d1c29e6915aa24299182212c13a0f849b8", "ctime": 1726877684.9124777, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172756, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1726877684.9124777, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1699536723", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:43 Friday 20 September 2024 20:14:51 -0400 (0:00:00.466) 0:00:13.238 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877684.9114778, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1726877684.9114778, "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": "inode/x-empty", "mode": "0600", "mtime": 1726877684.9114778, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1699536720", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:47 Friday 20 September 2024 20:14:51 -0400 (0:00:00.293) 0:00:13.531 ****** ok: [managed_node2] => { "changed": false, "stat": { "atime": 1726877684.9424777, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1726877684.9424777, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 172757, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1726877684.9424777, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1699536731", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:51 Friday 20 September 2024 20:14:51 -0400 (0:00:00.321) 0:00:13.852 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:58 Friday 20 September 2024 20:14:51 -0400 (0:00:00.051) 0:00:13.903 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Get pre/post-scripts files] ********************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:66 Friday 20 September 2024 20:14:51 -0400 (0:00:00.047) 0:00:13.951 ****** ok: [managed_node2] => { "changed": false, "examined": 2, "files": [ { "atime": 1726877684.9094777, "ctime": 1726877684.764478, "dev": 51713, "gid": 0, "gr_name": "root", "inode": 263221, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mode": "0770", "mtime": 1726877684.764478, "nlink": 1, "path": "/etc/certmonger/pre-scripts/mycert_run_hooks-369fd46.sh", "pw_name": "root", "rgrp": true, "roth": false, "rusr": true, "size": 92, "uid": 0, "wgrp": true, "woth": false, "wusr": true, "xgrp": true, "xoth": false, "xusr": true }, { "atime": 1726877684.9404778, "ctime": 1726877684.764478, "dev": 51713, "gid": 0, "gr_name": "root", "inode": 263222, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mode": "0770", "mtime": 1726877684.764478, "nlink": 1, "path": "/etc/certmonger/post-scripts/mycert_run_hooks-369fd46.sh", "pw_name": "root", "rgrp": true, "roth": false, "rusr": true, "size": 91, "uid": 0, "wgrp": true, "woth": false, "wusr": true, "xgrp": true, "xoth": false, "xusr": true } ], "matched": 2 } TASK [Check generated files for ansible_managed, fingerprint] ****************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:74 Friday 20 September 2024 20:14:52 -0400 (0:00:00.579) 0:00:14.531 ****** included: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml for managed_node2 included: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml for managed_node2 TASK [Get file] **************************************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:3 Friday 20 September 2024 20:14:52 -0400 (0:00:00.100) 0:00:14.631 ****** ok: [managed_node2] => { "changed": false, "content": "IyEvYmluL2Jhc2gKIwojIEFuc2libGUgbWFuYWdlZAojCiMgc3lzdGVtX3JvbGU6Y2VydGlmaWNhdGUKCnRvdWNoIC9ldGMvcGtpL2JlZm9yZV9jZXJ0LnRtcAo=", "encoding": "base64", "source": "/etc/certmonger/pre-scripts/mycert_run_hooks-369fd46.sh" } TASK [Check for presence of ansible managed header, fingerprint] *************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:8 Friday 20 September 2024 20:14:53 -0400 (0:00:00.741) 0:00:15.373 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed TASK [Get file] **************************************************************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:3 Friday 20 September 2024 20:14:53 -0400 (0:00:00.130) 0:00:15.503 ****** ok: [managed_node2] => { "changed": false, "content": "IyEvYmluL2Jhc2gKIwojIEFuc2libGUgbWFuYWdlZAojCiMgc3lzdGVtX3JvbGU6Y2VydGlmaWNhdGUKCnRvdWNoIC9ldGMvcGtpL2FmdGVyX2NlcnQudG1wCg==", "encoding": "base64", "source": "/etc/certmonger/post-scripts/mycert_run_hooks-369fd46.sh" } TASK [Check for presence of ansible managed header, fingerprint] *************** task path: /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:8 Friday 20 September 2024 20:14:53 -0400 (0:00:00.561) 0:00:16.065 ****** ok: [managed_node2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* managed_node2 : ok=43 changed=1 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0 Friday 20 September 2024 20:14:54 -0400 (0:00:00.116) 0:00:16.182 ****** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.87s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Gathering Facts --------------------------------------------------------- 1.22s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:2 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.16s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Parse certificate ------------------------------------------------------- 0.81s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:86 Get file ---------------------------------------------------------------- 0.74s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:3 Ensure python3 is installed --------------------------------------------- 0.74s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:18 fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.64s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Retrieve auto-renew flag ------------------------------------------------ 0.60s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:143 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.59s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Get pre/post-scripts files ---------------------------------------------- 0.58s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:66 Get file ---------------------------------------------------------------- 0.56s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/check_header.yml:3 Gathering Facts --------------------------------------------------------- 0.55s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:17 fedora.linux_system_roles.certificate : Check if system is ostree ------- 0.53s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:38 Get certificate timestamp ----------------------------------------------- 0.47s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:39 Retrieve key file stats ------------------------------------------------- 0.45s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tasks/assert_certificate_parameters.yml:65 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.44s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Get post-run file timestamp --------------------------------------------- 0.32s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:47 Get pre-run file timestamp ---------------------------------------------- 0.29s /tmp/collections-LhV/ansible_collections/fedora/linux_system_roles/tests/certificate/tests_run_hooks.yml:43