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:50:27 +0000 (0:00:00.018) 0:00:00.018 ******** 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.194452", "end": "2022-07-06 04:50:27.655642", "rc": 0, "start": "2022-07-06 04:50:27.461190" } 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:50:28 +0000 (0:00:00.791) 0:00:00.810 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.79s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_many_self_signed.yml ******************************************* 2 plays in /tmp/tmphw7p6t3p/tests/tests_many_self_signed.yml PLAY [Issue many self-signed certificates] ************************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_many_self_signed.yml:2 Wednesday 06 July 2022 04:50:28 +0000 (0:00:00.020) 0:00:00.831 ******** 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:50:29 +0000 (0:00:01.061) 0:00:01.893 ******** 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:50:29 +0000 (0:00:00.035) 0:00:01.928 ******** 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:50:30 +0000 (0:00:00.500) 0:00:02.428 ******** 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:50:30 +0000 (0:00:00.041) 0:00:02.470 ******** 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:50:32 +0000 (0:00:02.143) 0:00:04.614 ******** 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:50:34 +0000 (0:00:01.814) 0:00:06.428 ******** 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:50:34 +0000 (0:00:00.525) 0:00:06.954 ******** 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:50:35 +0000 (0:00:00.409) 0:00:07.363 ******** 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": "4022272", "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:50:35 +0000 (0:00:00.788) 0:00:08.152 ******** changed: [/cache/centos-8.qcow2] => (item={'name': 'mycert_many_self_signed', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_many_self_signed" } } MSG: Certificate requested (new). changed: [/cache/centos-8.qcow2] => (item={'name': 'other-cert', 'dns': 'www.example.org', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.org", "name": "other-cert" } } MSG: Certificate requested (new). changed: [/cache/centos-8.qcow2] => (item={'name': 'another-cert', 'dns': 'www.example.net', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.net", "name": "another-cert" } } MSG: Certificate requested (new). 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_many_self_signed.yml:18 Wednesday 06 July 2022 04:50:38 +0000 (0:00:02.729) 0:00:10.881 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_many_self_signed.yml:50 Wednesday 06 July 2022 04:50:40 +0000 (0:00:01.781) 0:00:12.663 ******** included: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_many_self_signed.crt', 'key_path': '/etc/pki/tls/private/mycert_many_self_signed.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) included: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/other-cert.crt', 'key_path': '/etc/pki/tls/private/other-cert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.org'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.org'}]}) included: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/another-cert.crt', 'key_path': '/etc/pki/tls/private/another-cert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.net'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.net'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:50:40 +0000 (0:00:00.051) 0:00:12.715 ******** 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:50:40 +0000 (0:00:00.028) 0:00:12.744 ******** 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:50:42 +0000 (0:00:01.850) 0:00:14.594 ******** 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:50:43 +0000 (0:00:01.131) 0:00:15.726 ******** 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:50:44 +0000 (0:00:00.896) 0:00:16.623 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083035.7920878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "81a0d6a72091611710685742ead7924ed739b729", "ctime": 1657083035.790088, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494214, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083035.790088, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_many_self_signed.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1403938277", "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:50:44 +0000 (0:00:00.475) 0:00:17.098 ******** 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:50:44 +0000 (0:00:00.033) 0:00:17.132 ******** 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:50:44 +0000 (0:00:00.048) 0:00:17.181 ******** 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:50:45 +0000 (0:00:00.045) 0:00:17.227 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083035.744088, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9b627afcc0b137c5061fb44c4815d1114f28a024", "ctime": 1657083035.790088, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494213, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083035.790088, "nlink": 1, "path": "/etc/pki/tls/private/mycert_many_self_signed.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1250867379", "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:50:45 +0000 (0:00:00.385) 0:00:17.612 ******** 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:50:45 +0000 (0:00:00.031) 0:00:17.643 ******** 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:50:45 +0000 (0:00:00.047) 0:00:17.691 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_many_self_signed.crt" ], "delta": "0:00:00.223584", "end": "2022-07-06 04:50:45.136946", "rc": 0, "start": "2022-07-06 04:50:44.913362" } 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": "9C:C1:00:A5:0F:96:51:1A:AE:55:51:2F:D5:B6:37:0F:27:0F:63:0B", "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": "72:6A:9B:3A:1A:C4:10:63:C2:96:88:23:11:4A:ED:95:F0:52:1D:EC:59:E2:72:C0:BE:C0:94:30:14:5C:A6:89:6F:EA:5F:BC:7C:40:34:AD:BE:AA:5E:65:10:0D:7A:74:A8:A5:7D:86:CC:9F:94:DD:A2:00:3F:DB:8F:D4:72:82:4D:80:BA:8C:CF:DF:E0:01:A7:F9:BF:E3:94:91:FE:83:B4:48:C1:D7:07:4D:63:B3:B6:6F:92:BD:8C:C1:75:5A:D6:74:D9:BC:EA:39:3B:3B:48:32:1A:A1:FC:CB:97:5B:DB:3E:44:0B:89:A7:11:EB:A0:84:1A:29:FE:51:E5:07:90:8F:A3:E1:7B:25:C8:EB:41:49:A0:2A:45:DA:3A:2B:23:13:D1:9F:4A:F6:1A:D3:8D:7F:23:30:3E:0D:EF:5B:25:B8:C2:E8:29:7B:6C:28:00:69:A0:B6:2A:55:72:4A:92:82:AE:72:67:EE:D0:57:10:DF:A7:9C:B9:3E:A8:23:83:E2:94:0D:F6:57:23:66:3E:14:96:84:73:FF:F9:12:4B:D5:48:17:F0:4F:65:BD:4B:26:AB:22:08:B1:05:27:6A:B4:0A:C6:43:EC:7F:FF:8C:D4:B1:05:06:1F:07:3E:20:1D:62:87:1C:30:FB:2B:34:FA:9D:32:7A:10:2A:FF" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:50:35" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:50:46 +0000 (0:00:00.593) 0:00:18.284 ******** 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": "9C:C1:00:A5:0F:96:51:1A:AE:55:51:2F:D5:B6:37:0F:27:0F:63:0B" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "72:6A:9B:3A:1A:C4:10:63:C2:96:88:23:11:4A:ED:95:F0:52:1D:EC:59:E2:72:C0:BE:C0:94:30:14:5C:A6:89:6F:EA:5F:BC:7C:40:34:AD:BE:AA:5E:65:10:0D:7A:74:A8:A5:7D:86:CC:9F:94:DD:A2:00:3F:DB:8F:D4:72:82:4D:80:BA:8C:CF:DF:E0:01:A7:F9:BF:E3:94:91:FE:83:B4:48:C1:D7:07:4D:63:B3:B6:6F:92:BD:8C:C1:75:5A:D6:74:D9:BC:EA:39:3B:3B:48:32:1A:A1:FC:CB:97:5B:DB:3E:44:0B:89:A7:11:EB:A0:84:1A:29:FE:51:E5:07:90:8F:A3:E1:7B:25:C8:EB:41:49:A0:2A:45:DA:3A:2B:23:13:D1:9F:4A:F6:1A:D3:8D:7F:23:30:3E:0D:EF:5B:25:B8:C2:E8:29:7B:6C:28:00:69:A0:B6:2A:55:72:4A:92:82:AE:72:67:EE:D0:57:10:DF:A7:9C:B9:3E:A8:23:83:E2:94:0D:F6:57:23:66:3E:14:96:84:73:FF:F9:12:4B:D5:48:17:F0:4F:65:BD:4B:26:AB:22:08:B1:05:27:6A:B4:0A:C6:43:EC:7F:FF:8C:D4:B1:05:06:1F:07:3E:20:1D:62:87:1C:30:FB:2B:34:FA:9D:32:7A:10:2A:FF" }, "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:50:35" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:50:46 +0000 (0:00:00.044) 0:00:18.329 ******** 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:50:46 +0000 (0:00:00.045) 0:00:18.374 ******** 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:50:46 +0000 (0:00:00.034) 0:00:18.409 ******** 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:50:46 +0000 (0:00:00.044) 0:00:18.453 ******** 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:50:46 +0000 (0:00:00.044) 0:00:18.498 ******** 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:50:46 +0000 (0:00:00.045) 0:00:18.543 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_many_self_signed.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.069483", "end": "2022-07-06 04:50:45.842840", "rc": 0, "start": "2022-07-06 04:50:45.773357" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:50:46 +0000 (0:00:00.440) 0:00:18.984 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:50:46 +0000 (0:00:00.046) 0:00:19.031 ******** 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:50:46 +0000 (0:00:00.030) 0:00:19.061 ******** 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:50:48 +0000 (0:00:01.830) 0:00:20.891 ******** 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:50:49 +0000 (0:00:01.033) 0:00:21.925 ******** 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:50:50 +0000 (0:00:00.873) 0:00:22.798 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083036.9200878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5eb3af52ada295e988bbe484a8997659fc8367c6", "ctime": 1657083036.9170878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494217, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083036.9170878, "nlink": 1, "path": "/etc/pki/tls/certs/other-cert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1907041446", "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:50:50 +0000 (0:00:00.377) 0:00:23.176 ******** 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:50:51 +0000 (0:00:00.036) 0:00:23.213 ******** 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:50:51 +0000 (0:00:00.048) 0:00:23.261 ******** 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:50:51 +0000 (0:00:00.044) 0:00:23.306 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083036.8720877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "00f5bd06e615bfaf8fcf82ee35935c48ac76943c", "ctime": 1657083036.9170878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494215, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083036.9170878, "nlink": 1, "path": "/etc/pki/tls/private/other-cert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1139162820", "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:50:51 +0000 (0:00:00.387) 0:00:23.694 ******** 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:50:51 +0000 (0:00:00.033) 0:00:23.727 ******** 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:50:51 +0000 (0:00:00.046) 0:00:23.773 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/other-cert.crt" ], "delta": "0:00:00.234466", "end": "2022-07-06 04:50:51.227326", "rc": 0, "start": "2022-07-06 04:50:50.992860" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.org" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.org" } ], "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": "23:79:F9:2C:47:D1:26:F8:61:60:78:FD:67:5C:4D:5D:6F:B6:3C:18", "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": "DB:E6:2C:BC:C6:2C:3C:FA:02:09:9E:6F:3E:4E:93:E8:A7:AA:4E:93:C9:53:29:E8:72:31:C4:2E:A6:DD:49:42:BB:FC:C7:E0:01:6A:B0:B8:40:99:95:2E:40:D8:30:2F:6B:23:9A:99:6C:8D:80:83:67:17:87:08:14:B2:4E:08:CE:2F:2F:43:5E:C8:F9:79:B2:B9:FB:94:C4:CA:2D:51:33:02:EB:12:F0:3D:9B:FC:98:8E:B2:09:5B:C0:97:15:90:42:2E:AC:51:A2:DF:C9:73:8A:FC:54:36:25:CE:61:53:33:41:80:16:F2:CE:D9:43:BC:4B:B0:E6:1E:49:9F:A3:86:4D:70:DA:1E:6F:66:AD:EC:75:85:B7:F6:70:5A:81:70:E2:03:41:34:B2:D8:63:EB:15:54:42:A8:28:E9:2A:30:C5:C0:29:41:65:C1:58:65:9E:14:5D:4E:36:08:14:08:BD:35:70:8E:D6:A0:82:67:33:E3:65:1B:1C:90:9D:38:E7:F6:DB:27:22:E6:D9:9A:01:90:8B:C6:8D:C9:C0:59:47:DD:83:F4:A4:4C:6D:EE:23:82:D9:AF:C6:50:73:7F:8B:67:0D:C2:D4:92:BB:A3:45:C9:9F:5C:2A:57:76:1B:87:42:90:53:CB:0C:5C:F2:CC:2A:4E:EB:43:3E" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:50:36" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:50:52 +0000 (0:00:00.600) 0:00:24.374 ******** 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.org" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "23:79:F9:2C:47:D1:26:F8:61:60:78:FD:67:5C:4D:5D:6F:B6:3C:18" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "DB:E6:2C:BC:C6:2C:3C:FA:02:09:9E:6F:3E:4E:93:E8:A7:AA:4E:93:C9:53:29:E8:72:31:C4:2E:A6:DD:49:42:BB:FC:C7:E0:01:6A:B0:B8:40:99:95:2E:40:D8:30:2F:6B:23:9A:99:6C:8D:80:83:67:17:87:08:14:B2:4E:08:CE:2F:2F:43:5E:C8:F9:79:B2:B9:FB:94:C4:CA:2D:51:33:02:EB:12:F0:3D:9B:FC:98:8E:B2:09:5B:C0:97:15:90:42:2E:AC:51:A2:DF:C9:73:8A:FC:54:36:25:CE:61:53:33:41:80:16:F2:CE:D9:43:BC:4B:B0:E6:1E:49:9F:A3:86:4D:70:DA:1E:6F:66:AD:EC:75:85:B7:F6:70:5A:81:70:E2:03:41:34:B2:D8:63:EB:15:54:42:A8:28:E9:2A:30:C5:C0:29:41:65:C1:58:65:9E:14:5D:4E:36:08:14:08:BD:35:70:8E:D6:A0:82:67:33:E3:65:1B:1C:90:9D:38:E7:F6:DB:27:22:E6:D9:9A:01:90:8B:C6:8D:C9:C0:59:47:DD:83:F4:A4:4C:6D:EE:23:82:D9:AF:C6:50:73:7F:8B:67:0D:C2:D4:92:BB:A3:45:C9:9F:5C:2A:57:76:1B:87:42:90:53:CB:0C:5C:F2:CC:2A:4E:EB:43:3E" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.org" } ], "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:50:36" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:50:52 +0000 (0:00:00.046) 0:00:24.420 ******** 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:50:52 +0000 (0:00:00.044) 0:00:24.464 ******** 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:50:52 +0000 (0:00:00.039) 0:00:24.503 ******** 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:50:52 +0000 (0:00:00.046) 0:00:24.550 ******** 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:50:52 +0000 (0:00:00.044) 0:00:24.594 ******** 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:50:52 +0000 (0:00:00.049) 0:00:24.644 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/other-cert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.073603", "end": "2022-07-06 04:50:51.941666", "rc": 0, "start": "2022-07-06 04:50:51.868063" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:50:52 +0000 (0:00:00.441) 0:00:25.086 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:50:52 +0000 (0:00:00.045) 0:00:25.131 ******** 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:50:52 +0000 (0:00:00.027) 0:00:25.158 ******** 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:50:54 +0000 (0:00:01.808) 0:00:26.967 ******** 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:50:55 +0000 (0:00:01.007) 0:00:27.975 ******** 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:50:56 +0000 (0:00:00.877) 0:00:28.852 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083037.6670878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "c5c9d913bbf6acf55f5a0d9878ae32fac443b013", "ctime": 1657083037.6640878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494221, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083037.6640878, "nlink": 1, "path": "/etc/pki/tls/certs/another-cert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1311406743", "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:50:57 +0000 (0:00:00.391) 0:00:29.244 ******** 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:50:57 +0000 (0:00:00.061) 0:00:29.306 ******** 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:50:57 +0000 (0:00:00.047) 0:00:29.354 ******** 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:50:57 +0000 (0:00:00.043) 0:00:29.397 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083037.619088, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "362bc3588ecdb8b384da477b87ce686ab231dcc1", "ctime": 1657083037.6640878, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494480, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083037.6640878, "nlink": 1, "path": "/etc/pki/tls/private/another-cert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "240470660", "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:50:57 +0000 (0:00:00.387) 0:00:29.785 ******** 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:50:57 +0000 (0:00:00.032) 0:00:29.817 ******** 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:50:57 +0000 (0:00:00.073) 0:00:29.891 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/another-cert.crt" ], "delta": "0:00:00.226678", "end": "2022-07-06 04:50:57.346070", "rc": 0, "start": "2022-07-06 04:50:57.119392" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.net" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.net" } ], "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": "21:3F:36:AE:CE:A2:8B:6D:54:C1:27:C3:B2:81:8E:65:CE:3D:DC:18", "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": "A7:D2:6A:4E:FB:48:05:1F:E1:FC:3F:C9:10:A7:6A:6B:18:78:66:D2:5C:2C:44:70:A4:29:05:FB:30:02:67:30:90:D0:CB:95:B7:4F:19:2A:79:67:53:B0:1C:25:46:95:5A:8F:06:A7:D7:7B:DC:4B:DC:34:07:D3:43:06:3D:09:9F:37:D6:90:CC:7F:AD:CD:C1:5E:3D:FE:4E:53:77:15:17:19:CD:21:86:14:09:11:39:5A:3C:BB:EB:61:DB:47:DF:60:AD:9A:17:EE:9A:E5:80:F4:4B:21:17:01:61:D5:BA:D4:42:77:09:01:16:9C:6C:82:5D:46:33:8B:65:F3:C3:5F:E7:25:B5:63:A7:8D:5D:BF:99:D0:63:00:DE:A0:79:8C:07:E8:95:D0:68:EB:DB:E9:24:C0:30:18:25:6C:C9:7C:31:B3:B2:D1:E8:CC:FA:67:80:5F:3E:CA:6D:AA:66:1D:FF:21:D2:A9:D5:5A:04:1A:36:98:D6:98:7A:F7:A9:DD:DC:89:24:8C:88:7D:51:EA:5C:C7:66:33:F9:F2:46:6A:4B:7E:C7:37:56:87:DE:4F:C2:84:9A:96:95:9F:93:2A:7D:DA:D3:3A:25:15:CC:B1:F2:FB:0F:44:E7:F4:0B:AF:78:76:41:89:30:C4:F5:7C:D2:DC:6F:66:F3:90" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:50:37" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:50:58 +0000 (0:00:00.598) 0:00:30.489 ******** 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.net" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "21:3F:36:AE:CE:A2:8B:6D:54:C1:27:C3:B2:81:8E:65:CE:3D:DC:18" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "A7:D2:6A:4E:FB:48:05:1F:E1:FC:3F:C9:10:A7:6A:6B:18:78:66:D2:5C:2C:44:70:A4:29:05:FB:30:02:67:30:90:D0:CB:95:B7:4F:19:2A:79:67:53:B0:1C:25:46:95:5A:8F:06:A7:D7:7B:DC:4B:DC:34:07:D3:43:06:3D:09:9F:37:D6:90:CC:7F:AD:CD:C1:5E:3D:FE:4E:53:77:15:17:19:CD:21:86:14:09:11:39:5A:3C:BB:EB:61:DB:47:DF:60:AD:9A:17:EE:9A:E5:80:F4:4B:21:17:01:61:D5:BA:D4:42:77:09:01:16:9C:6C:82:5D:46:33:8B:65:F3:C3:5F:E7:25:B5:63:A7:8D:5D:BF:99:D0:63:00:DE:A0:79:8C:07:E8:95:D0:68:EB:DB:E9:24:C0:30:18:25:6C:C9:7C:31:B3:B2:D1:E8:CC:FA:67:80:5F:3E:CA:6D:AA:66:1D:FF:21:D2:A9:D5:5A:04:1A:36:98:D6:98:7A:F7:A9:DD:DC:89:24:8C:88:7D:51:EA:5C:C7:66:33:F9:F2:46:6A:4B:7E:C7:37:56:87:DE:4F:C2:84:9A:96:95:9F:93:2A:7D:DA:D3:3A:25:15:CC:B1:F2:FB:0F:44:E7:F4:0B:AF:78:76:41:89:30:C4:F5:7C:D2:DC:6F:66:F3:90" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.net" } ], "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:50:37" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:50:58 +0000 (0:00:00.044) 0:00:30.533 ******** 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:50:58 +0000 (0:00:00.045) 0:00:30.579 ******** 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:50:58 +0000 (0:00:00.031) 0:00:30.610 ******** 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:50:58 +0000 (0:00:00.058) 0:00:30.669 ******** 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:50:58 +0000 (0:00:00.071) 0:00:30.741 ******** 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:50:58 +0000 (0:00:00.071) 0:00:30.813 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/another-cert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.077822", "end": "2022-07-06 04:50:58.118771", "rc": 0, "start": "2022-07-06 04:50:58.040949" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:50:59 +0000 (0:00:00.453) 0:00:31.266 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=74 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:50:59 +0000 (0:00:00.081) 0:00:31.347 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.73s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.14s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.85s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.83s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.81s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.81s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- Gathering Facts --------------------------------------------------------- 1.78s /tmp/tmphw7p6t3p/tests/tests_many_self_signed.yml:18 -------------------------- Install the package, force upgrade -------------------------------------- 1.13s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.06s /tmp/tmphw7p6t3p/tests/tests_many_self_signed.yml:2 --------------------------- Install the package, force upgrade -------------------------------------- 1.03s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 1.01s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install certreader ------------------------------------------------------ 0.90s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.87s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- Enable HA repos --------------------------------------------------------- 0.79s /cache/centos-8_setup.yml:5 --------------------------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.79s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.60s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.60s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.59s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - 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:04:00 +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.227394", "end": "2022-07-06 05:04:00.635225", "rc": 0, "start": "2022-07-06 05:04:00.407831" } 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:04:01 +0000 (0:00:00.847) 0:00:00.867 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.85s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_many_self_signed.yml ******************************************* 2 plays in /tmp/tmpap4wle35/tests/certificate/tests_many_self_signed.yml PLAY [Issue many self-signed certificates] ************************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_many_self_signed.yml:2 Wednesday 06 July 2022 05:04:01 +0000 (0:00:00.033) 0:00:00.901 ******** 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:04:02 +0000 (0:00:01.061) 0:00:01.962 ******** 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:04:02 +0000 (0:00:00.026) 0:00:01.988 ******** 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:04:03 +0000 (0:00:00.512) 0:00:02.501 ******** 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:04:03 +0000 (0:00:00.038) 0:00:02.539 ******** 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:04:05 +0000 (0:00:02.202) 0:00:04.742 ******** 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:04:07 +0000 (0:00:01.862) 0:00:06.604 ******** 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:04:07 +0000 (0:00:00.528) 0:00:07.133 ******** 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:04:08 +0000 (0:00:00.402) 0:00:07.535 ******** 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": "4026368", "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:04:08 +0000 (0:00:00.783) 0:00:08.319 ******** changed: [/cache/centos-8.qcow2] => (item={'name': 'mycert_many_self_signed', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_many_self_signed" } } MSG: Certificate requested (new). changed: [/cache/centos-8.qcow2] => (item={'name': 'other-cert', 'dns': 'www.example.org', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.org", "name": "other-cert" } } MSG: Certificate requested (new). changed: [/cache/centos-8.qcow2] => (item={'name': 'another-cert', 'dns': 'www.example.net', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.net", "name": "another-cert" } } MSG: Certificate requested (new). 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_many_self_signed.yml:18 Wednesday 06 July 2022 05:04:11 +0000 (0:00:02.494) 0:00:10.813 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_many_self_signed.yml:50 Wednesday 06 July 2022 05:04:12 +0000 (0:00:00.900) 0:00:11.714 ******** included: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_many_self_signed.crt', 'key_path': '/etc/pki/tls/private/mycert_many_self_signed.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) included: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/other-cert.crt', 'key_path': '/etc/pki/tls/private/other-cert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.org'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.org'}]}) included: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-8.qcow2 => (item={'path': '/etc/pki/tls/certs/another-cert.crt', 'key_path': '/etc/pki/tls/private/another-cert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.net'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.net'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:04:12 +0000 (0:00:00.060) 0:00:11.774 ******** 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:04:12 +0000 (0:00:00.032) 0:00:11.806 ******** 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:04:14 +0000 (0:00:01.851) 0:00:13.658 ******** 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:04:15 +0000 (0:00:01.183) 0:00:14.842 ******** 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:04:16 +0000 (0:00:00.924) 0:00:15.767 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083848.9218812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e426609c540046c789a4caaab73dca66ee2819ac", "ctime": 1657083848.9188812, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539266, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083848.9188812, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_many_self_signed.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "2685530876", "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:04:16 +0000 (0:00:00.525) 0:00:16.292 ******** 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:04:17 +0000 (0:00:00.062) 0:00:16.355 ******** 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:04:17 +0000 (0:00:00.071) 0:00:16.427 ******** 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:04:17 +0000 (0:00:00.045) 0:00:16.472 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083848.8728812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "469d2de9c45643a12e3efa1d63134fa83443c685", "ctime": 1657083848.9188812, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539535, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083848.9188812, "nlink": 1, "path": "/etc/pki/tls/private/mycert_many_self_signed.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "2061915859", "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:04:17 +0000 (0:00:00.400) 0:00:16.872 ******** 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:04:17 +0000 (0:00:00.031) 0:00:16.904 ******** 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:04:17 +0000 (0:00:00.046) 0:00:16.951 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_many_self_signed.crt" ], "delta": "0:00:00.229543", "end": "2022-07-06 05:04:17.347690", "rc": 0, "start": "2022-07-06 05:04:17.118147" } 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": "64:E4:17:81:47:97:6A:E3:CC:1E:09:99:36:2E:8F:31:EF:2F:F7:D4", "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": "45:FF:DA:22:65:AA:FC:6D:22:88:6D:86:92:A3:A4:A2:C0:F0:42:62:54:DE:BD:4A:DE:CA:EB:F1:8E:92:07:21:5D:51:51:C2:42:F0:43:FA:64:32:ED:32:BB:2E:DE:86:CA:E7:F8:36:9B:50:41:9B:36:F0:10:BD:CF:30:B8:85:6E:1C:F6:4E:28:C0:C2:D5:B7:A7:92:38:EA:5A:D1:4F:1D:10:E4:DB:9D:81:65:3D:77:B3:73:23:2A:8A:0E:B8:C3:52:AB:F7:06:9C:C5:5E:EB:CC:67:BF:21:B4:6B:DE:61:41:CA:95:A4:C6:49:C4:D3:80:15:95:E9:6C:F9:12:FA:BB:CF:4F:B1:83:03:4D:BE:4A:63:B8:18:62:D5:A7:B2:DF:CD:6D:2D:2F:FA:CF:0B:98:41:D6:43:B9:34:18:CA:87:1E:8A:96:54:2F:77:A7:82:6D:90:4F:7B:F5:7B:40:2F:F0:9D:1D:B3:85:21:1E:91:A0:8C:C2:AD:09:7A:DF:A1:70:21:3D:E4:7A:5A:42:06:1C:5E:B7:58:E2:49:48:C4:49:FC:C7:92:F9:E0:00:7C:E6:1C:71:00:66:45:97:AC:DE:22:68:D4:C5:83:1F:2D:6E:98:1D:21:5E:68:1D:BB:1A:C6:2E:F6:EE:F2:F1:A6:CB:00:DA:A7:99:65" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:08" } } 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:04:18 +0000 (0:00:00.614) 0:00:17.566 ******** 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": "64:E4:17:81:47:97:6A:E3:CC:1E:09:99:36:2E:8F:31:EF:2F:F7:D4" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "45:FF:DA:22:65:AA:FC:6D:22:88:6D:86:92:A3:A4:A2:C0:F0:42:62:54:DE:BD:4A:DE:CA:EB:F1:8E:92:07:21:5D:51:51:C2:42:F0:43:FA:64:32:ED:32:BB:2E:DE:86:CA:E7:F8:36:9B:50:41:9B:36:F0:10:BD:CF:30:B8:85:6E:1C:F6:4E:28:C0:C2:D5:B7:A7:92:38:EA:5A:D1:4F:1D:10:E4:DB:9D:81:65:3D:77:B3:73:23:2A:8A:0E:B8:C3:52:AB:F7:06:9C:C5:5E:EB:CC:67:BF:21:B4:6B:DE:61:41:CA:95:A4:C6:49:C4:D3:80:15:95:E9:6C:F9:12:FA:BB:CF:4F:B1:83:03:4D:BE:4A:63:B8:18:62:D5:A7:B2:DF:CD:6D:2D:2F:FA:CF:0B:98:41:D6:43:B9:34:18:CA:87:1E:8A:96:54:2F:77:A7:82:6D:90:4F:7B:F5:7B:40:2F:F0:9D:1D:B3:85:21:1E:91:A0:8C:C2:AD:09:7A:DF:A1:70:21:3D:E4:7A:5A:42:06:1C:5E:B7:58:E2:49:48:C4:49:FC:C7:92:F9:E0:00:7C:E6:1C:71:00:66:45:97:AC:DE:22:68:D4:C5:83:1F:2D:6E:98:1D:21:5E:68:1D:BB:1A:C6:2E:F6:EE:F2:F1:A6:CB:00:DA:A7:99:65" }, "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:04:08" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:04:18 +0000 (0:00:00.045) 0:00:17.611 ******** 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:04:18 +0000 (0:00:00.046) 0:00:17.657 ******** 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:04:18 +0000 (0:00:00.034) 0:00:17.692 ******** 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:04:18 +0000 (0:00:00.047) 0:00:17.739 ******** 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:04:18 +0000 (0:00:00.047) 0:00:17.786 ******** 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:04:18 +0000 (0:00:00.048) 0:00:17.835 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_many_self_signed.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.071404", "end": "2022-07-06 05:04:18.056878", "rc": 0, "start": "2022-07-06 05:04:17.985474" } 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:04:18 +0000 (0:00:00.439) 0:00:18.274 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:04:18 +0000 (0:00:00.044) 0:00:18.318 ******** 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:04:18 +0000 (0:00:00.027) 0:00:18.346 ******** 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:04:20 +0000 (0:00:01.861) 0:00:20.207 ******** 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:04:21 +0000 (0:00:01.008) 0:00:21.216 ******** 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:04:22 +0000 (0:00:00.915) 0:00:22.131 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083849.7018812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "02b6c2f496e76ac82da539af555c3e6dfade235d", "ctime": 1657083849.699881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539268, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083849.699881, "nlink": 1, "path": "/etc/pki/tls/certs/other-cert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "2071980003", "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:04:23 +0000 (0:00:00.379) 0:00:22.511 ******** 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:04:23 +0000 (0:00:00.031) 0:00:22.542 ******** 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:04:23 +0000 (0:00:00.045) 0:00:22.587 ******** 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:04:23 +0000 (0:00:00.043) 0:00:22.630 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083849.650881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "699867d2e85799c747b63365ccc2e32c81d85ae6", "ctime": 1657083849.699881, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539265, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083849.699881, "nlink": 1, "path": "/etc/pki/tls/private/other-cert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1770509607", "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:04:23 +0000 (0:00:00.368) 0:00:22.999 ******** 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:04:23 +0000 (0:00:00.032) 0:00:23.031 ******** 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:04:23 +0000 (0:00:00.049) 0:00:23.080 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/other-cert.crt" ], "delta": "0:00:00.228114", "end": "2022-07-06 05:04:23.463813", "rc": 0, "start": "2022-07-06 05:04:23.235699" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.org" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.org" } ], "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": "F8:40:4D:A0:18:D8:5D:B5:BE:48:1F:26:63:A1:24:2C:03:38:B1:A0", "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": "14:68:E8:8D:06:7B:40:74:ED:67:25:21:C7:D3:F1:FE:26:93:49:49:CE:CF:BF:B9:CA:FA:2D:88:4C:5E:79:0E:F6:62:21:3E:5A:95:B7:28:EA:44:5B:8F:82:A8:EB:89:B2:DA:81:46:16:0C:58:A8:FC:AC:68:05:50:1C:66:D6:A4:D0:89:57:07:13:1B:5F:44:A3:E2:54:03:04:AF:43:02:C6:A2:D7:25:A9:A4:6C:2C:EB:92:0E:AE:80:74:E9:94:76:13:23:E0:E3:97:8F:AC:23:A4:93:85:C0:BF:13:5E:BE:3F:D5:46:00:0A:C5:51:F5:C3:AF:48:44:C3:CC:0C:67:33:3D:C2:FF:AB:00:1B:BB:18:D0:E6:7D:A5:F4:3D:65:1B:A9:96:39:B8:A0:F7:51:F4:C2:94:5D:DB:27:14:EB:F6:0E:B5:67:A4:85:FB:9E:E8:00:3E:13:77:DD:5B:F0:C6:B7:D5:16:4E:4C:F3:13:19:29:0F:A0:08:DF:25:E2:AB:41:0F:5A:2C:DD:8F:9C:01:F8:E2:BC:B2:F8:93:4E:2E:2F:BD:52:C7:08:25:D5:93:3F:18:CC:CC:D6:C7:FD:33:1C:AD:8C:48:D6:FE:3B:91:FA:F3:A0:2F:AB:47:45:E5:28:C8:67:54:2F:E1:2D:D5:F7:D1:2D:F6:C5" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:09" } } 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:04:24 +0000 (0:00:00.600) 0:00:23.681 ******** 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.org" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "F8:40:4D:A0:18:D8:5D:B5:BE:48:1F:26:63:A1:24:2C:03:38:B1:A0" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "14:68:E8:8D:06:7B:40:74:ED:67:25:21:C7:D3:F1:FE:26:93:49:49:CE:CF:BF:B9:CA:FA:2D:88:4C:5E:79:0E:F6:62:21:3E:5A:95:B7:28:EA:44:5B:8F:82:A8:EB:89:B2:DA:81:46:16:0C:58:A8:FC:AC:68:05:50:1C:66:D6:A4:D0:89:57:07:13:1B:5F:44:A3:E2:54:03:04:AF:43:02:C6:A2:D7:25:A9:A4:6C:2C:EB:92:0E:AE:80:74:E9:94:76:13:23:E0:E3:97:8F:AC:23:A4:93:85:C0:BF:13:5E:BE:3F:D5:46:00:0A:C5:51:F5:C3:AF:48:44:C3:CC:0C:67:33:3D:C2:FF:AB:00:1B:BB:18:D0:E6:7D:A5:F4:3D:65:1B:A9:96:39:B8:A0:F7:51:F4:C2:94:5D:DB:27:14:EB:F6:0E:B5:67:A4:85:FB:9E:E8:00:3E:13:77:DD:5B:F0:C6:B7:D5:16:4E:4C:F3:13:19:29:0F:A0:08:DF:25:E2:AB:41:0F:5A:2C:DD:8F:9C:01:F8:E2:BC:B2:F8:93:4E:2E:2F:BD:52:C7:08:25:D5:93:3F:18:CC:CC:D6:C7:FD:33:1C:AD:8C:48:D6:FE:3B:91:FA:F3:A0:2F:AB:47:45:E5:28:C8:67:54:2F:E1:2D:D5:F7:D1:2D:F6:C5" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.org" } ], "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:09" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:04:24 +0000 (0:00:00.042) 0:00:23.724 ******** 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:04:24 +0000 (0:00:00.045) 0:00:23.770 ******** 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:04:24 +0000 (0:00:00.032) 0:00:23.803 ******** 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:04:24 +0000 (0:00:00.045) 0:00:23.848 ******** 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:04:24 +0000 (0:00:00.045) 0:00:23.894 ******** 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:04:24 +0000 (0:00:00.046) 0:00:23.941 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/other-cert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.073348", "end": "2022-07-06 05:04:24.165723", "rc": 0, "start": "2022-07-06 05:04:24.092375" } 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:04:25 +0000 (0:00:00.442) 0:00:24.383 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:04:25 +0000 (0:00:00.042) 0:00:24.426 ******** 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:04:25 +0000 (0:00:00.026) 0:00:24.452 ******** 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:04:26 +0000 (0:00:01.854) 0:00:26.306 ******** 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:04:27 +0000 (0:00:01.019) 0:00:27.325 ******** 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:04:28 +0000 (0:00:00.896) 0:00:28.222 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083850.512881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "633c4902b399b3fa303c5e5b10a550e00b0feb1e", "ctime": 1657083850.5098813, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539270, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083850.5098813, "nlink": 1, "path": "/etc/pki/tls/certs/another-cert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1424651815", "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:04:29 +0000 (0:00:00.368) 0:00:28.591 ******** 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:04:29 +0000 (0:00:00.030) 0:00:28.621 ******** 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:04:29 +0000 (0:00:00.044) 0:00:28.666 ******** 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:04:29 +0000 (0:00:00.042) 0:00:28.708 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083850.4648812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "06abcb1cb8daecbf6f76cc84701fe2411b854762", "ctime": 1657083850.5098813, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539269, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083850.5098813, "nlink": 1, "path": "/etc/pki/tls/private/another-cert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "3204426314", "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:04:29 +0000 (0:00:00.385) 0:00:29.094 ******** 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:04:29 +0000 (0:00:00.031) 0:00:29.125 ******** 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:04:29 +0000 (0:00:00.053) 0:00:29.178 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/another-cert.crt" ], "delta": "0:00:00.230288", "end": "2022-07-06 05:04:29.561816", "rc": 0, "start": "2022-07-06 05:04:29.331528" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.net" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.net" } ], "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": "59:27:48:10:27:57:61:4D:D0:F3:9E:BA:1A:AB:EA:35:77:17:7D:14", "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": "9B:37:56:5D:69:B4:7C:1E:1E:41:03:2C:9F:6B:73:C5:B6:2B:DB:4D:DA:0B:C6:5C:2E:62:38:B4:12:60:4E:56:D8:B4:E0:B7:4A:66:4F:9E:02:08:81:E0:A6:27:6D:8B:28:56:38:03:EF:69:2A:37:C4:FC:DB:87:A6:0C:51:02:8B:56:0A:1A:B6:8B:C8:A8:67:1D:C1:55:D0:3B:F4:45:58:BA:E9:26:4A:73:EE:2B:BA:9B:E5:E1:D2:E4:CD:D5:58:36:3C:EC:EB:7A:F4:AD:F4:89:68:BD:95:B2:CC:6A:70:A1:DC:65:1C:42:FA:88:2A:B6:C0:16:1A:2E:23:91:1A:61:AD:4D:F9:C7:BA:B0:60:8F:F0:74:3F:8F:CD:A9:6B:77:58:33:A3:D8:97:47:80:CB:CE:CB:0E:35:92:78:F9:C7:5C:28:F0:8D:49:51:6D:DD:56:79:83:D1:B7:AE:9A:B1:03:9A:85:71:3E:C0:55:BB:F1:F1:26:6A:8B:A5:EA:59:E7:00:98:D8:3A:F0:17:6E:77:7C:9C:DF:3F:C2:7E:44:EE:38:96:B2:FC:01:34:DE:DB:94:C4:0D:C6:60:E4:72:5E:44:28:97:C0:0C:A7:3E:5C:99:C2:77:C8:0C:15:3E:F1:CC:1E:BE:65:BB:4A:62:17:6E:27:A2:FA:47" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:10" } } 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:04:30 +0000 (0:00:00.602) 0:00:29.780 ******** 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.net" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "59:27:48:10:27:57:61:4D:D0:F3:9E:BA:1A:AB:EA:35:77:17:7D:14" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9B:37:56:5D:69:B4:7C:1E:1E:41:03:2C:9F:6B:73:C5:B6:2B:DB:4D:DA:0B:C6:5C:2E:62:38:B4:12:60:4E:56:D8:B4:E0:B7:4A:66:4F:9E:02:08:81:E0:A6:27:6D:8B:28:56:38:03:EF:69:2A:37:C4:FC:DB:87:A6:0C:51:02:8B:56:0A:1A:B6:8B:C8:A8:67:1D:C1:55:D0:3B:F4:45:58:BA:E9:26:4A:73:EE:2B:BA:9B:E5:E1:D2:E4:CD:D5:58:36:3C:EC:EB:7A:F4:AD:F4:89:68:BD:95:B2:CC:6A:70:A1:DC:65:1C:42:FA:88:2A:B6:C0:16:1A:2E:23:91:1A:61:AD:4D:F9:C7:BA:B0:60:8F:F0:74:3F:8F:CD:A9:6B:77:58:33:A3:D8:97:47:80:CB:CE:CB:0E:35:92:78:F9:C7:5C:28:F0:8D:49:51:6D:DD:56:79:83:D1:B7:AE:9A:B1:03:9A:85:71:3E:C0:55:BB:F1:F1:26:6A:8B:A5:EA:59:E7:00:98:D8:3A:F0:17:6E:77:7C:9C:DF:3F:C2:7E:44:EE:38:96:B2:FC:01:34:DE:DB:94:C4:0D:C6:60:E4:72:5E:44:28:97:C0:0C:A7:3E:5C:99:C2:77:C8:0C:15:3E:F1:CC:1E:BE:65:BB:4A:62:17:6E:27:A2:FA:47" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.net" } ], "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:10" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:04:30 +0000 (0:00:00.071) 0:00:29.852 ******** 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:04:30 +0000 (0:00:00.045) 0:00:29.897 ******** 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:04:30 +0000 (0:00:00.031) 0:00:29.929 ******** 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:04:30 +0000 (0:00:00.042) 0:00:29.971 ******** 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:04:30 +0000 (0:00:00.045) 0:00:30.017 ******** 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:04:30 +0000 (0:00:00.045) 0:00:30.062 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/another-cert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.076649", "end": "2022-07-06 05:04:30.301698", "rc": 0, "start": "2022-07-06 05:04:30.225049" } 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:04:31 +0000 (0:00:00.458) 0:00:30.521 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=74 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 05:04:31 +0000 (0:00:00.054) 0:00:30.575 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 2.49s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.20s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.86s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.86s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 1.85s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 1.85s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install the package, force upgrade -------------------------------------- 1.18s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.06s /tmp/tmpap4wle35/tests/certificate/tests_many_self_signed.yml:2 --------------- Install the package, force upgrade -------------------------------------- 1.02s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install the package, force upgrade -------------------------------------- 1.01s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.92s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.92s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.90s /tmp/tmpap4wle35/tests/certificate/tests_many_self_signed.yml:18 -------------- Install certreader ------------------------------------------------------ 0.90s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Enable HA repos --------------------------------------------------------- 0.85s /cache/centos-8_setup.yml:5 --------------------------------------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.78s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.61s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.60s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.60s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33