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/tmpz63ztj_p executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 23:26:23 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:26:25 +0000 (0:00:01.227) 0:00:01.241 ******** included: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:26:25 +0000 (0:00:00.047) 0:00:01.288 ******** ok: [/cache/centos-9.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 23:26:25 +0000 (0:00:00.600) 0:00:01.889 ******** skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:26:25 +0000 (0:00:00.040) 0:00:01.929 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:26:26 +0000 (0:00:01.130) 0:00:03.059 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:26:27 +0000 (0:00:00.953) 0:00:04.013 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:26:28 +0000 (0:00:00.608) 0:00:04.621 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:26:28 +0000 (0:00:00.487) 0:00:05.109 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ActiveEnterTimestampMonotonic": "244505840", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus-broker.service sysinit.target dbus.socket basic.target system.slice systemd-journald.socket syslog.target network.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 19:20:07 EDT", "AssertTimestampMonotonic": "244494390", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "41473128000", "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 cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ConditionTimestampMonotonic": "244494388", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "21786", "ExecMainStartTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ExecMainStartTimestampMonotonic": "244495669", "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 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 19:20:07 EDT", "InactiveExitTimestampMonotonic": "244496109", "InvocationID": "0102ee389fed4dc9950067800be1ebca", "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": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14618", "LimitNPROCSoft": "14618", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14618", "LimitSIGPENDINGSoft": "14618", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "21786", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "5238784", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice sysinit.target dbus.socket", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "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 19:23:46 EDT", "StateChangeTimestampMonotonic": "464086309", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23388", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 23:26:29 +0000 (0:00:00.880) 0:00:05.990 ******** changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). META: role_complete for /cache/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 23:26:32 +0000 (0:00:02.231) 0:00:08.222 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 23:26:32 +0000 (0:00:00.890) 0:00:09.112 ******** included: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:26:33 +0000 (0:00:00.046) 0:00:09.159 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:26:33 +0000 (0:00:00.035) 0:00:09.194 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:26:34 +0000 (0:00:00.963) 0:00:10.157 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:26:35 +0000 (0:00:01.244) 0:00:11.402 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:26:36 +0000 (0:00:00.979) 0:00:12.381 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149991.3045406, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d754a91766977820748e7932e4b02298a8974496", "ctime": 1657149991.3015406, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13813557, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149991.3015406, "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": "1849785561", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:26:36 +0000 (0:00:00.604) 0:00:12.986 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:26:36 +0000 (0:00:00.061) 0:00:13.047 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:26:36 +0000 (0:00:00.046) 0:00:13.093 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:26:37 +0000 (0:00:00.043) 0:00:13.137 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149991.2365408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e0fafd1df766f56fef8a97c8cc431a20bdf67c43", "ctime": 1657149991.3015406, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4581533, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149991.3015406, "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": "1945524137", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:26:37 +0000 (0:00:00.491) 0:00:13.628 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:26:37 +0000 (0:00:00.033) 0:00:13.661 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:26:37 +0000 (0:00:00.046) 0:00:13.708 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.193394", "end": "2022-07-06 19:26:38.624604", "rc": 0, "start": "2022-07-06 19:26:38.431210" } 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": "16:BA:92:BB:35:C9:0F:05:60:C2:E1:66:F5:7E:A3:87:4A:1C:52:8A", "critical": false }, "authorityKeyIdentifier": { "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "3D:4A:53:BF:30:1B:98:8F:BF:69:A0:4E:0C:C3:EA:10:10:7A:A8:E2:95:70:94:B2:9A:80:A4:5B:86:C2:BF:B9:E1:69:BB:08:78:6E:66:6D:20:72:53:D6:76:E1:A7:F6:57:5E:01:90:56:5C:2F:D3:A8:59:0A:8B:54:B4:77:3B:A6:54:53:43:C6:F2:3A:0E:23:CC:B9:03:52:75:09:78:45:8F:82:54:68:54:C0:F1:6A:D1:A5:E1:EE:C7:15:D8:1F:8D:13:78:96:4E:75:35:EE:94:30:42:F3:03:AC:D5:0A:E6:A9:60:69:B3:AE:0B:BC:6C:89:06:B5:0A:26:60:61:1F:B9:0C:C5:03:56:51:67:9A:71:CB:6E:99:12:3B:18:8B:46:DF:BE:3E:3A:A1:68:51:18:D8:49:A5:77:8E:92:D4:EA:A5:68:A1:49:98:4A:6A:AF:CC:83:70:26:42:A9:9E:A8:57:7A:18:57:2B:37:52:BE:BC:C5:B3:D1:32:6D:AF:10:4D:BE:B2:24:3F:8C:99:47:35:53:E5:81:16:54:DA:D2:F2:D3:BF:12:A7:AC:1D:A4:5B:06:5A:8A:49:05:9C:35:9C:CF:30:62:00:54:85:30:4E:56:DA:C7:CB:70:25:95:A5:29:BC:6A:1A:17:A3:ED:FC:99:24:49:90" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:26:31" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.782) 0:00:14.490 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90" }, "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": "16:BA:92:BB:35:C9:0F:05:60:C2:E1:66:F5:7E:A3:87:4A:1C:52:8A" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "3D:4A:53:BF:30:1B:98:8F:BF:69:A0:4E:0C:C3:EA:10:10:7A:A8:E2:95:70:94:B2:9A:80:A4:5B:86:C2:BF:B9:E1:69:BB:08:78:6E:66:6D:20:72:53:D6:76:E1:A7:F6:57:5E:01:90:56:5C:2F:D3:A8:59:0A:8B:54:B4:77:3B:A6:54:53:43:C6:F2:3A:0E:23:CC:B9:03:52:75:09:78:45:8F:82:54:68:54:C0:F1:6A:D1:A5:E1:EE:C7:15:D8:1F:8D:13:78:96:4E:75:35:EE:94:30:42:F3:03:AC:D5:0A:E6:A9:60:69:B3:AE:0B:BC:6C:89:06:B5:0A:26:60:61:1F:B9:0C:C5:03:56:51:67:9A:71:CB:6E:99:12:3B:18:8B:46:DF:BE:3E:3A:A1:68:51:18:D8:49:A5:77:8E:92:D4:EA:A5:68:A1:49:98:4A:6A:AF:CC:83:70:26:42:A9:9E:A8:57:7A:18:57:2B:37:52:BE:BC:C5:B3:D1:32:6D:AF:10:4D:BE:B2:24:3F:8C:99:47:35:53:E5:81:16:54:DA:D2:F2:D3:BF:12:A7:AC:1D:A4:5B:06:5A:8A:49:05:9C:35:9C:CF:30:62:00:54:85:30:4E:56:DA:C7:CB:70:25:95:A5:29:BC:6A:1A:17:A3:ED:FC:99:24:49:90" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:26:31" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.104) 0:00:14.594 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.046) 0:00:14.641 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.033) 0:00:14.674 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.044) 0:00:14.718 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.044) 0:00:14.763 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:26:38 +0000 (0:00:00.045) 0:00:14.808 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.059931", "end": "2022-07-06 19:26:39.480287", "rc": 0, "start": "2022-07-06 19:26:39.420356" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:26:39 +0000 (0:00:00.535) 0:00:15.344 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:26:39 +0000 (0:00:00.044) 0:00:15.388 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:26:39 +0000 (0:00:00.027) 0:00:15.416 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:26:40 +0000 (0:00:01.001) 0:00:16.418 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:26:41 +0000 (0:00:01.116) 0:00:17.534 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:26:42 +0000 (0:00:00.956) 0:00:18.491 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149992.2765408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d236af49209f67c1005ee221505463d5ba1836a3", "ctime": 1657149992.2735407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13813559, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149992.2735407, "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": "320607794", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:26:42 +0000 (0:00:00.459) 0:00:18.951 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:26:42 +0000 (0:00:00.033) 0:00:18.984 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:26:42 +0000 (0:00:00.047) 0:00:19.031 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:26:42 +0000 (0:00:00.042) 0:00:19.073 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149992.2135408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "56043d24d3c32036087fe55817dcfe3e35bddefa", "ctime": 1657149992.2735407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4591373, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149992.2735407, "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": "1549002589", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:26:43 +0000 (0:00:00.474) 0:00:19.547 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:26:43 +0000 (0:00:00.032) 0:00:19.579 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:26:43 +0000 (0:00:00.043) 0:00:19.623 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.191938", "end": "2022-07-06 19:26:44.396354", "rc": 0, "start": "2022-07-06 19:26:44.204416" } 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": "26:26:C1:76:FF:C9:67:E1:A1:05:6E:FA:11:D7:C1:EE:C3:0A:7A:15", "critical": false }, "authorityKeyIdentifier": { "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8C:65:A6:15:0E:7D:78:9A:77:0C:4D:94:9C:A9:77:D4:41:AA:64:67:81:1F:8C:D5:FE:D8:6D:D1:63:3D:F8:CE:DA:5D:CA:38:60:86:FD:C4:D2:49:EE:06:D6:5A:6E:E2:79:34:E9:A6:D5:FC:91:9C:F0:A9:0B:A9:01:09:DB:E2:27:BD:72:D8:FC:5C:43:2B:EA:2A:A7:75:43:D9:57:4E:48:8D:A2:BD:EA:AB:2C:F1:8C:0B:78:AA:59:08:89:F3:18:26:92:53:22:45:42:F0:DF:24:32:B1:97:91:B6:51:AA:0C:D8:20:C9:7D:E7:FE:2F:F5:DE:4F:6A:95:D5:1D:43:41:B8:89:A4:D3:54:5D:2F:2A:7F:A6:DC:9A:60:D5:3A:E6:E6:11:4E:3A:D9:7C:74:F8:CE:F4:90:62:CF:B4:05:1D:D3:A0:8F:15:69:6E:52:53:AB:0E:98:EF:AD:8F:79:55:11:BD:C7:28:4C:26:F8:AE:A0:1D:F4:CF:13:9A:68:E9:89:A9:29:3D:54:3B:85:5D:D1:BC:5C:D6:7E:DF:58:49:44:30:9C:98:69:9A:4C:69:60:C5:27:DA:3D:AC:59:73:05:3B:D5:03:F1:94:38:1C:67:27:AD:09:15:50:32:D0:11:B7:9D:B9:C7:C9:E5:BB:62:63:09:13:00:32" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:26:32" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.636) 0:00:20.260 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90" }, "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": "26:26:C1:76:FF:C9:67:E1:A1:05:6E:FA:11:D7:C1:EE:C3:0A:7A:15" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "8C:65:A6:15:0E:7D:78:9A:77:0C:4D:94:9C:A9:77:D4:41:AA:64:67:81:1F:8C:D5:FE:D8:6D:D1:63:3D:F8:CE:DA:5D:CA:38:60:86:FD:C4:D2:49:EE:06:D6:5A:6E:E2:79:34:E9:A6:D5:FC:91:9C:F0:A9:0B:A9:01:09:DB:E2:27:BD:72:D8:FC:5C:43:2B:EA:2A:A7:75:43:D9:57:4E:48:8D:A2:BD:EA:AB:2C:F1:8C:0B:78:AA:59:08:89:F3:18:26:92:53:22:45:42:F0:DF:24:32:B1:97:91:B6:51:AA:0C:D8:20:C9:7D:E7:FE:2F:F5:DE:4F:6A:95:D5:1D:43:41:B8:89:A4:D3:54:5D:2F:2A:7F:A6:DC:9A:60:D5:3A:E6:E6:11:4E:3A:D9:7C:74:F8:CE:F4:90:62:CF:B4:05:1D:D3:A0:8F:15:69:6E:52:53:AB:0E:98:EF:AD:8F:79:55:11:BD:C7:28:4C:26:F8:AE:A0:1D:F4:CF:13:9A:68:E9:89:A9:29:3D:54:3B:85:5D:D1:BC:5C:D6:7E:DF:58:49:44:30:9C:98:69:9A:4C:69:60:C5:27:DA:3D:AC:59:73:05:3B:D5:03:F1:94:38:1C:67:27:AD:09:15:50:32:D0:11:B7:9D:B9:C7:C9:E5:BB:62:63:09:13:00:32" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:26:32" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.043) 0:00:20.304 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.044) 0:00:20.348 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.032) 0:00:20.380 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.041) 0:00:20.422 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.043) 0:00:20.465 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.043) 0:00:20.508 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.055182", "end": "2022-07-06 19:26:45.155816", "rc": 0, "start": "2022-07-06 19:26:45.100634" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.506) 0:00:21.015 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:26:44 +0000 (0:00:00.053) 0:00:21.069 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.23s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.24s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.23s /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml:2 ------------------------------ linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.13s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Install the package, force upgrade -------------------------------------- 1.12s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 ------------- Ensure python3 is installed --------------------------------------------- 1.00s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install certreader ------------------------------------------------------ 0.98s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 ------------- Ensure python3 is installed --------------------------------------------- 0.96s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install certreader ------------------------------------------------------ 0.96s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 ------------- linux-system-roles.certificate : Ensure provider packages are installed --- 0.95s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Gathering Facts --------------------------------------------------------- 0.89s /tmp/tmpy0ojfldm/tests/tests_no_auto_renew.yml:17 ----------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.88s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.78s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.64s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.61s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.60s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.60s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.54s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.51s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve key file stats ------------------------------------------------- 0.49s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:55 ------------- 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/tmpz63ztj_p executable location = /usr/bin/ansible-playbook python version = 3.9.13 (main, May 18 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] jinja version = 2.11.3 libyaml = True Using /etc/ansible/ansible.cfg as config file Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 23:38:35 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:38:37 +0000 (0:00:01.190) 0:00:01.204 ******** included: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:38:37 +0000 (0:00:00.026) 0:00:01.231 ******** ok: [/cache/centos-9.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 23:38:37 +0000 (0:00:00.619) 0:00:01.851 ******** skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:38:37 +0000 (0:00:00.038) 0:00:01.889 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:38:38 +0000 (0:00:01.114) 0:00:03.004 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:38:39 +0000 (0:00:00.945) 0:00:03.949 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:38:40 +0000 (0:00:00.586) 0:00:04.536 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:38:40 +0000 (0:00:00.461) 0:00:04.998 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ActiveEnterTimestampMonotonic": "234351444", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "syslog.target basic.target systemd-journald.socket dbus.socket system.slice dbus-broker.service network.target sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 19:32:27 EDT", "AssertTimestampMonotonic": "234338283", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "41297756000", "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 cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ConditionTimestampMonotonic": "234338281", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "21573", "ExecMainStartTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ExecMainStartTimestampMonotonic": "234339895", "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 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 19:32:27 EDT", "InactiveExitTimestampMonotonic": "234340345", "InvocationID": "5f6ff4c841584ff59cf869087cb96d09", "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": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14618", "LimitNPROCSoft": "14618", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14618", "LimitSIGPENDINGSoft": "14618", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "21573", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "4927488", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice dbus.socket sysinit.target", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "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 19:36:01 EDT", "StateChangeTimestampMonotonic": "449090934", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23388", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 23:38:41 +0000 (0:00:00.858) 0:00:05.857 ******** changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). META: role_complete for /cache/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 23:38:43 +0000 (0:00:02.199) 0:00:08.056 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 23:38:44 +0000 (0:00:00.870) 0:00:08.927 ******** included: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:38:44 +0000 (0:00:00.044) 0:00:08.971 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:38:44 +0000 (0:00:00.049) 0:00:09.021 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:38:45 +0000 (0:00:00.991) 0:00:10.012 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:38:47 +0000 (0:00:01.219) 0:00:11.232 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:38:48 +0000 (0:00:00.940) 0:00:12.173 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150722.7211215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a3c029f1798152359800656239aa3835fdefc624", "ctime": 1657150722.7181215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13813941, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150722.7181215, "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": "2686806129", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:38:48 +0000 (0:00:00.586) 0:00:12.759 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:38:48 +0000 (0:00:00.032) 0:00:12.791 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:38:48 +0000 (0:00:00.044) 0:00:12.835 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:38:48 +0000 (0:00:00.069) 0:00:12.905 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150722.6581213, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a14cfdd02716b780a396dab4b18a49ac3c6e65c2", "ctime": 1657150722.7181215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4308945, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150722.7181215, "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": "2979331454", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:38:49 +0000 (0:00:00.491) 0:00:13.397 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:38:49 +0000 (0:00:00.030) 0:00:13.427 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:38:49 +0000 (0:00:00.044) 0:00:13.471 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.192903", "end": "2022-07-06 19:38:50.041621", "rc": 0, "start": "2022-07-06 19:38:49.848718" } 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": "69:99:C4:01:79:93:95:C7:F9:A7:77:C8:4D:34:B3:4C:47:6B:CE:EB", "critical": false }, "authorityKeyIdentifier": { "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "63:C9:1B:30:71:07:8B:D2:FF:EE:BA:C2:82:32:23:08:E7:23:E6:BE:2F:82:2C:41:11:34:AA:62:02:3F:59:5F:3E:15:94:5C:A8:4D:B4:BB:7F:7B:E6:E5:B7:1F:9E:B3:42:F5:34:39:2D:86:02:16:70:D3:98:D9:63:98:FB:D1:DA:3B:4E:CB:B7:C7:CC:B9:57:AB:49:01:DE:BF:10:A5:A5:22:97:3A:E4:11:2E:73:D5:67:E0:66:1F:3B:F8:03:6C:7C:F7:06:3A:73:AD:F5:85:D6:C7:9F:4E:93:15:52:AF:82:4F:4B:10:98:7D:40:87:1C:A0:6E:F2:53:89:9B:90:03:30:A6:BE:33:CE:B9:0F:9C:6C:68:0D:F5:9A:A4:41:E2:7A:0A:61:12:80:DC:1B:DC:58:D3:58:16:B5:82:9B:D7:BE:ED:7F:00:01:84:FC:5C:55:18:D5:EC:34:4A:0F:2E:20:2D:14:5C:53:DD:31:7A:FB:3F:B6:4C:22:FF:2E:D9:9A:EE:4C:E7:EA:92:E6:21:2B:17:48:14:26:6F:A8:D0:70:DF:A1:CC:39:67:A6:87:0F:D5:DA:67:81:DC:CA:D1:57:79:DC:01:E8:5E:70:0D:12:87:7C:E0:D0:06:26:72:B3:B2:BD:B9:21:41:F5:D5:62:C5:9D:7C:D9:60" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:38:42" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.734) 0:00:14.206 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0" }, "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": "69:99:C4:01:79:93:95:C7:F9:A7:77:C8:4D:34:B3:4C:47:6B:CE:EB" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "63:C9:1B:30:71:07:8B:D2:FF:EE:BA:C2:82:32:23:08:E7:23:E6:BE:2F:82:2C:41:11:34:AA:62:02:3F:59:5F:3E:15:94:5C:A8:4D:B4:BB:7F:7B:E6:E5:B7:1F:9E:B3:42:F5:34:39:2D:86:02:16:70:D3:98:D9:63:98:FB:D1:DA:3B:4E:CB:B7:C7:CC:B9:57:AB:49:01:DE:BF:10:A5:A5:22:97:3A:E4:11:2E:73:D5:67:E0:66:1F:3B:F8:03:6C:7C:F7:06:3A:73:AD:F5:85:D6:C7:9F:4E:93:15:52:AF:82:4F:4B:10:98:7D:40:87:1C:A0:6E:F2:53:89:9B:90:03:30:A6:BE:33:CE:B9:0F:9C:6C:68:0D:F5:9A:A4:41:E2:7A:0A:61:12:80:DC:1B:DC:58:D3:58:16:B5:82:9B:D7:BE:ED:7F:00:01:84:FC:5C:55:18:D5:EC:34:4A:0F:2E:20:2D:14:5C:53:DD:31:7A:FB:3F:B6:4C:22:FF:2E:D9:9A:EE:4C:E7:EA:92:E6:21:2B:17:48:14:26:6F:A8:D0:70:DF:A1:CC:39:67:A6:87:0F:D5:DA:67:81:DC:CA:D1:57:79:DC:01:E8:5E:70:0D:12:87:7C:E0:D0:06:26:72:B3:B2:BD:B9:21:41:F5:D5:62:C5:9D:7C:D9:60" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:38:42" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.041) 0:00:14.247 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.041) 0:00:14.289 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.030) 0:00:14.320 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.041) 0:00:14.361 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.041) 0:00:14.402 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.044) 0:00:14.446 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.058230", "end": "2022-07-06 19:38:50.787745", "rc": 0, "start": "2022-07-06 19:38:50.729515" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.503) 0:00:14.950 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.043) 0:00:14.993 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:38:50 +0000 (0:00:00.026) 0:00:15.019 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:38:51 +0000 (0:00:00.965) 0:00:15.984 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:38:53 +0000 (0:00:01.094) 0:00:17.079 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:38:53 +0000 (0:00:00.941) 0:00:18.020 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150723.7291214, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "583bcc3ea19c11f0cb4ce2036b936a89989ad135", "ctime": 1657150723.7261214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13813943, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150723.7261214, "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": "3486828110", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:38:54 +0000 (0:00:00.451) 0:00:18.471 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:38:54 +0000 (0:00:00.029) 0:00:18.501 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:38:54 +0000 (0:00:00.044) 0:00:18.546 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:38:54 +0000 (0:00:00.041) 0:00:18.588 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150723.6631215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "289503ae2e8c64b7e7f79f269820e77bea358f6e", "ctime": 1657150723.7261214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4308947, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150723.7261214, "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": "2771968033", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:38:54 +0000 (0:00:00.442) 0:00:19.031 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.030) 0:00:19.061 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.043) 0:00:19.104 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.190878", "end": "2022-07-06 19:38:55.584576", "rc": 0, "start": "2022-07-06 19:38:55.393698" } 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:2C:4C:CE:46:88:20:CF:23:DE:C3:97:EA:05:58:91:88:C1:63:49", "critical": false }, "authorityKeyIdentifier": { "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "1E:B9:3F:EE:2E:D2:28:BC:90:DC:1B:86:66:6F:67:8C:13:C1:BE:24:D5:1E:B9:67:3C:E2:BE:16:B7:3E:0A:1D:3B:A8:ED:09:82:26:A4:3D:5C:0F:92:6B:44:D7:5E:59:B9:EE:95:77:B7:25:CC:9F:54:29:4C:DE:D2:23:0F:56:B7:F4:47:53:48:39:22:0D:36:08:BB:B5:3B:3F:2B:B0:C9:4F:4F:ED:6A:8B:D8:ED:F3:A7:06:F5:47:81:1A:A1:66:A9:74:F2:A3:65:AE:2B:0D:53:7A:AD:EC:87:84:72:5B:E0:9E:F4:04:DD:70:C0:A0:99:FB:0F:C1:9E:DB:EB:0B:1B:88:71:7C:D6:04:5E:51:FF:D2:19:AF:21:D3:97:A8:BF:FF:9C:7F:F8:5C:40:C0:07:57:40:15:75:8E:C8:30:A4:C0:05:83:2E:E8:E5:32:F5:BC:68:97:AC:CC:95:2C:00:A0:7F:DE:22:2F:F0:FC:BF:CD:66:16:07:0C:BC:98:FA:2C:C2:B1:70:63:42:F2:14:DE:60:CF:3D:66:83:70:FB:72:9B:C3:FA:8C:04:17:A5:B7:C0:23:5A:55:01:29:A9:53:CF:14:8B:9D:15:15:44:56:8A:4E:31:ED:F3:ED:04:C2:33:1A:44:D4:E1:E6:49:78:4B:66:D8:99:5B" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:38:43" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.642) 0:00:19.747 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0" }, "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:2C:4C:CE:46:88:20:CF:23:DE:C3:97:EA:05:58:91:88:C1:63:49" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "1E:B9:3F:EE:2E:D2:28:BC:90:DC:1B:86:66:6F:67:8C:13:C1:BE:24:D5:1E:B9:67:3C:E2:BE:16:B7:3E:0A:1D:3B:A8:ED:09:82:26:A4:3D:5C:0F:92:6B:44:D7:5E:59:B9:EE:95:77:B7:25:CC:9F:54:29:4C:DE:D2:23:0F:56:B7:F4:47:53:48:39:22:0D:36:08:BB:B5:3B:3F:2B:B0:C9:4F:4F:ED:6A:8B:D8:ED:F3:A7:06:F5:47:81:1A:A1:66:A9:74:F2:A3:65:AE:2B:0D:53:7A:AD:EC:87:84:72:5B:E0:9E:F4:04:DD:70:C0:A0:99:FB:0F:C1:9E:DB:EB:0B:1B:88:71:7C:D6:04:5E:51:FF:D2:19:AF:21:D3:97:A8:BF:FF:9C:7F:F8:5C:40:C0:07:57:40:15:75:8E:C8:30:A4:C0:05:83:2E:E8:E5:32:F5:BC:68:97:AC:CC:95:2C:00:A0:7F:DE:22:2F:F0:FC:BF:CD:66:16:07:0C:BC:98:FA:2C:C2:B1:70:63:42:F2:14:DE:60:CF:3D:66:83:70:FB:72:9B:C3:FA:8C:04:17:A5:B7:C0:23:5A:55:01:29:A9:53:CF:14:8B:9D:15:15:44:56:8A:4E:31:ED:F3:ED:04:C2:33:1A:44:D4:E1:E6:49:78:4B:66:D8:99:5B" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:38:43" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.040) 0:00:19.788 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.041) 0:00:19.829 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.029) 0:00:19.859 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.040) 0:00:19.899 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.043) 0:00:19.942 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:38:55 +0000 (0:00:00.043) 0:00:19.986 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.055153", "end": "2022-07-06 19:38:56.323075", "rc": 0, "start": "2022-07-06 19:38:56.267922" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:38:56 +0000 (0:00:00.497) 0:00:20.483 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:38:56 +0000 (0:00:00.053) 0:00:20.536 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 2.20s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.22s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.19s /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml:2 ------------------ fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.11s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install the package, force upgrade -------------------------------------- 1.09s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Ensure python3 is installed --------------------------------------------- 0.99s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 0.97s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.95s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Install certreader ------------------------------------------------------ 0.94s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.94s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.87s /tmp/tmp8_d1edvf/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.86s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.73s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.64s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.62s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.59s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.59s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.50s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.50s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve key file stats ------------------------------------------------- 0.49s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:53 -