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/tmptdk3_2m8 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/tmpoydf_gbg/tests/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:2 Wednesday 06 July 2022 23:24:12 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:5 Wednesday 06 July 2022 23:24:13 +0000 (0:00:01.144) 0:00:01.157 ******** changed: [/cache/fedora-35.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/tmpoydf_gbg/tests/tests_fs_attrs.yml:9 Wednesday 06 July 2022 23:24:14 +0000 (0:00:00.819) 0:00:01.976 ******** changed: [/cache/fedora-35.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/tmpoydf_gbg/tests/tests_fs_attrs.yml:13 Wednesday 06 July 2022 23:24:15 +0000 (0:00:00.738) 0:00:02.714 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:24:16 +0000 (0:00:00.792) 0:00:03.507 ******** included: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/fedora-35.qcow2.snap TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:24:16 +0000 (0:00:00.027) 0:00:03.534 ******** ok: [/cache/fedora-35.qcow2.snap] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 23:24:16 +0000 (0:00:00.565) 0:00:04.099 ******** skipping: [/cache/fedora-35.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:24:16 +0000 (0:00:00.040) 0:00:04.140 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:24:18 +0000 (0:00:02.086) 0:00:06.227 ******** ok: [/cache/fedora-35.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/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:24:20 +0000 (0:00:01.870) 0:00:08.098 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:24:21 +0000 (0:00:00.548) 0:00:08.646 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:24:21 +0000 (0:00:00.419) 0:00:09.066 ******** ok: [/cache/fedora-35.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 23:19:06 UTC", "ActiveEnterTimestampMonotonic": "209043931", "ActiveExitTimestamp": "n/a", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket syslog.target dbus.socket sysinit.target basic.target network.target dbus-broker.service system.slice", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:19:06 UTC", "AssertTimestampMonotonic": "209030007", "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": "36286625000", "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 23:19:06 UTC", "ConditionTimestampMonotonic": "209030006", "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", "ExecMainExitTimestamp": "n/a", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "16686", "ExecMainStartTimestamp": "Wed 2022-07-06 23:19:06 UTC", "ExecMainStartTimestampMonotonic": "209031487", "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 }", "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", "InactiveEnterTimestamp": "n/a", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 23:19:06 UTC", "InactiveExitTimestampMonotonic": "209031810", "InvocationID": "8677e115309340cdb638ea61a9a207e7", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "8388608", "LimitMEMLOCKSoft": "8388608", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "15523", "LimitNPROCSoft": "15523", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15523", "LimitSIGPENDINGSoft": "15523", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "16686", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "2564096", "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": "dbus.socket system.slice sysinit.target", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "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 23:22:58 UTC", "StateChangeTimestampMonotonic": "440655177", "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": "4656", "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", "WatchdogTimestamp": "n/a", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 23:24:22 +0000 (0:00:00.843) 0:00:09.909 ******** changed: [/cache/fedora-35.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/fedora-35.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/fedora-35.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:31 Wednesday 06 July 2022 23:24:24 +0000 (0:00:01.831) 0:00:11.741 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:60 Wednesday 06 July 2022 23:24:25 +0000 (0:00:00.856) 0:00:12.597 ******** included: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:24:25 +0000 (0:00:00.047) 0:00:12.644 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:24:25 +0000 (0:00:00.056) 0:00:12.701 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:24:27 +0000 (0:00:01.884) 0:00:14.586 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:24:28 +0000 (0:00:01.136) 0:00:15.722 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:24:29 +0000 (0:00:00.877) 0:00:16.599 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149862.6919804, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "832b96f892e2bee4a4824cb67c04d8272653b87d", "ctime": 1657149862.8389804, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 59643, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149862.6889803, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:24:29 +0000 (0:00:00.545) 0:00:17.145 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:24:29 +0000 (0:00:00.034) 0:00:17.180 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:24:29 +0000 (0:00:00.045) 0:00:17.226 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:24:29 +0000 (0:00:00.045) 0:00:17.272 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149862.6419804, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "203a55b2268790e5a056fd4006675f314f7638cb", "ctime": 1657149862.8389804, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 59630, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149862.6879804, "nlink": 1, "path": "/etc/pki/tls/private/mycert_fs_attrs.key", "pw_name": "ftp", "readable": true, "rgrp": true, "roth": false, "rusr": true, "size": 1708, "uid": 14, "version": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:24:30 +0000 (0:00:00.408) 0:00:17.680 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:24:30 +0000 (0:00:00.032) 0:00:17.713 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:24:30 +0000 (0:00:00.048) 0:00:17.761 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.212971", "end": "2022-07-06 23:24:30.409036", "rc": 0, "start": "2022-07-06 23:24:30.196065" } 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": "E1:B1:FC:03:A9:4E:37:FD:82:E4:7C:0C:EC:C7:89:9C:4C:C9:99:8D", "critical": false }, "authorityKeyIdentifier": { "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "58:20:88:80:30:FF:EE:73:25:CC:D4:2F:61:2F:B5:C3:BE:F9:C2:91:1C:00:41:C9:47:99:6E:2F:CA:FE:2D:CC:E9:1A:C6:5D:74:8F:76:53:6F:37:2B:60:2C:84:84:84:6A:FA:52:D1:4E:7B:7D:71:84:D1:28:84:31:7C:76:A1:D0:D7:8C:26:22:36:9E:5A:F7:63:D1:42:77:B0:96:1E:84:6C:8B:69:68:46:48:0B:8E:8F:87:17:8C:2A:B4:A4:E2:5F:DF:8C:4F:F8:14:A4:79:74:AC:99:B5:6C:81:A4:1F:14:4A:9D:0A:A4:88:E4:1D:F3:7C:74:2A:24:51:AC:40:FE:5A:BF:7C:F8:90:6E:B3:DB:C2:C3:CF:97:1B:CA:C5:17:DB:1C:AF:4D:87:C0:2E:91:97:24:FF:D5:1B:33:F3:C5:BF:29:D0:20:93:67:A3:97:6C:7B:2F:61:35:6E:D0:B3:68:11:4B:B6:FB:E8:B1:88:D3:79:9E:DF:2A:E2:E5:34:55:05:5D:36:A0:33:72:E0:3D:AD:F2:5A:F6:BE:F6:79:12:7B:77:23:E5:0B:AB:07:7F:E0:83:A5:3A:BB:C3:E6:97:C3:BC:CF:CF:D9:8A:71:FE:15:F5:57:73:5A:10:02:8C:F2:EC:8E:9F:A4:61:86:74:49:50:F2:E8:F7" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:24:22" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.716) 0:00:18.478 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E" }, "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": "E1:B1:FC:03:A9:4E:37:FD:82:E4:7C:0C:EC:C7:89:9C:4C:C9:99:8D" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "58:20:88:80:30:FF:EE:73:25:CC:D4:2F:61:2F:B5:C3:BE:F9:C2:91:1C:00:41:C9:47:99:6E:2F:CA:FE:2D:CC:E9:1A:C6:5D:74:8F:76:53:6F:37:2B:60:2C:84:84:84:6A:FA:52:D1:4E:7B:7D:71:84:D1:28:84:31:7C:76:A1:D0:D7:8C:26:22:36:9E:5A:F7:63:D1:42:77:B0:96:1E:84:6C:8B:69:68:46:48:0B:8E:8F:87:17:8C:2A:B4:A4:E2:5F:DF:8C:4F:F8:14:A4:79:74:AC:99:B5:6C:81:A4:1F:14:4A:9D:0A:A4:88:E4:1D:F3:7C:74:2A:24:51:AC:40:FE:5A:BF:7C:F8:90:6E:B3:DB:C2:C3:CF:97:1B:CA:C5:17:DB:1C:AF:4D:87:C0:2E:91:97:24:FF:D5:1B:33:F3:C5:BF:29:D0:20:93:67:A3:97:6C:7B:2F:61:35:6E:D0:B3:68:11:4B:B6:FB:E8:B1:88:D3:79:9E:DF:2A:E2:E5:34:55:05:5D:36:A0:33:72:E0:3D:AD:F2:5A:F6:BE:F6:79:12:7B:77:23:E5:0B:AB:07:7F:E0:83:A5:3A:BB:C3:E6:97:C3:BC:CF:CF:D9:8A:71:FE:15:F5:57:73:5A:10:02:8C:F2:EC:8E:9F:A4:61:86:74:49:50:F2:E8:F7" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:24:22" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.042) 0:00:18.521 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.043) 0:00:18.564 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.031) 0:00:18.595 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.043) 0:00:18.639 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.046) 0:00:18.686 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.044) 0:00:18.730 ******** ok: [/cache/fedora-35.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.056001", "end": "2022-07-06 23:24:31.114419", "rc": 0, "start": "2022-07-06 23:24:31.058418" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.446) 0:00:19.177 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.043) 0:00:19.220 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:24:31 +0000 (0:00:00.025) 0:00:19.246 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:24:33 +0000 (0:00:01.940) 0:00:21.186 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:24:34 +0000 (0:00:01.048) 0:00:22.235 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:24:35 +0000 (0:00:00.880) 0:00:23.115 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149863.5599804, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "7ffb6e9a7a2ca55461c4d5650ab7cb135916f7f0", "ctime": 1657149863.6369803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 59678, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149863.5559804, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.409) 0:00:23.525 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.034) 0:00:23.559 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.060) 0:00:23.620 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.045) 0:00:23.666 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149863.5079803, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d7d95f6a7b3a157bf6511ad632290dde12e4532a", "ctime": 1657149863.6379805, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 59665, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657149863.5559804, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.401) 0:00:24.067 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.031) 0:00:24.098 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 23:24:36 +0000 (0:00:00.072) 0:00:24.171 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.199532", "end": "2022-07-06 23:24:36.693205", "rc": 0, "start": "2022-07-06 23:24:36.493673" } 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": "BC:8D:18:B3:E0:F7:C9:6A:39:FD:A7:B0:95:8A:86:7B:EC:58:7D:96", "critical": false }, "authorityKeyIdentifier": { "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "21:1D:02:A1:03:3B:A0:97:C6:39:3F:0E:10:88:D9:C2:9E:7C:64:F6:BD:D8:A9:F4:1A:11:87:4F:6C:B4:AD:B7:69:73:AA:83:5A:68:0B:3F:86:D5:36:6F:0F:82:6B:CA:11:9A:9E:0D:20:D9:76:8E:08:30:82:A6:A8:7D:4F:98:B2:C9:81:29:31:38:3E:03:4B:0D:DD:E3:36:47:9F:84:C5:06:BB:88:86:A6:F7:15:5C:7A:64:51:DA:B6:7D:D4:A8:B7:86:99:26:0B:C0:88:FC:B4:A2:19:58:E5:3C:97:B5:F0:B2:4A:65:B2:31:E3:A8:D8:7D:36:5E:33:99:AB:44:94:79:04:32:B8:5C:EC:23:90:95:4E:36:A1:CF:6D:14:A3:77:AB:58:0C:1B:F3:E5:0F:28:99:24:4C:AF:5D:5F:B4:3B:B1:04:BA:DF:C0:6B:A5:AC:9C:CF:DC:3F:9F:36:B9:11:68:6D:DC:EB:0C:18:2F:66:02:C2:AD:29:E4:10:7D:27:5C:7D:B8:08:9A:13:7B:25:A3:FC:B9:FF:63:EF:D0:7F:90:45:3B:B8:D5:9D:A2:A5:1B:BF:62:A2:E6:19:93:55:C7:03:73:43:A8:BE:5E:16:4F:BF:A5:57:AB:41:57:CC:6B:5F:56:6D:DF:E3:F3:9E:0A:5C:C8:B8:2E" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:24:23" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.588) 0:00:24.760 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "08:11:D3:0D:CD:47:EB:C7:01:58:AE:B3:12:D9:58:5D:B1:CF:03:7E" }, "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": "BC:8D:18:B3:E0:F7:C9:6A:39:FD:A7:B0:95:8A:86:7B:EC:58:7D:96" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "21:1D:02:A1:03:3B:A0:97:C6:39:3F:0E:10:88:D9:C2:9E:7C:64:F6:BD:D8:A9:F4:1A:11:87:4F:6C:B4:AD:B7:69:73:AA:83:5A:68:0B:3F:86:D5:36:6F:0F:82:6B:CA:11:9A:9E:0D:20:D9:76:8E:08:30:82:A6:A8:7D:4F:98:B2:C9:81:29:31:38:3E:03:4B:0D:DD:E3:36:47:9F:84:C5:06:BB:88:86:A6:F7:15:5C:7A:64:51:DA:B6:7D:D4:A8:B7:86:99:26:0B:C0:88:FC:B4:A2:19:58:E5:3C:97:B5:F0:B2:4A:65:B2:31:E3:A8:D8:7D:36:5E:33:99:AB:44:94:79:04:32:B8:5C:EC:23:90:95:4E:36:A1:CF:6D:14:A3:77:AB:58:0C:1B:F3:E5:0F:28:99:24:4C:AF:5D:5F:B4:3B:B1:04:BA:DF:C0:6B:A5:AC:9C:CF:DC:3F:9F:36:B9:11:68:6D:DC:EB:0C:18:2F:66:02:C2:AD:29:E4:10:7D:27:5C:7D:B8:08:9A:13:7B:25:A3:FC:B9:FF:63:EF:D0:7F:90:45:3B:B8:D5:9D:A2:A5:1B:BF:62:A2:E6:19:93:55:C7:03:73:43:A8:BE:5E:16:4F:BF:A5:57:AB:41:57:CC:6B:5F:56:6D:DF:E3:F3:9E:0A:5C:C8:B8:2E" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:24:23" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.045) 0:00:24.805 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.048) 0:00:24.854 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.035) 0:00:24.889 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.077) 0:00:24.967 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.072) 0:00:25.039 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:24:37 +0000 (0:00:00.047) 0:00:25.086 ******** ok: [/cache/fedora-35.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.052155", "end": "2022-07-06 23:24:37.459202", "rc": 0, "start": "2022-07-06 23:24:37.407047" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:24:38 +0000 (0:00:00.439) 0:00:25.526 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-35.qcow2.snap : ok=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:24:38 +0000 (0:00:00.077) 0:00:25.603 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.09s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Ensure python3 is installed --------------------------------------------- 1.94s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.88s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure provider packages are installed --- 1.87s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - linux-system-roles.certificate : Ensure certificate requests ------------ 1.83s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Gathering Facts --------------------------------------------------------- 1.14s /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:2 ----------------------------------- Install the package, force upgrade -------------------------------------- 1.14s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 1.05s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.88s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.86s /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:31 ---------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.84s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Ensure user exists ------------------------------------------------------ 0.82s /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:5 ----------------------------------- Gathering Facts --------------------------------------------------------- 0.79s /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:13 ---------------------------------- Ensure group "somegroup" exists ----------------------------------------- 0.74s /tmp/tmpoydf_gbg/tests/tests_fs_attrs.yml:9 ----------------------------------- Parse certificate ------------------------------------------------------- 0.72s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.59s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.57s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.55s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.55s /tmp/tmpoydf_gbg/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/tmptdk3_2m8 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/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml PLAY [Ensure UID and GID exists] *********************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:2 Wednesday 06 July 2022 23:36:41 +0000 (0:00:00.013) 0:00:00.013 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Ensure user exists] ****************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:5 Wednesday 06 July 2022 23:36:42 +0000 (0:00:01.136) 0:00:01.149 ******** changed: [/cache/fedora-35.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/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:9 Wednesday 06 July 2022 23:36:43 +0000 (0:00:00.846) 0:00:01.995 ******** changed: [/cache/fedora-35.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/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:13 Wednesday 06 July 2022 23:36:44 +0000 (0:00:00.752) 0:00:02.748 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 23:36:44 +0000 (0:00:00.814) 0:00:03.562 ******** included: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/fedora-35.qcow2.snap TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 23:36:44 +0000 (0:00:00.029) 0:00:03.592 ******** ok: [/cache/fedora-35.qcow2.snap] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 23:36:45 +0000 (0:00:00.553) 0:00:04.146 ******** skipping: [/cache/fedora-35.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/fedora-35.qcow2.snap] => (item=Fedora_35.yml) => { "ansible_loop_var": "item", "changed": false, "item": "Fedora_35.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 23:36:45 +0000 (0:00:00.043) 0:00:04.189 ******** ok: [/cache/fedora-35.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/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 23:36:47 +0000 (0:00:02.174) 0:00:06.364 ******** ok: [/cache/fedora-35.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/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 23:36:49 +0000 (0:00:01.914) 0:00:08.278 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 23:36:50 +0000 (0:00:00.561) 0:00:08.840 ******** ok: [/cache/fedora-35.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": 0, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 23:36:50 +0000 (0:00:00.418) 0:00:09.259 ******** ok: [/cache/fedora-35.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 23:31:35 UTC", "ActiveEnterTimestampMonotonic": "204425251", "ActiveExitTimestamp": "n/a", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "dbus-broker.service system.slice basic.target systemd-journald.socket dbus.socket network.target syslog.target sysinit.target", "AllowIsolate": "no", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 23:31:35 UTC", "AssertTimestampMonotonic": "204413518", "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": "37170769000", "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 23:31:35 UTC", "ConditionTimestampMonotonic": "204413516", "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", "ExecMainExitTimestamp": "n/a", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "16664", "ExecMainStartTimestamp": "Wed 2022-07-06 23:31:35 UTC", "ExecMainStartTimestampMonotonic": "204414889", "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 }", "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", "InactiveEnterTimestamp": "n/a", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 23:31:35 UTC", "InactiveExitTimestampMonotonic": "204415310", "InvocationID": "b6c03241252443a3b030f2fc85b5c108", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "8388608", "LimitMEMLOCKSoft": "8388608", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "15523", "LimitNPROCSoft": "15523", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "15523", "LimitSIGPENDINGSoft": "15523", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "16664", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "2555904", "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": "dbus.socket sysinit.target system.slice", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "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 23:35:25 UTC", "StateChangeTimestampMonotonic": "433942226", "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": "4656", "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", "WatchdogTimestamp": "n/a", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 23:36:51 +0000 (0:00:00.841) 0:00:10.100 ******** changed: [/cache/fedora-35.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/fedora-35.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/fedora-35.qcow2.snap META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:31 Wednesday 06 July 2022 23:36:53 +0000 (0:00:01.844) 0:00:11.944 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:60 Wednesday 06 July 2022 23:36:54 +0000 (0:00:00.810) 0:00:12.754 ******** included: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-35.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/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:36:54 +0000 (0:00:00.048) 0:00:12.802 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:36:54 +0000 (0:00:00.028) 0:00:12.831 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:36:56 +0000 (0:00:02.076) 0:00:14.908 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:36:57 +0000 (0:00:01.150) 0:00:16.058 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:36:58 +0000 (0:00:00.935) 0:00:16.993 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150611.4886906, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "8c0a12f2267c318d94120738f891140211ee880f", "ctime": 1657150611.5966907, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 59640, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150611.4846907, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:36:58 +0000 (0:00:00.539) 0:00:17.533 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:36:58 +0000 (0:00:00.034) 0:00:17.567 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:36:58 +0000 (0:00:00.051) 0:00:17.618 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:36:59 +0000 (0:00:00.045) 0:00:17.664 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150611.4366906, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4f961555e63f7515a20f76505eaf9a7d0efa413d", "ctime": 1657150611.5966907, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 50, "gr_name": "ftp", "inode": 59627, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150611.4846907, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:36:59 +0000 (0:00:00.388) 0:00:18.053 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:36:59 +0000 (0:00:00.032) 0:00:18.086 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:36:59 +0000 (0:00:00.053) 0:00:18.139 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_fs_attrs.crt" ], "delta": "0:00:00.217365", "end": "2022-07-06 23:36:59.268912", "rc": 0, "start": "2022-07-06 23:36:59.051547" } 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": "1E:16:2B:96:6B:9F:9D:CC:AB:1E:46:E6:FF:F2:1E:F8:48:CB:23:B3", "critical": false }, "authorityKeyIdentifier": { "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "B5:9C:B7:62:9A:2F:DA:59:5F:AA:F4:1F:A3:E8:C7:F4:90:47:81:E9:86:97:EE:BF:5F:85:89:32:BF:1E:C9:54:93:24:CC:93:ED:83:65:E1:5B:E0:95:4A:5E:0A:D0:61:9D:5B:E0:FD:45:C3:2D:5B:CF:E9:61:2F:0A:2A:0E:0A:71:FF:4F:AA:F5:F4:C7:23:FD:47:7D:82:83:3B:06:BB:73:C5:70:83:53:2E:64:30:F4:98:02:11:61:AF:BA:2E:32:A5:72:CE:18:8F:8D:82:79:9E:DB:E1:E7:C3:03:52:3D:C3:BB:3D:4C:07:F4:12:69:C7:F3:38:B1:2D:DF:8A:B5:27:FD:F1:6D:D7:52:30:C4:A2:9E:34:FA:91:4A:25:F8:A3:53:FC:3C:A2:7D:53:87:C6:52:08:EE:05:90:DF:21:5C:3C:07:12:F6:77:41:41:BB:2E:28:CB:36:40:C7:7E:30:0D:63:65:46:7A:10:EE:F2:F2:D0:3A:0C:2D:A4:8C:0E:B2:F1:31:D3:04:84:58:31:81:4C:AD:8B:C9:2A:CD:86:7A:CC:50:98:6C:EC:4A:CD:C2:90:BA:B5:01:58:8F:CF:14:79:35:31:73:23:DA:57:5E:C4:59:07:E1:9A:5D:DB:C0:17:33:C5:EE:C0:8A:34:91:F3:0F:DD:46:5F" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:36:51" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.739) 0:00:18.879 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F" }, "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": "1E:16:2B:96:6B:9F:9D:CC:AB:1E:46:E6:FF:F2:1E:F8:48:CB:23:B3" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "B5:9C:B7:62:9A:2F:DA:59:5F:AA:F4:1F:A3:E8:C7:F4:90:47:81:E9:86:97:EE:BF:5F:85:89:32:BF:1E:C9:54:93:24:CC:93:ED:83:65:E1:5B:E0:95:4A:5E:0A:D0:61:9D:5B:E0:FD:45:C3:2D:5B:CF:E9:61:2F:0A:2A:0E:0A:71:FF:4F:AA:F5:F4:C7:23:FD:47:7D:82:83:3B:06:BB:73:C5:70:83:53:2E:64:30:F4:98:02:11:61:AF:BA:2E:32:A5:72:CE:18:8F:8D:82:79:9E:DB:E1:E7:C3:03:52:3D:C3:BB:3D:4C:07:F4:12:69:C7:F3:38:B1:2D:DF:8A:B5:27:FD:F1:6D:D7:52:30:C4:A2:9E:34:FA:91:4A:25:F8:A3:53:FC:3C:A2:7D:53:87:C6:52:08:EE:05:90:DF:21:5C:3C:07:12:F6:77:41:41:BB:2E:28:CB:36:40:C7:7E:30:0D:63:65:46:7A:10:EE:F2:F2:D0:3A:0C:2D:A4:8C:0E:B2:F1:31:D3:04:84:58:31:81:4C:AD:8B:C9:2A:CD:86:7A:CC:50:98:6C:EC:4A:CD:C2:90:BA:B5:01:58:8F:CF:14:79:35:31:73:23:DA:57:5E:C4:59:07:E1:9A:5D:DB:C0:17:33:C5:EE:C0:8A:34:91:F3:0F:DD:46:5F" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:36:51" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.042) 0:00:18.922 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.042) 0:00:18.964 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.034) 0:00:18.999 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.046) 0:00:19.045 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.045) 0:00:19.091 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.048) 0:00:19.140 ******** ok: [/cache/fedora-35.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.054777", "end": "2022-07-06 23:36:59.989925", "rc": 0, "start": "2022-07-06 23:36:59.935148" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:37:00 +0000 (0:00:00.455) 0:00:19.595 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:37:01 +0000 (0:00:00.047) 0:00:19.642 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 23:37:01 +0000 (0:00:00.030) 0:00:19.672 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 23:37:03 +0000 (0:00:02.046) 0:00:21.719 ******** ok: [/cache/fedora-35.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.10/site-packages (22.1.2) TASK [Install certreader] ****************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 23:37:04 +0000 (0:00:01.003) 0:00:22.722 ******** ok: [/cache/fedora-35.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.10/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.10/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.10/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.10/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.10/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 23:37:04 +0000 (0:00:00.900) 0:00:23.622 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150612.2606907, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "8758cbd99ab58d9cad3b14f05d84229f137e7a64", "ctime": 1657150612.2966907, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 59675, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150612.2576907, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.403) 0:00:24.026 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.032) 0:00:24.058 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.045) 0:00:24.103 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.042) 0:00:24.146 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150612.2096906, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "cab086caa0acf81fbbe5f70ae593c512189031b9", "ctime": 1657150612.2966907, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 1041, "gr_name": "somegroup", "inode": 59662, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0640", "mtime": 1657150612.2576907, "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": "67", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.396) 0:00:24.542 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 23:37:05 +0000 (0:00:00.060) 0:00:24.602 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.047) 0:00:24.650 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/certid.crt" ], "delta": "0:00:00.209274", "end": "2022-07-06 23:37:05.664373", "rc": 0, "start": "2022-07-06 23:37:05.455099" } 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": "B7:F7:DF:74:68:15:F2:DE:22:FC:2A:D9:03:EE:67:57:64:E1:1A:CC", "critical": false }, "authorityKeyIdentifier": { "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AE:C3:92:18:19:73:AF:7E:AA:17:DD:FE:71:FD:B1:8D:F7:21:C8:9F:D3:00:96:2B:77:28:6A:55:8D:92:52:A0:8A:F2:53:8B:B1:6A:93:61:27:02:94:03:12:8B:13:BF:CB:43:F5:45:0E:04:AC:60:5F:75:B4:02:0D:F1:C0:22:FF:62:51:0E:A7:2E:CB:00:B2:22:65:FF:AC:7C:E9:46:4F:7D:61:FA:B4:1B:76:63:50:F0:88:86:77:18:E5:D2:14:A6:0D:B7:08:00:8F:03:50:27:2C:41:98:6E:A6:D7:07:A3:43:53:5C:1F:6E:C5:19:41:42:75:9E:17:BE:0B:50:17:BF:F8:97:B2:9A:FB:10:12:D6:CF:C6:6B:52:33:81:10:C2:2F:82:DF:EE:B7:B0:CF:42:85:39:69:A5:34:00:78:FA:D9:A6:65:F2:5C:E1:A0:69:8C:4A:2F:0A:AD:CD:5B:B9:65:CD:A6:20:03:24:52:A2:28:E0:22:60:78:A2:14:49:8E:3D:3F:1F:2C:34:37:63:18:C6:90:E2:3C:EC:93:B0:6F:BB:8E:53:E8:2A:88:15:DC:95:AD:1D:79:F8:A2:36:3F:65:DF:72:1B:CF:48:20:BF:25:F0:CC:D9:2D:BA:AE:0A:4F:EE:A7:22:1F:48:DA:C9:64:74:FD:AD" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:36:52" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.626) 0:00:25.276 ******** ok: [/cache/fedora-35.qcow2.snap] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "4C:FC:1F:4C:D8:65:29:92:2C:7F:D8:EA:F1:BF:F7:B0:DC:83:73:1F" }, "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": "B7:F7:DF:74:68:15:F2:DE:22:FC:2A:D9:03:EE:67:57:64:E1:1A:CC" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AE:C3:92:18:19:73:AF:7E:AA:17:DD:FE:71:FD:B1:8D:F7:21:C8:9F:D3:00:96:2B:77:28:6A:55:8D:92:52:A0:8A:F2:53:8B:B1:6A:93:61:27:02:94:03:12:8B:13:BF:CB:43:F5:45:0E:04:AC:60:5F:75:B4:02:0D:F1:C0:22:FF:62:51:0E:A7:2E:CB:00:B2:22:65:FF:AC:7C:E9:46:4F:7D:61:FA:B4:1B:76:63:50:F0:88:86:77:18:E5:D2:14:A6:0D:B7:08:00:8F:03:50:27:2C:41:98:6E:A6:D7:07:A3:43:53:5C:1F:6E:C5:19:41:42:75:9E:17:BE:0B:50:17:BF:F8:97:B2:9A:FB:10:12:D6:CF:C6:6B:52:33:81:10:C2:2F:82:DF:EE:B7:B0:CF:42:85:39:69:A5:34:00:78:FA:D9:A6:65:F2:5C:E1:A0:69:8C:4A:2F:0A:AD:CD:5B:B9:65:CD:A6:20:03:24:52:A2:28:E0:22:60:78:A2:14:49:8E:3D:3F:1F:2C:34:37:63:18:C6:90:E2:3C:EC:93:B0:6F:BB:8E:53:E8:2A:88:15:DC:95:AD:1D:79:F8:A2:36:3F:65:DF:72:1B:CF:48:20:BF:25:F0:CC:D9:2D:BA:AE:0A:4F:EE:A7:22:1F:48:DA:C9:64:74:FD:AD" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:36:52" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.041) 0:00:25.318 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.069) 0:00:25.387 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.059) 0:00:25.447 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.060) 0:00:25.508 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.046) 0:00:25.554 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 23:37:06 +0000 (0:00:00.075) 0:00:25.630 ******** ok: [/cache/fedora-35.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.058037", "end": "2022-07-06 23:37:06.516925", "rc": 0, "start": "2022-07-06 23:37:06.458888" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:37:07 +0000 (0:00:00.497) 0:00:26.127 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/fedora-35.qcow2.snap : ok=55 changed=3 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:37:07 +0000 (0:00:00.054) 0:00:26.181 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.17s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Ensure python3 is installed --------------------------------------------- 2.08s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 2.05s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.91s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.84s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Install the package, force upgrade -------------------------------------- 1.15s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 1.14s /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:2 ----------------------- Install the package, force upgrade -------------------------------------- 1.00s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.94s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.90s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Ensure user exists ------------------------------------------------------ 0.85s /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:5 ----------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.84s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:13 ---------------------- Gathering Facts --------------------------------------------------------- 0.81s /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:31 ---------------------- Ensure group "somegroup" exists ----------------------------------------- 0.75s /tmp/tmpswp52mgx/tests/certificate/tests_fs_attrs.yml:9 ----------------------- Parse certificate ------------------------------------------------------- 0.74s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.63s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.56s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.55s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.54s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 -