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/tmptdk3_2m8 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/tmpoydf_gbg/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:27:11 +0000 (0:00:00.012) 0:00:00.012 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:27:12 +0000 (0:00:01.135) 0:00:01.147 ******** included: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/fedora-35.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:27:12 +0000 (0:00:00.029) 0:00:01.177 ******** ok: [/cache/fedora-35.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 23:27:13 +0000 (0:00:00.564) 0:00:01.741 ******** skipping: [/cache/fedora-35.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:27:13 +0000 (0:00:00.041) 0:00:01.782 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:27:15 +0000 (0:00:02.016) 0:00:03.799 ******** ok: [/cache/fedora-35.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/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:27:17 +0000 (0:00:01.838) 0:00:05.637 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:27:17 +0000 (0:00:00.541) 0:00:06.179 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:27:18 +0000 (0:00:00.408) 0:00:06.587 ******** ok: [/cache/fedora-35.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 23:19:06 UTC", "ActiveEnterTimestampMonotonic": "209043931", "ActiveExitTimestamp": "n/a", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket syslog.target dbus.socket sysinit.target basic.target network.target dbus-broker.service system.slice", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:19:06 UTC", "AssertTimestampMonotonic": "209030007", "Before": "multi-user.target shutdown.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": "40287500000", "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 23:19:06 UTC", "ConditionTimestampMonotonic": "209030006", "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", "ExecMainExitTimestamp": "n/a", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "16686", "ExecMainStartTimestamp": "Wed 2022-07-06 23:19:06 UTC", "ExecMainStartTimestampMonotonic": "209031487", "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 }", "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", "InactiveEnterTimestamp": "n/a", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 23:19:06 UTC", "InactiveExitTimestampMonotonic": "209031810", "InvocationID": "8677e115309340cdb638ea61a9a207e7", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "8388608", "LimitMEMLOCKSoft": "8388608", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "15523", "LimitNPROCSoft": "15523", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15523", "LimitSIGPENDINGSoft": "15523", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "16686", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3280896", "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", "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 23:22:58 UTC", "StateChangeTimestampMonotonic": "440655177", "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": "4656", "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", "WatchdogTimestamp": "n/a", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 23:27:19 +0000 (0:00:00.808) 0:00:07.396 ******** changed: [/cache/fedora-35.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/fedora-35.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:27:20 +0000 (0:00:01.031) 0:00:08.428 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:27:21 +0000 (0:00:00.775) 0:00:09.203 ******** included: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:27:21 +0000 (0:00:00.042) 0:00:09.246 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:27:21 +0000 (0:00:00.027) 0:00:09.274 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:27:22 +0000 (0:00:01.845) 0:00:11.119 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:27:24 +0000 (0:00:01.130) 0:00:12.250 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:27:24 +0000 (0:00:00.899) 0:00:13.149 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150039.3879805, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "266ce3bd1c7f8036402340ca7e2e03bee35b436c", "ctime": 1657150039.3839803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60401, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150039.3839803, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:27:25 +0000 (0:00:00.523) 0:00:13.673 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:27:25 +0000 (0:00:00.058) 0:00:13.731 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:27:25 +0000 (0:00:00.048) 0:00:13.780 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:27:25 +0000 (0:00:00.076) 0:00:13.857 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150039.3309803, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "f5fbf6aa527b699bde0f649c3110ffdae6e39e46", "ctime": 1657150039.3839803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60386, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150039.3839803, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.417) 0:00:14.275 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.082) 0:00:14.358 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.052) 0:00:14.410 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.201715", "end": "2022-07-06 23:27:26.240867", "rc": 0, "start": "2022-07-06 23:27:26.039152" } 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": "76:39:81:75:7C:E8:1C:6F:AA:4B:1F:91:3A:60:FF:EB:71:54:9C:26", "critical": false }, "authorityKeyIdentifier": { "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "64:68:47:18:AB:2D:95:19:DC:AE:F7:B3:73:BB:0C:3D:05:26:BF:58:39:4E:11:94:30:FE:B4:0D:2B:E5:AA:A9:E1:8E:B8:43:D9:E1:52:6A:D8:3E:5A:F6:68:AF:F7:13:27:B6:B2:BA:0C:43:60:45:DA:6B:C5:CC:A6:A8:A7:1C:7E:F9:4D:77:C9:B9:44:AA:75:BB:1D:D5:E4:EB:D4:9A:BD:94:00:8C:21:71:FF:6D:F3:08:07:47:46:5B:B8:7C:30:97:46:03:35:DF:79:B1:6A:7B:BE:0C:BF:1F:0E:3A:A8:66:C3:0A:27:AE:05:86:9E:AD:70:64:1D:98:54:D9:8D:76:EC:E3:D7:62:DB:86:94:2B:0A:F3:65:E4:3F:42:BC:A0:4E:2E:30:93:90:EF:1C:40:2F:D2:3C:DA:6A:07:EC:F9:C3:AE:E1:A9:CA:F6:37:09:0C:37:8F:A5:5F:18:E6:54:8D:94:29:AB:01:E0:D5:DC:EF:2A:71:87:AF:2C:5A:1F:36:FB:6F:59:35:6E:58:80:30:B6:0E:AC:47:70:33:92:42:34:B4:EF:79:97:3C:C9:1B:13:DF:F9:E0:13:1E:E2:26:99:6B:81:D5:16:70:0A:A9:A1:23:B9:A8:47:59:14:3C:F2:A9:5F:41:CA:90:64:89:78:D0:A0:33:79" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:27:19" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.679) 0:00:15.090 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E" }, "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": "76:39:81:75:7C:E8:1C:6F:AA:4B:1F:91:3A:60:FF:EB:71:54:9C:26" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "64:68:47:18:AB:2D:95:19:DC:AE:F7:B3:73:BB:0C:3D:05:26:BF:58:39:4E:11:94:30:FE:B4:0D:2B:E5:AA:A9:E1:8E:B8:43:D9:E1:52:6A:D8:3E:5A:F6:68:AF:F7:13:27:B6:B2:BA:0C:43:60:45:DA:6B:C5:CC:A6:A8:A7:1C:7E:F9:4D:77:C9:B9:44:AA:75:BB:1D:D5:E4:EB:D4:9A:BD:94:00:8C:21:71:FF:6D:F3:08:07:47:46:5B:B8:7C:30:97:46:03:35:DF:79:B1:6A:7B:BE:0C:BF:1F:0E:3A:A8:66:C3:0A:27:AE:05:86:9E:AD:70:64:1D:98:54:D9:8D:76:EC:E3:D7:62:DB:86:94:2B:0A:F3:65:E4:3F:42:BC:A0:4E:2E:30:93:90:EF:1C:40:2F:D2:3C:DA:6A:07:EC:F9:C3:AE:E1:A9:CA:F6:37:09:0C:37:8F:A5:5F:18:E6:54:8D:94:29:AB:01:E0:D5:DC:EF:2A:71:87:AF:2C:5A:1F:36:FB:6F:59:35:6E:58:80:30:B6:0E:AC:47:70:33:92:42:34:B4:EF:79:97:3C:C9:1B:13:DF:F9:E0:13:1E:E2:26:99:6B:81:D5:16:70:0A:A9:A1:23:B9:A8:47:59:14:3C:F2:A9:5F:41:CA:90:64:89:78:D0:A0:33:79" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:27:19" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.044) 0:00:15.134 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:27:26 +0000 (0:00:00.047) 0:00:15.181 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.033) 0:00:15.214 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.043) 0:00:15.258 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.042) 0:00:15.301 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.046) 0:00:15.347 ******** ok: [/cache/fedora-35.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.062354", "end": "2022-07-06 23:27:26.962647", "rc": 0, "start": "2022-07-06 23:27:26.900293" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.460) 0:00:15.808 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:27:27 +0000 (0:00:00.045) 0:00:15.854 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150039.3879805, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "266ce3bd1c7f8036402340ca7e2e03bee35b436c", "ctime": 1657150039.3839803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60401, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150039.3839803, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:27:28 +0000 (0:00:00.390) 0:00:16.245 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150039.3809803, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150039.3809803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60398, "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": 1657150039.3809803, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:27:28 +0000 (0:00:00.380) 0:00:16.625 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150039.4209805, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150039.4209805, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60409, "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": 1657150039.4209805, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:27:28 +0000 (0:00:00.368) 0:00:16.993 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:27:28 +0000 (0:00:00.034) 0:00:17.028 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:27:28 +0000 (0:00:00.034) 0:00:17.062 ******** changed: [/cache/fedora-35.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005923", "end": "2022-07-06 23:27:28.605940", "rc": 0, "start": "2022-07-06 23:27:28.600017" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:27:29 +0000 (0:00:00.389) 0:00:17.451 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-35.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:27:29 +0000 (0:00:00.052) 0:00:17.504 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.02s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.85s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.84s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Gathering Facts --------------------------------------------------------- 1.14s /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:2 ---------------------------------- Install the package, force upgrade -------------------------------------- 1.13s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 ------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.03s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install certreader ------------------------------------------------------ 0.90s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 ------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.81s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Gathering Facts --------------------------------------------------------- 0.78s /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:17 --------------------------------- Parse certificate ------------------------------------------------------- 0.68s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.56s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.54s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve key file stats ------------------------------------------------- 0.42s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:55 ------------- linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.41s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Get certificate timestamp ----------------------------------------------- 0.39s /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:39 --------------------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.39s /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:66 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.38s /tmp/tmpoydf_gbg/tests/tests_run_hooks.yml:43 --------------------------------- Get post-run file timestamp --------------------------------------------- 0.37s /tmp/tmpoydf_gbg/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/tmptdk3_2m8 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/tmpswp52mgx/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:39:42 +0000 (0:00:00.015) 0:00:00.015 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:39:43 +0000 (0:00:01.093) 0:00:01.108 ******** included: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/fedora-35.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:39:43 +0000 (0:00:00.026) 0:00:01.135 ******** ok: [/cache/fedora-35.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 23:39:44 +0000 (0:00:00.795) 0:00:01.931 ******** skipping: [/cache/fedora-35.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:39:44 +0000 (0:00:00.040) 0:00:01.972 ******** ok: [/cache/fedora-35.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/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:39:46 +0000 (0:00:02.091) 0:00:04.063 ******** ok: [/cache/fedora-35.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/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:39:48 +0000 (0:00:01.905) 0:00:05.969 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:39:48 +0000 (0:00:00.539) 0:00:06.509 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:39:49 +0000 (0:00:00.426) 0:00:06.936 ******** ok: [/cache/fedora-35.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 23:31:35 UTC", "ActiveEnterTimestampMonotonic": "204425251", "ActiveExitTimestamp": "n/a", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus-broker.service system.slice basic.target systemd-journald.socket dbus.socket network.target syslog.target sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:31:35 UTC", "AssertTimestampMonotonic": "204413518", "Before": "multi-user.target shutdown.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": "40721799000", "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 23:31:35 UTC", "ConditionTimestampMonotonic": "204413516", "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", "ExecMainExitTimestamp": "n/a", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "16664", "ExecMainStartTimestamp": "Wed 2022-07-06 23:31:35 UTC", "ExecMainStartTimestampMonotonic": "204414889", "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 }", "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", "InactiveEnterTimestamp": "n/a", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 23:31:35 UTC", "InactiveExitTimestampMonotonic": "204415310", "InvocationID": "b6c03241252443a3b030f2fc85b5c108", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "8388608", "LimitMEMLOCKSoft": "8388608", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "15523", "LimitNPROCSoft": "15523", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15523", "LimitSIGPENDINGSoft": "15523", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "16664", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3190784", "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 sysinit.target system.slice", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "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 23:35:25 UTC", "StateChangeTimestampMonotonic": "433942226", "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": "4656", "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", "WatchdogTimestamp": "n/a", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 23:39:49 +0000 (0:00:00.817) 0:00:07.753 ******** changed: [/cache/fedora-35.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/fedora-35.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:39:51 +0000 (0:00:01.049) 0:00:08.802 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:39:51 +0000 (0:00:00.809) 0:00:09.611 ******** included: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:39:51 +0000 (0:00:00.040) 0:00:09.652 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:39:51 +0000 (0:00:00.028) 0:00:09.680 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:39:53 +0000 (0:00:01.897) 0:00:11.578 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:39:54 +0000 (0:00:01.123) 0:00:12.701 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:39:55 +0000 (0:00:00.905) 0:00:13.607 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150789.8646905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4d025892d61d4aac7ea45e9ae6643979197b2130", "ctime": 1657150789.8606906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60398, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150789.8606906, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:39:56 +0000 (0:00:00.529) 0:00:14.136 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:39:56 +0000 (0:00:00.034) 0:00:14.171 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:39:56 +0000 (0:00:00.076) 0:00:14.247 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:39:56 +0000 (0:00:00.086) 0:00:14.334 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150789.8036907, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "384ed093a63c09b03513088e691b85eed30efe67", "ctime": 1657150789.8606906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60383, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150789.8606906, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:39:56 +0000 (0:00:00.407) 0:00:14.742 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.061) 0:00:14.803 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.080) 0:00:14.884 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.210999", "end": "2022-07-06 23:39:56.894720", "rc": 0, "start": "2022-07-06 23:39:56.683721" } 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": "8B:81:0A:D6:BF:A9:44:BE:5A:76:9B:33:9B:2A:49:ED:DB:D1:05:61", "critical": false }, "authorityKeyIdentifier": { "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "75:7A:76:28:85:65:BA:4D:68:EB:1E:1B:C1:51:F7:9B:D2:F8:BC:EC:20:3B:3F:D9:7B:95:43:96:24:77:77:56:69:83:A6:A1:36:DC:17:06:2D:51:DC:E4:42:12:45:7D:1F:44:4F:90:6E:63:1C:7D:63:1B:73:A7:5B:61:C6:89:EA:A8:47:A6:16:E5:14:8D:A3:E3:6D:D4:B3:B7:20:67:77:69:22:30:61:9E:3A:82:AE:A1:5E:88:97:10:E2:78:89:33:3F:D4:CF:81:56:09:13:4D:14:91:A4:40:F7:15:BD:29:B5:88:82:66:09:F9:BF:2D:F3:F0:5E:A7:C9:64:FE:47:7C:44:BD:4E:8F:AC:EB:F9:9C:EF:40:1D:83:34:A9:53:DF:C2:6F:4A:64:C1:9F:0E:A3:0B:70:5E:16:14:8F:C5:04:67:F7:D0:BD:B6:59:0F:28:0D:05:9D:22:2A:2D:B1:D6:54:1B:87:47:A0:53:67:19:69:18:35:5A:5D:AC:07:98:E3:36:E9:A5:B0:D3:2D:BE:76:2E:93:0A:3F:AA:7D:5A:74:B3:D6:A3:F5:C2:C7:A8:7A:BB:4B:11:8C:0C:D4:B9:D3:55:A2:00:44:A6:C4:7E:9A:5D:70:50:5B:0A:65:8C:BF:14:E6:31:D9:37:58:C9:01:4F:F6:B0:BB" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:39:49" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.742) 0:00:15.626 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F" }, "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": "8B:81:0A:D6:BF:A9:44:BE:5A:76:9B:33:9B:2A:49:ED:DB:D1:05:61" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "75:7A:76:28:85:65:BA:4D:68:EB:1E:1B:C1:51:F7:9B:D2:F8:BC:EC:20:3B:3F:D9:7B:95:43:96:24:77:77:56:69:83:A6:A1:36:DC:17:06:2D:51:DC:E4:42:12:45:7D:1F:44:4F:90:6E:63:1C:7D:63:1B:73:A7:5B:61:C6:89:EA:A8:47:A6:16:E5:14:8D:A3:E3:6D:D4:B3:B7:20:67:77:69:22:30:61:9E:3A:82:AE:A1:5E:88:97:10:E2:78:89:33:3F:D4:CF:81:56:09:13:4D:14:91:A4:40:F7:15:BD:29:B5:88:82:66:09:F9:BF:2D:F3:F0:5E:A7:C9:64:FE:47:7C:44:BD:4E:8F:AC:EB:F9:9C:EF:40:1D:83:34:A9:53:DF:C2:6F:4A:64:C1:9F:0E:A3:0B:70:5E:16:14:8F:C5:04:67:F7:D0:BD:B6:59:0F:28:0D:05:9D:22:2A:2D:B1:D6:54:1B:87:47:A0:53:67:19:69:18:35:5A:5D:AC:07:98:E3:36:E9:A5:B0:D3:2D:BE:76:2E:93:0A:3F:AA:7D:5A:74:B3:D6:A3:F5:C2:C7:A8:7A:BB:4B:11:8C:0C:D4:B9:D3:55:A2:00:44:A6:C4:7E:9A:5D:70:50:5B:0A:65:8C:BF:14:E6:31:D9:37:58:C9:01:4F:F6:B0:BB" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:39:49" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.043) 0:00:15.670 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.046) 0:00:15.716 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.034) 0:00:15.751 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.042) 0:00:15.793 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.040) 0:00:15.834 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.043) 0:00:15.877 ******** ok: [/cache/fedora-35.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.064543", "end": "2022-07-06 23:39:57.607697", "rc": 0, "start": "2022-07-06 23:39:57.543154" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.461) 0:00:16.338 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.046) 0:00:16.385 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150789.8646905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4d025892d61d4aac7ea45e9ae6643979197b2130", "ctime": 1657150789.8606906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60398, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150789.8606906, "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": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.406) 0:00:16.792 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150789.8576906, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150789.8576906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60395, "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": 1657150789.8576906, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.415) 0:00:17.207 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150789.8976905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150789.8976905, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60406, "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": 1657150789.8976905, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "73", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.388) 0:00:17.595 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.033) 0:00:17.629 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.032) 0:00:17.661 ******** changed: [/cache/fedora-35.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.007424", "end": "2022-07-06 23:39:59.327717", "rc": 0, "start": "2022-07-06 23:39:59.320293" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:40:00 +0000 (0:00:00.394) 0:00:18.056 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-35.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:40:00 +0000 (0:00:00.052) 0:00:18.109 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.09s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.91s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.90s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install the package, force upgrade -------------------------------------- 1.12s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.09s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.05s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install certreader ------------------------------------------------------ 0.91s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 - fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.82s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:17 --------------------- fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.80s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Parse certificate ------------------------------------------------------- 0.74s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.54s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.53s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.43s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Get pre-run file timestamp ---------------------------------------------- 0.42s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:43 --------------------- Retrieve key file stats ------------------------------------------------- 0.41s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get certificate timestamp ----------------------------------------------- 0.41s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:39 --------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.40s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:66 --------------------- Get post-run file timestamp --------------------------------------------- 0.39s /tmp/tmpswp52mgx/tests/certificate/tests_run_hooks.yml:47 ---------------------