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_fs_attrs.yml *************************************************** 3 plays in /tmp/tmprylna2eo/tests/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:2 Wednesday 06 July 2022 06:26:23 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:5 Wednesday 06 July 2022 06:26:24 +0000 (0:00:01.175) 0:00:01.188 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 1040, "home": "/home/user1", "name": "user1", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1040 } TASK [Ensure group "somegroup" exists] ***************************************** task path: /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:9 Wednesday 06 July 2022 06:26:25 +0000 (0:00:00.812) 0:00:02.001 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "gid": 1041, "name": "somegroup", "state": "present", "system": false } META: ran handlers META: ran handlers PLAY [Issue certificate setting user/group] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:13 Wednesday 06 July 2022 06:26:26 +0000 (0:00:00.681) 0:00:02.683 ******** 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:26:26 +0000 (0:00:00.811) 0:00:03.494 ******** 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:26:26 +0000 (0:00:00.026) 0:00:03.521 ******** 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:26:27 +0000 (0:00:00.511) 0:00:04.032 ******** 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:26:27 +0000 (0:00:00.044) 0:00:04.077 ******** 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:26:28 +0000 (0:00:01.102) 0:00:05.180 ******** 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:26:29 +0000 (0:00:00.937) 0:00:06.117 ******** 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:26:30 +0000 (0:00:00.515) 0:00:06.633 ******** 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:26:30 +0000 (0:00:00.387) 0:00:07.020 ******** 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": "36847495000", "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": "2719744", "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:26:31 +0000 (0:00:00.801) 0:00:07.821 ******** changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'mycert_fs_attrs', 'dns': 'www.example.com', 'owner': 'ftp', 'group': 'ftp', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": "ftp", "name": "mycert_fs_attrs", "owner": "ftp" } } MSG: Certificate requested (new). File attributes updated. changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'certid', 'dns': 'www.example.com', 'owner': 1040, 'group': 1041, 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": 1041, "name": "certid", "owner": 1040 } } MSG: Certificate requested (new). File attributes updated. 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_fs_attrs.yml:31 Wednesday 06 July 2022 06:26:33 +0000 (0:00:02.026) 0:00:09.847 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:60 Wednesday 06 July 2022 06:26:34 +0000 (0:00:00.842) 0:00:10.690 ******** included: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_fs_attrs.crt', 'key_path': '/etc/pki/tls/private/mycert_fs_attrs.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 'ftp', 'group': 'ftp', 'mode': '0640'}) included: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/certid.crt', 'key_path': '/etc/pki/tls/private/certid.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 1040, 'group': 1041, 'mode': '0640'}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:26:34 +0000 (0:00:00.047) 0:00:10.737 ******** 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:26:34 +0000 (0:00:00.060) 0:00:10.798 ******** 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:26:35 +0000 (0:00:00.976) 0:00:11.774 ******** 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:26:36 +0000 (0:00:01.239) 0:00:13.014 ******** 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:26:37 +0000 (0:00:00.884) 0:00:13.898 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088792.157071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2f03f3cf4e36541667eec39099612c8a85e1119d", "ctime": 1657088792.2160711, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 25734786, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657088792.155071, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_fs_attrs.crt", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 14, "version": "1123424277", "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:26:37 +0000 (0:00:00.520) 0:00:14.419 ******** 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:26:37 +0000 (0:00:00.032) 0:00:14.451 ******** 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:26:37 +0000 (0:00:00.049) 0:00:14.500 ******** 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:26:37 +0000 (0:00:00.043) 0:00:14.544 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088792.094071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "32945907661585c827362042a5989b041217c02f", "ctime": 1657088792.2160711, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 16829257, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657088792.155071, "nlink": 1, "path": "/etc/pki/tls/private/mycert_fs_attrs.key", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 14, "version": "2161877330", "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:26:38 +0000 (0:00:00.375) 0:00:14.919 ******** 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:26:38 +0000 (0:00:00.032) 0:00:14.951 ******** 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:26:38 +0000 (0:00:00.049) 0:00:15.001 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.201304", "end": "2022-07-06 02:26:39.174888", "rc": 0, "start": "2022-07-06 02:26:38.973584" } 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": "65:26:03:07:D8:E4:CF:EA:19:F5:A6:35:38:8A:8F:65:FB:36:F2:03", "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": "28:F7:68:A6:CC:EA:EC:D0:3C:3D:DB:71:73:DA:EA:51:8A:FC:FE:6D:CE:18:8D:70:72:A3:CE:34:15:D6:34:A9:2D:FE:C3:D7:09:BB:B6:64:59:1B:66:1F:63:13:65:BB:46:DC:11:25:61:FF:ED:09:AF:2D:E7:A2:39:96:C5:57:BB:55:63:34:BB:3D:46:0B:02:84:51:C2:58:41:A1:D0:3C:18:07:C0:32:A1:9C:BA:69:A5:C3:47:C6:34:70:F7:82:ED:86:78:96:79:8F:88:63:C9:E9:57:70:A0:55:FC:B9:3B:23:1D:D4:30:3B:51:85:44:5E:C4:D6:DD:CF:F4:B0:16:BC:BA:C1:DC:B4:A1:0F:A9:39:24:10:62:5F:0F:FA:DF:BA:58:29:9A:A9:35:96:DB:BE:C5:80:F8:53:82:7C:89:EE:DA:D4:5A:8D:08:ED:07:0A:B5:F0:ED:8B:8D:F4:82:94:DC:C0:D7:46:54:41:A4:C6:8B:B4:F4:D3:3C:E6:BE:78:D6:80:08:00:2C:6E:9E:38:9C:51:A2:46:4A:9E:E4:DE:B0:C3:BB:1A:77:6C:9C:C9:4F:F1:41:A6:59:28:67:A4:A7:57:86:D9:14:39:6E:A9:5E:D5:7C:97:32:00:A5:23:21:33:CB:51:8A:77:68:E3:C7:FD:EB:DA:24" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:26:32" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:26:39 +0000 (0:00:00.695) 0:00:15.696 ******** 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": "65:26:03:07:D8:E4:CF:EA:19:F5:A6:35:38:8A:8F:65:FB:36:F2:03" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "28:F7:68:A6:CC:EA:EC:D0:3C:3D:DB:71:73:DA:EA:51:8A:FC:FE:6D:CE:18:8D:70:72:A3:CE:34:15:D6:34:A9:2D:FE:C3:D7:09:BB:B6:64:59:1B:66:1F:63:13:65:BB:46:DC:11:25:61:FF:ED:09:AF:2D:E7:A2:39:96:C5:57:BB:55:63:34:BB:3D:46:0B:02:84:51:C2:58:41:A1:D0:3C:18:07:C0:32:A1:9C:BA:69:A5:C3:47:C6:34:70:F7:82:ED:86:78:96:79:8F:88:63:C9:E9:57:70:A0:55:FC:B9:3B:23:1D:D4:30:3B:51:85:44:5E:C4:D6:DD:CF:F4:B0:16:BC:BA:C1:DC:B4:A1:0F:A9:39:24:10:62:5F:0F:FA:DF:BA:58:29:9A:A9:35:96:DB:BE:C5:80:F8:53:82:7C:89:EE:DA:D4:5A:8D:08:ED:07:0A:B5:F0:ED:8B:8D:F4:82:94:DC:C0:D7:46:54:41:A4:C6:8B:B4:F4:D3:3C:E6:BE:78:D6:80:08:00:2C:6E:9E:38:9C:51:A2:46:4A:9E:E4:DE:B0:C3:BB:1A:77:6C:9C:C9:4F:F1:41:A6:59:28:67:A4:A7:57:86:D9:14:39:6E:A9:5E:D5:7C:97:32:00:A5:23:21:33:CB:51:8A:77:68:E3:C7:FD:EB:DA:24" }, "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:26:32" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 06:26:39 +0000 (0:00:00.044) 0:00:15.741 ******** 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:26:39 +0000 (0:00:00.046) 0:00:15.788 ******** 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:26:39 +0000 (0:00:00.032) 0:00:15.820 ******** 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:26:39 +0000 (0:00:00.042) 0:00:15.863 ******** 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:26:39 +0000 (0:00:00.045) 0:00:15.909 ******** 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:26:39 +0000 (0:00:00.045) 0:00:15.955 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_fs_attrs.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.049090", "end": "2022-07-06 02:26:39.846985", "rc": 0, "start": "2022-07-06 02:26:39.797895" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 06:26:39 +0000 (0:00:00.410) 0:00:16.366 ******** 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:26:39 +0000 (0:00:00.047) 0:00:16.413 ******** 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:26:39 +0000 (0:00:00.029) 0:00:16.443 ******** 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:26:40 +0000 (0:00:00.963) 0:00:17.406 ******** 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:26:41 +0000 (0:00:01.039) 0:00:18.446 ******** 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:26:42 +0000 (0:00:00.921) 0:00:19.367 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088793.143071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "de83171fa3fc1c9f25f8547078841a4fdf2e76e1", "ctime": 1657088793.286071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 25734798, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657088793.140071, "nlink": 1, "path": "/etc/pki/tls/certs/certid.crt", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 1040, "version": "503575628", "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:26:43 +0000 (0:00:00.371) 0:00:19.738 ******** 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:26:43 +0000 (0:00:00.032) 0:00:19.771 ******** 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:26:43 +0000 (0:00:00.049) 0:00:19.821 ******** 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:26:43 +0000 (0:00:00.047) 0:00:19.868 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657088793.077071, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9af0d6c10791cf1ecd44cc2d248fb00162cc6925", "ctime": 1657088793.287071, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 16829124, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657088793.140071, "nlink": 1, "path": "/etc/pki/tls/private/certid.key", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 1040, "version": "4270182801", "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:26:43 +0000 (0:00:00.371) 0:00:20.239 ******** 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:26:43 +0000 (0:00:00.034) 0:00:20.273 ******** 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:26:43 +0000 (0:00:00.049) 0:00:20.323 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.203052", "end": "2022-07-06 02:26:44.389723", "rc": 0, "start": "2022-07-06 02:26:44.186671" } 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": "65:26:03:07:D8:E4:CF:EA:19:F5:A6:35:38:8A:8F:65:FB:36:F2:03", "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": "58:DB:25:EE:8A:34:C2:75:A3:83:A8:0F:D8:F6:ED:59:E0:4A:42:B4:8E:D0:14:C8:3F:C7:73:8D:0D:81:B1:EE:E0:50:E5:D2:C9:C1:13:B5:E3:B7:C7:23:C6:46:87:DE:0A:BD:E2:92:C6:21:E1:95:05:A3:B2:A1:B6:33:E6:31:C7:75:25:EE:C9:EA:BE:AC:4F:9D:18:97:B4:12:95:FB:55:E7:78:AA:67:04:51:8C:41:74:EA:15:DF:A9:96:22:30:0A:E7:21:EF:BA:49:D0:C3:9D:7C:9B:FE:2D:88:1E:57:A6:CA:56:3E:95:8C:2D:47:AF:28:90:6D:0B:BB:94:BF:11:1A:E7:CC:46:AA:38:C5:C7:37:F2:1D:02:BE:5D:84:DE:A4:68:6B:09:37:79:AE:4D:E2:BB:18:1A:16:24:8A:21:4E:41:BC:3B:A0:73:28:FE:EE:1F:75:63:0D:2F:4F:8B:3C:2F:6C:BE:BF:B7:29:71:8C:05:23:20:2D:8C:FE:2C:54:29:17:42:45:20:79:E5:7B:84:FE:4C:62:59:EA:32:10:05:5C:74:54:8A:86:76:58:86:99:59:3A:74:9A:3B:EC:FF:D2:32:E1:E0:BC:E6:14:40:15:06:80:C7:73:D9:10:1E:EE:34:2C:B9:D8:70:64:0D:E7:52:E0:C5" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:21:34", "not_valid_before": "2022-07-06 06:26:33" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:26:44 +0000 (0:00:00.585) 0:00:20.909 ******** 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": "65:26:03:07:D8:E4:CF:EA:19:F5:A6:35:38:8A:8F:65:FB:36:F2:03" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "58:DB:25:EE:8A:34:C2:75:A3:83:A8:0F:D8:F6:ED:59:E0:4A:42:B4:8E:D0:14:C8:3F:C7:73:8D:0D:81:B1:EE:E0:50:E5:D2:C9:C1:13:B5:E3:B7:C7:23:C6:46:87:DE:0A:BD:E2:92:C6:21:E1:95:05:A3:B2:A1:B6:33:E6:31:C7:75:25:EE:C9:EA:BE:AC:4F:9D:18:97:B4:12:95:FB:55:E7:78:AA:67:04:51:8C:41:74:EA:15:DF:A9:96:22:30:0A:E7:21:EF:BA:49:D0:C3:9D:7C:9B:FE:2D:88:1E:57:A6:CA:56:3E:95:8C:2D:47:AF:28:90:6D:0B:BB:94:BF:11:1A:E7:CC:46:AA:38:C5:C7:37:F2:1D:02:BE:5D:84:DE:A4:68:6B:09:37:79:AE:4D:E2:BB:18:1A:16:24:8A:21:4E:41:BC:3B:A0:73:28:FE:EE:1F:75:63:0D:2F:4F:8B:3C:2F:6C:BE:BF:B7:29:71:8C:05:23:20:2D:8C:FE:2C:54:29:17:42:45:20:79:E5:7B:84:FE:4C:62:59:EA:32:10:05:5C:74:54:8A:86:76:58:86:99:59:3A:74:9A:3B:EC:FF:D2:32:E1:E0:BC:E6:14:40:15:06:80:C7:73:D9:10:1E:EE:34:2C:B9:D8:70:64:0D:E7:52:E0:C5" }, "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:26:33" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 06:26:44 +0000 (0:00:00.045) 0:00:20.954 ******** 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:26:44 +0000 (0:00:00.046) 0:00:21.001 ******** 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:26:44 +0000 (0:00:00.035) 0:00:21.036 ******** 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:26:44 +0000 (0:00:00.044) 0:00:21.081 ******** 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:26:44 +0000 (0:00:00.077) 0:00:21.159 ******** 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:26:44 +0000 (0:00:00.047) 0:00:21.206 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/certid.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.049319", "end": "2022-07-06 02:26:45.115998", "rc": 0, "start": "2022-07-06 02:26:45.066679" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 06:26:45 +0000 (0:00:00.428) 0:00:21.635 ******** 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=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:26:45 +0000 (0:00:00.053) 0:00:21.689 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.03s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.24s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.18s /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:2 ----------------------------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.10s /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.98s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 0.96s /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.92s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.84s /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:31 ---------------------------------- Ensure user exists ------------------------------------------------------ 0.81s /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:5 ----------------------------------- Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:13 ---------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.80s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.70s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 ------------- Ensure group "somegroup" exists ----------------------------------------- 0.68s /tmp/tmprylna2eo/tests/tests_fs_attrs.yml:9 ----------------------------------- Parse certificate ------------------------------------------------------- 0.59s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:78 ------------- Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/tmprylna2eo/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.51s /tmp/tmprylna2eo/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 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_fs_attrs.yml *************************************************** 3 plays in /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:2 Wednesday 06 July 2022 06:37:57 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:5 Wednesday 06 July 2022 06:37:58 +0000 (0:00:01.127) 0:00:01.140 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 1040, "home": "/home/user1", "name": "user1", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1040 } TASK [Ensure group "somegroup" exists] ***************************************** task path: /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:9 Wednesday 06 July 2022 06:37:59 +0000 (0:00:00.771) 0:00:01.912 ******** changed: [/cache/rhel-9.qcow2.snap] => { "changed": true, "gid": 1041, "name": "somegroup", "state": "present", "system": false } META: ran handlers META: ran handlers PLAY [Issue certificate setting user/group] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:13 Wednesday 06 July 2022 06:37:59 +0000 (0:00:00.676) 0:00:02.588 ******** 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:38:00 +0000 (0:00:00.801) 0:00:03.389 ******** 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:38:00 +0000 (0:00:00.029) 0:00:03.418 ******** 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:38:01 +0000 (0:00:00.507) 0:00:03.926 ******** 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:38:01 +0000 (0:00:00.046) 0:00:03.972 ******** 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:38:02 +0000 (0:00:01.104) 0:00:05.077 ******** 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:38:03 +0000 (0:00:00.956) 0:00:06.033 ******** 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:38:03 +0000 (0:00:00.528) 0:00:06.562 ******** 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:38:04 +0000 (0:00:00.399) 0:00:06.961 ******** 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": "35850780000", "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": "2695168", "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:38:04 +0000 (0:00:00.798) 0:00:07.760 ******** changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'mycert_fs_attrs', 'dns': 'www.example.com', 'owner': 'ftp', 'group': 'ftp', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": "ftp", "name": "mycert_fs_attrs", "owner": "ftp" } } MSG: Certificate requested (new). File attributes updated. changed: [/cache/rhel-9.qcow2.snap] => (item={'name': 'certid', 'dns': 'www.example.com', 'owner': 1040, 'group': 1041, 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": 1041, "name": "certid", "owner": 1040 } } MSG: Certificate requested (new). File attributes updated. 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_fs_attrs.yml:31 Wednesday 06 July 2022 06:38:06 +0000 (0:00:01.992) 0:00:09.753 ******** ok: [/cache/rhel-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:60 Wednesday 06 July 2022 06:38:07 +0000 (0:00:00.819) 0:00:10.572 ******** included: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_fs_attrs.crt', 'key_path': '/etc/pki/tls/private/mycert_fs_attrs.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 'ftp', 'group': 'ftp', 'mode': '0640'}) included: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/certid.crt', 'key_path': '/etc/pki/tls/private/certid.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 1040, 'group': 1041, 'mode': '0640'}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 06:38:07 +0000 (0:00:00.048) 0:00:10.621 ******** 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:38:07 +0000 (0:00:00.028) 0:00:10.650 ******** 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:38:08 +0000 (0:00:00.926) 0:00:11.577 ******** 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:38:09 +0000 (0:00:01.187) 0:00:12.765 ******** 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:38:10 +0000 (0:00:00.871) 0:00:13.636 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089485.8892817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2fb6affd1bc68c796ca30939a308bb5e50e5d912", "ctime": 1657089485.9792817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 25742209, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657089485.8862817, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_fs_attrs.crt", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 14, "version": "117804995", "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:38:11 +0000 (0:00:00.507) 0:00:14.144 ******** 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:38:11 +0000 (0:00:00.031) 0:00:14.176 ******** 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:38:11 +0000 (0:00:00.046) 0:00:14.223 ******** 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:38:11 +0000 (0:00:00.043) 0:00:14.266 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089485.8242817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "636384d92cad6692926c95a4ff48078bf96558ff", "ctime": 1657089485.9802816, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 16829257, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657089485.8862817, "nlink": 1, "path": "/etc/pki/tls/private/mycert_fs_attrs.key", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 14, "version": "3903427216", "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:38:11 +0000 (0:00:00.391) 0:00:14.658 ******** 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:38:11 +0000 (0:00:00.032) 0:00:14.691 ******** 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:38:11 +0000 (0:00:00.046) 0:00:14.737 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.211074", "end": "2022-07-06 02:38:12.749290", "rc": 0, "start": "2022-07-06 02:38:12.538216" } 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": "B6:40:BF:E8:71:0D:08:13:82:D6:11:04:F2:30:7B:99:A4:D2:03:2A", "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": "3C:3C:2E:EF:EF:64:20:9C:86:49:69:3C:F6:6A:A9:47:E0:3E:EF:A5:AA:F3:E8:31:FA:9B:34:C5:8D:A0:80:8E:97:CF:B3:AA:83:36:DC:3F:64:5E:80:2B:78:5D:BD:E9:E0:BD:0F:3D:07:C3:29:FC:15:4B:E0:9A:E1:96:4C:57:B4:CA:94:45:21:8D:C9:6E:71:67:48:7E:99:AB:5D:27:BF:52:03:FF:2E:92:35:FE:FF:A1:C5:C8:94:26:61:25:33:FF:FF:29:89:51:FA:C0:F6:04:67:48:AB:7E:F1:2B:76:3E:B6:20:A6:55:8F:F5:11:09:AB:76:13:16:F5:3F:E2:2D:2E:CA:FB:07:84:6F:53:4F:BD:35:60:7A:C9:B4:47:DA:8D:22:CC:A6:67:8A:9E:B9:CE:6C:A3:3C:0C:F5:56:5E:7B:8D:0F:5F:65:A7:BF:8E:CA:8F:35:F5:88:12:F5:69:72:2C:26:77:87:D7:D4:CF:96:DB:B3:EA:56:AC:6E:7B:21:C0:6C:C8:9D:70:B9:E9:95:21:88:43:A1:0E:65:5A:F2:00:BD:C2:76:A1:38:C8:BE:B1:98:43:D5:6D:AD:A2:4A:DD:EB:C0:79:DE:95:06:F0:80:83:DA:F7:B9:FA:1B:6A:C5:C4:7C:2D:5A:84:BD:84:80:BD:12:F9:70" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:38:05" } } 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:38:12 +0000 (0:00:00.709) 0:00:15.447 ******** 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": "B6:40:BF:E8:71:0D:08:13:82:D6:11:04:F2:30:7B:99:A4:D2:03:2A" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "3C:3C:2E:EF:EF:64:20:9C:86:49:69:3C:F6:6A:A9:47:E0:3E:EF:A5:AA:F3:E8:31:FA:9B:34:C5:8D:A0:80:8E:97:CF:B3:AA:83:36:DC:3F:64:5E:80:2B:78:5D:BD:E9:E0:BD:0F:3D:07:C3:29:FC:15:4B:E0:9A:E1:96:4C:57:B4:CA:94:45:21:8D:C9:6E:71:67:48:7E:99:AB:5D:27:BF:52:03:FF:2E:92:35:FE:FF:A1:C5:C8:94:26:61:25:33:FF:FF:29:89:51:FA:C0:F6:04:67:48:AB:7E:F1:2B:76:3E:B6:20:A6:55:8F:F5:11:09:AB:76:13:16:F5:3F:E2:2D:2E:CA:FB:07:84:6F:53:4F:BD:35:60:7A:C9:B4:47:DA:8D:22:CC:A6:67:8A:9E:B9:CE:6C:A3:3C:0C:F5:56:5E:7B:8D:0F:5F:65:A7:BF:8E:CA:8F:35:F5:88:12:F5:69:72:2C:26:77:87:D7:D4:CF:96:DB:B3:EA:56:AC:6E:7B:21:C0:6C:C8:9D:70:B9:E9:95:21:88:43:A1:0E:65:5A:F2:00:BD:C2:76:A1:38:C8:BE:B1:98:43:D5:6D:AD:A2:4A:DD:EB:C0:79:DE:95:06:F0:80:83:DA:F7:B9:FA:1B:6A:C5:C4:7C:2D:5A:84:BD:84:80:BD:12:F9:70" }, "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:38:05" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:38:12 +0000 (0:00:00.045) 0:00:15.493 ******** 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:38:12 +0000 (0:00:00.049) 0:00:15.543 ******** 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:38:12 +0000 (0:00:00.034) 0:00:15.577 ******** 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:38:12 +0000 (0:00:00.044) 0:00:15.621 ******** 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:38:12 +0000 (0:00:00.046) 0:00:15.668 ******** 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:38:12 +0000 (0:00:00.043) 0:00:15.711 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_fs_attrs.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.052120", "end": "2022-07-06 02:38:13.423006", "rc": 0, "start": "2022-07-06 02:38:13.370886" } 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:38:13 +0000 (0:00:00.405) 0:00:16.117 ******** 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:38:13 +0000 (0:00:00.046) 0:00:16.164 ******** 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:38:13 +0000 (0:00:00.028) 0:00:16.193 ******** 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:38:14 +0000 (0:00:00.972) 0:00:17.165 ******** 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:38:15 +0000 (0:00:01.009) 0:00:18.175 ******** 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:38:16 +0000 (0:00:00.899) 0:00:19.074 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089486.8622816, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d272310819ffca413db5c41bef7e1383e0895d9f", "ctime": 1657089487.0112817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 25742221, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657089486.8592815, "nlink": 1, "path": "/etc/pki/tls/certs/certid.crt", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 1040, "version": "2949008679", "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:38:16 +0000 (0:00:00.387) 0:00:19.461 ******** 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:38:16 +0000 (0:00:00.034) 0:00:19.496 ******** 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:38:16 +0000 (0:00:00.049) 0:00:19.545 ******** 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:38:16 +0000 (0:00:00.045) 0:00:19.590 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657089486.7972817, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "342fbf0a307640374b7f3a3c6e344fcf7af15448", "ctime": 1657089487.0122817, "dev": 64516, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 16829124, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657089486.8592815, "nlink": 1, "path": "/etc/pki/tls/private/certid.key", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 1040, "version": "2877051802", "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:38:17 +0000 (0:00:00.360) 0:00:19.951 ******** 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:38:17 +0000 (0:00:00.034) 0:00:19.985 ******** 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:38:17 +0000 (0:00:00.049) 0:00:20.034 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.216846", "end": "2022-07-06 02:38:17.928634", "rc": 0, "start": "2022-07-06 02:38:17.711788" } 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": "BC:23:A9:0D:85:2C:71:9B:21:DD:D4:F1:7C:5D:97:39:10:D1:A1:7F", "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": "9D:00:70:5F:90:AB:38:FD:0B:41:57:22:E2:54:10:2A:18:8F:07:46:D2:D2:88:DE:94:A6:66:F8:A4:C6:BF:71:98:91:A3:70:6A:1B:9A:F2:39:15:27:27:8E:25:3B:AC:B0:5E:5E:2B:9D:78:93:E6:98:40:92:11:2E:2E:86:24:A8:B9:FF:27:7B:9C:96:A0:B7:CE:5D:C8:8C:45:44:31:B1:BD:78:A7:C8:69:5B:A3:99:1C:CA:F8:CD:5B:80:08:BA:41:67:88:4C:6D:DA:01:AC:01:2A:5F:A4:67:D6:07:F7:4E:1E:E4:C2:B2:57:17:02:79:E7:F5:75:8C:FD:8F:7A:33:1E:5A:D1:9C:ED:5D:72:39:19:05:F7:A1:0C:9D:B7:E7:89:59:29:57:D9:5E:56:F2:D8:F3:9B:93:FB:74:D8:0C:9D:08:24:A9:A4:0C:0A:F6:D3:CE:47:F0:8F:53:4C:A6:0E:0B:70:89:51:5D:B9:0F:5C:4C:24:47:A6:0F:40:A0:6A:17:C8:13:79:A9:28:5B:40:6E:0A:9D:93:26:84:8B:6D:E2:D0:52:94:C8:20:96:B6:C1:3B:E7:DB:1B:CA:B2:39:63:33:0B:30:2D:89:22:A2:79:5A:95:51:C3:B1:98:C1:E2:0B:61:28:B5:43:0C:11:91:74:1A:AC:D1" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 06:33:04", "not_valid_before": "2022-07-06 06:38:06" } } 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:38:17 +0000 (0:00:00.604) 0:00:20.638 ******** 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": "BC:23:A9:0D:85:2C:71:9B:21:DD:D4:F1:7C:5D:97:39:10:D1:A1:7F" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9D:00:70:5F:90:AB:38:FD:0B:41:57:22:E2:54:10:2A:18:8F:07:46:D2:D2:88:DE:94:A6:66:F8:A4:C6:BF:71:98:91:A3:70:6A:1B:9A:F2:39:15:27:27:8E:25:3B:AC:B0:5E:5E:2B:9D:78:93:E6:98:40:92:11:2E:2E:86:24:A8:B9:FF:27:7B:9C:96:A0:B7:CE:5D:C8:8C:45:44:31:B1:BD:78:A7:C8:69:5B:A3:99:1C:CA:F8:CD:5B:80:08:BA:41:67:88:4C:6D:DA:01:AC:01:2A:5F:A4:67:D6:07:F7:4E:1E:E4:C2:B2:57:17:02:79:E7:F5:75:8C:FD:8F:7A:33:1E:5A:D1:9C:ED:5D:72:39:19:05:F7:A1:0C:9D:B7:E7:89:59:29:57:D9:5E:56:F2:D8:F3:9B:93:FB:74:D8:0C:9D:08:24:A9:A4:0C:0A:F6:D3:CE:47:F0:8F:53:4C:A6:0E:0B:70:89:51:5D:B9:0F:5C:4C:24:47:A6:0F:40:A0:6A:17:C8:13:79:A9:28:5B:40:6E:0A:9D:93:26:84:8B:6D:E2:D0:52:94:C8:20:96:B6:C1:3B:E7:DB:1B:CA:B2:39:63:33:0B:30:2D:89:22:A2:79:5A:95:51:C3:B1:98:C1:E2:0B:61:28:B5:43:0C:11:91:74:1A:AC:D1" }, "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:38:06" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 06:38:17 +0000 (0:00:00.052) 0:00:20.691 ******** 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:38:17 +0000 (0:00:00.052) 0:00:20.744 ******** 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:38:17 +0000 (0:00:00.037) 0:00:20.782 ******** 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:38:18 +0000 (0:00:00.043) 0:00:20.825 ******** 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:38:18 +0000 (0:00:00.079) 0:00:20.905 ******** 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:38:18 +0000 (0:00:00.046) 0:00:20.951 ******** ok: [/cache/rhel-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/certid.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.052376", "end": "2022-07-06 02:38:18.663818", "rc": 0, "start": "2022-07-06 02:38:18.611442" } 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:38:18 +0000 (0:00:00.408) 0:00:21.359 ******** 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=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 06:38:18 +0000 (0:00:00.056) 0:00:21.415 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.99s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.19s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.13s /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:2 ----------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.10s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install the package, force upgrade -------------------------------------- 1.01s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Ensure python3 is installed --------------------------------------------- 0.97s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.96s /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.90s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.87s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.82s /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:31 ---------------------- Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:13 ---------------------- 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 Ensure user exists ------------------------------------------------------ 0.77s /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:5 ----------------------- Parse certificate ------------------------------------------------------- 0.71s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Ensure group "somegroup" exists ----------------------------------------- 0.68s /tmp/tmppcorpegn/tests/certificate/tests_fs_attrs.yml:9 ----------------------- Parse certificate ------------------------------------------------------- 0.60s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmppcorpegn/tests/certificate/tasks/assert_certificate_parameters.yml:26 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.51s /tmp/tmppc8868jw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2