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/tmpt8vnebz7 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Wednesday 06 July 2022 22:43:57 +0000 (0:00:00.017) 0:00:00.017 ******** ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:43:59 +0000 (0:00:01.311) 0:00:01.328 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.31s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmplpebei7w/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 22:43:59 +0000 (0:00:00.041) 0:00:01.370 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:44:00 +0000 (0:00:01.035) 0:00:02.405 ******** included: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:44:00 +0000 (0:00:00.025) 0:00:02.430 ******** ok: [/cache/rhel-8.qcow2] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 22:44:00 +0000 (0:00:00.499) 0:00:02.929 ******** skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:44:00 +0000 (0:00:00.039) 0:00:02.968 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:44:02 +0000 (0:00:01.495) 0:00:04.464 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:44:03 +0000 (0:00:01.307) 0:00:05.771 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:44:04 +0000 (0:00:00.517) 0:00:06.289 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:44:04 +0000 (0:00:00.401) 0:00:06.690 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 18:36:04 EDT", "ActiveEnterTimestampMonotonic": "228945850", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "sysinit.target dbus.service dbus.socket syslog.target network.target system.slice systemd-journald.socket basic.target", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:36:04 EDT", "AssertTimestampMonotonic": "228933431", "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 18:36:04 EDT", "ConditionTimestampMonotonic": "228933431", "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": "23911", "ExecMainStartTimestamp": "Wed 2022-07-06 18:36:04 EDT", "ExecMainStartTimestampMonotonic": "228934830", "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 18:36:04 EDT", "InactiveExitTimestampMonotonic": "228934872", "InvocationID": "73d85d6be97a474c9524444a92253530", "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": "14648", "LimitNPROCSoft": "14648", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14648", "LimitSIGPENDINGSoft": "14648", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "23911", "MemoryAccounting": "yes", "MemoryCurrent": "4493312", "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 system.slice dbus.socket", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 18:36:04 EDT", "StateChangeTimestampMonotonic": "228945850", "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": "23436", "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 18:36:04 EDT", "WatchdogTimestampMonotonic": "228945849", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 22:44:05 +0000 (0:00:00.779) 0:00:07.469 ******** changed: [/cache/rhel-8.qcow2] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': 'touch /etc/pki/after_cert.tmp\n'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } } MSG: Certificate requested (new). Pre/Post run hooks updated. META: role_complete for /cache/rhel-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 22:44:06 +0000 (0:00:01.040) 0:00:08.509 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 22:44:07 +0000 (0:00:00.789) 0:00:09.299 ******** included: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:44:07 +0000 (0:00:00.039) 0:00:09.339 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:44:07 +0000 (0:00:00.068) 0:00:09.407 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:44:08 +0000 (0:00:01.316) 0:00:10.724 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:44:09 +0000 (0:00:01.164) 0:00:11.888 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:44:10 +0000 (0:00:00.904) 0:00:12.793 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147445.6319797, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "ee3b7e6964923eda48ec1728da19138961e16810", "ctime": 1657147445.6219797, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004052, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147445.6219797, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "2206387033", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.520) 0:00:13.313 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.063) 0:00:13.377 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.075) 0:00:13.453 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.078) 0:00:13.531 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147445.5679798, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d5b37cb49b5cc39ad8260d7f8c84add1aaa6e151", "ctime": 1657147445.6219797, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9519366, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147445.6219797, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "2556120577", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.370) 0:00:13.901 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.030) 0:00:13.932 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 22:44:11 +0000 (0:00:00.044) 0:00:13.977 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.235509", "end": "2022-07-06 18:44:11.969756", "rc": 0, "start": "2022-07-06 18:44:11.734247" } 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": "CE:B8:D0:D6:A9:31:E4:45:A8:9F:91:27:FB:3F:BA:E3:3E:4B:2C:EC", "critical": false }, "authorityKeyIdentifier": { "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "98:3A:70:C1:99:F8:6C:87:AC:67:77:77:BD:10:B8:FB:24:BD:09:A7:C1:AA:BB:C2:38:55:78:A5:D3:97:36:D2:B1:3A:5E:AD:E1:E1:D6:76:3A:04:F5:A4:EC:90:31:D6:54:91:07:64:38:60:D4:B6:29:AA:A6:4F:4D:0C:29:FD:FB:15:4F:CC:39:BE:39:5F:5F:1E:BF:01:27:28:7B:32:1A:E8:FB:3E:93:C2:95:57:4F:96:4A:A8:88:AA:9C:EC:07:30:DC:C3:70:51:E0:A6:BF:85:7A:9F:7B:FD:E1:AC:E2:88:AA:63:D1:D6:9F:63:EB:83:B1:C1:2B:AC:5E:28:B2:9A:0D:9B:CD:73:89:36:41:E0:82:17:95:88:71:05:A9:FA:8D:62:3B:3B:1E:DB:4E:28:56:B3:AA:09:F9:BF:C2:E3:08:98:14:6A:17:CA:69:85:82:D5:70:84:B6:19:03:3E:01:BC:5C:13:C9:97:49:25:D0:EC:85:5E:EA:4D:6B:9C:69:A8:7C:81:B5:5B:83:9D:30:2F:AA:F6:5E:C1:47:36:1C:3E:FB:17:3D:2E:4E:E8:98:BC:E4:7E:CB:10:90:BE:7F:D4:24:D4:88:86:AE:45:E1:61:A5:BF:33:0C:2E:C5:E0:5B:4F:FF:E6:51:A3:4A:71:85:CF:D4:84:1A" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:44:05" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.695) 0:00:14.672 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "59:31:B7:F8:0D:08:12:16:0A:D4:E8:FA:0B:BD:91:65:C9:DC:60:5A" }, "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": "CE:B8:D0:D6:A9:31:E4:45:A8:9F:91:27:FB:3F:BA:E3:3E:4B:2C:EC" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "98:3A:70:C1:99:F8:6C:87:AC:67:77:77:BD:10:B8:FB:24:BD:09:A7:C1:AA:BB:C2:38:55:78:A5:D3:97:36:D2:B1:3A:5E:AD:E1:E1:D6:76:3A:04:F5:A4:EC:90:31:D6:54:91:07:64:38:60:D4:B6:29:AA:A6:4F:4D:0C:29:FD:FB:15:4F:CC:39:BE:39:5F:5F:1E:BF:01:27:28:7B:32:1A:E8:FB:3E:93:C2:95:57:4F:96:4A:A8:88:AA:9C:EC:07:30:DC:C3:70:51:E0:A6:BF:85:7A:9F:7B:FD:E1:AC:E2:88:AA:63:D1:D6:9F:63:EB:83:B1:C1:2B:AC:5E:28:B2:9A:0D:9B:CD:73:89:36:41:E0:82:17:95:88:71:05:A9:FA:8D:62:3B:3B:1E:DB:4E:28:56:B3:AA:09:F9:BF:C2:E3:08:98:14:6A:17:CA:69:85:82:D5:70:84:B6:19:03:3E:01:BC:5C:13:C9:97:49:25:D0:EC:85:5E:EA:4D:6B:9C:69:A8:7C:81:B5:5B:83:9D:30:2F:AA:F6:5E:C1:47:36:1C:3E:FB:17:3D:2E:4E:E8:98:BC:E4:7E:CB:10:90:BE:7F:D4:24:D4:88:86:AE:45:E1:61:A5:BF:33:0C:2E:C5:E0:5B:4F:FF:E6:51:A3:4A:71:85:CF:D4:84:1A" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:36:04", "not_valid_before": "2022-07-06 22:44:05" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.041) 0:00:14.713 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.042) 0:00:14.756 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.034) 0:00:14.790 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.044) 0:00:14.834 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.044) 0:00:14.879 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:44:12 +0000 (0:00:00.052) 0:00:14.931 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_run_hooks.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.085402", "end": "2022-07-06 18:44:12.706092", "rc": 0, "start": "2022-07-06 18:44:12.620690" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:44:13 +0000 (0:00:00.479) 0:00:15.410 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 22:44:13 +0000 (0:00:00.046) 0:00:15.456 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147445.6319797, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "ee3b7e6964923eda48ec1728da19138961e16810", "ctime": 1657147445.6219797, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004052, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147445.6219797, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "2206387033", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 22:44:13 +0000 (0:00:00.378) 0:00:15.834 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147445.61898, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657147445.61898, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9519367, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657147445.61898, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "3890858216", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.373) 0:00:16.207 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657147445.67198, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657147445.67198, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9519368, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657147445.67198, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1469487851", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.366) 0:00:16.574 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.033) 0:00:16.607 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.031) 0:00:16.638 ******** changed: [/cache/rhel-8.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006804", "end": "2022-07-06 18:44:14.317006", "rc": 0, "start": "2022-07-06 18:44:14.310202" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmplpebei7w/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.383) 0:00:17.022 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=39 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 22:44:14 +0000 (0:00:00.051) 0:00:17.074 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.50s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.32s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:6 -------------- set up internal repositories -------------------------------------------- 1.31s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.31s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Install the package, force upgrade -------------------------------------- 1.16s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:11 ------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.04s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Gathering Facts --------------------------------------------------------- 1.04s /tmp/tmplpebei7w/tests/tests_run_hooks.yml:2 ---------------------------------- Install certreader ------------------------------------------------------ 0.90s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.79s /tmp/tmplpebei7w/tests/tests_run_hooks.yml:17 --------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.78s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.70s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:78 ------------- Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.52s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.50s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.48s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.40s /tmp/tmplpebei7w/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Get the ansible_managed comment in pre/post-scripts --------------------- 0.38s /tmp/tmplpebei7w/tests/tests_run_hooks.yml:66 --------------------------------- Get certificate timestamp ----------------------------------------------- 0.38s /tmp/tmplpebei7w/tests/tests_run_hooks.yml:39 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.37s /tmp/tmplpebei7w/tests/tests_run_hooks.yml:43 --------------------------------- Retrieve key file stats ------------------------------------------------- 0.37s /tmp/tmplpebei7w/tests/tasks/assert_certificate_parameters.yml:55 ------------- ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/tmpt8vnebz7 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Wednesday 06 July 2022 22:56:29 +0000 (0:00:00.018) 0:00:00.018 ******** ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:56:31 +0000 (0:00:01.307) 0:00:01.325 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.31s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 22:56:31 +0000 (0:00:00.044) 0:00:01.370 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:56:32 +0000 (0:00:01.016) 0:00:02.387 ******** included: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:56:32 +0000 (0:00:00.026) 0:00:02.413 ******** ok: [/cache/rhel-8.qcow2] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 22:56:32 +0000 (0:00:00.493) 0:00:02.907 ******** skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:56:32 +0000 (0:00:00.041) 0:00:02.948 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:56:34 +0000 (0:00:01.470) 0:00:04.418 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:56:35 +0000 (0:00:01.301) 0:00:05.719 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:56:36 +0000 (0:00:00.507) 0:00:06.227 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:56:36 +0000 (0:00:00.400) 0:00:06.627 ******** ok: [/cache/rhel-8.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 18:48:34 EDT", "ActiveEnterTimestampMonotonic": "217577643", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus.service dbus.socket sysinit.target system.slice basic.target network.target syslog.target systemd-journald.socket", "AllowIsolate": "no", "AllowedCPUs": "", "AllowedMemoryNodes": "", "AmbientCapabilities": "", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:48:34 EDT", "AssertTimestampMonotonic": "217565677", "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 18:48:34 EDT", "ConditionTimestampMonotonic": "217565676", "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": "23914", "ExecMainStartTimestamp": "Wed 2022-07-06 18:48:34 EDT", "ExecMainStartTimestampMonotonic": "217566944", "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 18:48:34 EDT", "InactiveExitTimestampMonotonic": "217566995", "InvocationID": "d54891b3cfa34d7ca4a9f82aac3ff004", "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": "14648", "LimitNPROCSoft": "14648", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14648", "LimitSIGPENDINGSoft": "14648", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "23914", "MemoryAccounting": "yes", "MemoryCurrent": "4468736", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "MountFlags": "", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAMask": "", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus.service", "PermissionsStartOnly": "no", "Perpetual": "no", "PrivateDevices": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice dbus.socket sysinit.target", "Restart": "no", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardInputData": "", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 18:48:34 EDT", "StateChangeTimestampMonotonic": "217577643", "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": "23436", "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 18:48:34 EDT", "WatchdogTimestampMonotonic": "217577641", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 22:56:37 +0000 (0:00:00.784) 0:00:07.412 ******** changed: [/cache/rhel-8.qcow2] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': 'touch /etc/pki/after_cert.tmp\n'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } } MSG: Certificate requested (new). Pre/Post run hooks updated. META: role_complete for /cache/rhel-8.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 22:56:38 +0000 (0:00:01.045) 0:00:08.458 ******** ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 22:56:39 +0000 (0:00:00.810) 0:00:09.268 ******** included: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-8.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:56:39 +0000 (0:00:00.040) 0:00:09.309 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:56:39 +0000 (0:00:00.065) 0:00:09.375 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:56:40 +0000 (0:00:01.283) 0:00:10.659 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:56:41 +0000 (0:00:01.172) 0:00:11.831 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:56:42 +0000 (0:00:00.903) 0:00:12.735 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148196.8068478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "09259122c47474258acac1a5d20f22bd1d7b1a7c", "ctime": 1657148196.8038478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004404, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148196.8038478, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1273, "uid": 0, "version": "3060329263", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.487) 0:00:13.222 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.032) 0:00:13.255 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.047) 0:00:13.302 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.045) 0:00:13.348 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148196.7508478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a2fecc776b9acbcc143e21322bb08e25787bb544", "ctime": 1657148196.8038478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9531784, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148196.8038478, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "959493523", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.381) 0:00:13.730 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.030) 0:00:13.761 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 22:56:43 +0000 (0:00:00.044) 0:00:13.806 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.230901", "end": "2022-07-06 18:56:43.012192", "rc": 0, "start": "2022-07-06 18:56:42.781291" } 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": "F8:32:10:D0:5B:3A:3B:C7:B3:0E:73:B8:75:50:72:03:16:4F:79:67", "critical": false }, "authorityKeyIdentifier": { "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "03:96:BA:06:DF:5F:A4:0B:46:82:FC:5D:09:34:1B:0B:12:00:2F:A2:E1:A4:95:D5:EB:3B:93:73:67:3B:3D:25:6D:AD:01:E6:72:F3:36:BC:D3:17:9D:4B:61:6E:4A:19:49:5E:44:1A:1D:01:51:41:0B:04:CF:68:25:53:D2:B3:C9:66:83:27:67:88:3B:B5:EE:06:13:54:06:44:89:2F:14:E9:A9:18:D0:47:0F:32:BF:CD:10:D2:B6:9B:F6:36:B0:B7:38:7E:7B:64:E2:1A:A8:BD:6C:06:5A:FE:AE:60:AB:73:5D:E5:B9:70:9A:E0:21:DE:91:20:4C:69:C8:62:71:A3:22:EC:A8:EC:26:14:68:72:4B:3D:99:1C:F9:99:89:DD:8F:A3:5C:BB:22:99:23:9A:FC:E8:CC:91:CB:BE:14:1B:95:3E:3A:77:91:3C:47:0F:B6:9D:F5:47:CF:6C:04:93:10:E6:75:02:18:7B:72:8F:9D:8C:A5:C0:D3:E5:EE:E8:DE:5C:87:46:82:04:4B:9C:2A:A8:48:E0:01:EE:55:D0:60:66:6C:16:03:7C:ED:5D:89:2B:36:1C:0C:B9:31:B9:CE:52:1F:47:79:BC:00:22:A6:64:04:59:7B:FA:5C:9E:90:0E:BA:D0:C9:F3:0E:71:73:FF:1F:4B:44:F8" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:56:36" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.695) 0:00:14.501 ******** ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "FD:F7:0C:F2:B1:C6:45:2A:0C:57:81:A6:5B:4F:95:51:CE:58:82:6C" }, "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": "F8:32:10:D0:5B:3A:3B:C7:B3:0E:73:B8:75:50:72:03:16:4F:79:67" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "03:96:BA:06:DF:5F:A4:0B:46:82:FC:5D:09:34:1B:0B:12:00:2F:A2:E1:A4:95:D5:EB:3B:93:73:67:3B:3D:25:6D:AD:01:E6:72:F3:36:BC:D3:17:9D:4B:61:6E:4A:19:49:5E:44:1A:1D:01:51:41:0B:04:CF:68:25:53:D2:B3:C9:66:83:27:67:88:3B:B5:EE:06:13:54:06:44:89:2F:14:E9:A9:18:D0:47:0F:32:BF:CD:10:D2:B6:9B:F6:36:B0:B7:38:7E:7B:64:E2:1A:A8:BD:6C:06:5A:FE:AE:60:AB:73:5D:E5:B9:70:9A:E0:21:DE:91:20:4C:69:C8:62:71:A3:22:EC:A8:EC:26:14:68:72:4B:3D:99:1C:F9:99:89:DD:8F:A3:5C:BB:22:99:23:9A:FC:E8:CC:91:CB:BE:14:1B:95:3E:3A:77:91:3C:47:0F:B6:9D:F5:47:CF:6C:04:93:10:E6:75:02:18:7B:72:8F:9D:8C:A5:C0:D3:E5:EE:E8:DE:5C:87:46:82:04:4B:9C:2A:A8:48:E0:01:EE:55:D0:60:66:6C:16:03:7C:ED:5D:89:2B:36:1C:0C:B9:31:B9:CE:52:1F:47:79:BC:00:22:A6:64:04:59:7B:FA:5C:9E:90:0E:BA:D0:C9:F3:0E:71:73:FF:1F:4B:44:F8" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:48:35", "not_valid_before": "2022-07-06 22:56:36" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.044) 0:00:14.546 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.042) 0:00:14.588 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.029) 0:00:14.617 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.040) 0:00:14.657 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.039) 0:00:14.697 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 22:56:44 +0000 (0:00:00.040) 0:00:14.737 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_run_hooks.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.085531", "end": "2022-07-06 18:56:43.695349", "rc": 0, "start": "2022-07-06 18:56:43.609818" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:56:45 +0000 (0:00:00.444) 0:00:15.182 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 22:56:45 +0000 (0:00:00.045) 0:00:15.227 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148196.8068478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "09259122c47474258acac1a5d20f22bd1d7b1a7c", "ctime": 1657148196.8038478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 1004404, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657148196.8038478, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1273, "uid": 0, "version": "3060329263", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 22:56:45 +0000 (0:00:00.368) 0:00:15.595 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148196.8008478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657148196.8008478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9531785, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657148196.8008478, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "3756520461", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 22:56:45 +0000 (0:00:00.375) 0:00:15.971 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1657148196.8398478, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657148196.8398478, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 9531786, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657148196.8398478, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "3918033670", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 22:56:46 +0000 (0:00:00.383) 0:00:16.355 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 22:56:46 +0000 (0:00:00.034) 0:00:16.390 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 22:56:46 +0000 (0:00:00.033) 0:00:16.423 ******** changed: [/cache/rhel-8.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005708", "end": "2022-07-06 18:56:45.296218", "rc": 0, "start": "2022-07-06 18:56:45.290510" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 22:56:46 +0000 (0:00:00.360) 0:00:16.783 ******** ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=39 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 22:56:46 +0000 (0:00:00.052) 0:00:16.835 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.47s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 set up internal repositories -------------------------------------------- 1.31s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.30s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.28s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Install the package, force upgrade -------------------------------------- 1.17s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:11 - fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.05s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Gathering Facts --------------------------------------------------------- 1.02s /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:2 ---------------------- Install certreader ------------------------------------------------------ 0.90s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:17 --------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.78s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.70s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.51s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.49s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.49s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.40s /tmp/tmpt8vnebz7/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Get post-run file timestamp --------------------------------------------- 0.38s /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:47 --------------------- Retrieve key file stats ------------------------------------------------- 0.38s /tmp/tmp0buh2ky5/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get pre-run file timestamp ---------------------------------------------- 0.38s /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:43 --------------------- Get certificate timestamp ----------------------------------------------- 0.37s /tmp/tmp0buh2ky5/tests/certificate/tests_run_hooks.yml:39 ---------------------