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/tmpch7qdmnu 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: centos-8_setup.yml *************************************************** 1 plays in /cache/centos-8_setup.yml PLAY [Enable HA repos] ********************************************************* META: ran handlers TASK [Enable HA repos] ********************************************************* task path: /cache/centos-8_setup.yml:5 Wednesday 06 July 2022 04:52:22 +0000 (0:00:00.022) 0:00:00.022 ******** changed: [/cache/centos-8.qcow2] => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "cmd": [ "dnf", "config-manager", "--set-enabled", "ha" ], "delta": "0:00:00.193928", "end": "2022-07-06 04:52:22.268176", "rc": 0, "start": "2022-07-06 04:52:22.074248" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 04:52:23 +0000 (0:00:00.773) 0:00:00.795 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.77s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 04:52:23 +0000 (0:00:00.023) 0:00:00.819 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:52:24 +0000 (0:00:01.025) 0:00:01.844 ******** included: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/centos-8.qcow2 TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:52:24 +0000 (0:00:00.026) 0:00:01.871 ******** ok: [/cache/centos-8.qcow2] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 04:52:24 +0000 (0:00:00.494) 0:00:02.365 ******** skipping: [/cache/centos-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:52:24 +0000 (0:00:00.041) 0:00:02.407 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:52:27 +0000 (0:00:02.179) 0:00:04.587 ******** ok: [/cache/centos-8.qcow2] => (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/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:52:28 +0000 (0:00:01.843) 0:00:06.431 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:52:29 +0000 (0:00:00.508) 0:00:06.940 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:52:29 +0000 (0:00:00.379) 0:00:07.319 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ActiveEnterTimestampMonotonic": "276633786", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "sysinit.target syslog.target systemd-journald.socket network.target basic.target system.slice dbus.service dbus.socket", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 04:44:15 UTC", "AssertTimestampMonotonic": "276623232", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "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", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ConditionTimestampMonotonic": "276623232", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "24015", "ExecMainStartTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ExecMainStartTimestampMonotonic": "276624121", "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 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 04:44:15 UTC", "InactiveExitTimestampMonotonic": "276624167", "InvocationID": "3de97fcbf89741f9816de82898a648f3", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14647", "LimitNPROCSoft": "14647", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14647", "LimitSIGPENDINGSoft": "14647", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "24015", "MemoryAccounting": "yes", "MemoryCurrent": "4513792", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "dbus.socket system.slice sysinit.target", "Restart": "no", "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", "StandardInputData": "", "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 04:44:15 UTC", "StateChangeTimestampMonotonic": "276633786", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23435", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 04:44:15 UTC", "WatchdogTimestampMonotonic": "276633785", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 04:52:30 +0000 (0:00:00.829) 0:00:08.149 ******** changed: [/cache/centos-8.qcow2] => (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/centos-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 04:52:31 +0000 (0:00:01.029) 0:00:09.179 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 04:52:32 +0000 (0:00:00.769) 0:00:09.948 ******** included: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (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/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:52:32 +0000 (0:00:00.040) 0:00:09.989 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:52:32 +0000 (0:00:00.029) 0:00:10.018 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:52:34 +0000 (0:00:01.820) 0:00:11.838 ******** ok: [/cache/centos-8.qcow2] => { "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:52:35 +0000 (0:00:01.166) 0:00:13.004 ******** ok: [/cache/centos-8.qcow2] => { "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:52:36 +0000 (0:00:00.951) 0:00:13.956 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083150.4660878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a21d4b83f970d12a01e561dff1c2a84ef8e63c80", "ctime": 1657083150.4630878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494234, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083150.4630878, "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": "3042401865", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:52:36 +0000 (0:00:00.503) 0:00:14.459 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:52:36 +0000 (0:00:00.073) 0:00:14.532 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:52:36 +0000 (0:00:00.047) 0:00:14.579 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:52:37 +0000 (0:00:00.045) 0:00:14.625 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083150.4100878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a978b062cf95da6a4af1629e6de237aa6638fb9f", "ctime": 1657083150.4630878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494229, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083150.4630878, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "4190307407", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:52:37 +0000 (0:00:00.369) 0:00:14.995 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:52:37 +0000 (0:00:00.062) 0:00:15.057 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:52:37 +0000 (0:00:00.074) 0:00:15.131 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.226024", "end": "2022-07-06 04:52:37.216268", "rc": 0, "start": "2022-07-06 04:52:36.990244" } 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": "1C:62:9F:63:6F:66:7C:E6:99:26:E0:CF:59:F8:D9:E0:55:7C:67:52", "critical": false }, "authorityKeyIdentifier": { "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "65:FD:97:CC:AA:B0:C1:5E:C2:46:4E:04:26:06:67:17:50:A7:0D:F4:0A:AD:36:84:E7:9A:8E:DD:AA:7C:3B:C4:DE:8A:E6:B4:C1:E9:8F:B4:F7:2D:6C:EB:E5:9D:13:7E:D9:76:BA:4B:23:81:27:87:49:B0:EA:F6:D4:56:76:C5:CA:C8:76:B9:4D:26:99:0E:F6:37:C0:43:5F:76:BE:BD:2E:0A:76:2A:E6:8D:26:01:0D:A8:46:ED:7F:EC:3E:85:56:FA:36:56:5D:C8:B1:B1:9D:9D:21:39:AB:1A:F4:2A:27:6F:C3:DC:CB:E1:53:F3:A6:A2:2A:87:85:66:B1:60:4A:8E:E4:C3:02:F5:D8:5F:43:9D:3A:A7:9B:BE:8D:A7:DF:57:A2:C5:55:51:85:31:E1:61:D0:FA:55:68:EE:BD:14:91:3B:0C:F2:6B:5A:67:34:73:0F:DB:80:3D:FB:F5:E3:BC:FB:3C:4B:C3:79:CC:73:6C:C5:60:26:DD:43:CF:0B:AB:11:1F:5E:38:1D:7E:1A:CA:25:45:D0:4E:63:28:50:FC:1C:38:5E:C0:F7:37:91:EC:71:A2:AA:7A:60:5A:9E:4B:88:FD:C0:B0:10:3E:7F:44:1A:B3:06:E6:F7:A9:78:8D:2A:D1:11:87:98:6B:8F:AE:BF:C2:E2:24:36:C7" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:52:30" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.608) 0:00:15.739 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD" }, "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": "1C:62:9F:63:6F:66:7C:E6:99:26:E0:CF:59:F8:D9:E0:55:7C:67:52" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "65:FD:97:CC:AA:B0:C1:5E:C2:46:4E:04:26:06:67:17:50:A7:0D:F4:0A:AD:36:84:E7:9A:8E:DD:AA:7C:3B:C4:DE:8A:E6:B4:C1:E9:8F:B4:F7:2D:6C:EB:E5:9D:13:7E:D9:76:BA:4B:23:81:27:87:49:B0:EA:F6:D4:56:76:C5:CA:C8:76:B9:4D:26:99:0E:F6:37:C0:43:5F:76:BE:BD:2E:0A:76:2A:E6:8D:26:01:0D:A8:46:ED:7F:EC:3E:85:56:FA:36:56:5D:C8:B1:B1:9D:9D:21:39:AB:1A:F4:2A:27:6F:C3:DC:CB:E1:53:F3:A6:A2:2A:87:85:66:B1:60:4A:8E:E4:C3:02:F5:D8:5F:43:9D:3A:A7:9B:BE:8D:A7:DF:57:A2:C5:55:51:85:31:E1:61:D0:FA:55:68:EE:BD:14:91:3B:0C:F2:6B:5A:67:34:73:0F:DB:80:3D:FB:F5:E3:BC:FB:3C:4B:C3:79:CC:73:6C:C5:60:26:DD:43:CF:0B:AB:11:1F:5E:38:1D:7E:1A:CA:25:45:D0:4E:63:28:50:FC:1C:38:5E:C0:F7:37:91:EC:71:A2:AA:7A:60:5A:9E:4B:88:FD:C0:B0:10:3E:7F:44:1A:B3:06:E6:F7:A9:78:8D:2A:D1:11:87:98:6B:8F:AE:BF:C2:E2:24:36:C7" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:52:30" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.044) 0:00:15.784 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.046) 0:00:15.830 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.032) 0:00:15.862 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.042) 0:00:15.905 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.048) 0:00:15.954 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.049) 0:00:16.003 ******** ok: [/cache/centos-8.qcow2] => { "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.077293", "end": "2022-07-06 04:52:37.909961", "rc": 0, "start": "2022-07-06 04:52:37.832668" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.426) 0:00:16.430 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 04:52:38 +0000 (0:00:00.042) 0:00:16.472 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083150.4660878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a21d4b83f970d12a01e561dff1c2a84ef8e63c80", "ctime": 1657083150.4630878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494234, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083150.4630878, "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": "3042401865", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 04:52:39 +0000 (0:00:00.359) 0:00:16.832 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083150.4600878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657083150.4600878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494232, "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": 1657083150.4600878, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "347922512", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 04:52:39 +0000 (0:00:00.359) 0:00:17.191 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083150.5000877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657083150.5000877, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494235, "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": 1657083150.5000877, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1097562760", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 04:52:39 +0000 (0:00:00.375) 0:00:17.567 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 04:52:40 +0000 (0:00:00.031) 0:00:17.598 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 04:52:40 +0000 (0:00:00.034) 0:00:17.633 ******** changed: [/cache/centos-8.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005356", "end": "2022-07-06 04:52:39.483325", "rc": 0, "start": "2022-07-06 04:52:39.477969" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 04:52:40 +0000 (0:00:00.374) 0:00:18.007 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=39 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:52:40 +0000 (0:00:00.051) 0:00:18.059 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.18s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.84s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.82s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install the package, force upgrade -------------------------------------- 1.17s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.03s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Gathering Facts --------------------------------------------------------- 1.03s /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:2 ---------------------------------- Install certreader ------------------------------------------------------ 0.95s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.83s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Enable HA repos --------------------------------------------------------- 0.77s /cache/centos-8_setup.yml:5 --------------------------------------------------- Gathering Facts --------------------------------------------------------- 0.77s /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:17 --------------------------------- Parse certificate ------------------------------------------------------- 0.61s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.51s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.49s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.43s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.38s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Get post-run file timestamp --------------------------------------------- 0.38s /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:47 --------------------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.37s /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:66 --------------------------------- Retrieve key file stats ------------------------------------------------- 0.37s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get pre-run file timestamp ---------------------------------------------- 0.36s /tmp/tmphw7p6t3p/tests/tests_run_hooks.yml:43 --------------------------------- 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/tmpch7qdmnu 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: centos-8_setup.yml *************************************************** 1 plays in /cache/centos-8_setup.yml PLAY [Enable HA repos] ********************************************************* META: ran handlers TASK [Enable HA repos] ********************************************************* task path: /cache/centos-8_setup.yml:5 Wednesday 06 July 2022 05:05:55 +0000 (0:00:00.019) 0:00:00.019 ******** changed: [/cache/centos-8.qcow2] => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "cmd": [ "dnf", "config-manager", "--set-enabled", "ha" ], "delta": "0:00:00.212382", "end": "2022-07-06 05:05:55.464616", "rc": 0, "start": "2022-07-06 05:05:55.252234" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 05:05:56 +0000 (0:00:00.797) 0:00:00.817 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.80s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 05:05:56 +0000 (0:00:00.027) 0:00:00.844 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 05:05:57 +0000 (0:00:01.035) 0:00:01.880 ******** included: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/centos-8.qcow2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 05:05:57 +0000 (0:00:00.030) 0:00:01.911 ******** ok: [/cache/centos-8.qcow2] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 05:05:57 +0000 (0:00:00.512) 0:00:02.424 ******** skipping: [/cache/centos-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 05:05:57 +0000 (0:00:00.040) 0:00:02.465 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 05:06:00 +0000 (0:00:02.186) 0:00:04.651 ******** ok: [/cache/centos-8.qcow2] => (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/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 05:06:02 +0000 (0:00:01.886) 0:00:06.537 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 05:06:02 +0000 (0:00:00.565) 0:00:07.103 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 05:06:03 +0000 (0:00:00.397) 0:00:07.500 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ActiveEnterTimestampMonotonic": "255054911", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.service sysinit.target basic.target network.target dbus.socket system.slice systemd-journald.socket syslog.target", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 04:57:42 UTC", "AssertTimestampMonotonic": "255044022", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "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", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ConditionTimestampMonotonic": "255044022", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "24010", "ExecMainStartTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ExecMainStartTimestampMonotonic": "255045047", "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 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 04:57:42 UTC", "InactiveExitTimestampMonotonic": "255045090", "InvocationID": "87aa9c8e0e7049a4bbed02fba42c187d", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14647", "LimitNPROCSoft": "14647", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14647", "LimitSIGPENDINGSoft": "14647", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "24010", "MemoryAccounting": "yes", "MemoryCurrent": "4505600", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice sysinit.target dbus.socket", "Restart": "no", "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", "StandardInputData": "", "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 04:57:42 UTC", "StateChangeTimestampMonotonic": "255054911", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23435", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 04:57:42 UTC", "WatchdogTimestampMonotonic": "255054910", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 05:06:03 +0000 (0:00:00.815) 0:00:08.316 ******** changed: [/cache/centos-8.qcow2] => (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/centos-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 05:06:04 +0000 (0:00:01.041) 0:00:09.357 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 05:06:05 +0000 (0:00:00.816) 0:00:10.174 ******** included: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (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/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:06:05 +0000 (0:00:00.053) 0:00:10.227 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 05:06:05 +0000 (0:00:00.028) 0:00:10.255 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 05:06:07 +0000 (0:00:01.979) 0:00:12.235 ******** ok: [/cache/centos-8.qcow2] => { "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 05:06:08 +0000 (0:00:01.144) 0:00:13.379 ******** ok: [/cache/centos-8.qcow2] => { "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 05:06:09 +0000 (0:00:00.889) 0:00:14.269 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083963.840881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9d59e0764348c649778729dedd2ae56a33c7d493", "ctime": 1657083963.837881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539286, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083963.837881, "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": "1938446098", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.551) 0:00:14.820 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.032) 0:00:14.853 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.048) 0:00:14.901 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.043) 0:00:14.945 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083963.784881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "3edd0b7f9c1c9062c8bf3297cf90f9c0eb670b92", "ctime": 1657083963.837881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539283, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083963.837881, "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": "2839095585", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.385) 0:00:15.330 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.065) 0:00:15.396 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 05:06:10 +0000 (0:00:00.077) 0:00:15.473 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.240826", "end": "2022-07-06 05:06:10.744788", "rc": 0, "start": "2022-07-06 05:06:10.503962" } 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": "F0:55:4C:F7:31:9D:FA:FB:4E:CD:28:1A:97:06:DD:2F:DA:01:9D:36", "critical": false }, "authorityKeyIdentifier": { "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "50:40:29:C3:2B:7A:62:DD:81:2F:D4:97:4B:5D:8F:21:7B:91:9C:FB:A1:2D:38:EB:49:E5:2D:30:4F:3F:DF:F9:98:D4:DB:46:E2:C8:E7:C3:7A:00:78:39:C3:E8:20:BD:7E:86:3A:64:D7:04:EB:E8:A1:71:8C:B9:6D:E2:F4:37:1A:12:40:D4:F7:71:09:B4:A4:B0:3C:17:AD:18:D5:A6:18:3D:C5:6D:64:F5:96:3C:70:D9:AF:46:C2:5C:2C:5E:5D:2C:6D:46:36:4D:D2:4F:7B:E8:04:69:1D:E5:4D:32:5D:0F:5A:88:D1:54:C0:3F:CA:DC:FF:18:62:21:94:39:6A:D6:A3:EC:BC:AF:DE:95:02:72:E0:26:EE:57:8C:44:7A:BC:E0:08:AC:CA:73:54:BF:D0:F1:9C:27:94:3B:03:D1:F2:7D:A2:36:9F:D6:C7:C3:A4:29:21:B2:F8:2A:66:DF:BB:67:C0:22:8E:66:0D:C3:34:68:2B:5C:3C:BC:7B:E6:12:F2:FB:64:B4:71:4B:EE:E0:52:CB:90:08:D2:AF:AB:E0:88:7D:FB:71:D6:5C:44:F5:1F:4C:CF:03:B4:29:91:6C:0E:AE:4B:EB:C0:39:3A:89:E4:8F:48:BD:D2:31:08:34:4E:1F:9D:BE:48:94:C1:3A:C5:D0:09:3D:71:1D" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:06:03" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.624) 0:00:16.098 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC" }, "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": "F0:55:4C:F7:31:9D:FA:FB:4E:CD:28:1A:97:06:DD:2F:DA:01:9D:36" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "50:40:29:C3:2B:7A:62:DD:81:2F:D4:97:4B:5D:8F:21:7B:91:9C:FB:A1:2D:38:EB:49:E5:2D:30:4F:3F:DF:F9:98:D4:DB:46:E2:C8:E7:C3:7A:00:78:39:C3:E8:20:BD:7E:86:3A:64:D7:04:EB:E8:A1:71:8C:B9:6D:E2:F4:37:1A:12:40:D4:F7:71:09:B4:A4:B0:3C:17:AD:18:D5:A6:18:3D:C5:6D:64:F5:96:3C:70:D9:AF:46:C2:5C:2C:5E:5D:2C:6D:46:36:4D:D2:4F:7B:E8:04:69:1D:E5:4D:32:5D:0F:5A:88:D1:54:C0:3F:CA:DC:FF:18:62:21:94:39:6A:D6:A3:EC:BC:AF:DE:95:02:72:E0:26:EE:57:8C:44:7A:BC:E0:08:AC:CA:73:54:BF:D0:F1:9C:27:94:3B:03:D1:F2:7D:A2:36:9F:D6:C7:C3:A4:29:21:B2:F8:2A:66:DF:BB:67:C0:22:8E:66:0D:C3:34:68:2B:5C:3C:BC:7B:E6:12:F2:FB:64:B4:71:4B:EE:E0:52:CB:90:08:D2:AF:AB:E0:88:7D:FB:71:D6:5C:44:F5:1F:4C:CF:03:B4:29:91:6C:0E:AE:4B:EB:C0:39:3A:89:E4:8F:48:BD:D2:31:08:34:4E:1F:9D:BE:48:94:C1:3A:C5:D0:09:3D:71:1D" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:06:03" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.072) 0:00:16.170 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.080) 0:00:16.251 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.067) 0:00:16.319 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.073) 0:00:16.392 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 05:06:11 +0000 (0:00:00.043) 0:00:16.436 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 05:06:12 +0000 (0:00:00.043) 0:00:16.480 ******** ok: [/cache/centos-8.qcow2] => { "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.089910", "end": "2022-07-06 05:06:11.705146", "rc": 0, "start": "2022-07-06 05:06:11.615236" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 05:06:12 +0000 (0:00:00.576) 0:00:17.056 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 05:06:12 +0000 (0:00:00.044) 0:00:17.100 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083963.840881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9d59e0764348c649778729dedd2ae56a33c7d493", "ctime": 1657083963.837881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539286, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083963.837881, "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": "1938446098", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 05:06:12 +0000 (0:00:00.366) 0:00:17.466 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083963.834881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657083963.834881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539284, "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": 1657083963.834881, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "496510508", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 05:06:13 +0000 (0:00:00.374) 0:00:17.841 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083963.8748813, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657083963.8748813, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539287, "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": 1657083963.8748813, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "3397875213", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 05:06:13 +0000 (0:00:00.367) 0:00:18.209 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 05:06:13 +0000 (0:00:00.032) 0:00:18.242 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 05:06:13 +0000 (0:00:00.033) 0:00:18.276 ******** changed: [/cache/centos-8.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005501", "end": "2022-07-06 05:06:13.308042", "rc": 0, "start": "2022-07-06 05:06:13.302541" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 05:06:14 +0000 (0:00:00.377) 0:00:18.654 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=39 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 05:06:14 +0000 (0:00:00.051) 0:00:18.706 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.19s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 1.98s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.89s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Install the package, force upgrade -------------------------------------- 1.14s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.04s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Gathering Facts --------------------------------------------------------- 1.04s /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:2 ---------------------- Install certreader ------------------------------------------------------ 0.89s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.82s /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:17 --------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.82s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Enable HA repos --------------------------------------------------------- 0.80s /cache/centos-8_setup.yml:5 --------------------------------------------------- Parse certificate ------------------------------------------------------- 0.62s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Retrieve auto-renew flag ------------------------------------------------ 0.58s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.57s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.55s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:26 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.51s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.40s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Retrieve key file stats ------------------------------------------------- 0.39s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get the ansible_managed comment in pre/post-scripts --------------------- 0.38s /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:66 --------------------- Get pre-run file timestamp ---------------------------------------------- 0.37s /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:43 --------------------- Get post-run file timestamp --------------------------------------------- 0.37s /tmp/tmpap4wle35/tests/certificate/tests_run_hooks.yml:47 ---------------------