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/tmpt8vnebz7 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Wednesday 06 July 2022 22:42:39 +0000 (0:00:00.017) 0:00:00.017 ******** ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:42:41 +0000 (0:00:01.270) 0:00:01.288 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.27s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 22:42:41 +0000 (0:00:00.037) 0:00:01.326 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:42:42 +0000 (0:00:01.042) 0:00:02.368 ******** included: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:42:42 +0000 (0:00:00.027) 0:00:02.396 ******** ok: [/cache/rhel-8.qcow2] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 22:42:42 +0000 (0:00:00.522) 0:00:02.919 ******** skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:42:42 +0000 (0:00:00.045) 0:00:02.964 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:42:44 +0000 (0:00:01.436) 0:00:04.401 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:42:45 +0000 (0:00:01.320) 0:00:05.721 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:42:46 +0000 (0:00:00.524) 0:00:06.245 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:42:46 +0000 (0:00:00.400) 0:00:06.645 ******** ok: [/cache/rhel-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 18:36:04 EDT", "ActiveEnterTimestampMonotonic": "228945850", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "sysinit.target dbus.service dbus.socket syslog.target network.target system.slice systemd-journald.socket basic.target", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:36:04 EDT", "AssertTimestampMonotonic": "228933431", "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 18:36:04 EDT", "ConditionTimestampMonotonic": "228933431", "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": "23911", "ExecMainStartTimestamp": "Wed 2022-07-06 18:36:04 EDT", "ExecMainStartTimestampMonotonic": "228934830", "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 18:36:04 EDT", "InactiveExitTimestampMonotonic": "228934872", "InvocationID": "73d85d6be97a474c9524444a92253530", "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": "14648", "LimitNPROCSoft": "14648", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14648", "LimitSIGPENDINGSoft": "14648", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "23911", "MemoryAccounting": "yes", "MemoryCurrent": "4067328", "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 system.slice 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 18:36:04 EDT", "StateChangeTimestampMonotonic": "228945850", "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": "23436", "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 18:36:04 EDT", "WatchdogTimestampMonotonic": "228945849", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 22:42:47 +0000 (0:00:00.773) 0:00:07.419 ******** changed: [/cache/rhel-8.qcow2] => (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.qcow2] => (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.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 22:42:48 +0000 (0:00:01.813) 0:00:09.232 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 22:42:49 +0000 (0:00:00.804) 0:00:10.036 ******** included: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:42:49 +0000 (0:00:00.048) 0:00:10.085 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:42:49 +0000 (0:00:00.029) 0:00:10.114 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:42:51 +0000 (0:00:01.387) 0:00:11.501 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:42:52 +0000 (0:00:01.192) 0:00:12.694 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:42:53 +0000 (0:00:00.883) 0:00:13.577 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147367.4069798, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "c2c6f2b89c8d0e7e49cde8fbd3be6c7a9f0aec9e", "ctime": 1657147367.4039798, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 754245, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147367.4039798, "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": "1343855511", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:42:53 +0000 (0:00:00.509) 0:00:14.087 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:42:53 +0000 (0:00:00.035) 0:00:14.122 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 22:42:53 +0000 (0:00:00.048) 0:00:14.171 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 22:42:54 +0000 (0:00:00.073) 0:00:14.244 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147367.3569798, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "01a7630c33df754b73a2ae44e2b340d9ba5317cb", "ctime": 1657147367.4039798, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9518651, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147367.4039798, "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": "8646581", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 22:42:54 +0000 (0:00:00.411) 0:00:14.656 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 22:42:54 +0000 (0:00:00.060) 0:00:14.717 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 22:42:54 +0000 (0:00:00.068) 0:00:14.785 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.229915", "end": "2022-07-06 18:42:54.662497", "rc": 0, "start": "2022-07-06 18:42:54.432582" } 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": "F7:13:95:37:2D:9A:46:C2:8F:C7:AF:22:AE:6F:B3:F3:C4:4A:6E:6F", "critical": false }, "authorityKeyIdentifier": { "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "41:2A:08:0B:25:F0:82:4D:EB:EA:2F:50:67:A6:99:6D:20:C4:87:A5:81:E5:1A:F3:5E:33:23:E0:42:00:61:87:E0:98:F6:71:BE:E9:35:77:01:0E:D4:89:71:8A:BF:84:70:65:B5:0B:24:BF:95:04:52:70:6D:99:BE:08:DB:D8:7C:E8:DC:17:87:2B:B6:91:B5:24:60:BF:3D:8D:85:D9:6C:B3:FF:16:FE:74:98:89:B9:20:83:E4:F9:4F:1B:6D:40:08:E3:3E:FE:08:86:39:5C:6F:C7:98:45:FF:73:73:31:82:3D:7F:83:02:91:43:62:32:59:A9:25:EB:AE:5A:AB:66:8C:06:FE:5C:E8:E4:C8:39:F7:46:71:CC:28:02:1B:C5:0D:B6:4D:1C:F7:F4:61:B5:6E:86:57:D4:43:CD:08:77:75:C1:C5:4F:13:AC:F2:71:6D:68:D0:0D:EE:7D:31:DC:D7:0A:F8:1A:CC:D6:6B:53:87:D4:4D:38:95:E5:AF:E7:FB:2C:4F:A6:D3:DA:63:DD:3B:19:0A:31:D8:94:2B:0A:1D:C6:6D:2F:59:EB:61:62:2A:8E:9B:68:70:8F:24:82:D5:62:C9:EE:34:23:93:1C:B8:EE:D3:A2:0E:A7:71:76:39:6C:1B:5E:89:9C:DA:D8:D2:8E:98:46:30:01" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:42:47" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.710) 0:00:15.496 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A" }, "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": "F7:13:95:37:2D:9A:46:C2:8F:C7:AF:22:AE:6F:B3:F3:C4:4A:6E:6F" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "41:2A:08:0B:25:F0:82:4D:EB:EA:2F:50:67:A6:99:6D:20:C4:87:A5:81:E5:1A:F3:5E:33:23:E0:42:00:61:87:E0:98:F6:71:BE:E9:35:77:01:0E:D4:89:71:8A:BF:84:70:65:B5:0B:24:BF:95:04:52:70:6D:99:BE:08:DB:D8:7C:E8:DC:17:87:2B:B6:91:B5:24:60:BF:3D:8D:85:D9:6C:B3:FF:16:FE:74:98:89:B9:20:83:E4:F9:4F:1B:6D:40:08:E3:3E:FE:08:86:39:5C:6F:C7:98:45:FF:73:73:31:82:3D:7F:83:02:91:43:62:32:59:A9:25:EB:AE:5A:AB:66:8C:06:FE:5C:E8:E4:C8:39:F7:46:71:CC:28:02:1B:C5:0D:B6:4D:1C:F7:F4:61:B5:6E:86:57:D4:43:CD:08:77:75:C1:C5:4F:13:AC:F2:71:6D:68:D0:0D:EE:7D:31:DC:D7:0A:F8:1A:CC:D6:6B:53:87:D4:4D:38:95:E5:AF:E7:FB:2C:4F:A6:D3:DA:63:DD:3B:19:0A:31:D8:94:2B:0A:1D:C6:6D:2F:59:EB:61:62:2A:8E:9B:68:70:8F:24:82:D5:62:C9:EE:34:23:93:1C:B8:EE:D3:A2:0E:A7:71:76:39:6C:1B:5E:89:9C:DA:D8:D2:8E:98:46:30:01" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:42:47" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.044) 0:00:15.540 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.046) 0:00:15.586 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.033) 0:00:15.620 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.043) 0:00:15.664 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.045) 0:00:15.709 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.046) 0:00:15.756 ******** ok: [/cache/rhel-8.qcow2] => { "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.078045", "end": "2022-07-06 18:42:55.383007", "rc": 0, "start": "2022-07-06 18:42:55.304962" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:42:55 +0000 (0:00:00.456) 0:00:16.212 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:42:56 +0000 (0:00:00.045) 0:00:16.258 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:42:56 +0000 (0:00:00.028) 0:00:16.286 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:42:57 +0000 (0:00:01.321) 0:00:17.608 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:42:58 +0000 (0:00:01.042) 0:00:18.650 ******** ok: [/cache/rhel-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/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:42:59 +0000 (0:00:00.893) 0:00:19.543 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147368.20798, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5768938528bf5be2a6fb311f373c7cc4fe56382a", "ctime": 1657147368.20498, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004046, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147368.20498, "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": "920115762", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:42:59 +0000 (0:00:00.377) 0:00:19.921 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:42:59 +0000 (0:00:00.033) 0:00:19.954 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 22:42:59 +0000 (0:00:00.048) 0:00:20.003 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 22:42:59 +0000 (0:00:00.045) 0:00:20.049 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147368.15898, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "81dc42f9b81cd75c77a2e8f45574b797123ce319", "ctime": 1657147368.20498, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9518652, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147368.20498, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "525408457", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.382) 0:00:20.431 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.034) 0:00:20.465 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.047) 0:00:20.513 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.236662", "end": "2022-07-06 18:43:00.289532", "rc": 0, "start": "2022-07-06 18:43:00.052870" } 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": "09:29:DC:0C:C4:DC:43:F4:DB:83:01:B4:74:C8:42:0B:20:1B:39:19", "critical": false }, "authorityKeyIdentifier": { "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "77:BF:14:35:DD:4B:0B:B4:D8:6E:EA:8B:41:1C:0F:48:76:A2:93:02:9F:13:17:1E:1B:7B:CF:38:07:56:60:A5:42:5D:D8:08:D5:97:8E:3D:D2:1F:C3:50:74:79:F9:7C:E9:DE:6C:D7:6E:DF:DF:55:DC:05:EF:CF:F1:1E:DE:7F:74:B9:E5:8C:53:68:38:2D:F8:B4:4A:31:0D:8A:68:D1:2E:89:FD:A0:97:12:0D:BE:20:6C:89:0E:85:71:2F:E2:BE:95:7E:BC:EA:2C:8B:77:2B:2C:99:CF:5D:0D:6A:79:67:12:64:E8:EB:D2:36:FE:5E:AA:71:4E:60:6F:D8:B0:90:F7:46:27:2E:38:2B:87:A8:63:3C:72:85:AE:52:FF:7C:B2:58:67:C5:99:C5:C2:92:37:A2:BC:32:74:A3:24:79:E1:C6:D9:60:11:AE:FD:53:BA:1E:9A:4B:D9:29:8A:F9:EE:48:14:BD:5A:8B:24:84:4C:61:5C:8C:5E:EC:79:25:AD:E2:0A:D5:78:4E:06:5B:ED:B4:57:16:1B:29:F7:B1:2C:03:D5:72:3F:C8:A5:F6:2B:83:D4:44:D0:FD:B9:35:91:87:85:C8:07:47:DC:A7:28:DA:38:E1:E0:8F:E0:6D:77:8C:C0:C7:44:8C:D6:B7:32:E1:AE:8F:D8:D0:2D" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:42:48" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.606) 0:00:21.120 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A" }, "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": "09:29:DC:0C:C4:DC:43:F4:DB:83:01:B4:74:C8:42:0B:20:1B:39:19" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "77:BF:14:35:DD:4B:0B:B4:D8:6E:EA:8B:41:1C:0F:48:76:A2:93:02:9F:13:17:1E:1B:7B:CF:38:07:56:60:A5:42:5D:D8:08:D5:97:8E:3D:D2:1F:C3:50:74:79:F9:7C:E9:DE:6C:D7:6E:DF:DF:55:DC:05:EF:CF:F1:1E:DE:7F:74:B9:E5:8C:53:68:38:2D:F8:B4:4A:31:0D:8A:68:D1:2E:89:FD:A0:97:12:0D:BE:20:6C:89:0E:85:71:2F:E2:BE:95:7E:BC:EA:2C:8B:77:2B:2C:99:CF:5D:0D:6A:79:67:12:64:E8:EB:D2:36:FE:5E:AA:71:4E:60:6F:D8:B0:90:F7:46:27:2E:38:2B:87:A8:63:3C:72:85:AE:52:FF:7C:B2:58:67:C5:99:C5:C2:92:37:A2:BC:32:74:A3:24:79:E1:C6:D9:60:11:AE:FD:53:BA:1E:9A:4B:D9:29:8A:F9:EE:48:14:BD:5A:8B:24:84:4C:61:5C:8C:5E:EC:79:25:AD:E2:0A:D5:78:4E:06:5B:ED:B4:57:16:1B:29:F7:B1:2C:03:D5:72:3F:C8:A5:F6:2B:83:D4:44:D0:FD:B9:35:91:87:85:C8:07:47:DC:A7:28:DA:38:E1:E0:8F:E0:6D:77:8C:C0:C7:44:8C:D6:B7:32:E1:AE:8F:D8:D0:2D" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:42:48" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.044) 0:00:21.164 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 22:43:00 +0000 (0:00:00.045) 0:00:21.210 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.033) 0:00:21.243 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.045) 0:00:21.288 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.045) 0:00:21.334 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.043) 0:00:21.378 ******** ok: [/cache/rhel-8.qcow2] => { "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.077829", "end": "2022-07-06 18:43:00.985738", "rc": 0, "start": "2022-07-06 18:43:00.907909" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.436) 0:00:21.814 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=53 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 22:43:01 +0000 (0:00:00.055) 0:00:21.869 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 1.81s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.44s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.39s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.32s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.32s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - set up internal repositories -------------------------------------------- 1.27s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- Install the package, force upgrade -------------------------------------- 1.19s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 1.04s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.04s /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml:2 ------------------------------ Install certreader ------------------------------------------------------ 0.89s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmplpebei7w/tests/tests_no_auto_renew.yml:17 ----------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.77s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.71s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.61s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.52s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 ------------ 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/tmpt8vnebz7 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Wednesday 06 July 2022 22:55:14 +0000 (0:00:00.017) 0:00:00.017 ******** ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:55:15 +0000 (0:00:01.302) 0:00:01.320 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.30s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 22:55:15 +0000 (0:00:00.041) 0:00:01.361 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:55:16 +0000 (0:00:01.005) 0:00:02.367 ******** included: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:55:16 +0000 (0:00:00.029) 0:00:02.396 ******** ok: [/cache/rhel-8.qcow2] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 22:55:17 +0000 (0:00:00.486) 0:00:02.883 ******** skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:55:17 +0000 (0:00:00.038) 0:00:02.921 ******** ok: [/cache/rhel-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/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:55:18 +0000 (0:00:01.415) 0:00:04.337 ******** ok: [/cache/rhel-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/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:55:19 +0000 (0:00:01.247) 0:00:05.585 ******** ok: [/cache/rhel-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/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:55:20 +0000 (0:00:00.504) 0:00:06.090 ******** ok: [/cache/rhel-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/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:55:20 +0000 (0:00:00.389) 0:00:06.479 ******** ok: [/cache/rhel-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 18:48:34 EDT", "ActiveEnterTimestampMonotonic": "217577643", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.service dbus.socket sysinit.target system.slice basic.target network.target syslog.target systemd-journald.socket", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:48:34 EDT", "AssertTimestampMonotonic": "217565677", "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 18:48:34 EDT", "ConditionTimestampMonotonic": "217565676", "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": "23914", "ExecMainStartTimestamp": "Wed 2022-07-06 18:48:34 EDT", "ExecMainStartTimestampMonotonic": "217566944", "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 18:48:34 EDT", "InactiveExitTimestampMonotonic": "217566995", "InvocationID": "d54891b3cfa34d7ca4a9f82aac3ff004", "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": "14648", "LimitNPROCSoft": "14648", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14648", "LimitSIGPENDINGSoft": "14648", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "23914", "MemoryAccounting": "yes", "MemoryCurrent": "4038656", "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 dbus.socket 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 18:48:34 EDT", "StateChangeTimestampMonotonic": "217577643", "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": "23436", "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 18:48:34 EDT", "WatchdogTimestampMonotonic": "217577641", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 22:55:21 +0000 (0:00:00.770) 0:00:07.250 ******** changed: [/cache/rhel-8.qcow2] => (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.qcow2] => (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.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 22:55:23 +0000 (0:00:01.820) 0:00:09.071 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 22:55:24 +0000 (0:00:00.795) 0:00:09.866 ******** included: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:55:24 +0000 (0:00:00.047) 0:00:09.914 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:55:24 +0000 (0:00:00.029) 0:00:09.943 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:55:25 +0000 (0:00:01.271) 0:00:11.214 ******** ok: [/cache/rhel-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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:55:26 +0000 (0:00:01.188) 0:00:12.403 ******** ok: [/cache/rhel-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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:55:27 +0000 (0:00:00.882) 0:00:13.286 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148120.9718478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a5d48dbb0a091736f1e27e449b42d2f593b902d0", "ctime": 1657148120.9688478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 753392, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148120.9688478, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_no_auto_renew.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1273, "uid": 0, "version": "2115126553", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.496) 0:00:13.783 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.054) 0:00:13.838 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.049) 0:00:13.887 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.067) 0:00:13.954 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148120.9218478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fe1178e573654d2439aac80b3602a3b025d99247", "ctime": 1657148120.9688478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9519411, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148120.9688478, "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": "4066471106", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.379) 0:00:14.333 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.031) 0:00:14.365 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 22:55:28 +0000 (0:00:00.048) 0:00:14.414 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.224006", "end": "2022-07-06 18:55:27.925074", "rc": 0, "start": "2022-07-06 18:55:27.701068" } 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": "23:96:09:28:55:20:BC:AC:15:D4:4B:8C:18:9E:CE:39:59:B3:41:8B", "critical": false }, "authorityKeyIdentifier": { "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "6B:9D:8D:DF:C1:10:F5:39:92:E4:26:E2:91:61:52:15:F3:C6:ED:6F:5C:AC:52:35:CB:01:08:87:B3:F9:46:C2:F6:1F:A6:21:D0:49:DF:1A:37:B7:36:0B:91:21:FB:D7:6B:EA:D4:E7:BC:F8:A7:82:7A:BE:80:B0:13:B7:77:0A:BE:67:12:48:78:9F:F4:3A:59:12:B0:96:5C:14:55:9E:EF:F2:52:FD:EC:F3:CC:84:69:C4:C3:46:04:07:09:4C:30:C4:5F:34:40:D2:2C:79:FE:E9:64:B8:94:AA:8A:FC:EA:A4:95:11:6E:8F:E1:27:DE:01:F2:86:55:13:9D:A7:71:D9:0E:73:AA:41:C2:4D:82:3E:CC:44:92:49:9B:D0:B7:19:D2:A6:A6:BC:59:D4:1F:F6:E3:0B:7E:8D:9B:D9:CA:84:E9:44:B3:93:E9:C8:CF:21:31:BA:B3:88:68:2A:4A:5C:00:BB:06:98:BF:44:3A:CA:8E:07:15:D5:BD:B8:EC:0A:28:A4:F9:ED:05:3A:B8:F4:1A:FD:9D:97:58:B6:A3:91:D5:D8:31:51:E6:30:1D:13:4E:34:3A:AA:40:78:08:12:02:B8:87:F8:5B:59:11:72:9C:1E:C5:92:95:CE:E0:79:E3:73:06:49:B9:83:EA:64:AC:B9:B0:F3:62:D6" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:55:20" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.665) 0:00:15.080 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C" }, "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": "23:96:09:28:55:20:BC:AC:15:D4:4B:8C:18:9E:CE:39:59:B3:41:8B" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "6B:9D:8D:DF:C1:10:F5:39:92:E4:26:E2:91:61:52:15:F3:C6:ED:6F:5C:AC:52:35:CB:01:08:87:B3:F9:46:C2:F6:1F:A6:21:D0:49:DF:1A:37:B7:36:0B:91:21:FB:D7:6B:EA:D4:E7:BC:F8:A7:82:7A:BE:80:B0:13:B7:77:0A:BE:67:12:48:78:9F:F4:3A:59:12:B0:96:5C:14:55:9E:EF:F2:52:FD:EC:F3:CC:84:69:C4:C3:46:04:07:09:4C:30:C4:5F:34:40:D2:2C:79:FE:E9:64:B8:94:AA:8A:FC:EA:A4:95:11:6E:8F:E1:27:DE:01:F2:86:55:13:9D:A7:71:D9:0E:73:AA:41:C2:4D:82:3E:CC:44:92:49:9B:D0:B7:19:D2:A6:A6:BC:59:D4:1F:F6:E3:0B:7E:8D:9B:D9:CA:84:E9:44:B3:93:E9:C8:CF:21:31:BA:B3:88:68:2A:4A:5C:00:BB:06:98:BF:44:3A:CA:8E:07:15:D5:BD:B8:EC:0A:28:A4:F9:ED:05:3A:B8:F4:1A:FD:9D:97:58:B6:A3:91:D5:D8:31:51:E6:30:1D:13:4E:34:3A:AA:40:78:08:12:02:B8:87:F8:5B:59:11:72:9C:1E:C5:92:95:CE:E0:79:E3:73:06:49:B9:83:EA:64:AC:B9:B0:F3:62:D6" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:55:20" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.044) 0:00:15.125 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.044) 0:00:15.169 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.034) 0:00:15.204 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.042) 0:00:15.246 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.042) 0:00:15.289 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 22:55:29 +0000 (0:00:00.056) 0:00:15.345 ******** ok: [/cache/rhel-8.qcow2] => { "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.081216", "end": "2022-07-06 18:55:28.634465", "rc": 0, "start": "2022-07-06 18:55:28.553249" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:55:30 +0000 (0:00:00.469) 0:00:15.815 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:55:30 +0000 (0:00:00.074) 0:00:15.890 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:55:30 +0000 (0:00:00.043) 0:00:15.934 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:55:31 +0000 (0:00:01.375) 0:00:17.309 ******** ok: [/cache/rhel-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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:55:32 +0000 (0:00:01.037) 0:00:18.347 ******** ok: [/cache/rhel-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/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:55:33 +0000 (0:00:00.897) 0:00:19.245 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148121.7278478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "c0b7e62ec0c7fc33ebf881e666219a74a072f687", "ctime": 1657148121.7238479, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004398, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148121.7238479, "nlink": 1, "path": "/etc/pki/tls/certs/defaultcert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1273, "uid": 0, "version": "3300354740", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:55:33 +0000 (0:00:00.382) 0:00:19.627 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:55:33 +0000 (0:00:00.032) 0:00:19.659 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 22:55:33 +0000 (0:00:00.047) 0:00:19.707 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 22:55:34 +0000 (0:00:00.044) 0:00:19.751 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148121.676848, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d958052a8eafe9462f17ebb65d33611ac85b21d1", "ctime": 1657148121.7238479, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9519413, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148121.7238479, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "263104886", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 22:55:34 +0000 (0:00:00.370) 0:00:20.121 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 22:55:34 +0000 (0:00:00.031) 0:00:20.153 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 22:55:34 +0000 (0:00:00.044) 0:00:20.197 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.232001", "end": "2022-07-06 18:55:33.637653", "rc": 0, "start": "2022-07-06 18:55:33.405652" } 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": "A4:07:F1:9A:C8:FB:77:FE:5F:FE:65:74:F2:BC:E9:4D:31:73:BE:CE", "critical": false }, "authorityKeyIdentifier": { "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "49:2B:5F:D3:5B:0C:2D:95:72:C3:C8:C9:D9:30:0A:C5:38:15:05:98:8E:66:F8:95:1B:82:F1:07:26:78:20:4B:F1:D6:73:C6:6D:0E:DC:F5:CB:14:72:1E:0D:D5:94:17:C4:1A:8F:AC:4C:3B:A1:5F:EA:0E:1F:CC:8E:23:2D:4C:10:F6:64:74:86:53:40:5F:68:E9:C7:E3:1F:48:34:2C:76:DC:61:4F:34:C9:10:45:C0:CF:17:53:47:EC:ED:58:C8:5C:2C:F5:4D:E3:FC:72:ED:06:E9:BE:46:DC:03:56:D2:CE:07:C0:47:15:C0:2D:F5:DA:2A:C4:84:0C:3F:25:7D:B1:03:8D:25:8F:B1:15:01:A3:25:FA:C6:0A:C5:9F:F6:76:B9:84:57:67:44:92:12:A9:7E:C3:06:53:D8:89:67:22:38:0F:AD:B5:62:03:C7:68:98:A6:D8:70:69:28:DA:59:D6:55:60:90:B2:8E:BE:66:33:0A:B9:FA:AD:23:4C:10:6E:88:4B:71:7A:47:32:8F:1D:AC:28:0F:F6:4E:E3:AB:F8:31:5C:DA:99:3C:AD:DD:DB:9D:E7:E0:47:33:04:28:E6:56:58:60:3C:B4:9C:FE:AA:5B:DF:92:8C:60:1D:75:B4:00:9B:88:07:DA:B3:30:6C:BB:D4:30:00:58" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:55:21" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.595) 0:00:20.793 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C" }, "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": "A4:07:F1:9A:C8:FB:77:FE:5F:FE:65:74:F2:BC:E9:4D:31:73:BE:CE" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "49:2B:5F:D3:5B:0C:2D:95:72:C3:C8:C9:D9:30:0A:C5:38:15:05:98:8E:66:F8:95:1B:82:F1:07:26:78:20:4B:F1:D6:73:C6:6D:0E:DC:F5:CB:14:72:1E:0D:D5:94:17:C4:1A:8F:AC:4C:3B:A1:5F:EA:0E:1F:CC:8E:23:2D:4C:10:F6:64:74:86:53:40:5F:68:E9:C7:E3:1F:48:34:2C:76:DC:61:4F:34:C9:10:45:C0:CF:17:53:47:EC:ED:58:C8:5C:2C:F5:4D:E3:FC:72:ED:06:E9:BE:46:DC:03:56:D2:CE:07:C0:47:15:C0:2D:F5:DA:2A:C4:84:0C:3F:25:7D:B1:03:8D:25:8F:B1:15:01:A3:25:FA:C6:0A:C5:9F:F6:76:B9:84:57:67:44:92:12:A9:7E:C3:06:53:D8:89:67:22:38:0F:AD:B5:62:03:C7:68:98:A6:D8:70:69:28:DA:59:D6:55:60:90:B2:8E:BE:66:33:0A:B9:FA:AD:23:4C:10:6E:88:4B:71:7A:47:32:8F:1D:AC:28:0F:F6:4E:E3:AB:F8:31:5C:DA:99:3C:AD:DD:DB:9D:E7:E0:47:33:04:28:E6:56:58:60:3C:B4:9C:FE:AA:5B:DF:92:8C:60:1D:75:B4:00:9B:88:07:DA:B3:30:6C:BB:D4:30:00:58" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:55:21" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.043) 0:00:20.837 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.045) 0:00:20.882 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.035) 0:00:20.917 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.043) 0:00:20.961 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.046) 0:00:21.007 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.044) 0:00:21.052 ******** ok: [/cache/rhel-8.qcow2] => { "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.072470", "end": "2022-07-06 18:55:34.322175", "rc": 0, "start": "2022-07-06 18:55:34.249705" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.421) 0:00:21.474 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=53 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 22:55:35 +0000 (0:00:00.051) 0:00:21.525 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.82s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.42s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 1.38s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- set up internal repositories -------------------------------------------- 1.30s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- Ensure python3 is installed --------------------------------------------- 1.27s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.25s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Install the package, force upgrade -------------------------------------- 1.19s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install the package, force upgrade -------------------------------------- 1.04s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.01s /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml:2 ------------------ Install certreader ------------------------------------------------------ 0.90s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.88s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmp0buh2ky5/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.77s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.67s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.60s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.50s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:26 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.49s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.47s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.42s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132