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/tmppc8868jw 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/tmprylna2eo/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 06:27:46 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 06:27:47 +0000 (0:00:01.146) 0:00:01.161 ******** included: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-9.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 06:27:47 +0000 (0:00:00.026) 0:00:01.187 ******** ok: [/cache/rhel-9.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 06:27:48 +0000 (0:00:00.525) 0:00:01.713 ******** skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.0.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.0.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 06:27:48 +0000 (0:00:00.041) 0:00:01.754 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 06:27:49 +0000 (0:00:01.088) 0:00:02.843 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 06:27:50 +0000 (0:00:00.942) 0:00:03.785 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 06:27:50 +0000 (0:00:00.578) 0:00:04.364 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 06:27:51 +0000 (0:00:00.394) 0:00:04.758 ******** ok: [/cache/rhel-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 02:21:33 EDT", "ActiveEnterTimestampMonotonic": "202991623", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket sysinit.target dbus-broker.service network.target syslog.target basic.target system.slice dbus.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 02:21:33 EDT", "AssertTimestampMonotonic": "202981017", "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": "40742143000", "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 02:21:33 EDT", "ConditionTimestampMonotonic": "202981015", "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": "19556", "ExecMainStartTimestamp": "Wed 2022-07-06 02:21:33 EDT", "ExecMainStartTimestampMonotonic": "202982480", "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 02:21:33 EDT", "InactiveExitTimestampMonotonic": "202982812", "InvocationID": "c0689ec12baa457caecfdc36591ca310", "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": "14636", "LimitNPROCSoft": "14636", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14636", "LimitSIGPENDINGSoft": "14636", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "19556", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "3047424", "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": "dbus.socket system.slice 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 02:25:19 EDT", "StateChangeTimestampMonotonic": "428838015", "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": "2", "TasksMax": "23418", "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/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 06:27:52 +0000 (0:00:00.828) 0:00:05.587 ******** changed: [/cache/rhel-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/rhel-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/rhel-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 06:27:54 +0000 (0:00:02.612) 0:00:08.200 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmprylna2eo/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 06:27:55 +0000 (0:00:00.834) 0:00:09.034 ******** included: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:27:55 +0000 (0:00:00.050) 0:00:09.084 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:27:55 +0000 (0:00:00.031) 0:00:09.115 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:27:56 +0000 (0:00:00.959) 0:00:10.075 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:27:57 +0000 (0:00:01.178) 0:00:11.254 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:27:58 +0000 (0:00:00.861) 0:00:12.116 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088873.3180711, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b844ede947cc3abd508e201a84080b21235ff086", "ctime": 1657088873.316071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734810, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088873.316071, "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": "3357679075", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.508) 0:00:12.624 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.067) 0:00:12.692 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.072) 0:00:12.764 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.070) 0:00:12.834 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088873.254071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b266b3fb85138e60c78e35557d18e53e11eed4a8", "ctime": 1657088873.316071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829267, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088873.316071, "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": "2997980283", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.395) 0:00:13.230 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.066) 0:00:13.297 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 06:27:59 +0000 (0:00:00.075) 0:00:13.372 ******** ok: [/cache/rhel-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.200156", "end": "2022-07-06 02:28:00.542392", "rc": 0, "start": "2022-07-06 02:28:00.342236" } 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": "74:3E:90:4A:2A:E6:61:03:5E:1D:10:46:05:AA:43:8D:08:E8:5A:B3", "critical": false }, "authorityKeyIdentifier": { "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "18:12:B3:85:49:A1:FB:74:4B:31:FF:01:3B:0D:AF:17:21:E7:3A:FD:10:B7:1D:1A:F4:D2:42:66:D1:FE:D3:42:6B:1A:81:F8:92:23:78:2C:C1:39:D3:1A:19:C7:3A:7B:A5:2B:F1:75:09:C4:61:AA:5D:AE:DD:58:D1:FA:86:6F:C4:42:5A:BE:D3:8C:B6:A6:C9:13:C4:FA:03:3B:4E:B7:66:1D:3D:F0:77:F6:E8:06:49:46:2A:8E:E7:9B:68:60:4B:82:16:23:88:D6:25:79:0B:4B:FF:B7:CA:E5:C8:1B:68:D8:1E:4B:EE:3D:B3:37:A9:D5:A6:52:10:36:3C:F4:C6:A0:02:79:25:6B:1D:FE:BD:18:8A:25:1E:C0:85:85:35:7E:45:C3:93:3D:90:5F:78:65:0F:86:62:E8:E6:1B:7D:C3:9B:8A:40:6D:7C:C0:F4:DE:11:66:95:B7:D4:F3:0F:B1:93:EA:45:28:85:CB:87:BD:97:C5:F6:91:5A:C1:25:B2:26:63:50:70:77:06:91:1B:56:EE:AC:8B:2C:13:73:90:8E:27:1E:2E:B5:BA:48:E2:6B:FA:EB:31:28:53:50:59:E4:79:2A:9E:80:70:A4:20:AD:2E:17:AE:3A:CA:8B:6D:59:10:BA:F6:91:AA:C4:2F:7E:24:80:21:57:32" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:27:53" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.689) 0:00:14.061 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80" }, "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": "74:3E:90:4A:2A:E6:61:03:5E:1D:10:46:05:AA:43:8D:08:E8:5A:B3" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "18:12:B3:85:49:A1:FB:74:4B:31:FF:01:3B:0D:AF:17:21:E7:3A:FD:10:B7:1D:1A:F4:D2:42:66:D1:FE:D3:42:6B:1A:81:F8:92:23:78:2C:C1:39:D3:1A:19:C7:3A:7B:A5:2B:F1:75:09:C4:61:AA:5D:AE:DD:58:D1:FA:86:6F:C4:42:5A:BE:D3:8C:B6:A6:C9:13:C4:FA:03:3B:4E:B7:66:1D:3D:F0:77:F6:E8:06:49:46:2A:8E:E7:9B:68:60:4B:82:16:23:88:D6:25:79:0B:4B:FF:B7:CA:E5:C8:1B:68:D8:1E:4B:EE:3D:B3:37:A9:D5:A6:52:10:36:3C:F4:C6:A0:02:79:25:6B:1D:FE:BD:18:8A:25:1E:C0:85:85:35:7E:45:C3:93:3D:90:5F:78:65:0F:86:62:E8:E6:1B:7D:C3:9B:8A:40:6D:7C:C0:F4:DE:11:66:95:B7:D4:F3:0F:B1:93:EA:45:28:85:CB:87:BD:97:C5:F6:91:5A:C1:25:B2:26:63:50:70:77:06:91:1B:56:EE:AC:8B:2C:13:73:90:8E:27:1E:2E:B5:BA:48:E2:6B:FA:EB:31:28:53:50:59:E4:79:2A:9E:80:70:A4:20:AD:2E:17:AE:3A:CA:8B:6D:59:10:BA:F6:91:AA:C4:2F:7E:24:80:21:57:32" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:27:53" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.044) 0:00:14.106 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.042) 0:00:14.149 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.032) 0:00:14.181 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.041) 0:00:14.222 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.046) 0:00:14.269 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:28:00 +0000 (0:00:00.046) 0:00:14.315 ******** ok: [/cache/rhel-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.058317", "end": "2022-07-06 02:28:01.220445", "rc": 0, "start": "2022-07-06 02:28:01.162128" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 06:28:01 +0000 (0:00:00.424) 0:00:14.740 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:28:01 +0000 (0:00:00.048) 0:00:14.788 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:28:01 +0000 (0:00:00.029) 0:00:14.817 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:28:02 +0000 (0:00:00.944) 0:00:15.762 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:28:03 +0000 (0:00:01.035) 0:00:16.798 ******** ok: [/cache/rhel-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/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.871) 0:00:17.669 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088874.576071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "cef4c0052be24cd4c4981e51c3728a9799ca6ad7", "ctime": 1657088874.573071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25734803, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088874.573071, "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": "1649706745", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.373) 0:00:18.042 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.031) 0:00:18.074 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.044) 0:00:18.119 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.041) 0:00:18.160 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088874.510071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b35cb31ef4625d9dd2e00afcf0dae0d3d7587407", "ctime": 1657088874.573071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829271, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657088874.573071, "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": "1778997796", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.363) 0:00:18.524 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 06:28:04 +0000 (0:00:00.030) 0:00:18.554 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.045) 0:00:18.599 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.196134", "end": "2022-07-06 02:28:05.635363", "rc": 0, "start": "2022-07-06 02:28:05.439229" } 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": "29:F9:1B:4C:47:C3:A3:25:59:1A:F4:6C:AD:78:45:B4:62:BA:B8:AF", "critical": false }, "authorityKeyIdentifier": { "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "29:9D:1E:C0:4C:0A:BE:DA:60:5E:C3:D0:63:AE:17:CA:D6:CC:A0:25:0F:9A:84:FF:7E:26:9C:1D:1D:8D:3F:F3:85:08:EB:61:52:1B:AA:13:47:7C:00:F8:97:C0:AD:4F:40:F4:6A:75:7E:87:8C:D6:0A:66:14:AD:C6:DB:30:FF:15:2B:84:2E:42:A8:4A:98:FA:23:20:0D:45:EB:1F:29:EC:C3:E7:07:AA:59:92:07:DE:42:A6:5E:67:ED:AE:AF:78:DF:17:94:5A:C6:04:A8:15:C6:F4:63:95:2D:73:EA:C5:66:E0:00:5E:9F:70:0C:C6:DF:A5:24:65:57:76:56:E2:A4:36:4E:C7:88:68:C6:FB:BE:77:4A:CF:FD:70:AA:90:AC:59:07:B4:3B:2E:7F:75:5F:15:97:42:D8:0B:BC:87:93:56:03:4A:52:6C:4C:1F:28:8F:36:05:09:2E:D0:C1:47:92:63:34:D7:AB:53:E1:7D:F2:C8:AF:F1:29:18:8B:FA:60:C5:2D:D2:90:96:57:24:22:EC:7D:D7:6F:45:58:92:36:76:3F:8A:CD:0E:CD:A8:21:92:D5:EF:DF:16:2E:AF:52:0A:96:CF:A7:63:E9:65:CE:1A:3A:CA:65:6D:B8:6B:AF:9F:DC:49:E8:2B:A1:05:42:67:98:19:FF:CD" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:27:54" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.552) 0:00:19.152 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "E2:7D:58:1C:3B:07:55:BD:7E:79:94:D5:33:C0:12:12:C8:60:DF:80" }, "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": "29:F9:1B:4C:47:C3:A3:25:59:1A:F4:6C:AD:78:45:B4:62:BA:B8:AF" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "29:9D:1E:C0:4C:0A:BE:DA:60:5E:C3:D0:63:AE:17:CA:D6:CC:A0:25:0F:9A:84:FF:7E:26:9C:1D:1D:8D:3F:F3:85:08:EB:61:52:1B:AA:13:47:7C:00:F8:97:C0:AD:4F:40:F4:6A:75:7E:87:8C:D6:0A:66:14:AD:C6:DB:30:FF:15:2B:84:2E:42:A8:4A:98:FA:23:20:0D:45:EB:1F:29:EC:C3:E7:07:AA:59:92:07:DE:42:A6:5E:67:ED:AE:AF:78:DF:17:94:5A:C6:04:A8:15:C6:F4:63:95:2D:73:EA:C5:66:E0:00:5E:9F:70:0C:C6:DF:A5:24:65:57:76:56:E2:A4:36:4E:C7:88:68:C6:FB:BE:77:4A:CF:FD:70:AA:90:AC:59:07:B4:3B:2E:7F:75:5F:15:97:42:D8:0B:BC:87:93:56:03:4A:52:6C:4C:1F:28:8F:36:05:09:2E:D0:C1:47:92:63:34:D7:AB:53:E1:7D:F2:C8:AF:F1:29:18:8B:FA:60:C5:2D:D2:90:96:57:24:22:EC:7D:D7:6F:45:58:92:36:76:3F:8A:CD:0E:CD:A8:21:92:D5:EF:DF:16:2E:AF:52:0A:96:CF:A7:63:E9:65:CE:1A:3A:CA:65:6D:B8:6B:AF:9F:DC:49:E8:2B:A1:05:42:67:98:19:FF:CD" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:27:54" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.056) 0:00:19.209 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.043) 0:00:19.253 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.033) 0:00:19.286 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.046) 0:00:19.332 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.043) 0:00:19.375 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:28:05 +0000 (0:00:00.043) 0:00:19.419 ******** ok: [/cache/rhel-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.056758", "end": "2022-07-06 02:28:06.321541", "rc": 0, "start": "2022-07-06 02:28:06.264783" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 06:28:06 +0000 (0:00:00.424) 0:00:19.843 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-9.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:28:06 +0000 (0:00:00.052) 0:00:19.896 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.61s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.18s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.15s /tmp/tmprylna2eo/tests/tests_no_auto_renew.yml:2 ------------------------------ linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.09s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Install the package, force upgrade -------------------------------------- 1.04s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 ------------- Ensure python3 is installed --------------------------------------------- 0.96s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 0.94s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 0.94s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Install certreader ------------------------------------------------------ 0.87s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.86s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.83s /tmp/tmprylna2eo/tests/tests_no_auto_renew.yml:17 ----------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.83s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.69s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.58s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Parse certificate ------------------------------------------------------- 0.55s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.53s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.42s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.42s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve key file stats ------------------------------------------------- 0.40s /tmp/tmprylna2eo/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/tmppc8868jw 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/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 06:39:22 +0000 (0:00:00.015) 0:00:00.015 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 06:39:23 +0000 (0:00:01.153) 0:00:01.168 ******** included: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-9.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 06:39:23 +0000 (0:00:00.028) 0:00:01.197 ******** ok: [/cache/rhel-9.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 06:39:24 +0000 (0:00:00.530) 0:00:01.727 ******** skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-9.qcow2.snap] => (item=RedHat_9.0.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.0.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 06:39:24 +0000 (0:00:00.043) 0:00:01.771 ******** ok: [/cache/rhel-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/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 06:39:25 +0000 (0:00:01.150) 0:00:02.922 ******** ok: [/cache/rhel-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/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 06:39:26 +0000 (0:00:00.975) 0:00:03.898 ******** ok: [/cache/rhel-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/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 06:39:27 +0000 (0:00:00.519) 0:00:04.417 ******** ok: [/cache/rhel-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/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 06:39:27 +0000 (0:00:00.408) 0:00:04.825 ******** ok: [/cache/rhel-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 02:33:03 EDT", "ActiveEnterTimestampMonotonic": "196651017", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice network.target sysinit.target basic.target syslog.target dbus-broker.service systemd-journald.socket dbus.socket", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 02:33:03 EDT", "AssertTimestampMonotonic": "196638069", "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": "42167446000", "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 02:33:03 EDT", "ConditionTimestampMonotonic": "196638067", "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": "19537", "ExecMainStartTimestamp": "Wed 2022-07-06 02:33:03 EDT", "ExecMainStartTimestampMonotonic": "196639864", "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 02:33:03 EDT", "InactiveExitTimestampMonotonic": "196640238", "InvocationID": "54468520e6274a09a70579107544ed55", "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": "14636", "LimitNPROCSoft": "14636", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14636", "LimitSIGPENDINGSoft": "14636", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "19537", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "2945024", "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": "dbus.socket system.slice 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 02:36:52 EDT", "StateChangeTimestampMonotonic": "425846403", "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": "23418", "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/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 06:39:28 +0000 (0:00:00.801) 0:00:05.627 ******** changed: [/cache/rhel-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/rhel-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/rhel-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 06:39:30 +0000 (0:00:01.939) 0:00:07.566 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 06:39:31 +0000 (0:00:00.807) 0:00:08.374 ******** included: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:39:31 +0000 (0:00:00.053) 0:00:08.427 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:39:31 +0000 (0:00:00.031) 0:00:08.459 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:39:32 +0000 (0:00:00.919) 0:00:09.378 ******** ok: [/cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:39:33 +0000 (0:00:01.184) 0:00:10.562 ******** ok: [/cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:39:34 +0000 (0:00:00.924) 0:00:11.487 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089569.4002817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a1dd396ebedf487f3a82833d97382181bf5b15f2", "ctime": 1657089569.3972816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742233, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089569.3972816, "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": "3157178090", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:39:34 +0000 (0:00:00.504) 0:00:11.992 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:39:34 +0000 (0:00:00.063) 0:00:12.055 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 06:39:34 +0000 (0:00:00.077) 0:00:12.132 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 06:39:34 +0000 (0:00:00.077) 0:00:12.209 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089569.3362815, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "30295492c5dde2c0502101f8cb3aa13bbcec7186", "ctime": 1657089569.3972816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829267, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089569.3972816, "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": "3318213714", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 06:39:35 +0000 (0:00:00.357) 0:00:12.566 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 06:39:35 +0000 (0:00:00.033) 0:00:12.600 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 06:39:35 +0000 (0:00:00.046) 0:00:12.647 ******** ok: [/cache/rhel-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.202281", "end": "2022-07-06 02:39:36.108721", "rc": 0, "start": "2022-07-06 02:39:35.906440" } 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": "B2:FC:A5:BD:D7:21:88:9B:E3:3D:DF:95:EA:7E:A0:E8:99:29:B7:5E", "critical": false }, "authorityKeyIdentifier": { "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "BA:3B:8A:58:C6:E0:6F:CA:4C:07:A8:1E:13:DC:B7:2E:ED:F0:64:3F:C4:D9:AB:AE:24:16:0B:06:3E:0F:D0:30:50:7D:88:BF:A6:5F:AA:DD:EE:1F:29:67:53:3E:77:DC:E2:C9:FD:8C:11:2C:05:48:B0:2C:CB:C5:05:23:4F:84:C5:6B:9A:2C:56:FC:87:77:96:D5:3E:21:7F:A9:A1:A5:91:3E:8D:DD:8B:D2:64:F9:6C:88:F9:D7:35:4E:70:16:B6:F6:2A:2D:FF:20:4D:06:08:6B:FF:E2:D4:C7:60:21:37:BB:AC:A9:11:EC:F1:29:B8:14:4D:EE:AB:71:72:64:A7:B1:4E:45:39:8A:3D:D0:AA:16:DD:A1:71:7D:99:CC:54:2F:50:AF:8F:DF:D2:5C:BD:56:93:7D:BE:2C:91:66:4B:E8:DD:F3:F7:D4:3E:5F:EA:F7:3B:D1:E1:A6:C5:40:74:06:41:94:C5:8A:FF:A7:11:B2:BA:D5:5F:9B:85:1E:A4:9C:1A:17:76:04:01:39:E5:CA:16:DD:91:2D:3C:88:86:1C:E4:6F:F2:64:B5:E9:05:17:21:6E:0F:D2:E5:6A:08:6B:97:92:C4:5F:4F:1B:B0:D6:15:68:FF:DE:E4:78:BC:01:55:9C:34:60:1E:24:23:7C:84:17:70:06:A2:2E" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:39:29" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.667) 0:00:13.315 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2" }, "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": "B2:FC:A5:BD:D7:21:88:9B:E3:3D:DF:95:EA:7E:A0:E8:99:29:B7:5E" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "BA:3B:8A:58:C6:E0:6F:CA:4C:07:A8:1E:13:DC:B7:2E:ED:F0:64:3F:C4:D9:AB:AE:24:16:0B:06:3E:0F:D0:30:50:7D:88:BF:A6:5F:AA:DD:EE:1F:29:67:53:3E:77:DC:E2:C9:FD:8C:11:2C:05:48:B0:2C:CB:C5:05:23:4F:84:C5:6B:9A:2C:56:FC:87:77:96:D5:3E:21:7F:A9:A1:A5:91:3E:8D:DD:8B:D2:64:F9:6C:88:F9:D7:35:4E:70:16:B6:F6:2A:2D:FF:20:4D:06:08:6B:FF:E2:D4:C7:60:21:37:BB:AC:A9:11:EC:F1:29:B8:14:4D:EE:AB:71:72:64:A7:B1:4E:45:39:8A:3D:D0:AA:16:DD:A1:71:7D:99:CC:54:2F:50:AF:8F:DF:D2:5C:BD:56:93:7D:BE:2C:91:66:4B:E8:DD:F3:F7:D4:3E:5F:EA:F7:3B:D1:E1:A6:C5:40:74:06:41:94:C5:8A:FF:A7:11:B2:BA:D5:5F:9B:85:1E:A4:9C:1A:17:76:04:01:39:E5:CA:16:DD:91:2D:3C:88:86:1C:E4:6F:F2:64:B5:E9:05:17:21:6E:0F:D2:E5:6A:08:6B:97:92:C4:5F:4F:1B:B0:D6:15:68:FF:DE:E4:78:BC:01:55:9C:34:60:1E:24:23:7C:84:17:70:06:A2:2E" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:39:29" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.046) 0:00:13.361 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.045) 0:00:13.407 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.036) 0:00:13.443 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.049) 0:00:13.493 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.046) 0:00:13.540 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.046) 0:00:13.586 ******** ok: [/cache/rhel-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.056603", "end": "2022-07-06 02:39:36.817656", "rc": 0, "start": "2022-07-06 02:39:36.761053" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.434) 0:00:14.021 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.047) 0:00:14.068 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 06:39:36 +0000 (0:00:00.028) 0:00:14.097 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 06:39:37 +0000 (0:00:00.933) 0:00:15.031 ******** ok: [/cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 06:39:38 +0000 (0:00:00.987) 0:00:16.018 ******** ok: [/cache/rhel-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/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 06:39:39 +0000 (0:00:00.866) 0:00:16.885 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089570.2872818, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4a957255f9a245e761b6d10a9030a66a4965e0a9", "ctime": 1657089570.2842817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 25742220, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089570.2842817, "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": "4292251086", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 06:39:39 +0000 (0:00:00.355) 0:00:17.240 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 06:39:39 +0000 (0:00:00.032) 0:00:17.273 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 06:39:40 +0000 (0:00:00.046) 0:00:17.320 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 06:39:40 +0000 (0:00:00.043) 0:00:17.363 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089570.2232816, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e7ab9123434a952df50b60fa19c270bbeb0e48f2", "ctime": 1657089570.2842817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16829271, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657089570.2842817, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "1262948132", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 06:39:40 +0000 (0:00:00.359) 0:00:17.723 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 06:39:40 +0000 (0:00:00.033) 0:00:17.757 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 06:39:40 +0000 (0:00:00.048) 0:00:17.805 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.208758", "end": "2022-07-06 02:39:41.175155", "rc": 0, "start": "2022-07-06 02:39:40.966397" } 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": "66:A6:E9:1F:E9:92:A4:24:9C:B9:08:39:C5:96:45:58:24:89:95:05", "critical": false }, "authorityKeyIdentifier": { "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "1F:54:47:E1:BC:EA:60:21:94:D1:05:17:A0:8A:A3:57:FC:69:CA:85:14:49:55:B5:9C:C1:16:F3:F1:77:BE:76:17:00:CC:E8:E1:BC:33:B8:CC:61:5A:A8:E8:81:DA:C1:CF:89:6F:E8:AF:E4:8B:50:56:D2:7B:45:7D:1F:79:18:BB:DB:FD:8A:3C:C8:9E:F7:A0:AA:DE:C3:A7:C2:E7:BB:FA:99:0F:25:EE:70:03:C1:CD:80:96:EC:22:3F:78:63:00:53:22:72:54:87:FE:41:8F:FD:E9:6D:C0:C9:40:EF:98:60:32:F0:40:59:A6:47:2D:0B:DE:75:7F:0D:0B:95:DC:AB:3F:85:C5:E9:2E:86:9D:F6:B8:70:2D:73:8F:23:64:34:50:49:77:9D:4A:AD:AB:ED:CD:F1:FF:7C:44:F0:4F:9D:2F:D5:2E:CB:EA:5F:18:B8:3B:06:CE:B6:1A:62:4A:44:C7:42:E8:32:C9:8C:77:D5:C6:8A:22:21:AA:0F:82:D9:12:AD:56:9A:45:61:64:C4:7D:47:25:BB:50:8F:3E:AB:34:DD:54:91:5E:23:5C:D4:75:D9:00:BB:16:6C:96:4E:DF:12:E3:12:70:D9:7E:A3:99:9B:94:05:ED:CC:FF:64:9A:17:C7:D8:64:62:6A:DE:C9:7F:CA:BA:FA:5F" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:39:30" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.578) 0:00:18.383 ******** ok: [/cache/rhel-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "54:AF:7E:70:34:A9:C1:47:38:E3:1B:3F:D8:F2:4D:5B:65:C9:80:D2" }, "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": "66:A6:E9:1F:E9:92:A4:24:9C:B9:08:39:C5:96:45:58:24:89:95:05" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "1F:54:47:E1:BC:EA:60:21:94:D1:05:17:A0:8A:A3:57:FC:69:CA:85:14:49:55:B5:9C:C1:16:F3:F1:77:BE:76:17:00:CC:E8:E1:BC:33:B8:CC:61:5A:A8:E8:81:DA:C1:CF:89:6F:E8:AF:E4:8B:50:56:D2:7B:45:7D:1F:79:18:BB:DB:FD:8A:3C:C8:9E:F7:A0:AA:DE:C3:A7:C2:E7:BB:FA:99:0F:25:EE:70:03:C1:CD:80:96:EC:22:3F:78:63:00:53:22:72:54:87:FE:41:8F:FD:E9:6D:C0:C9:40:EF:98:60:32:F0:40:59:A6:47:2D:0B:DE:75:7F:0D:0B:95:DC:AB:3F:85:C5:E9:2E:86:9D:F6:B8:70:2D:73:8F:23:64:34:50:49:77:9D:4A:AD:AB:ED:CD:F1:FF:7C:44:F0:4F:9D:2F:D5:2E:CB:EA:5F:18:B8:3B:06:CE:B6:1A:62:4A:44:C7:42:E8:32:C9:8C:77:D5:C6:8A:22:21:AA:0F:82:D9:12:AD:56:9A:45:61:64:C4:7D:47:25:BB:50:8F:3E:AB:34:DD:54:91:5E:23:5C:D4:75:D9:00:BB:16:6C:96:4E:DF:12:E3:12:70:D9:7E:A3:99:9B:94:05:ED:CC:FF:64:9A:17:C7:D8:64:62:6A:DE:C9:7F:CA:BA:FA:5F" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:39:30" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.045) 0:00:18.429 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.043) 0:00:18.473 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.036) 0:00:18.509 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.047) 0:00:18.556 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.046) 0:00:18.603 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.045) 0:00:18.649 ******** ok: [/cache/rhel-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.054415", "end": "2022-07-06 02:39:41.858761", "rc": 0, "start": "2022-07-06 02:39:41.804346" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.411) 0:00:19.060 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-9.qcow2.snap : ok=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:39:41 +0000 (0:00:00.053) 0:00:19.114 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.94s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.18s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.15s /tmp/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml:2 ------------------ fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.15s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install the package, force upgrade -------------------------------------- 0.99s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 - fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.98s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 0.93s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install certreader ------------------------------------------------------ 0.92s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Ensure python3 is installed --------------------------------------------- 0.92s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install certreader ------------------------------------------------------ 0.87s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmppcorpegn/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.80s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.67s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.58s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.53s /tmp/tmppc8868jw/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.52s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.43s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.41s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.41s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59