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_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpoydf_gbg/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 23:25:50 +0000 (0:00:00.014) 0:00:00.014 ******** 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:25:51 +0000 (0:00:01.110) 0:00:01.125 ******** 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:25:51 +0000 (0:00:00.027) 0:00:01.152 ******** 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:25:51 +0000 (0:00:00.550) 0:00:01.702 ******** 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:25:52 +0000 (0:00:00.041) 0:00:01.744 ******** 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:25:54 +0000 (0:00:02.073) 0:00:03.817 ******** 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:25:55 +0000 (0:00:01.899) 0:00:05.716 ******** 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:25:56 +0000 (0:00:00.562) 0:00:06.279 ******** 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:25:56 +0000 (0:00:00.420) 0:00:06.700 ******** 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": "38582061000", "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": "2945024", "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:25:57 +0000 (0:00:00.824) 0:00:07.524 ******** changed: [/cache/fedora-35.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/fedora-35.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). 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_no_auto_renew.yml:17 Wednesday 06 July 2022 23:25:59 +0000 (0:00:02.105) 0:00:09.629 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpoydf_gbg/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 23:26:00 +0000 (0:00:00.782) 0:00:10.412 ******** included: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-35.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml for /cache/fedora-35.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:26:00 +0000 (0:00:00.045) 0:00:10.458 ******** 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:26:00 +0000 (0:00:00.028) 0:00:10.486 ******** 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:26:02 +0000 (0:00:01.840) 0:00:12.327 ******** 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:26:03 +0000 (0:00:01.112) 0:00:13.440 ******** 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:26:04 +0000 (0:00:00.865) 0:00:14.305 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149958.0919805, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "658bd1da3f5f738f5ac1823a4543500d47968507", "ctime": 1657149958.0879803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60065, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149958.0879803, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_no_auto_renew.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "70", "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:26:05 +0000 (0:00:00.532) 0:00:14.837 ******** 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:26:05 +0000 (0:00:00.068) 0:00:14.906 ******** 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:26:05 +0000 (0:00:00.047) 0:00:14.953 ******** 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:26:05 +0000 (0:00:00.044) 0:00:14.997 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149958.0389802, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "b9327cc4402196edb8447c3a753d4c1879a39cc5", "ctime": 1657149958.0879803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60052, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149958.0879803, "nlink": 1, "path": "/etc/pki/tls/private/mycert_no_auto_renew.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "70", "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:26:05 +0000 (0:00:00.427) 0:00:15.425 ******** 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:26:05 +0000 (0:00:00.062) 0:00:15.487 ******** 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:26:05 +0000 (0:00:00.069) 0:00:15.557 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.201526", "end": "2022-07-06 23:26:05.879389", "rc": 0, "start": "2022-07-06 23:26:05.677863" } 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": "CF:6F:D5:46:43:6A:E4:60:93:02:C7:0C:DB:9A:20:2F:7A:29:2E:DB", "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": "AE:56:9F:E0:88:D0:48:6F:57:24:8C:0A:92:70:E1:45:A7:0A:12:27:95:29:72:60:7A:50:1C:59:8F:DB:38:D0:CE:88:48:36:02:5B:89:B8:18:86:B5:F4:92:2A:86:71:B2:4B:76:F4:17:44:7D:8C:6C:A9:60:11:1D:20:6F:B7:72:3F:99:36:11:A7:9B:3D:FF:BD:5C:5F:A4:61:81:4B:D0:2F:F8:DC:8B:95:CC:0A:93:B1:CC:3E:E1:AC:C2:0F:93:33:D5:7F:42:8F:ED:F2:B9:1A:11:3D:77:FD:BA:97:97:74:5F:CA:A5:D8:5E:34:A2:FF:06:BF:88:C4:FF:5E:E1:2A:8B:C1:F6:AD:9E:8E:22:24:5B:06:5E:D9:D9:62:08:E0:8F:86:E7:EE:CA:74:BC:A6:AB:50:0F:43:83:87:AC:34:66:B3:5C:0A:E1:66:9E:4A:9F:C3:2D:C6:00:73:6E:35:CE:68:61:8A:73:0D:54:F8:42:CB:1B:CF:C6:E3:60:DE:35:5F:97:1C:31:0A:48:B0:BC:31:1B:FA:B3:73:FA:41:08:DE:28:B6:A0:83:A8:85:CD:AA:D7:A0:82:12:2C:29:C8:B3:ED:13:87:57:01:2F:3F:DB:60:06:5E:43:FF:DD:8F:23:51:21:C0:E6:70:F4:18:90:70:31:39:F2" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:25:58" } } 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:26:06 +0000 (0:00:00.697) 0:00:16.255 ******** 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": "CF:6F:D5:46:43:6A:E4:60:93:02:C7:0C:DB:9A:20:2F:7A:29:2E:DB" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AE:56:9F:E0:88:D0:48:6F:57:24:8C:0A:92:70:E1:45:A7:0A:12:27:95:29:72:60:7A:50:1C:59:8F:DB:38:D0:CE:88:48:36:02:5B:89:B8:18:86:B5:F4:92:2A:86:71:B2:4B:76:F4:17:44:7D:8C:6C:A9:60:11:1D:20:6F:B7:72:3F:99:36:11:A7:9B:3D:FF:BD:5C:5F:A4:61:81:4B:D0:2F:F8:DC:8B:95:CC:0A:93:B1:CC:3E:E1:AC:C2:0F:93:33:D5:7F:42:8F:ED:F2:B9:1A:11:3D:77:FD:BA:97:97:74:5F:CA:A5:D8:5E:34:A2:FF:06:BF:88:C4:FF:5E:E1:2A:8B:C1:F6:AD:9E:8E:22:24:5B:06:5E:D9:D9:62:08:E0:8F:86:E7:EE:CA:74:BC:A6:AB:50:0F:43:83:87:AC:34:66:B3:5C:0A:E1:66:9E:4A:9F:C3:2D:C6:00:73:6E:35:CE:68:61:8A:73:0D:54:F8:42:CB:1B:CF:C6:E3:60:DE:35:5F:97:1C:31:0A:48:B0:BC:31:1B:FA:B3:73:FA:41:08:DE:28:B6:A0:83:A8:85:CD:AA:D7:A0:82:12:2C:29:C8:B3:ED:13:87:57:01:2F:3F:DB:60:06:5E:43:FF:DD:8F:23:51:21:C0:E6:70:F4:18:90:70:31:39:F2" }, "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:25:58" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:26:06 +0000 (0:00:00.044) 0:00:16.299 ******** 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:26:06 +0000 (0:00:00.042) 0:00:16.342 ******** 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:26:06 +0000 (0:00:00.033) 0:00:16.375 ******** 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:26:06 +0000 (0:00:00.044) 0:00:16.419 ******** 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:26:06 +0000 (0:00:00.045) 0:00:16.465 ******** 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:26:06 +0000 (0:00:00.046) 0:00:16.511 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.065219", "end": "2022-07-06 23:26:06.592866", "rc": 0, "start": "2022-07-06 23:26:06.527647" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 23:26:07 +0000 (0:00:00.455) 0:00:16.966 ******** 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:26:07 +0000 (0:00:00.043) 0:00:17.010 ******** 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:26:07 +0000 (0:00:00.028) 0:00:17.038 ******** 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:26:09 +0000 (0:00:01.842) 0:00:18.881 ******** 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:26:10 +0000 (0:00:00.993) 0:00:19.875 ******** 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:26:11 +0000 (0:00:00.882) 0:00:20.758 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149959.0609803, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1d66af806e482865f8af0c6eb8383dca8917f55a", "ctime": 1657149959.0579803, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60100, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149959.0579803, "nlink": 1, "path": "/etc/pki/tls/certs/defaultcert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "71", "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:26:11 +0000 (0:00:00.402) 0:00:21.160 ******** 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:26:11 +0000 (0:00:00.032) 0:00:21.193 ******** 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:26:11 +0000 (0:00:00.049) 0:00:21.242 ******** 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:26:11 +0000 (0:00:00.044) 0:00:21.287 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657149959.0079803, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "0f62d1b17ccd75628c1a3228015dda70a26a1393", "ctime": 1657149959.0569804, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60087, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657149959.0569804, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "71", "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:26:11 +0000 (0:00:00.398) 0:00:21.685 ******** 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:26:11 +0000 (0:00:00.034) 0:00:21.720 ******** 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:26:12 +0000 (0:00:00.049) 0:00:21.769 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.207988", "end": "2022-07-06 23:26:11.999921", "rc": 0, "start": "2022-07-06 23:26:11.791933" } 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": "B9:EB:DD:C5:48:B3:86:15:8F:98:AE:F2:94:78:A6:D3:B3:4E:B2:79", "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": "25:CE:30:D2:95:E9:55:0D:EB:81:C3:7D:AB:00:09:06:CA:CB:3D:7E:42:30:3F:69:E2:ED:CF:69:31:4E:2B:4B:EF:CC:6B:A0:39:D9:41:75:7F:EE:5B:02:59:7D:6F:E4:57:15:D8:82:32:4F:FC:E3:D0:2D:DC:C8:69:04:F7:5B:F3:91:A1:0B:CF:0D:D7:68:BC:C9:37:0D:4B:FB:A3:5A:DA:0C:6B:A4:F8:0E:B2:C7:F2:61:6C:2B:D7:F2:52:A7:44:96:BB:47:09:7E:4C:86:B4:3F:A7:A8:67:7A:82:2C:78:C8:4F:85:B0:8B:63:ED:C3:89:57:94:43:F6:92:EB:87:84:E7:3B:4E:B2:8C:FB:E2:BA:4F:12:C9:D5:06:6C:7A:E0:5F:42:3F:18:19:3E:12:AC:44:06:9F:98:34:44:A7:60:ED:88:59:E4:46:82:A6:BD:66:57:E2:79:1E:8A:CD:57:1C:05:D2:5E:E9:4C:DF:F5:80:FB:B6:D0:93:53:5D:7E:15:62:46:4E:63:3B:C4:B3:BC:85:CF:5E:24:60:DC:B3:24:17:A6:4C:06:89:88:E6:58:88:47:99:D4:9B:74:73:3A:2A:C4:06:A3:0C:31:45:AD:AD:D3:75:A7:9A:05:51:37:4F:03:F0:38:9D:1B:D6:C1:DD:E8:DB:23:3D" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:19:06", "not_valid_before": "2022-07-06 23:25:59" } } 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:26:12 +0000 (0:00:00.607) 0:00:22.376 ******** 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": "B9:EB:DD:C5:48:B3:86:15:8F:98:AE:F2:94:78:A6:D3:B3:4E:B2:79" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "25:CE:30:D2:95:E9:55:0D:EB:81:C3:7D:AB:00:09:06:CA:CB:3D:7E:42:30:3F:69:E2:ED:CF:69:31:4E:2B:4B:EF:CC:6B:A0:39:D9:41:75:7F:EE:5B:02:59:7D:6F:E4:57:15:D8:82:32:4F:FC:E3:D0:2D:DC:C8:69:04:F7:5B:F3:91:A1:0B:CF:0D:D7:68:BC:C9:37:0D:4B:FB:A3:5A:DA:0C:6B:A4:F8:0E:B2:C7:F2:61:6C:2B:D7:F2:52:A7:44:96:BB:47:09:7E:4C:86:B4:3F:A7:A8:67:7A:82:2C:78:C8:4F:85:B0:8B:63:ED:C3:89:57:94:43:F6:92:EB:87:84:E7:3B:4E:B2:8C:FB:E2:BA:4F:12:C9:D5:06:6C:7A:E0:5F:42:3F:18:19:3E:12:AC:44:06:9F:98:34:44:A7:60:ED:88:59:E4:46:82:A6:BD:66:57:E2:79:1E:8A:CD:57:1C:05:D2:5E:E9:4C:DF:F5:80:FB:B6:D0:93:53:5D:7E:15:62:46:4E:63:3B:C4:B3:BC:85:CF:5E:24:60:DC:B3:24:17:A6:4C:06:89:88:E6:58:88:47:99:D4:9B:74:73:3A:2A:C4:06:A3:0C:31:45:AD:AD:D3:75:A7:9A:05:51:37:4F:03:F0:38:9D:1B:D6:C1:DD:E8:DB:23:3D" }, "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:25:59" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 23:26:12 +0000 (0:00:00.043) 0:00:22.420 ******** 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:26:12 +0000 (0:00:00.046) 0:00:22.466 ******** 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:26:12 +0000 (0:00:00.033) 0:00:22.500 ******** 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:26:12 +0000 (0:00:00.045) 0:00:22.546 ******** 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:26:12 +0000 (0:00:00.044) 0:00:22.591 ******** 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:26:12 +0000 (0:00:00.072) 0:00:22.663 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.059880", "end": "2022-07-06 23:26:12.749799", "rc": 0, "start": "2022-07-06 23:26:12.689919" } 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:26:13 +0000 (0:00:00.464) 0:00:23.128 ******** 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=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:26:13 +0000 (0:00:00.055) 0:00:23.183 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 2.11s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 2.07s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure provider packages are installed --- 1.90s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 1.84s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 -------------- Ensure python3 is installed --------------------------------------------- 1.84s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:6 -------------- Install the package, force upgrade -------------------------------------- 1.11s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 1.11s /tmp/tmpoydf_gbg/tests/tests_no_auto_renew.yml:2 ------------------------------ Install the package, force upgrade -------------------------------------- 0.99s /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.87s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:18 ------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.82s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Gathering Facts --------------------------------------------------------- 0.78s /tmp/tmpoydf_gbg/tests/tests_no_auto_renew.yml:17 ----------------------------- Parse certificate ------------------------------------------------------- 0.70s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 ------------- Parse certificate ------------------------------------------------------- 0.61s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.56s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.55s /tmp/tmpoydf_gbg/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve certificate file stats ----------------------------------------- 0.53s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:26 ------------- Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve key file stats ------------------------------------------------- 0.43s /tmp/tmpoydf_gbg/tests/tasks/assert_certificate_parameters.yml:55 ------------- ansible-playbook [core 2.12.6] config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.9/site-packages/ansible ansible collection location = /tmp/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_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpswp52mgx/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 23:38:19 +0000 (0:00:00.014) 0:00:00.014 ******** 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:38:21 +0000 (0:00:01.114) 0:00:01.129 ******** 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:38:21 +0000 (0:00:00.030) 0:00:01.159 ******** 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:38:21 +0000 (0:00:00.558) 0:00:01.718 ******** 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:38:21 +0000 (0:00:00.041) 0:00:01.759 ******** 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:38:23 +0000 (0:00:02.133) 0:00:03.893 ******** 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:38:25 +0000 (0:00:01.975) 0:00:05.868 ******** 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:38:26 +0000 (0:00:00.556) 0:00:06.425 ******** 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:38:26 +0000 (0:00:00.423) 0:00:06.848 ******** 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": "39279564000", "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": "2928640", "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:38:27 +0000 (0:00:00.860) 0:00:07.709 ******** changed: [/cache/fedora-35.qcow2.snap] => (item={'name': 'mycert_no_auto_renew', 'dns': 'www.example.com', 'ca': 'self-sign', 'auto_renew': False}) => { "ansible_loop_var": "item", "changed": true, "item": { "auto_renew": false, "ca": "self-sign", "dns": "www.example.com", "name": "mycert_no_auto_renew" } } MSG: Certificate requested (new). changed: [/cache/fedora-35.qcow2.snap] => (item={'name': 'defaultcert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "defaultcert" } } MSG: Certificate requested (new). 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_no_auto_renew.yml:17 Wednesday 06 July 2022 23:38:29 +0000 (0:00:02.006) 0:00:09.715 ******** ok: [/cache/fedora-35.qcow2.snap] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpswp52mgx/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.816) 0:00:10.532 ******** included: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-35.qcow2.snap => (item={'path': '/etc/pki/tls/certs/mycert_no_auto_renew.crt', 'key_path': '/etc/pki/tls/private/mycert_no_auto_renew.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': False}) included: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/fedora-35.qcow2.snap => (item={'path': '/etc/pki/tls/certs/defaultcert.crt', 'key_path': '/etc/pki/tls/private/defaultcert.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'auto_renew': True}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 23:38:30 +0000 (0:00:00.048) 0:00:10.581 ******** 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:38:30 +0000 (0:00:00.061) 0:00:10.643 ******** 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:38:32 +0000 (0:00:01.932) 0:00:12.575 ******** 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:38:33 +0000 (0:00:01.091) 0:00:13.667 ******** 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:38:34 +0000 (0:00:00.907) 0:00:14.575 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150707.6776905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "9bea6f9b3b8780d5a5af73d1db342b7021009fd0", "ctime": 1657150707.6736906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60062, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150707.6736906, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_no_auto_renew.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "71", "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:38:35 +0000 (0:00:00.516) 0:00:15.092 ******** 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:38:35 +0000 (0:00:00.065) 0:00:15.158 ******** 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:38:35 +0000 (0:00:00.115) 0:00:15.273 ******** 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:38:35 +0000 (0:00:00.046) 0:00:15.319 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150707.6216905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "72e9f6c9cdb0d566cc768cae1633824d1f63075f", "ctime": 1657150707.6736906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60049, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150707.6736906, "nlink": 1, "path": "/etc/pki/tls/private/mycert_no_auto_renew.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "71", "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:38:35 +0000 (0:00:00.404) 0:00:15.723 ******** 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:38:35 +0000 (0:00:00.033) 0:00:15.757 ******** 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:38:35 +0000 (0:00:00.048) 0:00:15.805 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.209641", "end": "2022-07-06 23:38:35.473587", "rc": 0, "start": "2022-07-06 23:38:35.263946" } 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": "56:7D:4D:74:A6:2E:F9:C2:EA:81:6D:AA:99:7E:2F:A5:38:07:28:31", "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": "C3:CA:34:C1:DA:65:3C:80:16:19:D0:94:22:02:CE:A8:5D:F2:C2:47:3D:3F:EC:12:49:3C:BE:C4:FF:4A:A2:99:A5:44:AB:E5:5E:FB:2A:4B:05:98:0D:A2:4E:C9:F1:4C:13:05:58:5B:6F:94:D5:29:A7:45:3C:A2:AD:E6:70:9A:1B:EC:F0:B2:B8:0A:32:AE:A7:8E:70:BA:BF:97:C5:EE:74:56:58:0F:16:C2:7A:79:BC:38:7C:9F:84:0B:40:A9:37:48:BB:60:37:A6:C2:EA:32:FD:CF:27:61:5A:46:17:B0:A8:9D:BF:FE:2E:38:E9:8A:25:EA:8D:DA:2B:7F:4E:22:75:23:2C:F4:15:68:71:EF:B1:F8:E4:45:34:44:CB:BA:50:A0:70:8C:3F:DC:D7:FF:D8:D2:A3:22:E4:3C:78:89:47:A3:0C:63:F9:CB:96:C4:21:A7:BF:A2:19:BB:70:D3:62:8B:D0:E3:D8:9C:56:77:B4:F4:DC:96:01:C0:B1:56:04:7E:6D:2A:BD:81:19:CA:DE:30:63:AD:E6:06:CC:82:BA:F7:B7:57:E0:64:79:3E:DE:AD:10:D5:DE:D6:57:36:C6:FC:AA:7A:A0:50:B5:4D:BD:6C:C6:96:EA:0A:3D:EB:EA:4C:F3:E9:D2:3D:A4:D7:D8:6F:5C:A2:85:F8:F0" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:38:27" } } 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:38:36 +0000 (0:00:00.678) 0:00:16.484 ******** 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": "56:7D:4D:74:A6:2E:F9:C2:EA:81:6D:AA:99:7E:2F:A5:38:07:28:31" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "C3:CA:34:C1:DA:65:3C:80:16:19:D0:94:22:02:CE:A8:5D:F2:C2:47:3D:3F:EC:12:49:3C:BE:C4:FF:4A:A2:99:A5:44:AB:E5:5E:FB:2A:4B:05:98:0D:A2:4E:C9:F1:4C:13:05:58:5B:6F:94:D5:29:A7:45:3C:A2:AD:E6:70:9A:1B:EC:F0:B2:B8:0A:32:AE:A7:8E:70:BA:BF:97:C5:EE:74:56:58:0F:16:C2:7A:79:BC:38:7C:9F:84:0B:40:A9:37:48:BB:60:37:A6:C2:EA:32:FD:CF:27:61:5A:46:17:B0:A8:9D:BF:FE:2E:38:E9:8A:25:EA:8D:DA:2B:7F:4E:22:75:23:2C:F4:15:68:71:EF:B1:F8:E4:45:34:44:CB:BA:50:A0:70:8C:3F:DC:D7:FF:D8:D2:A3:22:E4:3C:78:89:47:A3:0C:63:F9:CB:96:C4:21:A7:BF:A2:19:BB:70:D3:62:8B:D0:E3:D8:9C:56:77:B4:F4:DC:96:01:C0:B1:56:04:7E:6D:2A:BD:81:19:CA:DE:30:63:AD:E6:06:CC:82:BA:F7:B7:57:E0:64:79:3E:DE:AD:10:D5:DE:D6:57:36:C6:FC:AA:7A:A0:50:B5:4D:BD:6C:C6:96:EA:0A:3D:EB:EA:4C:F3:E9:D2:3D:A4:D7:D8:6F:5C:A2:85:F8:F0" }, "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:38:27" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:38:36 +0000 (0:00:00.041) 0:00:16.526 ******** 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:38:36 +0000 (0:00:00.043) 0:00:16.569 ******** 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:38:36 +0000 (0:00:00.031) 0:00:16.600 ******** 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:38:36 +0000 (0:00:00.042) 0:00:16.643 ******** 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:38:36 +0000 (0:00:00.042) 0:00:16.685 ******** 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:38:36 +0000 (0:00:00.043) 0:00:16.728 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_no_auto_renew.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.058731", "end": "2022-07-06 23:38:36.153336", "rc": 0, "start": "2022-07-06 23:38:36.094605" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 23:38:37 +0000 (0:00:00.435) 0:00:17.164 ******** 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:38:37 +0000 (0:00:00.044) 0:00:17.209 ******** 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:38:37 +0000 (0:00:00.026) 0:00:17.235 ******** 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:38:39 +0000 (0:00:01.912) 0:00:19.148 ******** 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:38:40 +0000 (0:00:00.969) 0:00:20.117 ******** 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:38:40 +0000 (0:00:00.875) 0:00:20.993 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150708.5786905, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2c14746d09a4c5988d6bdebdc33ecc4c2c6fe7ff", "ctime": 1657150708.5746906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60097, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150708.5746906, "nlink": 1, "path": "/etc/pki/tls/certs/defaultcert.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "71", "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:38:41 +0000 (0:00:00.418) 0:00:21.411 ******** 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:38:41 +0000 (0:00:00.032) 0:00:21.443 ******** 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:38:41 +0000 (0:00:00.043) 0:00:21.487 ******** 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:38:41 +0000 (0:00:00.047) 0:00:21.534 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "stat": { "atime": 1657150708.5246906, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "02dc4c282563ff59cf498d556e4654a46348d8d4", "ctime": 1657150708.5746906, "dev": 32, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 60084, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657150708.5746906, "nlink": 1, "path": "/etc/pki/tls/private/defaultcert.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "71", "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:38:41 +0000 (0:00:00.406) 0:00:21.941 ******** 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:38:41 +0000 (0:00:00.031) 0:00:21.973 ******** 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:38:41 +0000 (0:00:00.048) 0:00:22.022 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.208709", "end": "2022-07-06 23:38:41.616010", "rc": 0, "start": "2022-07-06 23:38:41.407301" } 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": "EB:73:FE:A9:17:D8:32:7A:B9:20:CE:50:88:FF:72:4D:CF:A9:E6: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": "B6:5E:85:0E:43:26:C1:11:A8:04:AD:6F:1B:77:76:CB:2B:33:A2:82:F3:23:0C:A2:B3:2B:E8:4E:D1:6D:A8:90:5A:15:0C:E2:8B:4C:A9:F4:92:40:38:FE:BB:A7:FB:9A:55:27:3D:AF:7A:2B:D5:19:5D:94:7D:48:5D:3F:CB:C7:C9:D4:CF:12:EB:E1:1A:66:51:A2:0F:47:7E:2E:5A:71:84:FF:20:08:CA:63:B9:EC:09:8D:83:45:B6:11:7F:80:07:0C:2E:AE:53:8D:F3:08:AD:11:DC:0F:15:6C:9D:B5:8C:B7:4A:A4:C8:99:D0:BF:2C:98:9D:89:EB:80:F8:65:C2:15:43:D0:56:45:DC:12:5C:28:9E:F4:E8:36:5A:4E:D0:D4:2A:6C:0A:88:D6:97:8D:39:0A:E5:B3:7F:0F:12:E9:D9:E7:E2:B9:75:49:CA:15:7B:3D:A6:C6:FF:A3:D1:66:26:BE:A8:BA:84:14:B5:4C:81:49:6D:1A:71:2F:75:9E:9C:D3:EE:E7:12:AA:AC:2C:5B:C4:C0:4C:49:18:12:21:4C:A9:EC:93:31:EF:80:1B:D0:6D:51:2D:9A:A7:0B:B4:A7:61:6B:89:46:03:D1:43:CB:BF:72:06:45:73:9C:2A:D2:B0:6F:46:64:D5:D7:86:66:2D:FC:95:A7:D0:F2" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 23:31:36", "not_valid_before": "2022-07-06 23:38:28" } } 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:38:42 +0000 (0:00:00.606) 0:00:22.628 ******** 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": "EB:73:FE:A9:17:D8:32:7A:B9:20:CE:50:88:FF:72:4D:CF:A9:E6:CC" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "B6:5E:85:0E:43:26:C1:11:A8:04:AD:6F:1B:77:76:CB:2B:33:A2:82:F3:23:0C:A2:B3:2B:E8:4E:D1:6D:A8:90:5A:15:0C:E2:8B:4C:A9:F4:92:40:38:FE:BB:A7:FB:9A:55:27:3D:AF:7A:2B:D5:19:5D:94:7D:48:5D:3F:CB:C7:C9:D4:CF:12:EB:E1:1A:66:51:A2:0F:47:7E:2E:5A:71:84:FF:20:08:CA:63:B9:EC:09:8D:83:45:B6:11:7F:80:07:0C:2E:AE:53:8D:F3:08:AD:11:DC:0F:15:6C:9D:B5:8C:B7:4A:A4:C8:99:D0:BF:2C:98:9D:89:EB:80:F8:65:C2:15:43:D0:56:45:DC:12:5C:28:9E:F4:E8:36:5A:4E:D0:D4:2A:6C:0A:88:D6:97:8D:39:0A:E5:B3:7F:0F:12:E9:D9:E7:E2:B9:75:49:CA:15:7B:3D:A6:C6:FF:A3:D1:66:26:BE:A8:BA:84:14:B5:4C:81:49:6D:1A:71:2F:75:9E:9C:D3:EE:E7:12:AA:AC:2C:5B:C4:C0:4C:49:18:12:21:4C:A9:EC:93:31:EF:80:1B:D0:6D:51:2D:9A:A7:0B:B4:A7:61:6B:89:46:03:D1:43:CB:BF:72:06:45:73:9C:2A:D2:B0:6F:46:64:D5:D7:86:66:2D:FC:95:A7:D0:F2" }, "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:38:28" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 23:38:42 +0000 (0:00:00.044) 0:00:22.673 ******** 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:38:42 +0000 (0:00:00.044) 0:00:22.717 ******** 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:38:42 +0000 (0:00:00.034) 0:00:22.752 ******** 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:38:42 +0000 (0:00:00.046) 0:00:22.799 ******** 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:38:42 +0000 (0:00:00.046) 0:00:22.846 ******** 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:38:42 +0000 (0:00:00.045) 0:00:22.891 ******** ok: [/cache/fedora-35.qcow2.snap] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/defaultcert.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.062768", "end": "2022-07-06 23:38:42.340004", "rc": 0, "start": "2022-07-06 23:38:42.277236" } 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:38:43 +0000 (0:00:00.458) 0:00:23.350 ******** 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=52 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Wednesday 06 July 2022 23:38:43 +0000 (0:00:00.052) 0:00:23.402 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 2.13s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 2.01s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 1.98s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 1.93s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Ensure python3 is installed --------------------------------------------- 1.91s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Gathering Facts --------------------------------------------------------- 1.11s /tmp/tmpswp52mgx/tests/certificate/tests_no_auto_renew.yml:2 ------------------ Install the package, force upgrade -------------------------------------- 1.09s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install the package, force upgrade -------------------------------------- 0.97s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install certreader ------------------------------------------------------ 0.91s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.88s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:18 - fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.86s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Gathering Facts --------------------------------------------------------- 0.82s /tmp/tmpswp52mgx/tests/certificate/tests_no_auto_renew.yml:17 ----------------- Parse certificate ------------------------------------------------------- 0.68s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Parse certificate ------------------------------------------------------- 0.61s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.56s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.56s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.52s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.46s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.44s /tmp/tmpswp52mgx/tests/certificate/tasks/assert_certificate_parameters.yml:132 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.42s /tmp/tmptdk3_2m8/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59