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/tmpsp7qopjw executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 04:25:16 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:25:17 +0000 (0:00:01.138) 0:00:01.153 ******** included: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:25:17 +0000 (0:00:00.027) 0:00:01.180 ******** ok: [/cache/rhel-8-y.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 04:25:18 +0000 (0:00:00.517) 0:00:01.698 ******** skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:25:18 +0000 (0:00:00.041) 0:00:01.739 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:25:19 +0000 (0:00:01.505) 0:00:03.244 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:25:21 +0000 (0:00:01.388) 0:00:04.633 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:25:21 +0000 (0:00:00.516) 0:00:05.149 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:25:22 +0000 (0:00:00.393) 0:00:05.543 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 00:19:07 EDT", "ActiveEnterTimestampMonotonic": "209835307", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.socket dbus.service sysinit.target syslog.target network.target systemd-journald.socket basic.target system.slice", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 00:19:07 EDT", "AssertTimestampMonotonic": "209824609", "Before": "multi-user.target shutdown.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 00:19:07 EDT", "ConditionTimestampMonotonic": "209824609", "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": "20356", "ExecMainStartTimestamp": "Wed 2022-07-06 00:19:07 EDT", "ExecMainStartTimestampMonotonic": "209825682", "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 00:19:07 EDT", "InactiveExitTimestampMonotonic": "209825779", "InvocationID": "9b7f2c992b884db7b09cb5a377a5b7df", "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": "14640", "LimitNPROCSoft": "14640", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14640", "LimitSIGPENDINGSoft": "14640", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "20356", "MemoryAccounting": "yes", "MemoryCurrent": "4169728", "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": "sysinit.target dbus.socket system.slice", "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 00:19:07 EDT", "StateChangeTimestampMonotonic": "209835307", "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": "23424", "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 00:19:07 EDT", "WatchdogTimestampMonotonic": "209835306", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 04:25:22 +0000 (0:00:00.809) 0:00:06.353 ******** changed: [/cache/rhel-8-y.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/rhel-8-y.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). META: role_complete for /cache/rhel-8-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 04:25:24 +0000 (0:00:01.583) 0:00:07.936 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 04:25:25 +0000 (0:00:00.795) 0:00:08.732 ******** included: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:25:25 +0000 (0:00:00.047) 0:00:08.779 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:25:25 +0000 (0:00:00.028) 0:00:08.807 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:25:26 +0000 (0:00:01.342) 0:00:10.149 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:25:27 +0000 (0:00:01.145) 0:00:11.295 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.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/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:25:28 +0000 (0:00:00.857) 0:00:12.153 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081523.6132739, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4be6131263864b5c306c6baf88bfea7926e2f0bc", "ctime": 1657081523.6102738, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17013569, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081523.6102738, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_no_auto_renew.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "2144213056", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.498) 0:00:12.652 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.060) 0:00:12.713 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.051) 0:00:12.764 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.046) 0:00:12.811 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081523.565274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e5a952150e601095857f2b9fbe6260b08565d619", "ctime": 1657081523.6102738, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26548758, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081523.6102738, "nlink": 1, "path": "/etc/pki/tls/private/mycert_no_auto_renew.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "3382544678", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.381) 0:00:13.193 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.060) 0:00:13.254 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:25:29 +0000 (0:00:00.073) 0:00:13.327 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.220498", "end": "2022-07-06 00:25:30.484043", "rc": 0, "start": "2022-07-06 00:25:30.263545" } 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": "94:50:5F:1F:C5:71:DF:AC:1D:BF:D1:BB:42:3E:37:CE:38:03:B9:6A", "critical": false }, "authorityKeyIdentifier": { "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AB:DA:F0:45:BB:06:B0:04:2B:0C:4D:64:C1:CC:17:42:BD:6E:49:91:49:52:B5:10:98:65:E7:C7:02:A5:33:3D:A5:8C:0F:DF:70:04:FD:CF:DD:B9:33:FE:27:2D:3C:07:1F:AB:34:5C:DA:A8:D9:0A:66:29:F0:EC:BD:91:1A:CE:FA:47:4A:F7:66:47:7D:69:7D:D2:D1:4E:1C:FF:DE:FB:F5:90:A8:41:CE:60:9E:F5:40:84:55:0A:BB:65:EB:1F:C5:5C:70:16:D9:2B:BA:E6:3E:60:D2:8A:15:68:E2:E6:99:25:CB:FD:F7:30:0A:76:6C:CE:34:1F:2B:76:BE:A7:74:FD:71:9F:A1:71:CD:27:DB:B6:CF:AB:BF:4C:BE:34:0B:68:85:64:85:FA:98:48:23:33:60:6F:6F:3A:81:BA:03:AA:EF:4E:36:CC:40:39:CF:1F:9D:C7:D1:D2:AE:CD:4A:E0:3D:AB:D1:BF:A8:37:A8:D5:06:C8:63:0B:99:95:A3:C2:D0:83:E7:DE:AF:EF:26:52:74:35:D6:EB:11:0F:18:4F:73:7B:D5:F5:59:67:A1:26:D5:71:4C:F8:AF:C2:48:DF:5B:53:0E:E7:90:D1:E8:6D:83:46:25:BA:35:28:7C:50:25:E6:02:D3:9D:6B:E2:D4:CC:B2:01:AE:49:91" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:25:23" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.701) 0:00:14.029 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26" }, "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": "94:50:5F:1F:C5:71:DF:AC:1D:BF:D1:BB:42:3E:37:CE:38:03:B9:6A" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AB:DA:F0:45:BB:06:B0:04:2B:0C:4D:64:C1:CC:17:42:BD:6E:49:91:49:52:B5:10:98:65:E7:C7:02:A5:33:3D:A5:8C:0F:DF:70:04:FD:CF:DD:B9:33:FE:27:2D:3C:07:1F:AB:34:5C:DA:A8:D9:0A:66:29:F0:EC:BD:91:1A:CE:FA:47:4A:F7:66:47:7D:69:7D:D2:D1:4E:1C:FF:DE:FB:F5:90:A8:41:CE:60:9E:F5:40:84:55:0A:BB:65:EB:1F:C5:5C:70:16:D9:2B:BA:E6:3E:60:D2:8A:15:68:E2:E6:99:25:CB:FD:F7:30:0A:76:6C:CE:34:1F:2B:76:BE:A7:74:FD:71:9F:A1:71:CD:27:DB:B6:CF:AB:BF:4C:BE:34:0B:68:85:64:85:FA:98:48:23:33:60:6F:6F:3A:81:BA:03:AA:EF:4E:36:CC:40:39:CF:1F:9D:C7:D1:D2:AE:CD:4A:E0:3D:AB:D1:BF:A8:37:A8:D5:06:C8:63:0B:99:95:A3:C2:D0:83:E7:DE:AF:EF:26:52:74:35:D6:EB:11:0F:18:4F:73:7B:D5:F5:59:67:A1:26:D5:71:4C:F8:AF:C2:48:DF:5B:53:0E:E7:90:D1:E8:6D:83:46:25:BA:35:28:7C:50:25:E6:02:D3:9D:6B:E2:D4:CC:B2:01:AE:49:91" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:25:23" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.045) 0:00:14.074 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.093) 0:00:14.168 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.062) 0:00:14.231 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.068) 0:00:14.300 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.046) 0:00:14.346 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:25:30 +0000 (0:00:00.070) 0:00:14.417 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.077198", "end": "2022-07-06 00:25:31.344096", "rc": 0, "start": "2022-07-06 00:25:31.266898" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:25:31 +0000 (0:00:00.471) 0:00:14.889 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:25:31 +0000 (0:00:00.046) 0:00:14.936 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:25:31 +0000 (0:00:00.030) 0:00:14.966 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:25:32 +0000 (0:00:01.348) 0:00:16.315 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:25:33 +0000 (0:00:01.039) 0:00:17.354 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.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/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:25:34 +0000 (0:00:00.864) 0:00:18.218 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081524.313274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b0936c44576fb9d22fc423ebc1b27155cec09020", "ctime": 1657081524.311274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17013570, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081524.311274, "nlink": 1, "path": "/etc/pki/tls/certs/defaultcert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1475580184", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.367) 0:00:18.586 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.034) 0:00:18.620 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.046) 0:00:18.666 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.042) 0:00:18.709 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081524.265274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9a7b44ddae8a33e841940a9c12f6e000c5fc819c", "ctime": 1657081524.310274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26542135, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081524.310274, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "3783935486", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.385) 0:00:19.094 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.032) 0:00:19.127 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:25:35 +0000 (0:00:00.046) 0:00:19.173 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.246477", "end": "2022-07-06 00:25:36.241783", "rc": 0, "start": "2022-07-06 00:25:35.995306" } 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": "45:D9:3E:F6:99:A9:FA:82:E7:F3:A8:D4:38:C2:C9:05:2C:B6:59:7F", "critical": false }, "authorityKeyIdentifier": { "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "38:5B:8C:60:5E:A9:3A:ED:14:73:2E:B0:5B:3F:7E:83:1E:55:B7:91:0F:BF:30:AB:DB:F6:93:1C:91:D6:15:3C:59:C2:C9:8E:57:B3:FD:4D:AD:D7:68:5C:D7:26:D4:53:D5:50:D8:34:24:80:90:DF:02:10:51:A2:4C:5B:CE:48:54:C7:6F:FA:1E:71:EA:5C:ED:8C:9E:6D:9A:71:BB:E7:E0:0E:60:18:32:B0:44:50:7D:8E:24:B0:7C:6B:EE:D2:24:AB:FB:23:26:03:04:1E:69:5E:6C:85:9B:44:5F:0C:13:D2:B2:39:2C:0A:7F:0B:5A:4D:81:6F:33:FC:65:3C:36:B7:22:96:08:BD:7C:7F:E8:EC:F0:04:73:1E:A8:83:E5:40:B4:09:3A:3B:D6:53:F6:65:E2:FF:C7:A8:82:3F:D8:F1:19:A2:3E:89:A5:32:19:ED:E1:84:44:83:D9:93:2F:F3:51:76:7F:38:02:63:8E:C9:A6:9D:B3:D7:91:CB:D0:E4:48:F7:58:EE:2B:83:8D:E2:6D:D5:F6:32:DC:63:2D:C7:58:88:5B:16:A8:4D:17:88:1E:77:9D:10:BB:48:72:5E:B1:6B:E7:96:91:D9:1E:AC:E7:90:1E:C0:68:6E:5B:5D:DA:DD:B8:F3:94:92:CC:8F:20:B5:B3:CC:02:C1" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:25:24" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.614) 0:00:19.788 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26" }, "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": "45:D9:3E:F6:99:A9:FA:82:E7:F3:A8:D4:38:C2:C9:05:2C:B6:59:7F" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "38:5B:8C:60:5E:A9:3A:ED:14:73:2E:B0:5B:3F:7E:83:1E:55:B7:91:0F:BF:30:AB:DB:F6:93:1C:91:D6:15:3C:59:C2:C9:8E:57:B3:FD:4D:AD:D7:68:5C:D7:26:D4:53:D5:50:D8:34:24:80:90:DF:02:10:51:A2:4C:5B:CE:48:54:C7:6F:FA:1E:71:EA:5C:ED:8C:9E:6D:9A:71:BB:E7:E0:0E:60:18:32:B0:44:50:7D:8E:24:B0:7C:6B:EE:D2:24:AB:FB:23:26:03:04:1E:69:5E:6C:85:9B:44:5F:0C:13:D2:B2:39:2C:0A:7F:0B:5A:4D:81:6F:33:FC:65:3C:36:B7:22:96:08:BD:7C:7F:E8:EC:F0:04:73:1E:A8:83:E5:40:B4:09:3A:3B:D6:53:F6:65:E2:FF:C7:A8:82:3F:D8:F1:19:A2:3E:89:A5:32:19:ED:E1:84:44:83:D9:93:2F:F3:51:76:7F:38:02:63:8E:C9:A6:9D:B3:D7:91:CB:D0:E4:48:F7:58:EE:2B:83:8D:E2:6D:D5:F6:32:DC:63:2D:C7:58:88:5B:16:A8:4D:17:88:1E:77:9D:10:BB:48:72:5E:B1:6B:E7:96:91:D9:1E:AC:E7:90:1E:C0:68:6E:5B:5D:DA:DD:B8:F3:94:92:CC:8F:20:B5:B3:CC:02:C1" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:25:24" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.044) 0:00:19.832 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.042) 0:00:19.875 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.033) 0:00:19.908 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.044) 0:00:19.953 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.044) 0:00:19.997 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:25:36 +0000 (0:00:00.043) 0:00:20.040 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.073879", "end": "2022-07-06 00:25:36.935525", "rc": 0, "start": "2022-07-06 00:25:36.861646" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:25:37 +0000 (0:00:00.440) 0:00:20.481 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:25:37 +0000 (0:00:00.054) 0:00:20.536 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 1.58s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.51s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.39s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.35s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.34s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.14s /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml:2 ------------------------------ Install the package, force upgrade -------------------------------------- 1.04s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install certreader ------------------------------------------------------ 0.86s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.86s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 ------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.81s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmpjupnnp9c/tests/tests_no_auto_renew.yml:17 ----------------------------- Parse certificate ------------------------------------------------------- 0.70s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.61s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.52s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.47s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.39s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - 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/tmpsp7qopjw executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 04:37:01 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:37:03 +0000 (0:00:01.133) 0:00:01.147 ******** included: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:37:03 +0000 (0:00:00.028) 0:00:01.176 ******** ok: [/cache/rhel-8-y.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 04:37:03 +0000 (0:00:00.515) 0:00:01.692 ******** skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:37:03 +0000 (0:00:00.039) 0:00:01.731 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:37:05 +0000 (0:00:01.461) 0:00:03.193 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:37:06 +0000 (0:00:01.348) 0:00:04.541 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:37:07 +0000 (0:00:00.532) 0:00:05.074 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:37:07 +0000 (0:00:00.393) 0:00:05.467 ******** ok: [/cache/rhel-8-y.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 00:30:53 EDT", "ActiveEnterTimestampMonotonic": "208549725", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "syslog.target dbus.socket systemd-journald.socket basic.target network.target dbus.service sysinit.target system.slice", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 00:30:53 EDT", "AssertTimestampMonotonic": "208539032", "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 00:30:53 EDT", "ConditionTimestampMonotonic": "208539032", "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": "20339", "ExecMainStartTimestamp": "Wed 2022-07-06 00:30:53 EDT", "ExecMainStartTimestampMonotonic": "208540188", "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 00:30:53 EDT", "InactiveExitTimestampMonotonic": "208540321", "InvocationID": "10da18c4a5da4869bbf5df93894e3192", "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": "14640", "LimitNPROCSoft": "14640", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14640", "LimitSIGPENDINGSoft": "14640", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "20339", "MemoryAccounting": "yes", "MemoryCurrent": "4059136", "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": "sysinit.target dbus.socket system.slice", "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 00:30:53 EDT", "StateChangeTimestampMonotonic": "208549725", "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": "23424", "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 00:30:53 EDT", "WatchdogTimestampMonotonic": "208549724", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 04:37:08 +0000 (0:00:00.766) 0:00:06.233 ******** changed: [/cache/rhel-8-y.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/rhel-8-y.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). META: role_complete for /cache/rhel-8-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 04:37:10 +0000 (0:00:01.964) 0:00:08.198 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 04:37:10 +0000 (0:00:00.795) 0:00:08.993 ******** included: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:37:10 +0000 (0:00:00.049) 0:00:09.043 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:37:11 +0000 (0:00:00.069) 0:00:09.112 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:37:12 +0000 (0:00:01.344) 0:00:10.457 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:37:13 +0000 (0:00:01.149) 0:00:11.606 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.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/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:37:14 +0000 (0:00:00.870) 0:00:12.477 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082228.2677495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "73ea607e4d8f1e82783e023f0ce70de51328af36", "ctime": 1657082228.2647495, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16980537, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082228.2647495, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_no_auto_renew.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1044392457", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:37:14 +0000 (0:00:00.506) 0:00:12.983 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:37:14 +0000 (0:00:00.064) 0:00:13.047 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 04:37:15 +0000 (0:00:00.082) 0:00:13.130 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 04:37:15 +0000 (0:00:00.046) 0:00:13.176 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082228.2027495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "dae011a52f64870df52a3ec2989d32e753ac0fcf", "ctime": 1657082228.2647495, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26493087, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082228.2647495, "nlink": 1, "path": "/etc/pki/tls/private/mycert_no_auto_renew.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "2703410430", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 04:37:15 +0000 (0:00:00.377) 0:00:13.553 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 04:37:15 +0000 (0:00:00.063) 0:00:13.617 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 04:37:15 +0000 (0:00:00.077) 0:00:13.695 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.237648", "end": "2022-07-06 00:37:15.572190", "rc": 0, "start": "2022-07-06 00:37:15.334542" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.com" } ], "critical": false }, "extendedKeyUsage": { "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ], "critical": false }, "basicConstraints": { "value": { "ca": false }, "critical": true }, "subjectKeyIdentifier": { "value": "8B:F1:F4:0E:B3:B2:93:38:B6:BF:F8:FD:BE:BC:9E:27:F8:01:56:5E", "critical": false }, "authorityKeyIdentifier": { "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8A:E1:DD:B8:32:4B:00:8B:64:5E:54:BA:9F:94:2B:FB:07:88:88:48:58:1E:BB:9A:BE:6E:BF:68:9B:58:17:E9:92:C9:F3:9B:B5:0B:C9:76:FF:7B:E7:C9:02:33:34:5E:9B:16:00:EF:0A:DC:77:32:34:C0:96:57:C4:70:7F:76:01:00:F5:F4:06:1B:C9:AA:65:8D:04:AB:ED:1B:9C:82:02:4F:D4:F5:EA:92:97:35:E8:1F:83:E7:E1:D9:73:9F:05:EE:86:B7:00:0C:C5:F2:EE:E6:9D:2D:A4:66:45:0F:5D:E5:38:E6:F8:69:14:EF:08:7B:1E:B0:51:BA:AF:6A:B4:D7:56:5B:80:89:B7:EB:7A:A3:55:0F:C5:00:AA:32:20:E6:7A:9C:48:A2:07:99:A0:B9:82:C9:FC:20:BC:B8:A1:38:E4:4B:49:65:78:24:61:25:EE:00:AE:EC:68:98:60:29:DE:3D:AC:BF:16:52:0F:8D:62:89:CA:04:E9:3C:DB:00:0F:D9:DB:CB:9D:9C:73:EB:73:21:11:A3:F5:D0:E9:9D:95:A9:99:9C:05:CA:2F:CC:E2:F1:BC:01:5C:54:2F:10:7F:9A:0D:FC:17:7B:19:BC:96:19:7D:7A:A9:D7:B9:5E:74:AC:8A:E4:CA:D0:C1:E6:6E:51:BF:B9:A7:BB" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:37:08" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.714) 0:00:14.409 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "8B:F1:F4:0E:B3:B2:93:38:B6:BF:F8:FD:BE:BC:9E:27:F8:01:56:5E" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8A:E1:DD:B8:32:4B:00:8B:64:5E:54:BA:9F:94:2B:FB:07:88:88:48:58:1E:BB:9A:BE:6E:BF:68:9B:58:17:E9:92:C9:F3:9B:B5:0B:C9:76:FF:7B:E7:C9:02:33:34:5E:9B:16:00:EF:0A:DC:77:32:34:C0:96:57:C4:70:7F:76:01:00:F5:F4:06:1B:C9:AA:65:8D:04:AB:ED:1B:9C:82:02:4F:D4:F5:EA:92:97:35:E8:1F:83:E7:E1:D9:73:9F:05:EE:86:B7:00:0C:C5:F2:EE:E6:9D:2D:A4:66:45:0F:5D:E5:38:E6:F8:69:14:EF:08:7B:1E:B0:51:BA:AF:6A:B4:D7:56:5B:80:89:B7:EB:7A:A3:55:0F:C5:00:AA:32:20:E6:7A:9C:48:A2:07:99:A0:B9:82:C9:FC:20:BC:B8:A1:38:E4:4B:49:65:78:24:61:25:EE:00:AE:EC:68:98:60:29:DE:3D:AC:BF:16:52:0F:8D:62:89:CA:04:E9:3C:DB:00:0F:D9:DB:CB:9D:9C:73:EB:73:21:11:A3:F5:D0:E9:9D:95:A9:99:9C:05:CA:2F:CC:E2:F1:BC:01:5C:54:2F:10:7F:9A:0D:FC:17:7B:19:BC:96:19:7D:7A:A9:D7:B9:5E:74:AC:8A:E4:CA:D0:C1:E6:6E:51:BF:B9:A7:BB" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:37:08" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.044) 0:00:14.454 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.044) 0:00:14.498 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.033) 0:00:14.532 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.044) 0:00:14.577 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.044) 0:00:14.621 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 04:37:16 +0000 (0:00:00.044) 0:00:14.666 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.078302", "end": "2022-07-06 00:37:16.277005", "rc": 0, "start": "2022-07-06 00:37:16.198703" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:37:17 +0000 (0:00:00.448) 0:00:15.115 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:37:17 +0000 (0:00:00.045) 0:00:15.161 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:37:17 +0000 (0:00:00.026) 0:00:15.187 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:37:18 +0000 (0:00:01.334) 0:00:16.522 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:37:19 +0000 (0:00:01.023) 0:00:17.545 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.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/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:37:20 +0000 (0:00:00.860) 0:00:18.405 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082229.1807494, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "72a4727d68d02e7ad1bb3dc972fac85724495907", "ctime": 1657082229.1777496, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16980538, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082229.1777496, "nlink": 1, "path": "/etc/pki/tls/certs/defaultcert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1345449716", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:37:20 +0000 (0:00:00.361) 0:00:18.767 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:37:20 +0000 (0:00:00.032) 0:00:18.800 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 04:37:20 +0000 (0:00:00.045) 0:00:18.845 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 04:37:20 +0000 (0:00:00.042) 0:00:18.888 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082229.1307495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "11b6614bfb82a683e586c80eef6b0292ad1023e3", "ctime": 1657082229.1777496, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26493085, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082229.1777496, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "559080747", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.397) 0:00:19.286 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.035) 0:00:19.321 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.048) 0:00:19.370 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.229649", "end": "2022-07-06 00:37:21.127374", "rc": 0, "start": "2022-07-06 00:37:20.897725" } 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": "15:56:32:82:B6:72:3C:E2:D9:C8:DC:1F:94:14:56:D8:73:FF:C5:20", "critical": false }, "authorityKeyIdentifier": { "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "59:28:4B:88:23:5E:9C:6D:07:40:71:16:94:33:D1:7A:AE:FE:EE:AA:BD:F6:C6:E6:41:23:D8:1F:4A:F4:84:F8:3F:5B:93:51:F8:F4:98:66:BB:81:59:4D:80:DC:47:42:77:03:C5:DD:88:34:E1:93:6F:8D:0C:AC:BB:69:3B:B2:EB:FF:C9:72:9B:7A:30:78:92:87:4B:90:73:31:74:3D:79:11:FF:10:A5:16:BE:89:FB:40:AD:20:FD:F8:6C:01:F0:EC:C4:AE:03:53:FB:3E:64:29:36:20:0F:12:11:BA:7E:4C:D7:C9:B0:81:2F:D0:8B:4C:4B:AC:F5:34:66:C9:D8:56:15:1B:9F:7C:94:0A:AA:37:17:A5:91:F8:B4:30:DB:96:4F:94:BE:6D:91:16:7B:2A:DD:B9:4E:83:36:89:F2:45:A2:DC:13:21:16:DB:DB:FB:A6:4D:CA:32:D3:E0:E2:9C:C0:81:24:8E:62:38:18:A8:F1:D8:86:F0:53:7C:64:CE:20:98:3F:86:70:28:35:A5:AB:55:9E:94:7C:52:E8:1A:67:37:A9:BA:DC:4B:DE:1D:93:7B:9B:45:54:E0:67:D5:ED:CB:28:DB:AD:71:AA:7D:F8:0A:2E:AD:1C:36:BA:F6:4C:05:3B:2F:B2:CE:B6:73:87:86:87:3E:44:90" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:37:09" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.594) 0:00:19.964 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C" }, "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": "15:56:32:82:B6:72:3C:E2:D9:C8:DC:1F:94:14:56:D8:73:FF:C5:20" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "59:28:4B:88:23:5E:9C:6D:07:40:71:16:94:33:D1:7A:AE:FE:EE:AA:BD:F6:C6:E6:41:23:D8:1F:4A:F4:84:F8:3F:5B:93:51:F8:F4:98:66:BB:81:59:4D:80:DC:47:42:77:03:C5:DD:88:34:E1:93:6F:8D:0C:AC:BB:69:3B:B2:EB:FF:C9:72:9B:7A:30:78:92:87:4B:90:73:31:74:3D:79:11:FF:10:A5:16:BE:89:FB:40:AD:20:FD:F8:6C:01:F0:EC:C4:AE:03:53:FB:3E:64:29:36:20:0F:12:11:BA:7E:4C:D7:C9:B0:81:2F:D0:8B:4C:4B:AC:F5:34:66:C9:D8:56:15:1B:9F:7C:94:0A:AA:37:17:A5:91:F8:B4:30:DB:96:4F:94:BE:6D:91:16:7B:2A:DD:B9:4E:83:36:89:F2:45:A2:DC:13:21:16:DB:DB:FB:A6:4D:CA:32:D3:E0:E2:9C:C0:81:24:8E:62:38:18:A8:F1:D8:86:F0:53:7C:64:CE:20:98:3F:86:70:28:35:A5:AB:55:9E:94:7C:52:E8:1A:67:37:A9:BA:DC:4B:DE:1D:93:7B:9B:45:54:E0:67:D5:ED:CB:28:DB:AD:71:AA:7D:F8:0A:2E:AD:1C:36:BA:F6:4C:05:3B:2F:B2:CE:B6:73:87:86:87:3E:44:90" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:37:09" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.041) 0:00:20.006 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 04:37:21 +0000 (0:00:00.045) 0:00:20.052 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.034) 0:00:20.087 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.047) 0:00:20.134 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.051) 0:00:20.186 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.047) 0:00:20.234 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.080331", "end": "2022-07-06 00:37:21.866836", "rc": 0, "start": "2022-07-06 00:37:21.786505" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.476) 0:00:20.710 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:37:22 +0000 (0:00:00.053) 0:00:20.764 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.96s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.46s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.35s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.34s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 1.33s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.13s /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml:2 ------------------ Install the package, force upgrade -------------------------------------- 1.02s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.87s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.86s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmpj_xtuxdz/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.77s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.71s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.59s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.52s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.48s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.45s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve key file stats ------------------------------------------------- 0.40s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 -