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/tmpz63ztj_p 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/tmpy0ojfldm/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:27:36 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:27:37 +0000 (0:00:01.220) 0:00:01.233 ******** included: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:27:37 +0000 (0:00:00.045) 0:00:01.278 ******** ok: [/cache/centos-9.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 23:27:37 +0000 (0:00:00.606) 0:00:01.885 ******** skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:27:37 +0000 (0:00:00.041) 0:00:01.927 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:27:39 +0000 (0:00:01.131) 0:00:03.058 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:27:40 +0000 (0:00:00.988) 0:00:04.047 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:27:40 +0000 (0:00:00.629) 0:00:04.677 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:27:41 +0000 (0:00:00.489) 0:00:05.167 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ActiveEnterTimestampMonotonic": "244505840", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus-broker.service sysinit.target dbus.socket basic.target system.slice systemd-journald.socket syslog.target network.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 19:20:07 EDT", "AssertTimestampMonotonic": "244494390", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "43505304000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ConditionTimestampMonotonic": "244494388", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "21786", "ExecMainStartTimestamp": "Wed 2022-07-06 19:20:07 EDT", "ExecMainStartTimestampMonotonic": "244495669", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 19:20:07 EDT", "InactiveExitTimestampMonotonic": "244496109", "InvocationID": "0102ee389fed4dc9950067800be1ebca", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14618", "LimitNPROCSoft": "14618", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14618", "LimitSIGPENDINGSoft": "14618", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "21786", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "5574656", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice sysinit.target dbus.socket", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 19:23:46 EDT", "StateChangeTimestampMonotonic": "464086309", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23388", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 23:27:42 +0000 (0:00:00.877) 0:00:06.045 ******** changed: [/cache/centos-9.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/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:27:43 +0000 (0:00:01.227) 0:00:07.272 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:27:44 +0000 (0:00:00.883) 0:00:08.155 ******** included: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml for /cache/centos-9.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/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:27:44 +0000 (0:00:00.038) 0:00:08.193 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:27:44 +0000 (0:00:00.028) 0:00:08.222 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:27:45 +0000 (0:00:00.974) 0:00:09.196 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:27:46 +0000 (0:00:01.290) 0:00:10.486 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:27:47 +0000 (0:00:00.954) 0:00:11.440 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150063.4285407, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1bf14d9a0edf60148710e0b4ed9ff98eaa61c17a", "ctime": 1657150063.4255407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13814158, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150063.4255407, "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": "426956925", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.587) 0:00:12.028 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.060) 0:00:12.088 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.067) 0:00:12.156 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.043) 0:00:12.199 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150063.3415408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "26377812972ec0ffd9b85b58b451074148c9338f", "ctime": 1657150063.4255407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4591379, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150063.4255407, "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": "2842769175", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.455) 0:00:12.655 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.060) 0:00:12.716 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:27:48 +0000 (0:00:00.070) 0:00:12.786 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.198434", "end": "2022-07-06 19:27:49.809588", "rc": 0, "start": "2022-07-06 19:27:49.611154" } 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": "DD:16:0E:74:FA:75:AA:A4:06:62:F0:F0:6F:B3:74:59:50:DB:BC:91", "critical": false }, "authorityKeyIdentifier": { "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7A:C0:75:61:03:66:3A:D3:BA:69:28:A9:1D:CB:4E:4E:F6:24:7C:A6:A6:D4:37:C2:81:4D:50:1D:17:FF:90:88:1E:9C:7C:03:9F:F0:9A:2E:C5:AA:33:F9:BB:DE:4D:06:37:40:9D:B1:8B:00:5E:2B:4E:F9:6D:60:04:F7:71:35:B3:E1:B3:35:9C:D8:79:52:AC:B5:7F:B3:C3:18:53:81:6E:5A:82:40:48:88:31:15:4E:98:31:96:25:FE:2D:44:32:D1:3D:2B:7E:D2:C3:22:0F:8E:77:29:52:44:00:91:D1:5B:B3:58:84:F5:BD:DB:D5:FB:89:0A:2A:E3:3F:1E:3E:67:8F:DC:04:97:68:F8:C7:3D:9A:E0:EA:EF:80:96:60:2B:5B:BD:84:EB:7E:49:49:DB:D0:25:7A:46:B8:45:24:A0:10:4C:56:B4:AF:5F:A7:23:73:65:96:79:05:C8:B1:CC:9B:2E:E4:1C:07:87:C2:6F:C5:8E:42:8B:62:AA:BA:81:C8:A5:2E:20:BB:B7:EA:70:FA:04:B6:C2:67:57:0B:AE:D7:2C:47:ED:53:5F:EC:36:88:F2:58:CF:B9:A3:FF:A3:91:30:EF:D5:0D:5A:0B:50:53:2B:9F:C3:0D:C1:BA:54:B7:6D:C6:01:BF:AF:9B:D0:61:D3:7D:20:68:22" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:27:43" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.778) 0:00:13.564 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "F3:02:31:5F:10:70:24:FF:1C:29:71:A9:50:7B:88:DE:00:FA:F9:90" }, "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": "DD:16:0E:74:FA:75:AA:A4:06:62:F0:F0:6F:B3:74:59:50:DB:BC:91" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7A:C0:75:61:03:66:3A:D3:BA:69:28:A9:1D:CB:4E:4E:F6:24:7C:A6:A6:D4:37:C2:81:4D:50:1D:17:FF:90:88:1E:9C:7C:03:9F:F0:9A:2E:C5:AA:33:F9:BB:DE:4D:06:37:40:9D:B1:8B:00:5E:2B:4E:F9:6D:60:04:F7:71:35:B3:E1:B3:35:9C:D8:79:52:AC:B5:7F:B3:C3:18:53:81:6E:5A:82:40:48:88:31:15:4E:98:31:96:25:FE:2D:44:32:D1:3D:2B:7E:D2:C3:22:0F:8E:77:29:52:44:00:91:D1:5B:B3:58:84:F5:BD:DB:D5:FB:89:0A:2A:E3:3F:1E:3E:67:8F:DC:04:97:68:F8:C7:3D:9A:E0:EA:EF:80:96:60:2B:5B:BD:84:EB:7E:49:49:DB:D0:25:7A:46:B8:45:24:A0:10:4C:56:B4:AF:5F:A7:23:73:65:96:79:05:C8:B1:CC:9B:2E:E4:1C:07:87:C2:6F:C5:8E:42:8B:62:AA:BA:81:C8:A5:2E:20:BB:B7:EA:70:FA:04:B6:C2:67:57:0B:AE:D7:2C:47:ED:53:5F:EC:36:88:F2:58:CF:B9:A3:FF:A3:91:30:EF:D5:0D:5A:0B:50:53:2B:9F:C3:0D:C1:BA:54:B7:6D:C6:01:BF:AF:9B:D0:61:D3:7D:20:68:22" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:27:43" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.075) 0:00:13.640 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.071) 0:00:13.711 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.032) 0:00:13.743 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.080) 0:00:13.824 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.067) 0:00:13.891 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:27:49 +0000 (0:00:00.067) 0:00:13.959 ******** ok: [/cache/centos-9.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.059031", "end": "2022-07-06 19:27:50.742253", "rc": 0, "start": "2022-07-06 19:27:50.683222" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:27:50 +0000 (0:00:00.531) 0:00:14.491 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:27:50 +0000 (0:00:00.043) 0:00:14.535 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150063.4285407, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1bf14d9a0edf60148710e0b4ed9ff98eaa61c17a", "ctime": 1657150063.4255407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13814158, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150063.4255407, "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": "426956925", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:27:50 +0000 (0:00:00.446) 0:00:14.982 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150063.4205408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150063.4205408, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13814156, "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": 1657150063.4205408, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "398248454", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:27:51 +0000 (0:00:00.437) 0:00:15.419 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150063.4655406, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150063.4655406, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13814149, "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": 1657150063.4655406, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "2212595169", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:27:51 +0000 (0:00:00.440) 0:00:15.859 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:27:51 +0000 (0:00:00.032) 0:00:15.891 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:27:51 +0000 (0:00:00.029) 0:00:15.920 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005805", "end": "2022-07-06 19:27:52.604516", "rc": 0, "start": "2022-07-06 19:27:52.598711" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:27:52 +0000 (0:00:00.431) 0:00:16.352 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:27:52 +0000 (0:00:00.050) 0:00:16.403 ******** =============================================================================== Install the package, force upgrade -------------------------------------- 1.29s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 ------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.23s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Gathering Facts --------------------------------------------------------- 1.22s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:2 ---------------------------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.13s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 0.99s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 0.97s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install certreader ------------------------------------------------------ 0.95s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.88s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:17 --------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.88s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.78s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.63s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.61s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.59s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.53s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:141 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.49s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Retrieve key file stats ------------------------------------------------- 0.46s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get certificate timestamp ----------------------------------------------- 0.45s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:39 --------------------------------- Get post-run file timestamp --------------------------------------------- 0.44s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:47 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.44s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:43 --------------------------------- Get the ansible_managed comment in pre/post-scripts --------------------- 0.43s /tmp/tmpy0ojfldm/tests/tests_run_hooks.yml:66 --------------------------------- 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/tmpz63ztj_p 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/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 23:39:45 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:39:47 +0000 (0:00:01.187) 0:00:01.201 ******** included: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:39:47 +0000 (0:00:00.048) 0:00:01.249 ******** ok: [/cache/centos-9.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 23:39:47 +0000 (0:00:00.603) 0:00:01.852 ******** skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:39:47 +0000 (0:00:00.041) 0:00:01.894 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:39:48 +0000 (0:00:01.116) 0:00:03.010 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:39:49 +0000 (0:00:00.945) 0:00:03.956 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:39:50 +0000 (0:00:00.592) 0:00:04.549 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:39:50 +0000 (0:00:00.484) 0:00:05.034 ******** ok: [/cache/centos-9.qcow2.snap] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ActiveEnterTimestampMonotonic": "234351444", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "syslog.target basic.target systemd-journald.socket dbus.socket system.slice dbus-broker.service network.target sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 19:32:27 EDT", "AssertTimestampMonotonic": "234338283", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "42964266000", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ConditionTimestampMonotonic": "234338281", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "21573", "ExecMainStartTimestamp": "Wed 2022-07-06 19:32:27 EDT", "ExecMainStartTimestampMonotonic": "234339895", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 19:32:27 EDT", "InactiveExitTimestampMonotonic": "234340345", "InvocationID": "5f6ff4c841584ff59cf869087cb96d09", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "14618", "LimitNPROCSoft": "14618", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "14618", "LimitSIGPENDINGSoft": "14618", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "21573", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "5021696", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "system.slice dbus.socket sysinit.target", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestamp": "Wed 2022-07-06 19:36:01 EDT", "StateChangeTimestampMonotonic": "449090934", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "1", "TasksMax": "23388", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "UtmpMode": "init", "WantedBy": "multi-user.target", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 23:39:51 +0000 (0:00:00.838) 0:00:05.872 ******** changed: [/cache/centos-9.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/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:17 Wednesday 06 July 2022 23:39:53 +0000 (0:00:01.467) 0:00:07.339 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 23:39:54 +0000 (0:00:00.868) 0:00:08.208 ******** included: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-9.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/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:39:54 +0000 (0:00:00.037) 0:00:08.245 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:39:54 +0000 (0:00:00.027) 0:00:08.273 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:39:55 +0000 (0:00:00.979) 0:00:09.253 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:39:56 +0000 (0:00:01.271) 0:00:10.525 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "cryptography<35", "certreader>=0.1.1" ], "name": [ "cryptography<35", "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: cryptography<35 in ./certificate-tests-venv/lib/python3.9/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.9/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.9/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.9/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:39:57 +0000 (0:00:00.996) 0:00:11.521 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150793.0021214, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1781fbbfc56b900c6bdd6ae63b5cdf01b780d10d", "ctime": 1657150793.0001214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13815374, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150793.0001214, "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": "3833744366", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.614) 0:00:12.136 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.033) 0:00:12.169 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.047) 0:00:12.216 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.044) 0:00:12.260 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150792.9271214, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "55ddf30744f75b06c00a68b1014d02a0f5523d5c", "ctime": 1657150793.0001214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 4216777, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150793.0001214, "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": "4185783078", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.482) 0:00:12.743 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.033) 0:00:12.777 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:39:58 +0000 (0:00:00.047) 0:00:12.825 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.202756", "end": "2022-07-06 19:39:59.427016", "rc": 0, "start": "2022-07-06 19:39:59.224260" } 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": "75:11:65:49:84:5C:43:AD:8C:E2:6F:4C:2A:ED:F5:4D:E1:D0:E2:43", "critical": false }, "authorityKeyIdentifier": { "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "71:D1:AE:25:B3:36:D7:AB:35:FC:4C:70:13:36:DC:79:48:63:9D:76:2D:35:F3:4A:DF:46:7D:3C:F2:77:3D:42:15:02:3A:86:82:09:5D:EF:B9:C9:DE:BB:82:D8:47:A8:88:00:2B:5B:97:65:0A:07:E0:32:B5:BA:B0:83:20:7F:3A:AF:03:16:F0:FA:F5:80:79:67:16:C3:57:94:56:C2:E0:BB:D8:67:EE:40:10:A0:10:1A:D9:FD:27:1D:33:3B:3A:22:C9:6B:87:5B:4C:46:E0:A2:EC:3B:05:23:72:86:24:BD:8C:1C:32:EB:B3:D5:97:2F:0D:82:9C:90:10:22:6B:6C:3D:BB:D9:8E:3D:75:3C:A8:25:D5:34:66:D0:43:C5:C7:5C:DB:EC:64:6C:1B:4E:01:D7:C8:59:86:5B:59:6C:0C:BE:1E:B7:73:7D:68:57:C0:11:F3:73:D6:CD:14:F4:19:5B:01:48:23:3A:CC:24:E8:98:43:95:6B:C3:BF:00:4E:0C:86:70:7C:5F:19:82:CF:61:C9:AC:86:98:9F:03:60:54:DD:CC:C8:85:24:01:8B:E6:B1:B3:01:3D:DE:2F:39:E2:69:3F:E8:DC:37:B9:5B:99:76:59:B0:2C:0E:71:98:71:00:B6:FA:43:34:69:1B:46:99:44:BE:AB:82" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:39:52" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.789) 0:00:13.614 ******** ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5B:42:3D:94:F2:D8:9A:9F:1B:44:30:B2:FA:3C:A2:D5:6D:14:00:D0" }, "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": "75:11:65:49:84:5C:43:AD:8C:E2:6F:4C:2A:ED:F5:4D:E1:D0:E2:43" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "71:D1:AE:25:B3:36:D7:AB:35:FC:4C:70:13:36:DC:79:48:63:9D:76:2D:35:F3:4A:DF:46:7D:3C:F2:77:3D:42:15:02:3A:86:82:09:5D:EF:B9:C9:DE:BB:82:D8:47:A8:88:00:2B:5B:97:65:0A:07:E0:32:B5:BA:B0:83:20:7F:3A:AF:03:16:F0:FA:F5:80:79:67:16:C3:57:94:56:C2:E0:BB:D8:67:EE:40:10:A0:10:1A:D9:FD:27:1D:33:3B:3A:22:C9:6B:87:5B:4C:46:E0:A2:EC:3B:05:23:72:86:24:BD:8C:1C:32:EB:B3:D5:97:2F:0D:82:9C:90:10:22:6B:6C:3D:BB:D9:8E:3D:75:3C:A8:25:D5:34:66:D0:43:C5:C7:5C:DB:EC:64:6C:1B:4E:01:D7:C8:59:86:5B:59:6C:0C:BE:1E:B7:73:7D:68:57:C0:11:F3:73:D6:CD:14:F4:19:5B:01:48:23:3A:CC:24:E8:98:43:95:6B:C3:BF:00:4E:0C:86:70:7C:5F:19:82:CF:61:C9:AC:86:98:9F:03:60:54:DD:CC:C8:85:24:01:8B:E6:B1:B3:01:3D:DE:2F:39:E2:69:3F:E8:DC:37:B9:5B:99:76:59:B0:2C:0E:71:98:71:00:B6:FA:43:34:69:1B:46:99:44:BE:AB:82" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:39:52" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.071) 0:00:13.685 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.045) 0:00:13.731 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.033) 0:00:13.764 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.073) 0:00:13.838 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.081) 0:00:13.919 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:39:59 +0000 (0:00:00.070) 0:00:13.990 ******** ok: [/cache/centos-9.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.058428", "end": "2022-07-06 19:40:00.308280", "rc": 0, "start": "2022-07-06 19:40:00.249852" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:40:00 +0000 (0:00:00.497) 0:00:14.487 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 23:40:00 +0000 (0:00:00.043) 0:00:14.530 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150793.0021214, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1781fbbfc56b900c6bdd6ae63b5cdf01b780d10d", "ctime": 1657150793.0001214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13815374, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150793.0001214, "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": "3833744366", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 23:40:00 +0000 (0:00:00.442) 0:00:14.973 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150792.9951215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150792.9951215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13815372, "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": 1657150792.9951215, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1750985590", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 23:40:01 +0000 (0:00:00.439) 0:00:15.412 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150793.0371215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657150793.0371215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 13815365, "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": 1657150793.0371215, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "886430935", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 23:40:01 +0000 (0:00:00.433) 0:00:15.846 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 23:40:01 +0000 (0:00:00.034) 0:00:15.881 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 23:40:01 +0000 (0:00:00.034) 0:00:15.915 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.005915", "end": "2022-07-06 19:40:02.180088", "rc": 0, "start": "2022-07-06 19:40:02.174173" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 23:40:02 +0000 (0:00:00.444) 0:00:16.360 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=38 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:40:02 +0000 (0:00:00.050) 0:00:16.410 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.47s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.27s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.19s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.12s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install certreader ------------------------------------------------------ 1.00s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Ensure python3 is installed --------------------------------------------- 0.98s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.95s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Gathering Facts --------------------------------------------------------- 0.87s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:17 --------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.84s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.79s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Retrieve certificate file stats ----------------------------------------- 0.61s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.60s /tmp/tmpz63ztj_p/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.59s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve auto-renew flag ------------------------------------------------ 0.50s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.48s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Retrieve key file stats ------------------------------------------------- 0.48s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get the ansible_managed comment in pre/post-scripts --------------------- 0.44s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:66 --------------------- Get certificate timestamp ----------------------------------------------- 0.44s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:39 --------------------- Get pre-run file timestamp ---------------------------------------------- 0.44s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:43 --------------------- Get post-run file timestamp --------------------------------------------- 0.43s /tmp/tmp8_d1edvf/tests/certificate/tests_run_hooks.yml:47 ---------------------