ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/tmpch7qdmnu executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: centos-8_setup.yml *************************************************** 1 plays in /cache/centos-8_setup.yml PLAY [Enable HA repos] ********************************************************* META: ran handlers TASK [Enable HA repos] ********************************************************* task path: /cache/centos-8_setup.yml:5 Wednesday 06 July 2022 04:50:59 +0000 (0:00:00.018) 0:00:00.018 ******** changed: [/cache/centos-8.qcow2] => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "cmd": [ "dnf", "config-manager", "--set-enabled", "ha" ], "delta": "0:00:00.223042", "end": "2022-07-06 04:50:59.616558", "rc": 0, "start": "2022-07-06 04:50:59.393516" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 04:51:00 +0000 (0:00:00.821) 0:00:00.840 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.82s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 04:51:00 +0000 (0:00:00.020) 0:00:00.861 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:51:01 +0000 (0:00:01.038) 0:00:01.899 ******** included: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/centos-8.qcow2 TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:51:01 +0000 (0:00:00.025) 0:00:01.925 ******** ok: [/cache/centos-8.qcow2] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 04:51:02 +0000 (0:00:00.504) 0:00:02.429 ******** skipping: [/cache/centos-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:51:02 +0000 (0:00:00.041) 0:00:02.471 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:51:04 +0000 (0:00:02.283) 0:00:04.754 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:51:06 +0000 (0:00:01.869) 0:00:06.624 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:51:06 +0000 (0:00:00.524) 0:00:07.148 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:51:07 +0000 (0:00:00.398) 0:00:07.547 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ActiveEnterTimestampMonotonic": "276633786", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "sysinit.target syslog.target systemd-journald.socket network.target basic.target system.slice dbus.service dbus.socket", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 04:44:15 UTC", "AssertTimestampMonotonic": "276623232", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ConditionTimestampMonotonic": "276623232", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "24015", "ExecMainStartTimestamp": "Wed 2022-07-06 04:44:15 UTC", "ExecMainStartTimestampMonotonic": "276624121", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 04:44:15 UTC", "InactiveExitTimestampMonotonic": "276624167", "InvocationID": "3de97fcbf89741f9816de82898a648f3", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14647", "LimitNPROCSoft": "14647", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14647", "LimitSIGPENDINGSoft": "14647", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "24015", "MemoryAccounting": "yes", "MemoryCurrent": "4173824", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "dbus.socket system.slice sysinit.target", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 04:44:15 UTC", "StateChangeTimestampMonotonic": "276633786", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23435", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 04:44:15 UTC", "WatchdogTimestampMonotonic": "276633785", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 04:51:08 +0000 (0:00:00.788) 0:00:08.335 ******** changed: [/cache/centos-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/centos-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/centos-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 04:51:09 +0000 (0:00:01.692) 0:00:10.028 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 04:51:10 +0000 (0:00:00.771) 0:00:10.800 ******** included: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-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/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml for /cache/centos-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/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:51:10 +0000 (0:00:00.046) 0:00:10.846 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:51:10 +0000 (0:00:00.035) 0:00:10.881 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:51:12 +0000 (0:00:01.827) 0:00:12.709 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:51:13 +0000 (0:00:01.192) 0:00:13.902 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:51:14 +0000 (0:00:00.856) 0:00:14.759 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083067.9840877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "722b48ae67253b852dee7b9fdfab37df29f62408", "ctime": 1657083067.981088, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494223, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083067.981088, "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": "140194278", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.522) 0:00:15.281 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.074) 0:00:15.355 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.048) 0:00:15.404 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.045) 0:00:15.449 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083067.935088, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "adf77134b518e528e5dc36490eba35d4e3bbe5f6", "ctime": 1657083067.981088, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494218, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083067.981088, "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": "978289950", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.393) 0:00:15.842 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.060) 0:00:15.902 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:51:15 +0000 (0:00:00.072) 0:00:15.975 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.238707", "end": "2022-07-06 04:51:15.398333", "rc": 0, "start": "2022-07-06 04:51:15.159626" } 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": "DB:2A:5E:21:0F:D8:AE:DB:61:5D:F5:2E:98:BD:E9:00:72:FD:07:27", "critical": false }, "authorityKeyIdentifier": { "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "96:F2:AA:A5:50:90:08:90:16:33:F5:07:06:1D:2D:B6:94:75:11:08:F7:79:56:F3:77:2B:84:3E:75:3E:65:25:F8:7B:13:16:05:46:E5:55:57:84:09:1D:5E:9F:12:10:E2:1D:22:DF:E8:92:BA:EA:EC:60:E8:3A:44:60:34:B3:FA:A5:27:52:AF:79:1A:67:F3:8D:B1:B0:9C:DB:B6:08:56:E2:3B:19:52:2F:BA:C1:FC:62:2C:08:72:B5:E5:C2:E5:87:F5:A3:09:84:10:C5:F4:B0:46:5D:1E:8F:52:72:83:97:E2:7E:E5:C8:87:21:55:20:C7:D8:41:67:CF:89:09:13:84:C6:F9:28:56:E0:75:07:0F:D2:8E:8A:92:B4:A7:C3:B6:97:8C:44:F7:DE:0E:C3:FE:C3:05:BC:4A:B7:F5:AC:C5:D5:39:E2:2D:71:EF:1A:FD:63:8F:C2:61:B8:0B:81:55:EE:C8:C3:86:BA:FC:D2:59:E8:BC:2F:4E:7F:7B:83:9D:03:F4:57:FC:6F:7F:FD:57:52:9E:97:C6:A8:89:A1:28:A3:99:E7:3C:83:3D:25:FF:85:93:D2:9A:76:54:94:AC:66:09:64:5B:D3:6B:85:83:5C:E9:C1:2F:2E:DE:D6:2E:CC:B4:3E:A6:2C:C6:87:F8:67:80:BC:29:71" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:51:07" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.639) 0:00:16.615 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "DB:2A:5E:21:0F:D8:AE:DB:61:5D:F5:2E:98:BD:E9:00:72:FD:07:27" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "96:F2:AA:A5:50:90:08:90:16:33:F5:07:06:1D:2D:B6:94:75:11:08:F7:79:56:F3:77:2B:84:3E:75:3E:65:25:F8:7B:13:16:05:46:E5:55:57:84:09:1D:5E:9F:12:10:E2:1D:22:DF:E8:92:BA:EA:EC:60:E8:3A:44:60:34:B3:FA:A5:27:52:AF:79:1A:67:F3:8D:B1:B0:9C:DB:B6:08:56:E2:3B:19:52:2F:BA:C1:FC:62:2C:08:72:B5:E5:C2:E5:87:F5:A3:09:84:10:C5:F4:B0:46:5D:1E:8F:52:72:83:97:E2:7E:E5:C8:87:21:55:20:C7:D8:41:67:CF:89:09:13:84:C6:F9:28:56:E0:75:07:0F:D2:8E:8A:92:B4:A7:C3:B6:97:8C:44:F7:DE:0E:C3:FE:C3:05:BC:4A:B7:F5:AC:C5:D5:39:E2:2D:71:EF:1A:FD:63:8F:C2:61:B8:0B:81:55:EE:C8:C3:86:BA:FC:D2:59:E8:BC:2F:4E:7F:7B:83:9D:03:F4:57:FC:6F:7F:FD:57:52:9E:97:C6:A8:89:A1:28:A3:99:E7:3C:83:3D:25:FF:85:93:D2:9A:76:54:94:AC:66:09:64:5B:D3:6B:85:83:5C:E9:C1:2F:2E:DE:D6:2E:CC:B4:3E:A6:2C:C6:87:F8:67:80:BC:29:71" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:51:07" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.042) 0:00:16.658 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.043) 0:00:16.701 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.033) 0:00:16.735 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.043) 0:00:16.778 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.048) 0:00:16.826 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:51:16 +0000 (0:00:00.047) 0:00:16.874 ******** ok: [/cache/centos-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.074226", "end": "2022-07-06 04:51:16.098229", "rc": 0, "start": "2022-07-06 04:51:16.024003" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:51:17 +0000 (0:00:00.442) 0:00:17.316 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:51:17 +0000 (0:00:00.045) 0:00:17.361 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:51:17 +0000 (0:00:00.025) 0:00:17.386 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:51:18 +0000 (0:00:01.814) 0:00:19.201 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:51:19 +0000 (0:00:01.007) 0:00:20.208 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:51:20 +0000 (0:00:00.873) 0:00:21.082 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083068.7360878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "96bdaa6e4eb8ca3834d9cabc85346fc51608911e", "ctime": 1657083068.7340877, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494225, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083068.7340877, "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": "1889313176", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.370) 0:00:21.452 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.032) 0:00:21.485 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.046) 0:00:21.531 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.042) 0:00:21.574 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083068.6890879, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "7724c6c3bd9b093b778b7ef19eb67cf35a0f0838", "ctime": 1657083068.7340877, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8494222, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083068.7340877, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "1255217483", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.371) 0:00:21.946 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.030) 0:00:21.977 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:51:21 +0000 (0:00:00.044) 0:00:22.022 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.233997", "end": "2022-07-06 04:51:21.461409", "rc": 0, "start": "2022-07-06 04:51:21.227412" } 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": "7E:4F:E6:9F:F1:88:42:0C:12:A2:65:9C:DE:30:FC:71:10:58:1B:13", "critical": false }, "authorityKeyIdentifier": { "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "85:D4:21:71:8B:D1:95:C1:73:34:BE:D0:C5:A0:6F:B2:BB:3D:44:B1:3A:76:05:3F:F9:AF:3F:81:C6:FC:26:E5:17:8E:5F:AB:22:01:0A:10:81:3B:A9:CF:EC:5B:FE:50:03:73:FE:D8:FE:80:DE:36:1C:E0:EC:CA:66:62:B9:AD:35:56:9D:AD:D8:7A:15:C5:89:05:02:70:83:AB:4A:BB:F9:31:64:50:6B:AF:FD:80:E3:19:BF:D2:B7:F2:E6:5B:FB:77:62:4C:7D:9D:7A:44:9A:F9:62:23:B3:80:50:2C:F2:19:4B:A7:D3:EA:BA:47:97:20:14:AF:21:31:9E:F7:97:FB:7E:61:DA:90:FC:A2:EB:FA:85:FF:3E:E5:A2:0E:53:53:E7:39:12:74:6F:19:79:C8:85:98:61:B9:F3:F8:B6:C4:C0:AC:A4:0F:F3:2F:A7:41:D9:8B:EB:61:A0:BA:3F:C6:5A:F0:86:32:C8:57:DA:8E:FE:FA:DB:2C:36:79:57:FD:78:5F:AC:38:C3:42:37:56:AD:26:FB:DE:D4:E5:33:99:3D:67:99:8A:54:89:11:CB:B5:54:0A:98:B4:A0:04:0D:20:D6:EA:8A:D6:1E:BF:57:02:D1:F2:E4:7F:87:04:27:4F:BC:AA:29:CB:18:06:55:C7:AC:DC:A4:A8:00" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:51:08" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.658) 0:00:22.680 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "02:3D:01:2A:A7:6B:8F:B9:76:BD:77:28:A0:B4:BD:F7:1C:93:E3:DD" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "7E:4F:E6:9F:F1:88:42:0C:12:A2:65:9C:DE:30:FC:71:10:58:1B:13" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "85:D4:21:71:8B:D1:95:C1:73:34:BE:D0:C5:A0:6F:B2:BB:3D:44:B1:3A:76:05:3F:F9:AF:3F:81:C6:FC:26:E5:17:8E:5F:AB:22:01:0A:10:81:3B:A9:CF:EC:5B:FE:50:03:73:FE:D8:FE:80:DE:36:1C:E0:EC:CA:66:62:B9:AD:35:56:9D:AD:D8:7A:15:C5:89:05:02:70:83:AB:4A:BB:F9:31:64:50:6B:AF:FD:80:E3:19:BF:D2:B7:F2:E6:5B:FB:77:62:4C:7D:9D:7A:44:9A:F9:62:23:B3:80:50:2C:F2:19:4B:A7:D3:EA:BA:47:97:20:14:AF:21:31:9E:F7:97:FB:7E:61:DA:90:FC:A2:EB:FA:85:FF:3E:E5:A2:0E:53:53:E7:39:12:74:6F:19:79:C8:85:98:61:B9:F3:F8:B6:C4:C0:AC:A4:0F:F3:2F:A7:41:D9:8B:EB:61:A0:BA:3F:C6:5A:F0:86:32:C8:57:DA:8E:FE:FA:DB:2C:36:79:57:FD:78:5F:AC:38:C3:42:37:56:AD:26:FB:DE:D4:E5:33:99:3D:67:99:8A:54:89:11:CB:B5:54:0A:98:B4:A0:04:0D:20:D6:EA:8A:D6:1E:BF:57:02:D1:F2:E4:7F:87:04:27:4F:BC:AA:29:CB:18:06:55:C7:AC:DC:A4:A8:00" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:44:16", "not_valid_before": "2022-07-06 04:51:08" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.049) 0:00:22.730 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.047) 0:00:22.778 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.033) 0:00:22.812 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.045) 0:00:22.857 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.044) 0:00:22.902 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:51:22 +0000 (0:00:00.047) 0:00:22.949 ******** ok: [/cache/centos-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.074715", "end": "2022-07-06 04:51:22.193573", "rc": 0, "start": "2022-07-06 04:51:22.118858" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:51:23 +0000 (0:00:00.460) 0:00:23.409 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=53 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:51:23 +0000 (0:00:00.053) 0:00:23.463 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.28s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.87s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.83s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.81s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.69s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.19s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.04s /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml:2 ------------------------------ Install the package, force upgrade -------------------------------------- 1.01s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install certreader ------------------------------------------------------ 0.87s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.86s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:18 ------------- Enable HA repos --------------------------------------------------------- 0.82s /cache/centos-8_setup.yml:5 --------------------------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.79s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Gathering Facts --------------------------------------------------------- 0.77s /tmp/tmphw7p6t3p/tests/tests_no_auto_renew.yml:17 ----------------------------- Parse certificate ------------------------------------------------------- 0.66s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.64s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.50s /tmp/tmphw7p6t3p/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmphw7p6t3p/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmphw7p6t3p/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/tmpch7qdmnu executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: centos-8_setup.yml *************************************************** 1 plays in /cache/centos-8_setup.yml PLAY [Enable HA repos] ********************************************************* META: ran handlers TASK [Enable HA repos] ********************************************************* task path: /cache/centos-8_setup.yml:5 Wednesday 06 July 2022 05:04:31 +0000 (0:00:00.019) 0:00:00.019 ******** changed: [/cache/centos-8.qcow2] => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "cmd": [ "dnf", "config-manager", "--set-enabled", "ha" ], "delta": "0:00:00.229970", "end": "2022-07-06 05:04:31.778540", "rc": 0, "start": "2022-07-06 05:04:31.548570" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 05:04:32 +0000 (0:00:00.845) 0:00:00.864 ******** =============================================================================== Enable HA repos --------------------------------------------------------- 0.85s /cache/centos-8_setup.yml:5 --------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 05:04:32 +0000 (0:00:00.022) 0:00:00.887 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 05:04:33 +0000 (0:00:01.027) 0:00:01.914 ******** included: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/centos-8.qcow2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 05:04:33 +0000 (0:00:00.026) 0:00:01.941 ******** ok: [/cache/centos-8.qcow2] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 05:04:34 +0000 (0:00:00.507) 0:00:02.449 ******** skipping: [/cache/centos-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-8.qcow2] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 05:04:34 +0000 (0:00:00.039) 0:00:02.489 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 05:04:36 +0000 (0:00:02.247) 0:00:04.736 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 05:04:38 +0000 (0:00:01.854) 0:00:06.590 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 05:04:38 +0000 (0:00:00.516) 0:00:07.106 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 05:04:39 +0000 (0:00:00.395) 0:00:07.502 ******** ok: [/cache/centos-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ActiveEnterTimestampMonotonic": "255054911", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.service sysinit.target basic.target network.target dbus.socket system.slice systemd-journald.socket syslog.target", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 04:57:42 UTC", "AssertTimestampMonotonic": "255044022", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ConditionTimestampMonotonic": "255044022", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "24010", "ExecMainStartTimestamp": "Wed 2022-07-06 04:57:42 UTC", "ExecMainStartTimestampMonotonic": "255045047", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 04:57:42 UTC", "InactiveExitTimestampMonotonic": "255045090", "InvocationID": "87aa9c8e0e7049a4bbed02fba42c187d", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14647", "LimitNPROCSoft": "14647", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14647", "LimitSIGPENDINGSoft": "14647", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "24010", "MemoryAccounting": "yes", "MemoryCurrent": "4079616", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice sysinit.target dbus.socket", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 04:57:42 UTC", "StateChangeTimestampMonotonic": "255054911", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23435", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 04:57:42 UTC", "WatchdogTimestampMonotonic": "255054910", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 05:04:40 +0000 (0:00:00.776) 0:00:08.279 ******** changed: [/cache/centos-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/centos-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/centos-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 05:04:41 +0000 (0:00:01.850) 0:00:10.130 ******** ok: [/cache/centos-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 05:04:42 +0000 (0:00:00.795) 0:00:10.926 ******** included: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-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/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-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/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:04:42 +0000 (0:00:00.048) 0:00:10.974 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 05:04:42 +0000 (0:00:00.054) 0:00:11.028 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 05:04:44 +0000 (0:00:01.843) 0:00:12.872 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 05:04:45 +0000 (0:00:01.150) 0:00:14.023 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 05:04:46 +0000 (0:00:00.917) 0:00:14.940 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083880.0168812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2b3d79bde43b96fdfe4c0b3ed3b236ffc526bb7e", "ctime": 1657083880.0138812, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539272, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083880.0138812, "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": "3136387820", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.501) 0:00:15.442 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.032) 0:00:15.475 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.044) 0:00:15.519 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.045) 0:00:15.565 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083879.9678812, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "01de48995ed3ca3b8deb88519fe6c14d1a65c8ac", "ctime": 1657083880.0138812, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539271, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083880.0138812, "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": "3054521543", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.383) 0:00:15.948 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.033) 0:00:15.982 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 05:04:47 +0000 (0:00:00.048) 0:00:16.031 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.223092", "end": "2022-07-06 05:04:47.534584", "rc": 0, "start": "2022-07-06 05:04:47.311492" } 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": "FF:67:6D:DC:FF:C3:22:1C:E7:C1:13:D8:EA:37:8E:EC:97:0E:D0:1F", "critical": false }, "authorityKeyIdentifier": { "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8B:44:F7:AA:FB:72:4A:EC:92:DF:EA:FB:A8:8C:E5:94:7A:CF:12:E3:26:08:6B:A7:12:BD:CF:33:07:F8:FE:06:22:85:3F:CE:2B:B5:EF:85:94:31:87:9F:1B:89:DD:B8:78:CA:69:CF:42:45:70:56:75:C2:00:DE:D8:56:53:61:D3:81:25:78:16:9A:1D:5B:B4:57:10:F1:4C:3E:44:F8:7D:CB:86:DB:F5:81:B1:2A:70:F8:AF:04:4D:35:F1:BA:76:F8:6C:16:F6:20:84:03:FB:79:83:76:B7:65:28:3B:F2:97:18:64:B2:B7:46:86:26:A4:07:67:E0:9A:D2:60:30:06:23:1D:5B:F2:63:D6:A2:B5:61:7D:4A:57:58:0F:06:50:BE:65:D0:24:F2:DE:66:CB:23:37:24:08:94:B4:E3:F7:73:79:7C:9E:91:A7:DD:37:41:5B:F2:65:C1:14:50:15:31:82:A0:B6:F9:47:CD:9F:7F:84:BF:89:76:9C:F5:E9:D4:8E:A3:5F:0E:1D:17:4B:C2:56:1C:93:E3:1D:9D:EB:D8:C2:4A:32:AF:C5:B3:DE:FA:B9:CF:A7:00:17:35:12:DC:61:77:7C:85:DC:36:32:C9:B4:95:3D:0B:FE:74:C6:1A:D3:BE:12:74:35:20:36:0E:E0:95:A1:BA:B6" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:40" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.587) 0:00:16.618 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "FF:67:6D:DC:FF:C3:22:1C:E7:C1:13:D8:EA:37:8E:EC:97:0E:D0:1F" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8B:44:F7:AA:FB:72:4A:EC:92:DF:EA:FB:A8:8C:E5:94:7A:CF:12:E3:26:08:6B:A7:12:BD:CF:33:07:F8:FE:06:22:85:3F:CE:2B:B5:EF:85:94:31:87:9F:1B:89:DD:B8:78:CA:69:CF:42:45:70:56:75:C2:00:DE:D8:56:53:61:D3:81:25:78:16:9A:1D:5B:B4:57:10:F1:4C:3E:44:F8:7D:CB:86:DB:F5:81:B1:2A:70:F8:AF:04:4D:35:F1:BA:76:F8:6C:16:F6:20:84:03:FB:79:83:76:B7:65:28:3B:F2:97:18:64:B2:B7:46:86:26:A4:07:67:E0:9A:D2:60:30:06:23:1D:5B:F2:63:D6:A2:B5:61:7D:4A:57:58:0F:06:50:BE:65:D0:24:F2:DE:66:CB:23:37:24:08:94:B4:E3:F7:73:79:7C:9E:91:A7:DD:37:41:5B:F2:65:C1:14:50:15:31:82:A0:B6:F9:47:CD:9F:7F:84:BF:89:76:9C:F5:E9:D4:8E:A3:5F:0E:1D:17:4B:C2:56:1C:93:E3:1D:9D:EB:D8:C2:4A:32:AF:C5:B3:DE:FA:B9:CF:A7:00:17:35:12:DC:61:77:7C:85:DC:36:32:C9:B4:95:3D:0B:FE:74:C6:1A:D3:BE:12:74:35:20:36:0E:E0:95:A1:BA:B6" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:40" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.049) 0:00:16.668 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.049) 0:00:16.717 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.030) 0:00:16.747 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.041) 0:00:16.788 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.042) 0:00:16.831 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 05:04:48 +0000 (0:00:00.045) 0:00:16.877 ******** ok: [/cache/centos-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.077182", "end": "2022-07-06 05:04:48.242642", "rc": 0, "start": "2022-07-06 05:04:48.165460" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 05:04:49 +0000 (0:00:00.442) 0:00:17.320 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 05:04:49 +0000 (0:00:00.045) 0:00:17.365 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 05:04:49 +0000 (0:00:00.027) 0:00:17.393 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 05:04:51 +0000 (0:00:01.825) 0:00:19.218 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 05:04:52 +0000 (0:00:01.002) 0:00:20.220 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 05:04:52 +0000 (0:00:00.914) 0:00:21.135 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083880.923881, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "3d45c849706ca1f04c34524e87a21e2a4b8fb3a9", "ctime": 1657083880.9208813, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539267, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083880.9208813, "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": "887849558", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.377) 0:00:21.512 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.034) 0:00:21.547 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.045) 0:00:21.592 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.041) 0:00:21.634 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "stat": { "atime": 1657083880.8748813, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "18618d8cb44a279a0d1d12ea5dcc572d45976b38", "ctime": 1657083880.9208813, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8539274, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657083880.9208813, "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": "1991405932", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.369) 0:00:22.004 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.030) 0:00:22.035 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 05:04:53 +0000 (0:00:00.045) 0:00:22.081 ******** ok: [/cache/centos-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.224429", "end": "2022-07-06 05:04:53.591007", "rc": 0, "start": "2022-07-06 05:04:53.366578" } 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": "1F:FB:13:94:A5:FF:43:A4:EB:04:EB:ED:47:4C:3F:AD:30:B8:52:18", "critical": false }, "authorityKeyIdentifier": { "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "0B:DC:58:B4:68:F1:22:E4:E2:DD:89:01:4B:F2:44:A2:70:D5:7B:1E:CF:18:E2:16:9E:AC:08:13:07:A0:F8:40:18:AA:D1:6B:93:95:13:B6:6B:8F:14:FA:36:48:1D:6A:4F:25:99:12:B2:87:DF:9A:60:E8:6A:40:5A:ED:2E:36:9C:18:26:02:95:FE:43:93:0D:FC:F7:C3:4D:D2:42:63:AB:C3:1D:B7:02:9B:34:52:BD:07:E4:E8:F1:DF:97:5C:B8:A3:8E:F2:06:F5:22:D7:C2:C5:C8:85:0B:E1:8F:CE:70:A1:53:26:D3:95:D6:0C:15:15:52:72:BD:D5:C9:D1:D7:00:FD:BA:59:A3:93:8A:78:BB:2C:9B:1B:10:2B:A4:25:69:56:D2:C6:B8:A6:9C:B1:7D:9F:03:4E:2A:7A:28:B8:E9:03:E2:75:AF:40:C5:C4:21:1C:61:48:73:BE:6A:9B:EC:24:4A:EE:17:77:E5:3E:BD:F7:02:22:18:99:E0:CC:EC:23:00:6E:B0:BD:90:3A:8C:CA:A8:2B:CD:B0:31:6B:FD:DE:2E:E4:19:DD:F6:0B:50:B1:33:07:60:F5:1C:99:D7:8D:FB:70:50:FC:B3:CE:D5:A1:67:5E:36:77:E3:66:73:7D:1E:7F:45:F8:2D:6B:AD:D5:F0:C3:89:3E:64" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:40" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.589) 0:00:22.670 ******** ok: [/cache/centos-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "C5:FD:E2:7E:B6:D3:3B:5A:3E:46:F2:AC:4C:17:50:0B:30:3C:AB:DC" }, "basicConstraints": { "critical": true, "value": { "ca": false } }, "extendedKeyUsage": { "critical": false, "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ] }, "keyUsage": { "critical": false, "value": [ "digital_signature", "key_encipherment" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "1F:FB:13:94:A5:FF:43:A4:EB:04:EB:ED:47:4C:3F:AD:30:B8:52:18" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "0B:DC:58:B4:68:F1:22:E4:E2:DD:89:01:4B:F2:44:A2:70:D5:7B:1E:CF:18:E2:16:9E:AC:08:13:07:A0:F8:40:18:AA:D1:6B:93:95:13:B6:6B:8F:14:FA:36:48:1D:6A:4F:25:99:12:B2:87:DF:9A:60:E8:6A:40:5A:ED:2E:36:9C:18:26:02:95:FE:43:93:0D:FC:F7:C3:4D:D2:42:63:AB:C3:1D:B7:02:9B:34:52:BD:07:E4:E8:F1:DF:97:5C:B8:A3:8E:F2:06:F5:22:D7:C2:C5:C8:85:0B:E1:8F:CE:70:A1:53:26:D3:95:D6:0C:15:15:52:72:BD:D5:C9:D1:D7:00:FD:BA:59:A3:93:8A:78:BB:2C:9B:1B:10:2B:A4:25:69:56:D2:C6:B8:A6:9C:B1:7D:9F:03:4E:2A:7A:28:B8:E9:03:E2:75:AF:40:C5:C4:21:1C:61:48:73:BE:6A:9B:EC:24:4A:EE:17:77:E5:3E:BD:F7:02:22:18:99:E0:CC:EC:23:00:6E:B0:BD:90:3A:8C:CA:A8:2B:CD:B0:31:6B:FD:DE:2E:E4:19:DD:F6:0B:50:B1:33:07:60:F5:1C:99:D7:8D:FB:70:50:FC:B3:CE:D5:A1:67:5E:36:77:E3:66:73:7D:1E:7F:45:F8:2D:6B:AD:D5:F0:C3:89:3E:64" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:57:42", "not_valid_before": "2022-07-06 05:04:40" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.043) 0:00:22.713 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.041) 0:00:22.755 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.032) 0:00:22.788 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.044) 0:00:22.832 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.044) 0:00:22.877 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 05:04:54 +0000 (0:00:00.049) 0:00:22.926 ******** ok: [/cache/centos-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.077139", "end": "2022-07-06 05:04:54.291187", "rc": 0, "start": "2022-07-06 05:04:54.214048" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 05:04:55 +0000 (0:00:00.444) 0:00:23.370 ******** ok: [/cache/centos-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-8.qcow2 : ok=53 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 05:04:55 +0000 (0:00:00.055) 0:00:23.426 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.25s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.85s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.85s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Ensure python3 is installed --------------------------------------------- 1.84s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 1.83s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.03s /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml:2 ------------------ Install the package, force upgrade -------------------------------------- 1.00s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.92s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.91s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Enable HA repos --------------------------------------------------------- 0.85s /cache/centos-8_setup.yml:5 --------------------------------------------------- Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmpap4wle35/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.78s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.59s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.59s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.51s /tmp/tmpch7qdmnu/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmpap4wle35/tests/certificate/tasks/assert_certificate_parameters.yml:132