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/tmpsp7qopjw 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/tmpjupnnp9c/tests/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:2 Wednesday 06 July 2022 04:23:47 +0000 (0:00:00.012) 0:00:00.012 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:5 Wednesday 06 July 2022 04:23:48 +0000 (0:00:01.182) 0:00:01.195 ******** changed: [/cache/rhel-8-y.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/tmpjupnnp9c/tests/tests_fs_attrs.yml:9 Wednesday 06 July 2022 04:23:49 +0000 (0:00:00.832) 0:00:02.027 ******** changed: [/cache/rhel-8-y.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/tmpjupnnp9c/tests/tests_fs_attrs.yml:13 Wednesday 06 July 2022 04:23:49 +0000 (0:00:00.713) 0:00:02.740 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:23:50 +0000 (0:00:00.818) 0:00:03.559 ******** included: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:23:50 +0000 (0:00:00.029) 0:00:03.589 ******** ok: [/cache/rhel-8-y.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 04:23:51 +0000 (0:00:00.510) 0:00:04.099 ******** skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:23:51 +0000 (0:00:00.042) 0:00:04.142 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:23:52 +0000 (0:00:01.561) 0:00:05.703 ******** ok: [/cache/rhel-8-y.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/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:23:54 +0000 (0:00:01.388) 0:00:07.092 ******** ok: [/cache/rhel-8-y.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/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:23:54 +0000 (0:00:00.523) 0:00:07.615 ******** ok: [/cache/rhel-8-y.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/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:23:55 +0000 (0:00:00.407) 0:00:08.022 ******** ok: [/cache/rhel-8-y.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 00:19:07 EDT", "ActiveEnterTimestampMonotonic": "209835307", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.socket dbus.service sysinit.target syslog.target network.target systemd-journald.socket basic.target system.slice", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 00:19:07 EDT", "AssertTimestampMonotonic": "209824609", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 00:19:07 EDT", "ConditionTimestampMonotonic": "209824609", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "20356", "ExecMainStartTimestamp": "Wed 2022-07-06 00:19:07 EDT", "ExecMainStartTimestampMonotonic": "209825682", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 00:19:07 EDT", "InactiveExitTimestampMonotonic": "209825779", "InvocationID": "9b7f2c992b884db7b09cb5a377a5b7df", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14640", "LimitNPROCSoft": "14640", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14640", "LimitSIGPENDINGSoft": "14640", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "20356", "MemoryAccounting": "yes", "MemoryCurrent": "3780608", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "sysinit.target dbus.socket system.slice", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 00:19:07 EDT", "StateChangeTimestampMonotonic": "209835307", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23424", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 00:19:07 EDT", "WatchdogTimestampMonotonic": "209835306", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 04:23:55 +0000 (0:00:00.794) 0:00:08.816 ******** changed: [/cache/rhel-8-y.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-8-y.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-8-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:31 Wednesday 06 July 2022 04:23:57 +0000 (0:00:01.815) 0:00:10.632 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:60 Wednesday 06 July 2022 04:23:58 +0000 (0:00:00.834) 0:00:11.467 ******** included: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.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/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.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/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:23:58 +0000 (0:00:00.048) 0:00:11.516 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:23:58 +0000 (0:00:00.083) 0:00:11.599 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:24:00 +0000 (0:00:01.676) 0:00:13.276 ******** ok: [/cache/rhel-8-y.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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:24:01 +0000 (0:00:01.155) 0:00:14.431 ******** ok: [/cache/rhel-8-y.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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:24:02 +0000 (0:00:00.892) 0:00:15.324 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081436.605274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4452ca2d67330495ae333747d0645b8310fd5c8d", "ctime": 1657081436.731274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 16980474, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657081436.602274, "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": "2607392855", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:24:02 +0000 (0:00:00.506) 0:00:15.830 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:24:02 +0000 (0:00:00.033) 0:00:15.864 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:24:02 +0000 (0:00:00.049) 0:00:15.913 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:24:03 +0000 (0:00:00.045) 0:00:15.959 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081436.5542738, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b0c9b4de8107bf50d3106b0eb13d71a85fbd00fd", "ctime": 1657081436.732274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 25183927, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657081436.602274, "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": "318043659", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:24:03 +0000 (0:00:00.370) 0:00:16.329 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:24:03 +0000 (0:00:00.032) 0:00:16.362 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:24:03 +0000 (0:00:00.048) 0:00:16.410 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.239779", "end": "2022-07-06 00:24:04.088216", "rc": 0, "start": "2022-07-06 00:24:03.848437" } 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": "42:32:9E:9F:FB:AF:CE:79:76:80:1A:E1:21:31:2B:69:A5:74:88:54", "critical": false }, "authorityKeyIdentifier": { "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "01:79:AF:44:FD:42:79:C5:8D:DF:A8:6A:36:55:B8:30:D5:E2:1B:E7:B2:3D:6C:94:5D:CB:98:19:AA:94:86:FE:58:B8:F2:09:4B:98:F3:6D:15:07:9B:C5:E2:34:BC:09:05:F3:9D:C0:ED:AF:1B:95:95:D3:19:DA:5D:6B:A4:E7:3E:E9:41:7B:46:EF:88:71:20:CF:D3:80:25:41:F1:B0:A6:7C:22:A2:5D:37:15:18:9A:E3:7D:78:CC:42:A3:CF:DD:45:C1:F7:57:DF:CB:2A:C3:30:4E:91:66:56:D9:BA:7C:A8:BA:F5:1B:E7:4D:5A:9F:89:A1:57:C9:02:31:C8:06:38:3F:94:A8:99:ED:49:FB:B5:7B:2A:25:1E:B4:F5:48:1C:04:52:BD:A9:60:11:51:FF:FC:79:FD:4E:40:B7:F3:C6:27:44:CA:7D:9E:DF:D5:E7:F9:9B:36:75:54:35:5D:A6:EC:31:08:31:18:84:06:49:B8:B6:59:83:8B:7C:E6:33:44:28:83:64:BA:83:3E:17:41:8E:95:69:26:6E:0F:17:79:F1:A0:68:4C:38:22:25:F8:27:98:34:23:D1:27:E9:B0:14:34:D6:B5:3F:EF:8B:D9:62:5E:44:E1:0D:4F:5B:7E:13:1C:65:B1:6A:7A:79:9D:7E:AF:53:22:4B" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:23:56" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.742) 0:00:17.153 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26" }, "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": "42:32:9E:9F:FB:AF:CE:79:76:80:1A:E1:21:31:2B:69:A5:74:88:54" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "01:79:AF:44:FD:42:79:C5:8D:DF:A8:6A:36:55:B8:30:D5:E2:1B:E7:B2:3D:6C:94:5D:CB:98:19:AA:94:86:FE:58:B8:F2:09:4B:98:F3:6D:15:07:9B:C5:E2:34:BC:09:05:F3:9D:C0:ED:AF:1B:95:95:D3:19:DA:5D:6B:A4:E7:3E:E9:41:7B:46:EF:88:71:20:CF:D3:80:25:41:F1:B0:A6:7C:22:A2:5D:37:15:18:9A:E3:7D:78:CC:42:A3:CF:DD:45:C1:F7:57:DF:CB:2A:C3:30:4E:91:66:56:D9:BA:7C:A8:BA:F5:1B:E7:4D:5A:9F:89:A1:57:C9:02:31:C8:06:38:3F:94:A8:99:ED:49:FB:B5:7B:2A:25:1E:B4:F5:48:1C:04:52:BD:A9:60:11:51:FF:FC:79:FD:4E:40:B7:F3:C6:27:44:CA:7D:9E:DF:D5:E7:F9:9B:36:75:54:35:5D:A6:EC:31:08:31:18:84:06:49:B8:B6:59:83:8B:7C:E6:33:44:28:83:64:BA:83:3E:17:41:8E:95:69:26:6E:0F:17:79:F1:A0:68:4C:38:22:25:F8:27:98:34:23:D1:27:E9:B0:14:34:D6:B5:3F:EF:8B:D9:62:5E:44:E1:0D:4F:5B:7E:13:1C:65:B1:6A:7A:79:9D:7E:AF:53:22:4B" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:23:56" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.043) 0:00:17.196 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.044) 0:00:17.241 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.033) 0:00:17.274 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.046) 0:00:17.320 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.046) 0:00:17.366 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.046) 0:00:17.412 ******** ok: [/cache/rhel-8-y.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.119907", "end": "2022-07-06 00:24:04.838530", "rc": 0, "start": "2022-07-06 00:24:04.718623" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.486) 0:00:17.899 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:24:04 +0000 (0:00:00.044) 0:00:17.944 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:24:05 +0000 (0:00:00.028) 0:00:17.973 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:24:06 +0000 (0:00:01.369) 0:00:19.342 ******** ok: [/cache/rhel-8-y.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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:24:07 +0000 (0:00:01.032) 0:00:20.374 ******** ok: [/cache/rhel-8-y.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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:24:08 +0000 (0:00:00.869) 0:00:21.243 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081437.436274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "83c8b8d1e046970e5234b074de6a0740c2bca7ea", "ctime": 1657081437.527274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 16980475, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657081437.433274, "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": "31417166", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:24:08 +0000 (0:00:00.367) 0:00:21.611 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:24:08 +0000 (0:00:00.033) 0:00:21.645 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 04:24:08 +0000 (0:00:00.048) 0:00:21.693 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 04:24:08 +0000 (0:00:00.044) 0:00:21.737 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081437.382274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "bb3cb50fabd0a9f27c614b328f311980e867b4de", "ctime": 1657081437.528274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 26548739, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657081437.433274, "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": "2515544492", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.365) 0:00:22.103 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.033) 0:00:22.136 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.048) 0:00:22.185 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.226622", "end": "2022-07-06 00:24:09.714684", "rc": 0, "start": "2022-07-06 00:24:09.488062" } 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": "64:C6:20:98:C7:B0:D0:10:5A:BB:03:70:52:9F:96:C1:3F:38:7B:06", "critical": false }, "authorityKeyIdentifier": { "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AD:3C:7A:BC:1F:B6:C5:6D:A2:18:A4:8D:FF:24:E2:87:F6:BF:A7:EE:79:CF:F6:A8:17:4B:65:B1:40:B8:C4:26:ED:04:2A:E6:25:BE:11:16:1B:ED:1F:DB:1A:64:26:13:E1:0D:E7:46:71:12:A6:75:5A:87:31:AE:63:6F:32:85:95:28:1A:A8:47:6C:32:64:5D:40:43:89:13:F5:83:AB:18:52:DE:90:76:D3:A0:1C:CF:F1:B8:C2:CF:75:0F:5C:07:87:6B:F2:43:55:BC:DB:7E:2A:A1:69:AC:0D:5A:DC:F2:70:09:81:FB:8F:58:8F:48:B7:46:F4:6F:AF:EF:E2:D0:FB:AC:FE:84:B3:6B:61:0A:99:61:8B:D3:56:9C:9E:87:B7:E1:83:B2:B6:FB:F0:4D:BD:BA:E2:CD:F1:4C:17:03:54:8A:66:A0:51:B9:1B:72:A0:62:F4:A7:8D:F6:C4:29:67:10:32:61:7A:D0:E5:94:34:89:97:12:84:C5:86:1B:5A:54:25:92:F5:47:35:6B:C5:D7:50:75:05:44:F2:C1:95:88:E6:EE:84:E4:3E:B5:CB:EE:9F:4C:7E:8D:D3:62:50:04:68:BC:D8:84:02:23:42:29:8D:CD:9C:09:97:68:19:1E:83:DA:7F:8A:BC:5F:92:6F:2D:1B:43:2E:50" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:23:57" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.592) 0:00:22.778 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "EA:13:1C:D9:76:B4:03:87:EC:1C:CA:DF:E8:85:E1:98:02:AB:53:26" }, "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": "64:C6:20:98:C7:B0:D0:10:5A:BB:03:70:52:9F:96:C1:3F:38:7B:06" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AD:3C:7A:BC:1F:B6:C5:6D:A2:18:A4:8D:FF:24:E2:87:F6:BF:A7:EE:79:CF:F6:A8:17:4B:65:B1:40:B8:C4:26:ED:04:2A:E6:25:BE:11:16:1B:ED:1F:DB:1A:64:26:13:E1:0D:E7:46:71:12:A6:75:5A:87:31:AE:63:6F:32:85:95:28:1A:A8:47:6C:32:64:5D:40:43:89:13:F5:83:AB:18:52:DE:90:76:D3:A0:1C:CF:F1:B8:C2:CF:75:0F:5C:07:87:6B:F2:43:55:BC:DB:7E:2A:A1:69:AC:0D:5A:DC:F2:70:09:81:FB:8F:58:8F:48:B7:46:F4:6F:AF:EF:E2:D0:FB:AC:FE:84:B3:6B:61:0A:99:61:8B:D3:56:9C:9E:87:B7:E1:83:B2:B6:FB:F0:4D:BD:BA:E2:CD:F1:4C:17:03:54:8A:66:A0:51:B9:1B:72:A0:62:F4:A7:8D:F6:C4:29:67:10:32:61:7A:D0:E5:94:34:89:97:12:84:C5:86:1B:5A:54:25:92:F5:47:35:6B:C5:D7:50:75:05:44:F2:C1:95:88:E6:EE:84:E4:3E:B5:CB:EE:9F:4C:7E:8D:D3:62:50:04:68:BC:D8:84:02:23:42:29:8D:CD:9C:09:97:68:19:1E:83:DA:7F:8A:BC:5F:92:6F:2D:1B:43:2E:50" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:23:57" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.070) 0:00:22.848 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.046) 0:00:22.894 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 04:24:09 +0000 (0:00:00.031) 0:00:22.926 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 04:24:10 +0000 (0:00:00.045) 0:00:22.972 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 04:24:10 +0000 (0:00:00.048) 0:00:23.020 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:24:10 +0000 (0:00:00.072) 0:00:23.093 ******** ok: [/cache/rhel-8-y.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.069581", "end": "2022-07-06 00:24:10.489424", "rc": 0, "start": "2022-07-06 00:24:10.419843" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:24:10 +0000 (0:00:00.457) 0:00:23.550 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:24:10 +0000 (0:00:00.051) 0:00:23.602 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 1.82s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Ensure python3 is installed --------------------------------------------- 1.68s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.56s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.39s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.37s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 -------------- Gathering Facts --------------------------------------------------------- 1.18s /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:2 ----------------------------------- Install the package, force upgrade -------------------------------------- 1.16s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 1.03s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install certreader ------------------------------------------------------ 0.89s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.87s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.83s /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:31 ---------------------------------- Ensure user exists ------------------------------------------------------ 0.83s /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:5 ----------------------------------- Gathering Facts --------------------------------------------------------- 0.82s /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:13 ---------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.79s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.74s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 ------------- Ensure group "somegroup" exists ----------------------------------------- 0.71s /tmp/tmpjupnnp9c/tests/tests_fs_attrs.yml:9 ----------------------------------- Parse certificate ------------------------------------------------------- 0.59s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.51s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 ------------- 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/tmpsp7qopjw 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/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:2 Wednesday 06 July 2022 04:35:33 +0000 (0:00:00.014) 0:00:00.014 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:5 Wednesday 06 July 2022 04:35:34 +0000 (0:00:01.179) 0:00:01.193 ******** changed: [/cache/rhel-8-y.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/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:9 Wednesday 06 July 2022 04:35:35 +0000 (0:00:00.880) 0:00:02.073 ******** changed: [/cache/rhel-8-y.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/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:13 Wednesday 06 July 2022 04:35:36 +0000 (0:00:00.723) 0:00:02.797 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 04:35:36 +0000 (0:00:00.838) 0:00:03.635 ******** included: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 04:35:36 +0000 (0:00:00.029) 0:00:03.665 ******** ok: [/cache/rhel-8-y.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 04:35:37 +0000 (0:00:00.594) 0:00:04.260 ******** skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 04:35:37 +0000 (0:00:00.041) 0:00:04.301 ******** ok: [/cache/rhel-8-y.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/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 04:35:39 +0000 (0:00:01.612) 0:00:05.914 ******** ok: [/cache/rhel-8-y.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/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 04:35:40 +0000 (0:00:01.342) 0:00:07.256 ******** ok: [/cache/rhel-8-y.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/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 04:35:41 +0000 (0:00:00.541) 0:00:07.798 ******** ok: [/cache/rhel-8-y.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/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 04:35:41 +0000 (0:00:00.419) 0:00:08.218 ******** ok: [/cache/rhel-8-y.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 00:30:53 EDT", "ActiveEnterTimestampMonotonic": "208549725", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "syslog.target dbus.socket systemd-journald.socket basic.target network.target dbus.service sysinit.target system.slice", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 00:30:53 EDT", "AssertTimestampMonotonic": "208539032", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUAffinity": "", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 00:30:53 EDT", "ConditionTimestampMonotonic": "208539032", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EffectiveCPUs": "", "EffectiveMemoryNodes": "", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "20339", "ExecMainStartTimestamp": "Wed 2022-07-06 00:30:53 EDT", "ExecMainStartTimestampMonotonic": "208540188", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOSchedulingClass": "0", "IOSchedulingPriority": "0", "IOWeight": "[not set]", "IPAccounting": "no", "IPEgressBytes": "18446744073709551615", "IPEgressPackets": "18446744073709551615", "IPIngressBytes": "18446744073709551615", "IPIngressPackets": "18446744073709551615", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 00:30:53 EDT", "InactiveExitTimestampMonotonic": "208540321", "InvocationID": "10da18c4a5da4869bbf5df93894e3192", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "262144", "LimitNOFILESoft": "1024", "LimitNPROC": "14640", "LimitNPROCSoft": "14640", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14640", "LimitSIGPENDINGSoft": "14640", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "20339", "MemoryAccounting": "yes", "MemoryCurrent": "3788800", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "sysinit.target dbus.socket system.slice", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 00:30:53 EDT", "StateChangeTimestampMonotonic": "208549725", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23424", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 00:30:53 EDT", "WatchdogTimestampMonotonic": "208549724", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 04:35:42 +0000 (0:00:00.796) 0:00:09.014 ******** changed: [/cache/rhel-8-y.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-8-y.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-8-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:31 Wednesday 06 July 2022 04:35:44 +0000 (0:00:01.747) 0:00:10.761 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:60 Wednesday 06 July 2022 04:35:44 +0000 (0:00:00.795) 0:00:11.556 ******** included: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.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/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.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/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:35:44 +0000 (0:00:00.048) 0:00:11.604 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:35:44 +0000 (0:00:00.060) 0:00:11.665 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:35:46 +0000 (0:00:01.338) 0:00:13.003 ******** ok: [/cache/rhel-8-y.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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:35:47 +0000 (0:00:01.116) 0:00:14.120 ******** ok: [/cache/rhel-8-y.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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:35:48 +0000 (0:00:00.845) 0:00:14.966 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082142.3427496, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "daad98c1044f9de39a9deb97d9d65fcc5e8a5a82", "ctime": 1657082142.3887496, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 16980529, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657082142.3397496, "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": "380510898", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:35:48 +0000 (0:00:00.501) 0:00:15.468 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:35:48 +0000 (0:00:00.033) 0:00:15.501 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 04:35:48 +0000 (0:00:00.047) 0:00:15.548 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 04:35:48 +0000 (0:00:00.044) 0:00:15.593 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082142.2937496, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "0cdf1ccb79604d99ed8d7247c06c843de3e88e57", "ctime": 1657082142.3887496, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 26338331, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657082142.3397496, "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": "3346792507", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 04:35:49 +0000 (0:00:00.373) 0:00:15.966 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 04:35:49 +0000 (0:00:00.031) 0:00:15.998 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 04:35:49 +0000 (0:00:00.047) 0:00:16.045 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.227416", "end": "2022-07-06 00:35:49.324427", "rc": 0, "start": "2022-07-06 00:35:49.097011" } 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": "32:BC:8D:89:6E:FA:3A:A1:5F:4E:22:56:8E:CE:D6:E2:F7:EF:52:20", "critical": false }, "authorityKeyIdentifier": { "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "40:5E:22:89:90:A5:11:83:D1:AB:4D:5B:64:C8:DF:0E:D5:54:7E:1D:A2:9A:10:0E:79:77:3F:0F:4C:93:EF:48:41:69:11:00:D3:56:B1:F0:8C:47:6F:4F:E5:52:EA:E9:2F:AA:0C:BA:39:E3:D8:98:DE:9A:55:98:64:BD:13:EF:0D:1C:0E:5E:EB:B9:50:08:CE:BF:F2:E7:E5:EF:46:C3:DD:2C:E0:7F:D3:40:D6:F4:F2:39:92:8E:F4:7A:21:F9:1E:97:C0:18:24:7F:C8:F2:70:E1:52:FA:6A:F1:50:41:52:26:E1:73:7F:2B:70:87:1A:92:86:C0:80:F7:E0:D3:9C:60:E8:11:E7:53:14:9B:F6:C8:98:65:A4:3F:65:06:93:FB:F6:59:56:09:6E:7B:78:EE:34:AA:38:CB:44:C5:46:BC:4B:08:A2:11:59:0B:9F:F9:B5:67:3C:68:B7:CC:22:E4:47:FF:30:9E:95:93:B7:EA:3F:26:CB:06:08:F1:63:91:EB:1F:BE:A9:E0:A6:37:8B:CE:33:D2:79:F7:41:C0:B2:25:EA:76:9B:F9:B5:19:19:CC:93:A5:13:4D:87:BE:D8:B3:D6:64:F9:62:76:BE:8E:F8:42:75:77:7B:30:31:37:4D:B1:6B:0F:29:97:30:36:58:0C:32:DB:3D:8B" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:35:42" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.722) 0:00:16.768 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C" }, "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": "32:BC:8D:89:6E:FA:3A:A1:5F:4E:22:56:8E:CE:D6:E2:F7:EF:52:20" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "40:5E:22:89:90:A5:11:83:D1:AB:4D:5B:64:C8:DF:0E:D5:54:7E:1D:A2:9A:10:0E:79:77:3F:0F:4C:93:EF:48:41:69:11:00:D3:56:B1:F0:8C:47:6F:4F:E5:52:EA:E9:2F:AA:0C:BA:39:E3:D8:98:DE:9A:55:98:64:BD:13:EF:0D:1C:0E:5E:EB:B9:50:08:CE:BF:F2:E7:E5:EF:46:C3:DD:2C:E0:7F:D3:40:D6:F4:F2:39:92:8E:F4:7A:21:F9:1E:97:C0:18:24:7F:C8:F2:70:E1:52:FA:6A:F1:50:41:52:26:E1:73:7F:2B:70:87:1A:92:86:C0:80:F7:E0:D3:9C:60:E8:11:E7:53:14:9B:F6:C8:98:65:A4:3F:65:06:93:FB:F6:59:56:09:6E:7B:78:EE:34:AA:38:CB:44:C5:46:BC:4B:08:A2:11:59:0B:9F:F9:B5:67:3C:68:B7:CC:22:E4:47:FF:30:9E:95:93:B7:EA:3F:26:CB:06:08:F1:63:91:EB:1F:BE:A9:E0:A6:37:8B:CE:33:D2:79:F7:41:C0:B2:25:EA:76:9B:F9:B5:19:19:CC:93:A5:13:4D:87:BE:D8:B3:D6:64:F9:62:76:BE:8E:F8:42:75:77:7B:30:31:37:4D:B1:6B:0F:29:97:30:36:58:0C:32:DB:3D:8B" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:35:42" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.042) 0:00:16.810 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.042) 0:00:16.853 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.031) 0:00:16.884 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.042) 0:00:16.927 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.044) 0:00:16.971 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.046) 0:00:17.018 ******** ok: [/cache/rhel-8-y.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.070838", "end": "2022-07-06 00:35:50.002714", "rc": 0, "start": "2022-07-06 00:35:49.931876" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.426) 0:00:17.445 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.044) 0:00:17.489 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 04:35:50 +0000 (0:00:00.028) 0:00:17.518 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 04:35:52 +0000 (0:00:01.347) 0:00:18.865 ******** ok: [/cache/rhel-8-y.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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 04:35:53 +0000 (0:00:01.024) 0:00:19.889 ******** ok: [/cache/rhel-8-y.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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 04:35:54 +0000 (0:00:00.888) 0:00:20.778 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082143.1497495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4b9f5f1246fea35453a49608e576d65eb120e911", "ctime": 1657082143.2817495, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 16980530, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657082143.1467495, "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": "317952322", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 04:35:54 +0000 (0:00:00.370) 0:00:21.148 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 04:35:54 +0000 (0:00:00.033) 0:00:21.182 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 04:35:54 +0000 (0:00:00.048) 0:00:21.231 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 04:35:54 +0000 (0:00:00.045) 0:00:21.276 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082143.0997496, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "180b663ff9d9c3b7813857531dae2ef8749c5745", "ctime": 1657082143.2817495, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 25183927, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657082143.1467495, "nlink": 1, "path": "/etc/pki/tls/private/certid.key", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1708, "uid": 1040, "version": "684094754", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.389) 0:00:21.666 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.032) 0:00:21.698 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.048) 0:00:21.747 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.228899", "end": "2022-07-06 00:35:54.934929", "rc": 0, "start": "2022-07-06 00:35:54.706030" } 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": "A0:E5:BE:69:B7:7E:D4:71:7A:EF:0D:F7:D2:1D:55:E2:9A:D1:DE:EE", "critical": false }, "authorityKeyIdentifier": { "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "95:80:0F:57:5B:61:27:82:CE:CE:7C:72:F7:C2:04:04:C9:6F:A3:B4:42:5F:48:33:B9:A0:30:90:D0:53:A7:24:E5:46:EF:08:58:79:45:D9:DD:A0:61:A4:26:9F:25:28:09:44:45:E1:04:69:21:E9:9F:90:11:4D:3E:80:94:42:A6:B9:C3:2F:F9:BF:37:56:41:F3:A1:F5:75:54:C4:9B:55:96:7A:CE:2E:29:46:E1:2C:35:A2:F7:F7:02:65:B1:A8:C6:A2:40:02:48:F1:80:B4:8B:EB:4B:B2:2E:98:79:1D:4D:CB:17:DF:01:6B:BF:0D:AB:81:5B:21:7C:43:E2:0C:C2:22:A0:FE:A0:09:DE:47:42:93:57:F3:38:1E:96:1B:2B:98:09:FB:57:D5:67:6F:00:1A:E6:DD:98:A7:3F:F7:F8:43:B9:89:35:A1:03:28:F2:68:9F:C7:3E:83:E6:35:43:87:A3:16:65:B5:3E:22:19:32:B6:91:5F:E5:B5:32:CC:47:7C:E9:40:F8:6B:A2:5D:DC:62:45:57:66:95:B3:71:68:B6:38:57:64:18:0A:7C:15:EE:75:66:83:31:69:87:53:1A:57:E8:08:B5:F2:50:06:71:07:E4:42:65:6D:E6:64:6C:92:45:8A:2B:81:4F:58:53:08:26:FC:58" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:35:43" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.633) 0:00:22.380 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "8A:94:1E:CC:14:86:F2:5F:BE:A3:0B:04:B8:91:8D:D3:C3:5A:D9:2C" }, "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": "A0:E5:BE:69:B7:7E:D4:71:7A:EF:0D:F7:D2:1D:55:E2:9A:D1:DE:EE" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "95:80:0F:57:5B:61:27:82:CE:CE:7C:72:F7:C2:04:04:C9:6F:A3:B4:42:5F:48:33:B9:A0:30:90:D0:53:A7:24:E5:46:EF:08:58:79:45:D9:DD:A0:61:A4:26:9F:25:28:09:44:45:E1:04:69:21:E9:9F:90:11:4D:3E:80:94:42:A6:B9:C3:2F:F9:BF:37:56:41:F3:A1:F5:75:54:C4:9B:55:96:7A:CE:2E:29:46:E1:2C:35:A2:F7:F7:02:65:B1:A8:C6:A2:40:02:48:F1:80:B4:8B:EB:4B:B2:2E:98:79:1D:4D:CB:17:DF:01:6B:BF:0D:AB:81:5B:21:7C:43:E2:0C:C2:22:A0:FE:A0:09:DE:47:42:93:57:F3:38:1E:96:1B:2B:98:09:FB:57:D5:67:6F:00:1A:E6:DD:98:A7:3F:F7:F8:43:B9:89:35:A1:03:28:F2:68:9F:C7:3E:83:E6:35:43:87:A3:16:65:B5:3E:22:19:32:B6:91:5F:E5:B5:32:CC:47:7C:E9:40:F8:6B:A2:5D:DC:62:45:57:66:95:B3:71:68:B6:38:57:64:18:0A:7C:15:EE:75:66:83:31:69:87:53:1A:57:E8:08:B5:F2:50:06:71:07:E4:42:65:6D:E6:64:6C:92:45:8A:2B:81:4F:58:53:08:26:FC:58" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:35:43" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.070) 0:00:22.450 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.044) 0:00:22.495 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.031) 0:00:22.526 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.041) 0:00:22.568 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 04:35:55 +0000 (0:00:00.076) 0:00:22.645 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 04:35:56 +0000 (0:00:00.071) 0:00:22.716 ******** ok: [/cache/rhel-8-y.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.069146", "end": "2022-07-06 00:35:55.719862", "rc": 0, "start": "2022-07-06 00:35:55.650716" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 04:35:56 +0000 (0:00:00.446) 0:00:23.163 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:35:56 +0000 (0:00:00.090) 0:00:23.253 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.75s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.61s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 1.35s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.34s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.34s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Gathering Facts --------------------------------------------------------- 1.18s /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:2 ----------------------- Install the package, force upgrade -------------------------------------- 1.12s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install the package, force upgrade -------------------------------------- 1.02s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.89s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Ensure user exists ------------------------------------------------------ 0.88s /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:5 ----------------------- Install certreader ------------------------------------------------------ 0.85s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.84s /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:13 ---------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.80s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.80s /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:31 ---------------------- Ensure group "somegroup" exists ----------------------------------------- 0.72s /tmp/tmpj_xtuxdz/tests/certificate/tests_fs_attrs.yml:9 ----------------------- Parse certificate ------------------------------------------------------- 0.72s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.63s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.59s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.54s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.50s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 -