ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/tmppc8868jw executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmprylna2eo/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 06:28:54 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 06:28:55 +0000 (0:00:01.128) 0:00:01.142 ******** included: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-9.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 06:28:55 +0000 (0:00:00.026) 0:00:01.169 ******** ok: [/cache/rhel-9.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 06:28:55 +0000 (0:00:00.549) 0:00:01.718 ******** skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.0.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.0.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 06:28:55 +0000 (0:00:00.039) 0:00:01.757 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 06:28:57 +0000 (0:00:01.106) 0:00:02.863 ******** ok: [/cache/rhel-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 06:28:58 +0000 (0:00:00.969) 0:00:03.833 ******** ok: [/cache/rhel-9.qcow2.snap] => (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": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 06:28:58 +0000 (0:00:00.509) 0:00:04.343 ******** ok: [/cache/rhel-9.qcow2.snap] => (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": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 06:28:58 +0000 (0:00:00.400) 0:00:04.743 ******** ok: [/cache/rhel-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 02:21:33 EDT", "ActiveEnterTimestampMonotonic": "202991623", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket sysinit.target dbus-broker.service network.target syslog.target basic.target system.slice dbus.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 02:21:33 EDT", "AssertTimestampMonotonic": "202981017", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "43097405000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 02:21:33 EDT", "ConditionTimestampMonotonic": "202981015", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "19556", "ExecMainStartTimestamp": "Wed 2022-07-06 02:21:33 EDT", "ExecMainStartTimestampMonotonic": "202982480", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 02:21:33 EDT", "InactiveExitTimestampMonotonic": "202982812", "InvocationID": "c0689ec12baa457caecfdc36591ca310", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14636", "LimitNPROCSoft": "14636", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14636", "LimitSIGPENDINGSoft": "14636", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "19556", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3399680", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "dbus.socket system.slice sysinit.target", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 02:25:19 EDT", "StateChangeTimestampMonotonic": "428838015", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "2", "TasksMax": "23418", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 06:28:59 +0000 (0:00:00.799) 0:00:05.543 ******** changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': '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. META: role_complete for /cache/rhel-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 06:29:00 +0000 (0:00:01.274) 0:00:06.818 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 06:29:01 +0000 (0:00:00.835) 0:00:07.654 ******** included: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:29:01 +0000 (0:00:00.048) 0:00:07.703 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:29:01 +0000 (0:00:00.030) 0:00:07.733 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:29:02 +0000 (0:00:00.969) 0:00:08.703 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:29:04 +0000 (0:00:01.169) 0:00:09.872 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:29:04 +0000 (0:00:00.894) 0:00:10.767 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088940.9660711, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "3509a90b168913cbf08d1fd8b29cfd02c0517121", "ctime": 1657088940.963071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734821, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088940.963071, "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": "33535582", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:29:05 +0000 (0:00:00.531) 0:00:11.298 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:29:05 +0000 (0:00:00.034) 0:00:11.332 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 06:29:05 +0000 (0:00:00.045) 0:00:11.378 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 06:29:05 +0000 (0:00:00.071) 0:00:11.449 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088940.889071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b832c26824cebedd30ff37f126ba7fbe30ef6f4b", "ctime": 1657088940.963071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829276, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088940.963071, "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": "1309266139", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.398) 0:00:11.848 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.032) 0:00:11.880 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.050) 0:00:11.931 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.195993", "end": "2022-07-06 02:29:06.873920", "rc": 0, "start": "2022-07-06 02:29:06.677927" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.com" } ], "critical": false }, "extendedKeyUsage": { "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" } ], "critical": false }, "basicConstraints": { "value": { "ca": false }, "critical": true }, "subjectKeyIdentifier": { "value": "F2:80:1C:7B:34:47:6E:94:EE:4C:3A:BB:00:EF:16:D6:AA:D8:D0:4D", "critical": false }, "authorityKeyIdentifier": { "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "42:23:9C:34:B7:3E:B7:20:E4:90:A2:54:11:B7:75:D3:BA:A1:7B:10:CC:DD:66:B0:72:DA:95:2F:55:75:08:CD:58:6D:34:0C:E5:12:B9:57:F6:BC:38:D4:1B:F2:EC:ED:B9:15:2F:67:2C:80:43:E8:D7:55:38:25:65:BB:EF:DE:DB:4A:E7:A0:B3:4A:25:2D:DD:33:64:AC:E9:A9:FC:E5:18:FB:F3:AA:57:6A:C9:70:EE:E2:87:53:5B:DB:04:AB:AC:22:BA:04:F8:B4:18:4C:3F:46:0E:63:0F:EF:4F:76:08:37:4C:B9:B3:23:61:C6:B0:74:B8:E1:DF:06:B7:ED:F2:A4:B0:3C:37:70:34:BE:10:89:C2:1C:FD:F3:36:03:45:8D:B0:30:90:11:EB:CE:1B:95:2B:E1:31:1A:82:74:31:3D:C3:F0:FA:D3:1F:5A:26:D7:12:E4:00:60:21:13:DF:43:2A:3D:A6:C6:BC:9B:A9:F8:8A:B0:E1:A5:03:EE:A2:85:1D:B6:FC:A2:15:DB:10:59:2B:8C:B7:F5:AA:98:4A:B5:45:55:7E:E0:3E:EE:9D:39:A5:37:F8:13:7A:34:0E:72:80:E1:C6:71:FE:F2:AF:E8:64:2A:5F:C9:9B:50:46:5B:9C:CB:50:A4:29:B8:27:FC:09:8B:DD:AD:07:3F" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:29:00" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.701) 0:00:12.632 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80" }, "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": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "F2:80:1C:7B:34:47:6E:94:EE:4C:3A:BB:00:EF:16:D6:AA:D8:D0:4D" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "42:23:9C:34:B7:3E:B7:20:E4:90:A2:54:11:B7:75:D3:BA:A1:7B:10:CC:DD:66:B0:72:DA:95:2F:55:75:08:CD:58:6D:34:0C:E5:12:B9:57:F6:BC:38:D4:1B:F2:EC:ED:B9:15:2F:67:2C:80:43:E8:D7:55:38:25:65:BB:EF:DE:DB:4A:E7:A0:B3:4A:25:2D:DD:33:64:AC:E9:A9:FC:E5:18:FB:F3:AA:57:6A:C9:70:EE:E2:87:53:5B:DB:04:AB:AC:22:BA:04:F8:B4:18:4C:3F:46:0E:63:0F:EF:4F:76:08:37:4C:B9:B3:23:61:C6:B0:74:B8:E1:DF:06:B7:ED:F2:A4:B0:3C:37:70:34:BE:10:89:C2:1C:FD:F3:36:03:45:8D:B0:30:90:11:EB:CE:1B:95:2B:E1:31:1A:82:74:31:3D:C3:F0:FA:D3:1F:5A:26:D7:12:E4:00:60:21:13:DF:43:2A:3D:A6:C6:BC:9B:A9:F8:8A:B0:E1:A5:03:EE:A2:85:1D:B6:FC:A2:15:DB:10:59:2B:8C:B7:F5:AA:98:4A:B5:45:55:7E:E0:3E:EE:9D:39:A5:37:F8:13:7A:34:0E:72:80:E1:C6:71:FE:F2:AF:E8:64:2A:5F:C9:9B:50:46:5B:9C:CB:50:A4:29:B8:27:FC:09:8B:DD:AD:07:3F" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:29:00" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.074) 0:00:12.706 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 06:29:06 +0000 (0:00:00.111) 0:00:12.817 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.035) 0:00:12.853 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.046) 0:00:12.899 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.046) 0:00:12.946 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.048) 0:00:12.994 ******** ok: [/cache/rhel-9.qcow2.snap] => { "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.058972", "end": "2022-07-06 02:29:07.668226", "rc": 0, "start": "2022-07-06 02:29:07.609254" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.430) 0:00:13.424 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 06:29:07 +0000 (0:00:00.047) 0:00:13.472 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088940.9660711, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "3509a90b168913cbf08d1fd8b29cfd02c0517121", "ctime": 1657088940.963071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734821, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088940.963071, "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": "33535582", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 06:29:08 +0000 (0:00:00.381) 0:00:13.853 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088940.958071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657088940.958071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734820, "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": 1657088940.958071, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1671523020", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 06:29:08 +0000 (0:00:00.376) 0:00:14.229 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088941.001071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657088941.001071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734818, "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": 1657088941.001071, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "903344260", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 06:29:08 +0000 (0:00:00.369) 0:00:14.598 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 06:29:08 +0000 (0:00:00.034) 0:00:14.633 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 06:29:08 +0000 (0:00:00.035) 0:00:14.668 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005616", "end": "2022-07-06 02:29:09.283683", "rc": 0, "start": "2022-07-06 02:29:09.278067" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmprylna2eo/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 06:29:09 +0000 (0:00:00.371) 0:00:15.039 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-9.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:29:09 +0000 (0:00:00.052) 0:00:15.091 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 1.27s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.17s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.13s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:2 ---------------------------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.11s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 0.97s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 0.97s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Install certreader ------------------------------------------------------ 0.89s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.84s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:17 --------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.80s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.70s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.55s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.53s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.51s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve auto-renew flag ------------------------------------------------ 0.43s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.40s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Retrieve key file stats ------------------------------------------------- 0.40s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get certificate timestamp ----------------------------------------------- 0.38s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:39 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.38s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:43 --------------------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.37s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:66 --------------------------------- Get post-run file timestamp --------------------------------------------- 0.37s /tmp/tmprylna2eo/tests/tests_run_hooks.yml:47 --------------------------------- ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/tmppc8868jw executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 06:40:29 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 06:40:30 +0000 (0:00:01.114) 0:00:01.128 ******** included: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-9.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 06:40:30 +0000 (0:00:00.027) 0:00:01.156 ******** ok: [/cache/rhel-9.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 06:40:31 +0000 (0:00:00.534) 0:00:01.690 ******** skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.0.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.0.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 06:40:31 +0000 (0:00:00.041) 0:00:01.732 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 06:40:32 +0000 (0:00:01.102) 0:00:02.834 ******** ok: [/cache/rhel-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 06:40:33 +0000 (0:00:00.942) 0:00:03.776 ******** ok: [/cache/rhel-9.qcow2.snap] => (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": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 06:40:33 +0000 (0:00:00.515) 0:00:04.292 ******** ok: [/cache/rhel-9.qcow2.snap] => (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": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 06:40:34 +0000 (0:00:00.423) 0:00:04.715 ******** ok: [/cache/rhel-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 02:33:03 EDT", "ActiveEnterTimestampMonotonic": "196651017", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice network.target sysinit.target basic.target syslog.target dbus-broker.service systemd-journald.socket dbus.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 02:33:03 EDT", "AssertTimestampMonotonic": "196638069", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "44079560000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 02:33:03 EDT", "ConditionTimestampMonotonic": "196638067", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "19537", "ExecMainStartTimestamp": "Wed 2022-07-06 02:33:03 EDT", "ExecMainStartTimestampMonotonic": "196639864", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 02:33:03 EDT", "InactiveExitTimestampMonotonic": "196640238", "InvocationID": "54468520e6274a09a70579107544ed55", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14636", "LimitNPROCSoft": "14636", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14636", "LimitSIGPENDINGSoft": "14636", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "19537", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3403776", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "dbus.socket system.slice sysinit.target", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 02:36:52 EDT", "StateChangeTimestampMonotonic": "425846403", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23418", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 06:40:35 +0000 (0:00:00.794) 0:00:05.510 ******** changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': '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. META: role_complete for /cache/rhel-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 06:40:36 +0000 (0:00:01.119) 0:00:06.629 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 06:40:36 +0000 (0:00:00.824) 0:00:07.453 ******** included: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:40:37 +0000 (0:00:00.048) 0:00:07.502 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:40:37 +0000 (0:00:00.033) 0:00:07.536 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:40:38 +0000 (0:00:00.955) 0:00:08.492 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:40:39 +0000 (0:00:01.166) 0:00:09.658 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:40:40 +0000 (0:00:00.935) 0:00:10.594 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089636.0452816, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "076960eec155f7245f8f2c3b2a977e87c4ba9372", "ctime": 1657089636.0422816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742244, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089636.0422816, "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": "2940924198", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:40:40 +0000 (0:00:00.494) 0:00:11.088 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:40:40 +0000 (0:00:00.032) 0:00:11.121 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 06:40:40 +0000 (0:00:00.072) 0:00:11.193 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 06:40:40 +0000 (0:00:00.074) 0:00:11.268 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089635.9732816, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "11337c4b3beb5c62c5e9136e760852ba0838ef8e", "ctime": 1657089636.0422816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829276, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089636.0422816, "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": "4079165237", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 06:40:41 +0000 (0:00:00.368) 0:00:11.637 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 06:40:41 +0000 (0:00:00.033) 0:00:11.670 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 06:40:41 +0000 (0:00:00.076) 0:00:11.747 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.210057", "end": "2022-07-06 02:40:42.055516", "rc": 0, "start": "2022-07-06 02:40:41.845459" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.com" } ], "critical": false }, "extendedKeyUsage": { "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" } ], "critical": false }, "basicConstraints": { "value": { "ca": false }, "critical": true }, "subjectKeyIdentifier": { "value": "99:03:53:1E:49:75:B3:6F:17:DF:B9:2E:50:C3:29:3D:68:08:EB:0D", "critical": false }, "authorityKeyIdentifier": { "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "52:AB:CA:4D:AF:C1:3E:DC:88:BD:5B:C1:89:31:55:DD:99:E1:D5:DA:3A:36:F7:BB:57:8D:10:9B:99:39:C7:BA:93:71:65:03:B5:C2:E4:FA:29:79:AB:E7:64:A3:7D:6E:88:E4:29:CA:1B:F8:46:CA:8D:53:4D:D1:11:0B:FA:6C:7A:D1:80:11:F9:37:84:BB:38:C4:96:41:A7:84:EA:23:88:22:90:7A:27:CE:F8:E8:DA:94:30:FA:30:7A:46:AB:95:E2:0F:5D:E2:21:C0:28:57:DB:29:22:F1:1D:5F:D8:E9:A0:7E:2E:70:D7:65:70:6C:5F:DB:93:CC:A0:EE:F3:8A:1D:11:55:B4:54:B8:D3:AB:2C:42:58:10:7C:C1:6E:89:E0:E2:67:6A:48:9C:34:3C:60:56:43:91:BC:6E:26:A1:56:B3:03:C3:89:AE:D1:D4:02:31:A4:3E:A1:A5:69:35:18:BA:7F:37:57:2E:55:B4:74:16:2B:9C:62:C1:27:AC:D8:D6:C1:83:93:D5:73:F5:F7:99:1C:BC:FF:CC:FE:E5:EC:D6:0E:73:A7:E9:E6:7C:39:BC:F5:8B:34:A0:5A:47:7D:16:AB:5E:71:A3:3C:C8:36:8B:33:7C:82:AB:70:6F:A5:51:04:03:F5:29:1B:11:97:47:FD:D2:CC:CF:58" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:40:36" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 06:40:41 +0000 (0:00:00.709) 0:00:12.457 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2" }, "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": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "99:03:53:1E:49:75:B3:6F:17:DF:B9:2E:50:C3:29:3D:68:08:EB:0D" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "52:AB:CA:4D:AF:C1:3E:DC:88:BD:5B:C1:89:31:55:DD:99:E1:D5:DA:3A:36:F7:BB:57:8D:10:9B:99:39:C7:BA:93:71:65:03:B5:C2:E4:FA:29:79:AB:E7:64:A3:7D:6E:88:E4:29:CA:1B:F8:46:CA:8D:53:4D:D1:11:0B:FA:6C:7A:D1:80:11:F9:37:84:BB:38:C4:96:41:A7:84:EA:23:88:22:90:7A:27:CE:F8:E8:DA:94:30:FA:30:7A:46:AB:95:E2:0F:5D:E2:21:C0:28:57:DB:29:22:F1:1D:5F:D8:E9:A0:7E:2E:70:D7:65:70:6C:5F:DB:93:CC:A0:EE:F3:8A:1D:11:55:B4:54:B8:D3:AB:2C:42:58:10:7C:C1:6E:89:E0:E2:67:6A:48:9C:34:3C:60:56:43:91:BC:6E:26:A1:56:B3:03:C3:89:AE:D1:D4:02:31:A4:3E:A1:A5:69:35:18:BA:7F:37:57:2E:55:B4:74:16:2B:9C:62:C1:27:AC:D8:D6:C1:83:93:D5:73:F5:F7:99:1C:BC:FF:CC:FE:E5:EC:D6:0E:73:A7:E9:E6:7C:39:BC:F5:8B:34:A0:5A:47:7D:16:AB:5E:71:A3:3C:C8:36:8B:33:7C:82:AB:70:6F:A5:51:04:03:F5:29:1B:11:97:47:FD:D2:CC:CF:58" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:40:36" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.070) 0:00:12.527 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.048) 0:00:12.575 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.034) 0:00:12.610 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.046) 0:00:12.657 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.048) 0:00:12.705 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.046) 0:00:12.752 ******** ok: [/cache/rhel-9.qcow2.snap] => { "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.056540", "end": "2022-07-06 02:40:42.787589", "rc": 0, "start": "2022-07-06 02:40:42.731049" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.436) 0:00:13.188 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 06:40:42 +0000 (0:00:00.047) 0:00:13.236 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089636.0452816, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "076960eec155f7245f8f2c3b2a977e87c4ba9372", "ctime": 1657089636.0422816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742244, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089636.0422816, "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": "2940924198", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 06:40:43 +0000 (0:00:00.367) 0:00:13.603 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089636.0382817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657089636.0382817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742243, "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": 1657089636.0382817, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "771195125", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 06:40:43 +0000 (0:00:00.360) 0:00:13.964 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089636.0802817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657089636.0802817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742241, "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": 1657089636.0802817, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "2430115974", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 06:40:43 +0000 (0:00:00.368) 0:00:14.333 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 06:40:43 +0000 (0:00:00.033) 0:00:14.366 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 06:40:43 +0000 (0:00:00.035) 0:00:14.402 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006147", "end": "2022-07-06 02:40:44.376437", "rc": 0, "start": "2022-07-06 02:40:44.370290" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 06:40:44 +0000 (0:00:00.374) 0:00:14.777 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-9.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:40:44 +0000 (0:00:00.050) 0:00:14.827 ******** =============================================================================== Install the package, force upgrade -------------------------------------- 1.17s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 - fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.12s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Gathering Facts --------------------------------------------------------- 1.11s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.10s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 0.96s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.94s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Install certreader ------------------------------------------------------ 0.94s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.82s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:17 --------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.79s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.71s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.53s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.49s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.42s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Get the ansible_managed comment in pre/post-scripts --------------------- 0.37s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:66 --------------------- Get post-run file timestamp --------------------------------------------- 0.37s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:47 --------------------- Retrieve key file stats ------------------------------------------------- 0.37s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get certificate timestamp ----------------------------------------------- 0.37s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:39 --------------------- Get pre-run file timestamp ---------------------------------------------- 0.36s /tmp/tmppcorpegn/tests/certificate/tests_run_hooks.yml:43 ---------------------