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_fs_attrs.yml *************************************************** 3 plays in /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:2 Wednesday 06 July 2022 23:24:53 +0000 (0:00:00.012) 0:00:00.012 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:5 Wednesday 06 July 2022 23:24:55 +0000 (0:00:01.283) 0:00:01.296 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 1040, "home": "/home/user1", "name": "user1", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1040 } TASK [Ensure group "somegroup" exists] ***************************************** task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:9 Wednesday 06 July 2022 23:24:55 +0000 (0:00:00.852) 0:00:02.148 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "gid": 1041, "name": "somegroup", "state": "present", "system": false } META: ran handlers META: ran handlers PLAY [Issue certificate setting user/group] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:13 Wednesday 06 July 2022 23:24:56 +0000 (0:00:00.770) 0:00:02.918 ******** 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:24:57 +0000 (0:00:00.874) 0:00:03.793 ******** 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:24:57 +0000 (0:00:00.025) 0:00:03.818 ******** 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:24:58 +0000 (0:00:00.614) 0:00:04.432 ******** 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:24:58 +0000 (0:00:00.040) 0:00:04.473 ******** 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:24:59 +0000 (0:00:01.151) 0:00:05.625 ******** 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:25:00 +0000 (0:00:00.965) 0:00:06.590 ******** 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:25:00 +0000 (0:00:00.605) 0:00:07.196 ******** 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:25:01 +0000 (0:00:00.500) 0:00:07.697 ******** 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": "36750775000", "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": "4861952", "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:25:02 +0000 (0:00:00.888) 0:00:08.585 ******** changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'mycert_fs_attrs', 'dns': 'www.example.com', 'owner': 'ftp', 'group': 'ftp', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": "ftp", "name": "mycert_fs_attrs", "owner": "ftp" } } MSG: Certificate requested (new). File attributes updated. changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'certid', 'dns': 'www.example.com', 'owner': 1040, 'group': 1041, 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": 1041, "name": "certid", "owner": 1040 } } MSG: Certificate requested (new). File attributes updated. META: role_complete for /cache/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:31 Wednesday 06 July 2022 23:25:04 +0000 (0:00:02.189) 0:00:10.775 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:60 Wednesday 06 July 2022 23:25:05 +0000 (0:00:00.936) 0:00:11.711 ******** included: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_fs_attrs.crt', 'key_path': '/etc/pki/tls/private/mycert_fs_attrs.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 'ftp', 'group': 'ftp', 'mode': '0640'}) included: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/certid.crt', 'key_path': '/etc/pki/tls/private/certid.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 1040, 'group': 1041, 'mode': '0640'}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:25:05 +0000 (0:00:00.045) 0:00:11.757 ******** 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:25:05 +0000 (0:00:00.072) 0:00:11.830 ******** 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:25:06 +0000 (0:00:00.982) 0:00:12.812 ******** 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:25:07 +0000 (0:00:01.254) 0:00:14.066 ******** 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:25:08 +0000 (0:00:00.992) 0:00:15.058 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149903.7005408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "94c53196e8de0d61996d1dcf9e723e69de5606db", "ctime": 1657149903.7445407, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 13813544, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149903.6975408, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_fs_attrs.crt", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 14, "version": "641350038", "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:25:09 +0000 (0:00:00.600) 0:00:15.659 ******** 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:25:09 +0000 (0:00:00.032) 0:00:15.692 ******** 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:25:09 +0000 (0:00:00.046) 0:00:15.739 ******** 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:25:09 +0000 (0:00:00.043) 0:00:15.783 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149903.6315408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "eaf13ac3dcaf20f78ac07141023da7929a13078a", "ctime": 1657149903.7455406, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 4308357, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149903.6975408, "nlink": 1, "path": "/etc/pki/tls/private/mycert_fs_attrs.key", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 14, "version": "1481163406", "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:25:10 +0000 (0:00:00.460) 0:00:16.244 ******** 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:25:10 +0000 (0:00:00.033) 0:00:16.277 ******** 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:25:10 +0000 (0:00:00.047) 0:00:16.325 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.195393", "end": "2022-07-06 19:25:11.120251", "rc": 0, "start": "2022-07-06 19:25:10.924858" } 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": "1C:81:45:0C:0F:9C:8D:4C:77:93:6D:5D:26:AB:D6:1A:85:7C:0F:2E", "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": "4C:14:E1:80:2E:83:37:0C:6E:D6:59:5F:5E:4C:E3:BA:CB:31:48:38:27:BD:07:CB:B7:BB:5B:28:19:DA:9D:79:D7:0C:A3:AC:C1:9B:91:49:B1:85:35:43:00:A1:08:14:56:13:49:41:83:5A:FD:3E:5C:2E:AC:BD:69:9B:92:24:D2:93:B2:2F:78:CF:5B:D9:11:97:84:B8:03:BD:99:27:81:69:6C:D3:6B:1A:F8:88:B0:5A:57:AF:F5:4C:19:35:3A:B5:1D:46:B5:42:6C:CE:32:5F:7A:8F:7D:4A:FE:2F:EC:76:A0:E4:24:66:F4:BA:0A:0D:DF:13:6C:0D:E7:AB:2A:0B:B5:08:CC:09:8F:11:80:CD:5F:6F:81:51:2F:09:61:CD:CF:88:9F:E4:C7:AE:15:8E:63:1A:57:B0:AF:EA:7C:7B:B9:3E:B5:F6:66:7D:3B:35:05:45:98:13:38:31:CD:32:BA:4D:0B:AF:C6:75:D0:DA:47:E2:F6:BD:22:1E:1B:F2:ED:AC:29:10:BC:0B:8B:29:31:CF:1B:E7:52:DE:55:01:15:CC:4B:69:09:81:B3:A2:B5:F1:3F:4F:A3:E3:BA:79:35:6D:B3:8D:12:3B:C9:61:92:73:B5:42:6D:80:93:58:12:2E:1E:81:85:37:47:51:67:46:8B:5F:65:50" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:25:03" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:25:10 +0000 (0:00:00.780) 0:00:17.105 ******** 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": "1C:81:45:0C:0F:9C:8D:4C:77:93:6D:5D:26:AB:D6:1A:85:7C:0F:2E" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "4C:14:E1:80:2E:83:37:0C:6E:D6:59:5F:5E:4C:E3:BA:CB:31:48:38:27:BD:07:CB:B7:BB:5B:28:19:DA:9D:79:D7:0C:A3:AC:C1:9B:91:49:B1:85:35:43:00:A1:08:14:56:13:49:41:83:5A:FD:3E:5C:2E:AC:BD:69:9B:92:24:D2:93:B2:2F:78:CF:5B:D9:11:97:84:B8:03:BD:99:27:81:69:6C:D3:6B:1A:F8:88:B0:5A:57:AF:F5:4C:19:35:3A:B5:1D:46:B5:42:6C:CE:32:5F:7A:8F:7D:4A:FE:2F:EC:76:A0:E4:24:66:F4:BA:0A:0D:DF:13:6C:0D:E7:AB:2A:0B:B5:08:CC:09:8F:11:80:CD:5F:6F:81:51:2F:09:61:CD:CF:88:9F:E4:C7:AE:15:8E:63:1A:57:B0:AF:EA:7C:7B:B9:3E:B5:F6:66:7D:3B:35:05:45:98:13:38:31:CD:32:BA:4D:0B:AF:C6:75:D0:DA:47:E2:F6:BD:22:1E:1B:F2:ED:AC:29:10:BC:0B:8B:29:31:CF:1B:E7:52:DE:55:01:15:CC:4B:69:09:81:B3:A2:B5:F1:3F:4F:A3:E3:BA:79:35:6D:B3:8D:12:3B:C9:61:92:73:B5:42:6D:80:93:58:12:2E:1E:81:85:37:47:51:67:46:8B:5F:65:50" }, "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:25:03" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:25:10 +0000 (0:00:00.043) 0:00:17.149 ******** 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:25:10 +0000 (0:00:00.044) 0:00:17.194 ******** 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:25:10 +0000 (0:00:00.029) 0:00:17.223 ******** 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:25:11 +0000 (0:00:00.041) 0:00:17.265 ******** 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:25:11 +0000 (0:00:00.044) 0:00:17.310 ******** 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:25:11 +0000 (0:00:00.045) 0:00:17.355 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_fs_attrs.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.051345", "end": "2022-07-06 19:25:11.879618", "rc": 0, "start": "2022-07-06 19:25:11.828273" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:25:11 +0000 (0:00:00.505) 0:00:17.861 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:25:11 +0000 (0:00:00.045) 0:00:17.906 ******** 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:25:11 +0000 (0:00:00.028) 0:00:17.934 ******** 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:25:12 +0000 (0:00:00.950) 0:00:18.885 ******** 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:25:13 +0000 (0:00:01.158) 0:00:20.043 ******** 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:25:14 +0000 (0:00:00.940) 0:00:20.983 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149904.6785407, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "98f82995e65140989831fbbc773df3d2c7e8544b", "ctime": 1657149904.7355406, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 13813545, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149904.6755407, "nlink": 1, "path": "/etc/pki/tls/certs/certid.crt", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 1040, "version": "4156590022", "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:25:15 +0000 (0:00:00.466) 0:00:21.450 ******** 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:25:15 +0000 (0:00:00.033) 0:00:21.483 ******** 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:25:15 +0000 (0:00:00.047) 0:00:21.531 ******** 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:25:15 +0000 (0:00:00.045) 0:00:21.577 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149904.6145408, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "77012ab8aa53bb254ba9b22bc10739bb2cdb6958", "ctime": 1657149904.7365408, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 4308367, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149904.6755407, "nlink": 1, "path": "/etc/pki/tls/private/certid.key", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 1040, "version": "2804633497", "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:25:15 +0000 (0:00:00.474) 0:00:22.052 ******** 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:25:15 +0000 (0:00:00.033) 0:00:22.085 ******** 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:25:15 +0000 (0:00:00.047) 0:00:22.133 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.199232", "end": "2022-07-06 19:25:16.805648", "rc": 0, "start": "2022-07-06 19:25:16.606416" } 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": "59:B8:E6:CA:23:3C:E6:7C:95:23:3B:01:A7:14:92:B0:1C:F2:F6:69", "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": "65:5D:5C:A1:A6:5D:9B:ED:CA:F5:A6:5E:46:21:0D:7A:E1:AA:1F:D5:53:76:45:E0:C7:27:34:83:58:F1:47:4A:80:2C:DA:14:27:FA:4F:0F:4B:E2:8F:95:47:2A:66:D5:6C:11:02:17:0E:AE:18:16:D7:FC:AA:89:16:4F:AD:B6:FE:95:D6:63:7B:E1:71:34:36:56:94:C9:02:E7:B4:D9:A3:A1:F5:71:5A:AA:38:45:57:F0:A2:BB:12:4F:52:C1:80:7A:75:D3:1B:9D:0A:45:E4:16:2B:81:8D:5F:9F:17:CC:7B:14:04:6E:2B:C6:11:55:37:C1:81:A8:FC:F3:CF:9D:85:2C:60:9B:76:70:6A:B2:84:3F:A0:82:16:7E:5E:7C:85:1D:CA:7A:89:58:DC:3D:AC:E0:93:B8:33:1F:89:36:CC:62:23:B4:A6:3E:F1:33:CC:99:49:C1:82:CD:2D:D1:07:99:86:ED:04:FA:A5:A2:8F:25:F9:BA:D5:0F:84:7B:8E:33:C4:FC:BB:C4:3B:08:90:C8:8F:7C:C8:62:57:7A:B9:13:AC:67:3D:B2:48:06:3F:54:39:FD:B5:7C:F6:64:72:34:0A:8F:DD:56:22:BD:7D:DC:49:4C:C9:C3:EF:D6:12:29:17:1C:F8:90:B2:2D:7F:7E:B4:B9:19:DE:84" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:20:09", "not_valid_before": "2022-07-06 23:25:04" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:25:16 +0000 (0:00:00.656) 0:00:22.790 ******** 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": "59:B8:E6:CA:23:3C:E6:7C:95:23:3B:01:A7:14:92:B0:1C:F2:F6:69" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "65:5D:5C:A1:A6:5D:9B:ED:CA:F5:A6:5E:46:21:0D:7A:E1:AA:1F:D5:53:76:45:E0:C7:27:34:83:58:F1:47:4A:80:2C:DA:14:27:FA:4F:0F:4B:E2:8F:95:47:2A:66:D5:6C:11:02:17:0E:AE:18:16:D7:FC:AA:89:16:4F:AD:B6:FE:95:D6:63:7B:E1:71:34:36:56:94:C9:02:E7:B4:D9:A3:A1:F5:71:5A:AA:38:45:57:F0:A2:BB:12:4F:52:C1:80:7A:75:D3:1B:9D:0A:45:E4:16:2B:81:8D:5F:9F:17:CC:7B:14:04:6E:2B:C6:11:55:37:C1:81:A8:FC:F3:CF:9D:85:2C:60:9B:76:70:6A:B2:84:3F:A0:82:16:7E:5E:7C:85:1D:CA:7A:89:58:DC:3D:AC:E0:93:B8:33:1F:89:36:CC:62:23:B4:A6:3E:F1:33:CC:99:49:C1:82:CD:2D:D1:07:99:86:ED:04:FA:A5:A2:8F:25:F9:BA:D5:0F:84:7B:8E:33:C4:FC:BB:C4:3B:08:90:C8:8F:7C:C8:62:57:7A:B9:13:AC:67:3D:B2:48:06:3F:54:39:FD:B5:7C:F6:64:72:34:0A:8F:DD:56:22:BD:7D:DC:49:4C:C9:C3:EF:D6:12:29:17:1C:F8:90:B2:2D:7F:7E:B4:B9:19:DE:84" }, "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:25:04" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:25:16 +0000 (0:00:00.044) 0:00:22.834 ******** 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:25:16 +0000 (0:00:00.042) 0:00:22.876 ******** 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:25:16 +0000 (0:00:00.032) 0:00:22.909 ******** 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:25:16 +0000 (0:00:00.069) 0:00:22.979 ******** 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:25:16 +0000 (0:00:00.045) 0:00:23.024 ******** 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:25:16 +0000 (0:00:00.044) 0:00:23.069 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/certid.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.051499", "end": "2022-07-06 19:25:17.601595", "rc": 0, "start": "2022-07-06 19:25:17.550096" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:25:17 +0000 (0:00:00.513) 0:00:23.582 ******** 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=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:25:17 +0000 (0:00:00.054) 0:00:23.636 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.19s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Gathering Facts --------------------------------------------------------- 1.28s /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:2 ----------------------------------- Install the package, force upgrade -------------------------------------- 1.25s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 1.16s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:11 ------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.15s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Install certreader ------------------------------------------------------ 0.99s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 ------------- Ensure python3 is installed --------------------------------------------- 0.98s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 0.97s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 0.95s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install certreader ------------------------------------------------------ 0.94s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.94s /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:31 ---------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.89s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Gathering Facts --------------------------------------------------------- 0.87s /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:13 ---------------------------------- Ensure user exists ------------------------------------------------------ 0.85s /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:5 ----------------------------------- Parse certificate ------------------------------------------------------- 0.78s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 ------------- Ensure group "somegroup" exists ----------------------------------------- 0.77s /tmp/tmpy0ojfldm/tests/tests_fs_attrs.yml:9 ----------------------------------- Parse certificate ------------------------------------------------------- 0.66s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:78 ------------- 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 linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.61s /tmp/tmpy0ojfldm/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.60s /tmp/tmpy0ojfldm/tests/tasks/assert_certificate_parameters.yml:26 ------------- ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/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_fs_attrs.yml *************************************************** 3 plays in /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:2 Wednesday 06 July 2022 23:37:08 +0000 (0:00:00.012) 0:00:00.012 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:5 Wednesday 06 July 2022 23:37:09 +0000 (0:00:01.200) 0:00:01.212 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 1040, "home": "/home/user1", "name": "user1", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1040 } TASK [Ensure group "somegroup" exists] ***************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:9 Wednesday 06 July 2022 23:37:10 +0000 (0:00:00.860) 0:00:02.072 ******** changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "gid": 1041, "name": "somegroup", "state": "present", "system": false } META: ran handlers META: ran handlers PLAY [Issue certificate setting user/group] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:13 Wednesday 06 July 2022 23:37:11 +0000 (0:00:00.751) 0:00:02.824 ******** 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:37:12 +0000 (0:00:00.875) 0:00:03.699 ******** 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:37:12 +0000 (0:00:00.026) 0:00:03.725 ******** 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:37:13 +0000 (0:00:00.580) 0:00:04.306 ******** 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:37:13 +0000 (0:00:00.037) 0:00:04.343 ******** 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:37:14 +0000 (0:00:01.117) 0:00:05.461 ******** 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:37:15 +0000 (0:00:00.982) 0:00:06.444 ******** 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:37:15 +0000 (0:00:00.597) 0:00:07.042 ******** 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:37:16 +0000 (0:00:00.490) 0:00:07.532 ******** 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": "37349187000", "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": "4603904", "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:37:17 +0000 (0:00:00.871) 0:00:08.404 ******** changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'mycert_fs_attrs', 'dns': 'www.example.com', 'owner': 'ftp', 'group': 'ftp', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": "ftp", "name": "mycert_fs_attrs", "owner": "ftp" } } MSG: Certificate requested (new). File attributes updated. changed: [/cache/centos-9.qcow2.snap] => (item={'name': 'certid', 'dns': 'www.example.com', 'owner': 1040, 'group': 1041, 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "group": 1041, "name": "certid", "owner": 1040 } } MSG: Certificate requested (new). File attributes updated. META: role_complete for /cache/centos-9.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:31 Wednesday 06 July 2022 23:37:19 +0000 (0:00:02.041) 0:00:10.445 ******** ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:60 Wednesday 06 July 2022 23:37:20 +0000 (0:00:00.862) 0:00:11.307 ******** included: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_fs_attrs.crt', 'key_path': '/etc/pki/tls/private/mycert_fs_attrs.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 'ftp', 'group': 'ftp', 'mode': '0640'}) included: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/centos-9.qcow2.snap => (item={'path': '/etc/pki/tls/certs/certid.crt', 'key_path': '/etc/pki/tls/private/certid.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'owner': 1040, 'group': 1041, 'mode': '0640'}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:37:20 +0000 (0:00:00.046) 0:00:11.354 ******** 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:37:20 +0000 (0:00:00.065) 0:00:11.419 ******** 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:37:21 +0000 (0:00:01.002) 0:00:12.422 ******** 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:37:22 +0000 (0:00:01.230) 0:00:13.652 ******** 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:37:23 +0000 (0:00:00.981) 0:00:14.633 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150638.0411215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "58b909927bcebfea1888a0a4c8b48d4ac2c42bad", "ctime": 1657150638.0971215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 13813928, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150638.0391214, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_fs_attrs.crt", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 14, "version": "969068910", "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:37:23 +0000 (0:00:00.578) 0:00:15.212 ******** 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:37:24 +0000 (0:00:00.031) 0:00:15.243 ******** 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:37:24 +0000 (0:00:00.044) 0:00:15.287 ******** 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:37:24 +0000 (0:00:00.042) 0:00:15.330 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150637.9781215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "97241ff9391aa44fd2d1ecbe9960bc5a0e1a7c3a", "ctime": 1657150638.0971215, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 4354150, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150638.0391214, "nlink": 1, "path": "/etc/pki/tls/private/mycert_fs_attrs.key", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 14, "version": "4006288770", "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:37:24 +0000 (0:00:00.452) 0:00:15.782 ******** 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:37:24 +0000 (0:00:00.030) 0:00:15.813 ******** 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:37:24 +0000 (0:00:00.044) 0:00:15.858 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.194743", "end": "2022-07-06 19:37:25.294667", "rc": 0, "start": "2022-07-06 19:37:25.099924" } 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": "27:E5:EF:DE:2F:D2:F5:43:B3:27:A0:E9:61:7B:5C:E8:2D:2A:7D:39", "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": "47:ED:1E:FD:59:69:7F:7A:9A:A0:AD:5A:C9:A2:3A:74:DE:C5:E7:7E:66:E4:86:71:11:65:42:8C:B1:91:3E:ED:D5:1F:0E:D4:7C:97:12:F9:93:CE:A1:EC:6C:11:BA:42:3E:66:F5:96:C9:9E:89:87:CD:E2:DE:ED:5C:15:8A:F8:51:7F:38:42:D3:BB:BB:18:AA:CF:24:89:1E:54:F0:FB:FD:DE:E0:A8:77:9E:21:7E:ED:1F:26:33:2D:15:1C:C5:11:4C:03:F5:8F:C8:5D:11:DF:5E:44:9E:3A:3A:A7:26:C1:5D:95:C6:61:F3:F0:4B:76:91:A0:02:7C:26:EE:3E:DE:6E:89:9F:EA:0F:52:59:CC:BC:34:3F:01:C7:A5:A1:7B:2D:A2:F4:41:54:AF:66:04:17:C6:79:90:F8:1F:12:31:F8:B2:06:3B:5C:8B:DE:B9:48:24:8A:96:E2:80:73:C9:FF:92:39:B7:90:9F:64:C6:7B:32:8E:AF:59:3B:5A:8E:51:EB:70:CB:6F:DD:98:B2:FA:1E:E6:38:7D:27:B1:37:AB:1C:67:77:81:0C:47:7E:22:44:F8:FA:78:4C:DB:30:0A:9A:AF:2A:9C:00:B7:1D:8E:9F:75:C8:73:FC:6D:C2:BF:0A:48:AB:3F:78:D7:F1:34:29:14:59:F7:88:B1" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:37:18" } } 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:37:25 +0000 (0:00:00.752) 0:00:16.610 ******** 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": "27:E5:EF:DE:2F:D2:F5:43:B3:27:A0:E9:61:7B:5C:E8:2D:2A:7D:39" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "47:ED:1E:FD:59:69:7F:7A:9A:A0:AD:5A:C9:A2:3A:74:DE:C5:E7:7E:66:E4:86:71:11:65:42:8C:B1:91:3E:ED:D5:1F:0E:D4:7C:97:12:F9:93:CE:A1:EC:6C:11:BA:42:3E:66:F5:96:C9:9E:89:87:CD:E2:DE:ED:5C:15:8A:F8:51:7F:38:42:D3:BB:BB:18:AA:CF:24:89:1E:54:F0:FB:FD:DE:E0:A8:77:9E:21:7E:ED:1F:26:33:2D:15:1C:C5:11:4C:03:F5:8F:C8:5D:11:DF:5E:44:9E:3A:3A:A7:26:C1:5D:95:C6:61:F3:F0:4B:76:91:A0:02:7C:26:EE:3E:DE:6E:89:9F:EA:0F:52:59:CC:BC:34:3F:01:C7:A5:A1:7B:2D:A2:F4:41:54:AF:66:04:17:C6:79:90:F8:1F:12:31:F8:B2:06:3B:5C:8B:DE:B9:48:24:8A:96:E2:80:73:C9:FF:92:39:B7:90:9F:64:C6:7B:32:8E:AF:59:3B:5A:8E:51:EB:70:CB:6F:DD:98:B2:FA:1E:E6:38:7D:27:B1:37:AB:1C:67:77:81:0C:47:7E:22:44:F8:FA:78:4C:DB:30:0A:9A:AF:2A:9C:00:B7:1D:8E:9F:75:C8:73:FC:6D:C2:BF:0A:48:AB:3F:78:D7:F1:34:29:14:59:F7:88:B1" }, "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:37:18" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:37:25 +0000 (0:00:00.041) 0:00:16.652 ******** 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:37:25 +0000 (0:00:00.043) 0:00:16.695 ******** 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:37:25 +0000 (0:00:00.030) 0:00:16.726 ******** 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:37:25 +0000 (0:00:00.041) 0:00:16.767 ******** 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:37:25 +0000 (0:00:00.041) 0:00:16.808 ******** 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:37:25 +0000 (0:00:00.042) 0:00:16.851 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_fs_attrs.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.051452", "end": "2022-07-06 19:37:26.040595", "rc": 0, "start": "2022-07-06 19:37:25.989143" } 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:37:26 +0000 (0:00:00.503) 0:00:17.355 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:37:26 +0000 (0:00:00.043) 0:00:17.399 ******** 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:37:26 +0000 (0:00:00.026) 0:00:17.425 ******** 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:37:27 +0000 (0:00:00.936) 0:00:18.362 ******** 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:37:28 +0000 (0:00:01.095) 0:00:19.458 ******** 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:37:29 +0000 (0:00:00.947) 0:00:20.405 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150639.0241215, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4733bdc5072bf17845bca8be9c7e9ab757eb84a1", "ctime": 1657150639.0911214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 13813929, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150639.0211215, "nlink": 1, "path": "/etc/pki/tls/certs/certid.crt", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1294, "uid": 1040, "version": "3144241798", "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:37:29 +0000 (0:00:00.453) 0:00:20.859 ******** 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:37:29 +0000 (0:00:00.031) 0:00:20.890 ******** 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:37:29 +0000 (0:00:00.044) 0:00:20.935 ******** 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:37:29 +0000 (0:00:00.041) 0:00:20.977 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150638.9601214, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "410795df98b213e6bdc4642c1641445c21785a62", "ctime": 1657150639.0911214, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 4308942, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150639.0211215, "nlink": 1, "path": "/etc/pki/tls/private/certid.key", "pw_name": "user1", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1704, "uid": 1040, "version": "3765293818", "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:37:30 +0000 (0:00:00.459) 0:00:21.436 ******** 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:37:30 +0000 (0:00:00.033) 0:00:21.469 ******** 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:37:30 +0000 (0:00:00.047) 0:00:21.516 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.194111", "end": "2022-07-06 19:37:30.848835", "rc": 0, "start": "2022-07-06 19:37:30.654724" } 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": "91:34:B0:DA:F1:0D:8A:0B:53:9B:4E:21:20:8F:B7:85:EB:BF:8C:3C", "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": "A4:DE:AB:9E:8C:C6:C8:2D:77:50:05:8E:B5:3B:12:E8:A2:5D:2F:9A:7D:D3:C0:46:AC:7D:71:B4:49:59:B9:8D:E0:58:FF:0B:AF:E8:51:BD:7E:33:32:80:48:72:11:D0:5A:DD:2E:4E:C1:9E:0D:E5:A2:0D:71:3D:8B:B5:BD:E6:08:3E:AD:3E:AD:7C:57:78:05:B0:06:86:50:32:C2:01:F1:1F:E0:EE:B1:76:31:CD:6A:08:5D:C7:24:A2:15:96:D1:3F:D4:98:95:98:29:46:28:A8:84:35:EB:47:0E:A8:CA:45:A4:C3:2A:51:79:9B:69:66:5A:2E:6A:E5:03:9D:47:3C:88:C2:84:AA:41:F0:87:98:15:39:6F:59:54:96:F2:24:8B:29:54:A5:44:32:BB:E6:AC:D3:9D:13:81:7F:69:45:C4:0A:2E:78:68:3A:14:9E:4D:C9:37:C2:9A:BD:90:44:D4:2D:C1:00:C1:6F:19:0E:C8:53:2C:A1:01:84:F8:36:A2:EF:24:6D:65:FC:D3:87:89:36:66:A6:E0:0E:CD:93:E0:64:40:B0:F0:93:92:FB:B7:C0:F1:54:0E:C7:34:F9:12:8C:3E:0C:6C:A6:A7:A8:C2:94:A4:66:9A:36:1E:D4:3C:A8:80:CE:0A:62:DA:E5:B8:92:A0:85:E5:A2" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:32:27", "not_valid_before": "2022-07-06 23:37:19" } } 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:37:30 +0000 (0:00:00.648) 0:00:22.165 ******** 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": "91:34:B0:DA:F1:0D:8A:0B:53:9B:4E:21:20:8F:B7:85:EB:BF:8C:3C" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "A4:DE:AB:9E:8C:C6:C8:2D:77:50:05:8E:B5:3B:12:E8:A2:5D:2F:9A:7D:D3:C0:46:AC:7D:71:B4:49:59:B9:8D:E0:58:FF:0B:AF:E8:51:BD:7E:33:32:80:48:72:11:D0:5A:DD:2E:4E:C1:9E:0D:E5:A2:0D:71:3D:8B:B5:BD:E6:08:3E:AD:3E:AD:7C:57:78:05:B0:06:86:50:32:C2:01:F1:1F:E0:EE:B1:76:31:CD:6A:08:5D:C7:24:A2:15:96:D1:3F:D4:98:95:98:29:46:28:A8:84:35:EB:47:0E:A8:CA:45:A4:C3:2A:51:79:9B:69:66:5A:2E:6A:E5:03:9D:47:3C:88:C2:84:AA:41:F0:87:98:15:39:6F:59:54:96:F2:24:8B:29:54:A5:44:32:BB:E6:AC:D3:9D:13:81:7F:69:45:C4:0A:2E:78:68:3A:14:9E:4D:C9:37:C2:9A:BD:90:44:D4:2D:C1:00:C1:6F:19:0E:C8:53:2C:A1:01:84:F8:36:A2:EF:24:6D:65:FC:D3:87:89:36:66:A6:E0:0E:CD:93:E0:64:40:B0:F0:93:92:FB:B7:C0:F1:54:0E:C7:34:F9:12:8C:3E:0C:6C:A6:A7:A8:C2:94:A4:66:9A:36:1E:D4:3C:A8:80:CE:0A:62:DA:E5:B8:92:A0:85:E5:A2" }, "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:37:19" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:37:30 +0000 (0:00:00.041) 0:00:22.206 ******** 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:37:31 +0000 (0:00:00.043) 0:00:22.249 ******** 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:37:31 +0000 (0:00:00.030) 0:00:22.280 ******** 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:37:31 +0000 (0:00:00.044) 0:00:22.324 ******** 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:37:31 +0000 (0:00:00.043) 0:00:22.368 ******** 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:37:31 +0000 (0:00:00.046) 0:00:22.414 ******** ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/certid.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.049875", "end": "2022-07-06 19:37:31.594202", "rc": 0, "start": "2022-07-06 19:37:31.544327" } 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:37:31 +0000 (0:00:00.494) 0:00:22.909 ******** 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=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:37:31 +0000 (0:00:00.051) 0:00:22.960 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 2.04s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.23s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.20s /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.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 the package, force upgrade -------------------------------------- 1.10s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Ensure python3 is installed --------------------------------------------- 1.00s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.98s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Install certreader ------------------------------------------------------ 0.98s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.95s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Ensure python3 is installed --------------------------------------------- 0.94s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Gathering Facts --------------------------------------------------------- 0.88s /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:13 ---------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.87s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.86s /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:31 ---------------------- Ensure user exists ------------------------------------------------------ 0.86s /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:5 ----------------------- Parse certificate ------------------------------------------------------- 0.75s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Ensure group "somegroup" exists ----------------------------------------- 0.75s /tmp/tmp8_d1edvf/tests/certificate/tests_fs_attrs.yml:9 ----------------------- Parse certificate ------------------------------------------------------- 0.65s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.60s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.58s /tmp/tmpz63ztj_p/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.58s /tmp/tmp8_d1edvf/tests/certificate/tasks/assert_certificate_parameters.yml:26 -