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/tmpy2gf3dq8 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/tmpzvh1g0rm/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:25:44 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/fedora-36.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:25:45 +0000 (0:00:01.100) 0:00:01.114 ******** included: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/fedora-36.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:25:45 +0000 (0:00:00.027) 0:00:01.142 ******** ok: [/cache/fedora-36.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 23:25:46 +0000 (0:00:00.562) 0:00:01.705 ******** skipping: [/cache/fedora-36.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora_36.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_36.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora_36.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_36.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:25:46 +0000 (0:00:00.038) 0:00:01.743 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:25:48 +0000 (0:00:01.932) 0:00:03.676 ******** ok: [/cache/fedora-36.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/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:25:49 +0000 (0:00:01.731) 0:00:05.408 ******** ok: [/cache/fedora-36.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/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:25:50 +0000 (0:00:00.534) 0:00:05.942 ******** ok: [/cache/fedora-36.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/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:25:50 +0000 (0:00:00.432) 0:00:06.374 ******** ok: [/cache/fedora-36.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:17:45 UTC", "ActiveEnterTimestampMonotonic": "213660433", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "sysinit.target systemd-journald.socket basic.target dbus.socket network.target system.slice dbus-broker.service syslog.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:17:45 UTC", "AssertTimestampMonotonic": "213648024", "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": "50868009000", "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:17:45 UTC", "ConditionTimestampMonotonic": "213648022", "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": "6744", "ExecMainStartTimestamp": "Wed 2022-07-06 23:17:45 UTC", "ExecMainStartTimestampMonotonic": "213649397", "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 23:17:45 UTC", "InactiveExitTimestampMonotonic": "213649980", "InvocationID": "cb854aa806d149ff883eec765d1c0f42", "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": "15524", "LimitNPROCSoft": "15524", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15524", "LimitSIGPENDINGSoft": "15524", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "6744", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3477504", "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": "sysinit.target dbus.socket system.slice", "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 23:21:36 UTC", "StateChangeTimestampMonotonic": "444501790", "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": "4657", "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/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 23:25:51 +0000 (0:00:00.781) 0:00:07.156 ******** changed: [/cache/fedora-36.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-36.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:25:52 +0000 (0:00:01.310) 0:00:08.467 ******** ok: [/cache/fedora-36.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:25:53 +0000 (0:00:00.810) 0:00:09.277 ******** included: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-36.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/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:25:53 +0000 (0:00:00.047) 0:00:09.325 ******** ok: [/cache/fedora-36.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:25:53 +0000 (0:00:00.030) 0:00:09.356 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:25:55 +0000 (0:00:01.721) 0:00:11.077 ******** ok: [/cache/fedora-36.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/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:25:56 +0000 (0:00:01.146) 0:00:12.224 ******** ok: [/cache/fedora-36.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/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:25:57 +0000 (0:00:00.881) 0:00:13.105 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149952.2323923, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "c2454d747d6816f1b246c92079a213c0fe867e55", "ctime": 1657149952.2283924, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61122, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149952.2283924, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.540) 0:00:13.646 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.033) 0:00:13.680 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.047) 0:00:13.727 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.086) 0:00:13.813 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149952.1613922, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "f492862eb878bc0a7f564c5a677adbecce4e0156", "ctime": 1657149952.2283924, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61107, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149952.2283924, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.426) 0:00:14.240 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.033) 0:00:14.273 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:25:58 +0000 (0:00:00.071) 0:00:14.344 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.204229", "end": "2022-07-06 23:25:58.993793", "rc": 0, "start": "2022-07-06 23:25:58.789564" } 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": "93:C5:2B:59:E8:C8:2A:1B:F6:98:BD:67:A8:55:DD:D0:EB:0E:6C:53", "critical": false }, "authorityKeyIdentifier": { "value": "D9:69:C3:F9:77:BD:82:02:43:29:A8:70:BD:5C:3C:FA:BB:39:29:3B", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "32:A1:ED:78:80:5F:49:23:F2:58:BE:CB:C9:1D:7F:79:71:E8:E2:76:7F:B7:00:F9:E9:32:15:F9:30:82:9F:28:5D:83:ED:F5:76:91:76:6A:B4:D5:71:2E:98:24:FE:D6:42:84:63:10:20:34:E9:3F:F4:95:ED:4B:6C:C6:BA:2C:4F:C8:11:37:31:38:B3:6B:53:71:38:FB:EF:B0:78:E7:54:92:90:CE:67:38:B0:A5:7B:81:55:A6:CF:D4:4B:9C:55:F0:CE:A0:88:BC:71:EA:73:6F:B0:2E:C2:46:A0:06:08:42:58:06:30:D7:E3:B1:9B:F1:CF:8E:DB:D4:EC:D7:AC:29:ED:C7:07:75:E3:7B:F2:D1:93:2E:67:47:7A:0C:E0:24:36:03:D1:73:FB:62:CF:0A:2F:EC:27:78:C2:15:4D:8B:00:94:50:7E:EE:54:BF:AD:97:47:85:E6:76:50:9F:8D:CA:EC:A2:F6:2D:39:A2:54:EA:E5:95:0C:3C:EE:E6:4A:C4:16:0A:6D:84:85:18:0F:EA:D1:4C:DA:96:A5:28:6A:24:5B:69:11:B2:EE:F6:DC:5D:42:06:88:93:03:A9:D4:37:D2:84:6B:2F:32:F5:31:51:EA:CF:86:D8:97:FB:A8:D3:A2:17:08:F9:4F:A5:AB:00:2F:AC:18:4D:D9" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:17:45", "not_valid_before": "2022-07-06 23:25:52" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.706) 0:00:15.050 ******** ok: [/cache/fedora-36.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "D9:69:C3:F9:77:BD:82:02:43:29:A8:70:BD:5C:3C:FA:BB:39:29:3B" }, "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": "93:C5:2B:59:E8:C8:2A:1B:F6:98:BD:67:A8:55:DD:D0:EB:0E:6C:53" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "32:A1:ED:78:80:5F:49:23:F2:58:BE:CB:C9:1D:7F:79:71:E8:E2:76:7F:B7:00:F9:E9:32:15:F9:30:82:9F:28:5D:83:ED:F5:76:91:76:6A:B4:D5:71:2E:98:24:FE:D6:42:84:63:10:20:34:E9:3F:F4:95:ED:4B:6C:C6:BA:2C:4F:C8:11:37:31:38:B3:6B:53:71:38:FB:EF:B0:78:E7:54:92:90:CE:67:38:B0:A5:7B:81:55:A6:CF:D4:4B:9C:55:F0:CE:A0:88:BC:71:EA:73:6F:B0:2E:C2:46:A0:06:08:42:58:06:30:D7:E3:B1:9B:F1:CF:8E:DB:D4:EC:D7:AC:29:ED:C7:07:75:E3:7B:F2:D1:93:2E:67:47:7A:0C:E0:24:36:03:D1:73:FB:62:CF:0A:2F:EC:27:78:C2:15:4D:8B:00:94:50:7E:EE:54:BF:AD:97:47:85:E6:76:50:9F:8D:CA:EC:A2:F6:2D:39:A2:54:EA:E5:95:0C:3C:EE:E6:4A:C4:16:0A:6D:84:85:18:0F:EA:D1:4C:DA:96:A5:28:6A:24:5B:69:11:B2:EE:F6:DC:5D:42:06:88:93:03:A9:D4:37:D2:84:6B:2F:32:F5:31:51:EA:CF:86:D8:97:FB:A8:D3:A2:17:08:F9:4F:A5:AB:00:2F:AC:18:4D:D9" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:17:45", "not_valid_before": "2022-07-06 23:25:52" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.095) 0:00:15.145 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.045) 0:00:15.191 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.032) 0:00:15.223 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.045) 0:00:15.269 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.045) 0:00:15.314 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:25:59 +0000 (0:00:00.043) 0:00:15.358 ******** ok: [/cache/fedora-36.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.069413", "end": "2022-07-06 23:25:59.775406", "rc": 0, "start": "2022-07-06 23:25:59.705993" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:26:00 +0000 (0:00:00.469) 0:00:15.828 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:26:00 +0000 (0:00:00.044) 0:00:15.872 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149952.2323923, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "c2454d747d6816f1b246c92079a213c0fe867e55", "ctime": 1657149952.2283924, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61122, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149952.2283924, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:26:00 +0000 (0:00:00.390) 0:00:16.262 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149952.2243924, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657149952.2243924, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61119, "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": 1657149952.2243924, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:26:01 +0000 (0:00:00.392) 0:00:16.654 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149952.2673924, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657149952.2673924, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61130, "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": 1657149952.2673924, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:26:01 +0000 (0:00:00.399) 0:00:17.054 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:26:01 +0000 (0:00:00.034) 0:00:17.088 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:26:01 +0000 (0:00:00.033) 0:00:17.122 ******** changed: [/cache/fedora-36.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006325", "end": "2022-07-06 23:26:01.467415", "rc": 0, "start": "2022-07-06 23:26:01.461090" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:26:02 +0000 (0:00:00.398) 0:00:17.520 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-36.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:26:02 +0000 (0:00:00.051) 0:00:17.572 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.93s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.73s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.72s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.31s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.10s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:2 ---------------------------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:17 --------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.78s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.71s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.56s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.54s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve auto-renew flag ------------------------------------------------ 0.47s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.43s /tmp/tmpzvh1g0rm/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Retrieve key file stats ------------------------------------------------- 0.43s /tmp/tmpzvh1g0rm/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get post-run file timestamp --------------------------------------------- 0.40s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:47 --------------------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.40s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:66 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.39s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:43 --------------------------------- Get certificate timestamp ----------------------------------------------- 0.39s /tmp/tmpzvh1g0rm/tests/tests_run_hooks.yml:39 --------------------------------- 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/tmpy2gf3dq8 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/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:38:12 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/fedora-36.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:38:14 +0000 (0:00:02.094) 0:00:02.108 ******** included: /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/fedora-36.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:38:14 +0000 (0:00:00.027) 0:00:02.135 ******** ok: [/cache/fedora-36.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 23:38:15 +0000 (0:00:00.526) 0:00:02.662 ******** skipping: [/cache/fedora-36.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora_36.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_36.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-36.qcow2.snap] => (item=Fedora_36.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_36.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:38:15 +0000 (0:00:00.038) 0:00:02.700 ******** ok: [/cache/fedora-36.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/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:38:17 +0000 (0:00:01.909) 0:00:04.609 ******** ok: [/cache/fedora-36.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/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:38:19 +0000 (0:00:01.720) 0:00:06.330 ******** ok: [/cache/fedora-36.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/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:38:19 +0000 (0:00:00.528) 0:00:06.858 ******** ok: [/cache/fedora-36.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/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:38:20 +0000 (0:00:00.410) 0:00:07.268 ******** ok: [/cache/fedora-36.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:30:10 UTC", "ActiveEnterTimestampMonotonic": "204468724", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice dbus.socket sysinit.target basic.target network.target syslog.target dbus-broker.service systemd-journald.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:30:10 UTC", "AssertTimestampMonotonic": "204456677", "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": "48695971000", "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:30:10 UTC", "ConditionTimestampMonotonic": "204456676", "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": "6978", "ExecMainStartTimestamp": "Wed 2022-07-06 23:30:10 UTC", "ExecMainStartTimestampMonotonic": "204457888", "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 23:30:10 UTC", "InactiveExitTimestampMonotonic": "204458184", "InvocationID": "0603aa74b38f4c68ac63e20db89081ee", "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": "15524", "LimitNPROCSoft": "15524", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15524", "LimitSIGPENDINGSoft": "15524", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "6978", "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": "sysinit.target dbus.socket system.slice", "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 23:34:08 UTC", "StateChangeTimestampMonotonic": "442526482", "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": "4657", "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/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 23:38:20 +0000 (0:00:00.779) 0:00:08.048 ******** changed: [/cache/fedora-36.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-36.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:38:22 +0000 (0:00:01.282) 0:00:09.330 ******** ok: [/cache/fedora-36.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:38:22 +0000 (0:00:00.776) 0:00:10.107 ******** included: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-36.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/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:38:22 +0000 (0:00:00.038) 0:00:10.146 ******** ok: [/cache/fedora-36.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:38:22 +0000 (0:00:00.026) 0:00:10.173 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:38:24 +0000 (0:00:01.728) 0:00:11.901 ******** ok: [/cache/fedora-36.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/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:38:25 +0000 (0:00:01.134) 0:00:13.036 ******** ok: [/cache/fedora-36.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/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:38:26 +0000 (0:00:00.877) 0:00:13.913 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150701.4553704, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b6f0029861656c438bacee33d68e01a32ed901cb", "ctime": 1657150701.4513705, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61122, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150701.4513705, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.513) 0:00:14.426 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.032) 0:00:14.459 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.047) 0:00:14.507 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.042) 0:00:14.549 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150701.3873703, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d68c0bac8e2de8ea213f56e5df0b78233aff3c6c", "ctime": 1657150701.4513705, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61107, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150701.4513705, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.393) 0:00:14.943 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.037) 0:00:14.980 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:38:27 +0000 (0:00:00.048) 0:00:15.029 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.205671", "end": "2022-07-06 23:38:28.044878", "rc": 0, "start": "2022-07-06 23:38:27.839207" } 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": "B1:2A:C0:68:55:E6:F2:19:44:DE:79:DB:E5:7C:F7:14:19:B4:F3:55", "critical": false }, "authorityKeyIdentifier": { "value": "5E:52:CD:04:1D:A6:B4:4F:6D:84:D8:82:A2:63:74:23:0B:B0:BF:FB", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "42:B7:D4:B8:AB:3D:D7:8C:33:9A:98:D5:58:B1:8C:B2:53:3B:43:6F:24:0C:1A:3D:05:1A:28:87:C4:91:76:7E:24:D4:2A:0C:BC:86:D7:4B:CC:B3:FA:8B:D2:D8:2A:D7:62:3B:92:3B:7C:90:2A:88:AD:64:0E:89:F1:6E:97:8F:24:2A:CF:A6:A0:F1:94:70:5D:17:61:CA:53:53:A2:B4:0A:4B:E2:80:18:AF:A9:07:AA:96:8A:80:79:78:0D:BE:67:8B:CF:DD:29:67:59:DF:66:6C:BB:7E:01:9C:A1:EB:51:5B:7C:53:E1:39:E8:3D:23:54:69:AD:31:CE:45:F4:58:8C:8C:2A:1A:69:34:1F:54:53:6B:15:4E:0D:3A:DC:2C:E2:EC:0F:C9:97:FD:28:FE:4D:D2:6F:47:81:50:48:63:1F:CD:71:22:58:1A:93:85:54:D7:CA:9B:EA:61:44:65:80:45:0A:CC:E6:B9:DA:ED:1C:DD:BB:87:60:B6:D9:9A:F6:9D:8D:0B:7D:65:ED:E5:E7:CB:4F:F7:07:4F:6C:59:CD:DF:9C:F2:2E:E4:76:0C:23:5A:AE:5F:D4:95:ED:AB:2F:45:43:7B:0C:3D:32:AD:3D:12:AF:69:C5:A8:2F:8D:0B:48:19:26:D3:7D:AC:9E:3A:E0:40:3C:0F:D4:06" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:30:12", "not_valid_before": "2022-07-06 23:38:21" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.696) 0:00:15.725 ******** ok: [/cache/fedora-36.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5E:52:CD:04:1D:A6:B4:4F:6D:84:D8:82:A2:63:74:23:0B:B0:BF:FB" }, "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": "B1:2A:C0:68:55:E6:F2:19:44:DE:79:DB:E5:7C:F7:14:19:B4:F3:55" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "42:B7:D4:B8:AB:3D:D7:8C:33:9A:98:D5:58:B1:8C:B2:53:3B:43:6F:24:0C:1A:3D:05:1A:28:87:C4:91:76:7E:24:D4:2A:0C:BC:86:D7:4B:CC:B3:FA:8B:D2:D8:2A:D7:62:3B:92:3B:7C:90:2A:88:AD:64:0E:89:F1:6E:97:8F:24:2A:CF:A6:A0:F1:94:70:5D:17:61:CA:53:53:A2:B4:0A:4B:E2:80:18:AF:A9:07:AA:96:8A:80:79:78:0D:BE:67:8B:CF:DD:29:67:59:DF:66:6C:BB:7E:01:9C:A1:EB:51:5B:7C:53:E1:39:E8:3D:23:54:69:AD:31:CE:45:F4:58:8C:8C:2A:1A:69:34:1F:54:53:6B:15:4E:0D:3A:DC:2C:E2:EC:0F:C9:97:FD:28:FE:4D:D2:6F:47:81:50:48:63:1F:CD:71:22:58:1A:93:85:54:D7:CA:9B:EA:61:44:65:80:45:0A:CC:E6:B9:DA:ED:1C:DD:BB:87:60:B6:D9:9A:F6:9D:8D:0B:7D:65:ED:E5:E7:CB:4F:F7:07:4F:6C:59:CD:DF:9C:F2:2E:E4:76:0C:23:5A:AE:5F:D4:95:ED:AB:2F:45:43:7B:0C:3D:32:AD:3D:12:AF:69:C5:A8:2F:8D:0B:48:19:26:D3:7D:AC:9E:3A:E0:40:3C:0F:D4:06" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:30:12", "not_valid_before": "2022-07-06 23:38:21" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.041) 0:00:15.767 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.042) 0:00:15.809 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.029) 0:00:15.839 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.041) 0:00:15.880 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.040) 0:00:15.921 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:38:28 +0000 (0:00:00.040) 0:00:15.962 ******** ok: [/cache/fedora-36.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.064843", "end": "2022-07-06 23:38:28.727917", "rc": 0, "start": "2022-07-06 23:38:28.663074" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:38:29 +0000 (0:00:00.444) 0:00:16.406 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:38:29 +0000 (0:00:00.043) 0:00:16.450 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150701.4553704, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b6f0029861656c438bacee33d68e01a32ed901cb", "ctime": 1657150701.4513705, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61122, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150701.4513705, "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": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:38:29 +0000 (0:00:00.388) 0:00:16.838 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150701.4473705, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150701.4473705, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61119, "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": 1657150701.4473705, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.379) 0:00:17.218 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150701.4893703, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150701.4893703, "dev": 31, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 61130, "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": 1657150701.4893703, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "74", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.377) 0:00:17.596 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.031) 0:00:17.627 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.031) 0:00:17.658 ******** changed: [/cache/fedora-36.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006497", "end": "2022-07-06 23:38:30.369998", "rc": 0, "start": "2022-07-06 23:38:30.363501" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.387) 0:00:18.046 ******** ok: [/cache/fedora-36.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-36.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.049) 0:00:18.095 ******** =============================================================================== Gathering Facts --------------------------------------------------------- 2.09s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.91s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 1.73s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.72s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.28s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.13s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.88s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:18 - fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.78s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.78s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:17 --------------------- Parse certificate ------------------------------------------------------- 0.70s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.53s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.41s /tmp/tmpy2gf3dq8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Retrieve key file stats ------------------------------------------------- 0.39s /tmp/tmpyv0bgwd0/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get certificate timestamp ----------------------------------------------- 0.39s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:39 --------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.39s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:66 --------------------- Get pre-run file timestamp ---------------------------------------------- 0.38s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:43 --------------------- Get post-run file timestamp --------------------------------------------- 0.38s /tmp/tmpyv0bgwd0/tests/certificate/tests_run_hooks.yml:47 ---------------------