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_run_hooks.yml ************************************************** 2 plays in /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 04:26:29 +0000 (0:00:00.013) 0:00:00.013 ******** 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:26:30 +0000 (0:00:01.118) 0:00:01.132 ******** 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:26:30 +0000 (0:00:00.028) 0:00:01.160 ******** 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:26:30 +0000 (0:00:00.529) 0:00:01.689 ******** 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:26:30 +0000 (0:00:00.041) 0:00:01.731 ******** 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:26:32 +0000 (0:00:01.582) 0:00:03.314 ******** 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:26:33 +0000 (0:00:01.329) 0:00:04.643 ******** 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:26:34 +0000 (0:00:00.531) 0:00:05.174 ******** 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:26:34 +0000 (0:00:00.388) 0:00:05.563 ******** 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": "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": "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:26:35 +0000 (0:00:00.776) 0:00:06.340 ******** changed: [/cache/rhel-8-y.qcow2.snap] => (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-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 04:26:36 +0000 (0:00:01.041) 0:00:07.381 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 04:26:37 +0000 (0:00:00.811) 0:00:08.193 ******** included: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-8-y.qcow2.snap => (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/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:26:37 +0000 (0:00:00.042) 0:00:08.235 ******** 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:26:37 +0000 (0:00:00.028) 0:00:08.263 ******** 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:26:38 +0000 (0:00:01.336) 0:00:09.600 ******** 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:26:39 +0000 (0:00:01.147) 0:00:10.747 ******** 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:26:40 +0000 (0:00:00.866) 0:00:11.614 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081596.141274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "8c783d9ecba616d947734bfd28dbffcc2d4320c3", "ctime": 1657081596.138274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17013575, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081596.138274, "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": "923403231", "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:26:41 +0000 (0:00:00.482) 0:00:12.096 ******** 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:26:41 +0000 (0:00:00.063) 0:00:12.160 ******** 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:26:41 +0000 (0:00:00.048) 0:00:12.209 ******** 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:26:41 +0000 (0:00:00.045) 0:00:12.254 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081596.075274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2af02ea5bbb0e66ccbdb9ccbe1f93085585a5959", "ctime": 1657081596.138274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26548768, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081596.138274, "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": "3446093807", "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:26:41 +0000 (0:00:00.369) 0:00:12.624 ******** 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:26:41 +0000 (0:00:00.060) 0:00:12.684 ******** 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:26:41 +0000 (0:00:00.072) 0:00:12.757 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.230828", "end": "2022-07-06 00:26:42.370327", "rc": 0, "start": "2022-07-06 00:26:42.139499" } 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": "84:6A:E3:78:23:AE:1E:A8:FB:2F:40:99:DF:46:2F:46:6F:3C:BE:DF", "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": "7B:00:40:25:DC:BA:3C:D1:00:DB:63:85:C7:32:1D:10:2E:A8:FB:56:8D:4C:EE:35:4D:E3:B4:6A:37:C7:0E:A5:10:19:16:C2:63:C7:87:C5:D4:55:4F:B0:5D:57:9C:AE:8D:B8:22:BC:FF:3C:DD:70:C9:34:E3:B2:14:75:13:99:85:05:94:A6:E8:C9:E1:8E:EF:15:40:4A:A1:4D:9B:CE:EF:CD:67:FD:9A:C1:30:36:D8:33:93:9B:C6:9B:73:3A:58:B0:81:82:E1:8F:E7:80:AF:05:99:86:7A:31:1A:6B:29:B1:8C:0E:AB:83:77:1D:7F:B3:41:3A:E4:71:28:60:85:0B:30:73:6D:84:A6:67:70:03:0C:7E:5B:EA:02:9C:33:8D:1F:CD:F9:89:D0:0A:D7:37:2F:BA:D5:FC:E9:D9:AD:D8:1F:01:9D:5D:C7:FF:2D:F4:E6:77:1E:D9:4F:F1:50:89:2A:18:73:EA:3B:8C:9E:99:3D:AB:80:82:B6:C8:CC:67:1D:06:BD:31:78:AF:6D:C3:1F:0A:3E:EE:0C:F4:76:F4:83:9A:B1:F9:B9:73:7A:8B:09:33:BF:C3:16:A2:F5:7A:05:6E:BD:3C:89:0C:9E:C7:84:E4:0F:67:3F:62:A9:DC:66:96:66:84:E6:37:7D:F9:34:4F:62:30:65:C6" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:19:07", "not_valid_before": "2022-07-06 04:26:36" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:26:42 +0000 (0:00:00.725) 0:00:13.482 ******** 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": "84:6A:E3:78:23:AE:1E:A8:FB:2F:40:99:DF:46:2F:46:6F:3C:BE:DF" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7B:00:40:25:DC:BA:3C:D1:00:DB:63:85:C7:32:1D:10:2E:A8:FB:56:8D:4C:EE:35:4D:E3:B4:6A:37:C7:0E:A5:10:19:16:C2:63:C7:87:C5:D4:55:4F:B0:5D:57:9C:AE:8D:B8:22:BC:FF:3C:DD:70:C9:34:E3:B2:14:75:13:99:85:05:94:A6:E8:C9:E1:8E:EF:15:40:4A:A1:4D:9B:CE:EF:CD:67:FD:9A:C1:30:36:D8:33:93:9B:C6:9B:73:3A:58:B0:81:82:E1:8F:E7:80:AF:05:99:86:7A:31:1A:6B:29:B1:8C:0E:AB:83:77:1D:7F:B3:41:3A:E4:71:28:60:85:0B:30:73:6D:84:A6:67:70:03:0C:7E:5B:EA:02:9C:33:8D:1F:CD:F9:89:D0:0A:D7:37:2F:BA:D5:FC:E9:D9:AD:D8:1F:01:9D:5D:C7:FF:2D:F4:E6:77:1E:D9:4F:F1:50:89:2A:18:73:EA:3B:8C:9E:99:3D:AB:80:82:B6:C8:CC:67:1D:06:BD:31:78:AF:6D:C3:1F:0A:3E:EE:0C:F4:76:F4:83:9A:B1:F9:B9:73:7A:8B:09:33:BF:C3:16:A2:F5:7A:05:6E:BD:3C:89:0C:9E:C7:84:E4:0F:67:3F:62:A9:DC:66:96:66:84:E6:37:7D:F9:34:4F:62:30:65:C6" }, "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:26:36" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 04:26:42 +0000 (0:00:00.073) 0:00:13.555 ******** 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:26:42 +0000 (0:00:00.079) 0:00:13.635 ******** 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:26:42 +0000 (0:00:00.060) 0:00:13.695 ******** 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:26:42 +0000 (0:00:00.044) 0:00:13.740 ******** 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:26:42 +0000 (0:00:00.073) 0:00:13.814 ******** 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:26:42 +0000 (0:00:00.070) 0:00:13.884 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "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.084480", "end": "2022-07-06 00:26:43.259766", "rc": 0, "start": "2022-07-06 00:26:43.175286" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 04:26:43 +0000 (0:00:00.483) 0:00:14.368 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 04:26:43 +0000 (0:00:00.076) 0:00:14.444 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081596.141274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "8c783d9ecba616d947734bfd28dbffcc2d4320c3", "ctime": 1657081596.138274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17013575, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657081596.138274, "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": "923403231", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 04:26:43 +0000 (0:00:00.402) 0:00:14.847 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081596.135274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657081596.135274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17013574, "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": 1657081596.135274, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "3068766176", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 04:26:44 +0000 (0:00:00.369) 0:00:15.217 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657081596.175274, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657081596.175274, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17014051, "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": 1657081596.175274, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1795237917", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 04:26:44 +0000 (0:00:00.360) 0:00:15.578 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 04:26:44 +0000 (0:00:00.033) 0:00:15.611 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 04:26:44 +0000 (0:00:00.034) 0:00:15.646 ******** changed: [/cache/rhel-8-y.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005059", "end": "2022-07-06 00:26:44.904896", "rc": 0, "start": "2022-07-06 00:26:44.899837" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 04:26:45 +0000 (0:00:00.367) 0:00:16.013 ******** 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=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:26:45 +0000 (0:00:00.052) 0:00:16.065 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.58s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.34s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.33s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.12s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:2 ---------------------------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.04s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install certreader ------------------------------------------------------ 0.87s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:17 --------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.78s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.73s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.53s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.53s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.48s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve certificate file stats ----------------------------------------- 0.48s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:26 ------------- Get certificate timestamp ----------------------------------------------- 0.40s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:39 --------------------------------- linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.39s /tmp/tmpjupnnp9c/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Get pre-run file timestamp ---------------------------------------------- 0.37s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:43 --------------------------------- Retrieve key file stats ------------------------------------------------- 0.37s /tmp/tmpjupnnp9c/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.37s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:66 --------------------------------- Get post-run file timestamp --------------------------------------------- 0.36s /tmp/tmpjupnnp9c/tests/tests_run_hooks.yml:47 --------------------------------- 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_run_hooks.yml ************************************************** 2 plays in /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 04:38:16 +0000 (0:00:00.014) 0:00:00.014 ******** 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:38:17 +0000 (0:00:01.113) 0:00:01.127 ******** 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:38:17 +0000 (0:00:00.027) 0:00:01.155 ******** 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:38:18 +0000 (0:00:00.523) 0:00:01.679 ******** 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:38:18 +0000 (0:00:00.041) 0:00:01.720 ******** 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:38:20 +0000 (0:00:01.557) 0:00:03.278 ******** 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:38:21 +0000 (0:00:01.418) 0:00:04.696 ******** 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:38:21 +0000 (0:00:00.521) 0:00:05.217 ******** 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:38:22 +0000 (0:00:00.397) 0:00:05.615 ******** 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": "4456448", "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:38:23 +0000 (0:00:00.802) 0:00:06.417 ******** changed: [/cache/rhel-8-y.qcow2.snap] => (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-y.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 04:38:24 +0000 (0:00:01.037) 0:00:07.454 ******** ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 04:38:25 +0000 (0:00:00.814) 0:00:08.269 ******** 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_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/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 04:38:25 +0000 (0:00:00.045) 0:00:08.315 ******** 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:38:25 +0000 (0:00:00.031) 0:00:08.346 ******** 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:38:26 +0000 (0:00:01.343) 0:00:09.689 ******** 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:38:27 +0000 (0:00:01.151) 0:00:10.841 ******** 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:38:28 +0000 (0:00:00.913) 0:00:11.754 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082303.2427495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4a3b803fb132d3fc24885347cb3919c4ef80104d", "ctime": 1657082303.2397494, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16980543, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082303.2397494, "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": "3352748532", "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:38:29 +0000 (0:00:00.508) 0:00:12.262 ******** 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:38:29 +0000 (0:00:00.033) 0:00:12.296 ******** 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:38:29 +0000 (0:00:00.080) 0:00:12.377 ******** 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:38:29 +0000 (0:00:00.071) 0:00:12.448 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082303.1867495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e3a356214dfd4535128653856f4e0eb967437160", "ctime": 1657082303.2397494, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 26493095, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082303.2397494, "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": "505483843", "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:38:29 +0000 (0:00:00.367) 0:00:12.815 ******** 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:38:29 +0000 (0:00:00.032) 0:00:12.847 ******** 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:38:29 +0000 (0:00:00.070) 0:00:12.918 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.226499", "end": "2022-07-06 00:38:29.618073", "rc": 0, "start": "2022-07-06 00:38:29.391574" } 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": "41:02:7C:BA:00:23:63:56:22:24:B9:BD:DB:22:BC:FC:75:CA:A2:98", "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": "AD:A8:5F:E2:AB:69:61:95:80:6A:C1:A0:01:F0:47:6F:C2:5C:4D:5E:27:BA:92:79:2E:6A:BE:B2:B7:3A:0B:4F:E9:B1:D1:EB:C8:84:65:8E:D9:B1:5A:C0:F7:DF:D3:21:23:B1:87:75:E8:A8:A3:91:5D:B1:BF:48:AE:99:56:E2:FE:70:B1:56:E4:73:DC:45:77:71:87:92:B0:5F:6B:60:98:71:92:8E:C2:21:3A:88:5B:63:6E:07:B0:A7:59:F1:5B:91:1D:74:98:9B:55:44:71:19:69:F3:DD:33:33:87:A3:9D:8C:EF:1E:58:BB:7E:5B:91:BD:58:89:D0:03:5D:4C:0C:BF:25:A4:A2:A9:A5:EB:F8:D2:0F:4E:43:1C:FA:A1:8C:92:38:D0:94:8A:EB:79:82:D8:6B:B9:D0:D6:23:5F:81:66:C2:04:A7:51:49:E8:F8:72:8C:CD:22:90:EC:C3:9A:3D:4B:06:61:F3:7E:DC:C6:0D:E1:6B:69:62:EE:E6:A3:50:2A:69:92:D2:CD:45:63:7E:77:2E:63:B1:F8:86:BB:71:DA:E3:E5:73:20:5C:24:A9:8F:B8:4A:6D:43:D0:48:34:A1:0D:7D:14:ED:E6:4B:67:A4:37:1A:9D:A0:A8:48:60:C8:91:55:EC:AB:5C:E7:56:FB:4F:48:7C:1F" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 04:30:53", "not_valid_before": "2022-07-06 04:38:23" } } 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:38:30 +0000 (0:00:00.718) 0:00:13.637 ******** 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": "41:02:7C:BA:00:23:63:56:22:24:B9:BD:DB:22:BC:FC:75:CA:A2:98" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AD:A8:5F:E2:AB:69:61:95:80:6A:C1:A0:01:F0:47:6F:C2:5C:4D:5E:27:BA:92:79:2E:6A:BE:B2:B7:3A:0B:4F:E9:B1:D1:EB:C8:84:65:8E:D9:B1:5A:C0:F7:DF:D3:21:23:B1:87:75:E8:A8:A3:91:5D:B1:BF:48:AE:99:56:E2:FE:70:B1:56:E4:73:DC:45:77:71:87:92:B0:5F:6B:60:98:71:92:8E:C2:21:3A:88:5B:63:6E:07:B0:A7:59:F1:5B:91:1D:74:98:9B:55:44:71:19:69:F3:DD:33:33:87:A3:9D:8C:EF:1E:58:BB:7E:5B:91:BD:58:89:D0:03:5D:4C:0C:BF:25:A4:A2:A9:A5:EB:F8:D2:0F:4E:43:1C:FA:A1:8C:92:38:D0:94:8A:EB:79:82:D8:6B:B9:D0:D6:23:5F:81:66:C2:04:A7:51:49:E8:F8:72:8C:CD:22:90:EC:C3:9A:3D:4B:06:61:F3:7E:DC:C6:0D:E1:6B:69:62:EE:E6:A3:50:2A:69:92:D2:CD:45:63:7E:77:2E:63:B1:F8:86:BB:71:DA:E3:E5:73:20:5C:24:A9:8F:B8:4A:6D:43:D0:48:34:A1:0D:7D:14:ED:E6:4B:67:A4:37:1A:9D:A0:A8:48:60:C8:91:55:EC:AB:5C:E7:56:FB:4F:48:7C:1F" }, "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:38:23" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 04:38:30 +0000 (0:00:00.084) 0:00:13.721 ******** 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:38:30 +0000 (0:00:00.047) 0:00:13.769 ******** 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:38:30 +0000 (0:00:00.058) 0:00:13.828 ******** 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:38:30 +0000 (0:00:00.070) 0:00:13.899 ******** 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:38:30 +0000 (0:00:00.071) 0:00:13.970 ******** 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:38:30 +0000 (0:00:00.049) 0:00:14.020 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "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.080040", "end": "2022-07-06 00:38:30.474418", "rc": 0, "start": "2022-07-06 00:38:30.394378" } 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:38:31 +0000 (0:00:00.465) 0:00:14.486 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 04:38:31 +0000 (0:00:00.046) 0:00:14.532 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082303.2427495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4a3b803fb132d3fc24885347cb3919c4ef80104d", "ctime": 1657082303.2397494, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16980543, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657082303.2397494, "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": "3352748532", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 04:38:31 +0000 (0:00:00.378) 0:00:14.910 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082303.2367494, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657082303.2367494, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16980542, "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": 1657082303.2367494, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "2876348337", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.424) 0:00:15.335 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1657082303.2777495, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657082303.2777495, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 17014050, "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": 1657082303.2777495, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1783245724", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.377) 0:00:15.712 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.033) 0:00:15.746 ******** ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.031) 0:00:15.777 ******** changed: [/cache/rhel-8-y.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006456", "end": "2022-07-06 00:38:32.133394", "rc": 0, "start": "2022-07-06 00:38:32.126938" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.370) 0:00:16.147 ******** 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=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 04:38:32 +0000 (0:00:00.051) 0:00:16.198 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.56s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.42s /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 -- Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.11s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.04s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install certreader ------------------------------------------------------ 0.91s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:17 --------------------- 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 Parse certificate ------------------------------------------------------- 0.72s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.52s /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.52s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.51s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.47s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:132 Get pre-run file timestamp ---------------------------------------------- 0.42s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:43 --------------------- fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.40s /tmp/tmpsp7qopjw/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Get certificate timestamp ----------------------------------------------- 0.38s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:39 --------------------- Get post-run file timestamp --------------------------------------------- 0.38s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:47 --------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.37s /tmp/tmpj_xtuxdz/tests/certificate/tests_run_hooks.yml:66 --------------------- Retrieve key file stats ------------------------------------------------- 0.37s /tmp/tmpj_xtuxdz/tests/certificate/tasks/assert_certificate_parameters.yml:53 -