# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* Thursday 18 August 2022 22:09:23 +0000 (0:00:00.024) 0:00:00.024 ******* ok: [sut] TASK [linux-system-roles.certificate : Set version specific variables] ********* Thursday 18 August 2022 22:09:24 +0000 (0:00:01.179) 0:00:01.203 ******* included: /WORKDIR/dist-git-certificate-use_distro_python_cryptography-GEkvSr/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for sut TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** Thursday 18 August 2022 22:09:24 +0000 (0:00:00.038) 0:00:01.242 ******* ok: [sut] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** Thursday 18 August 2022 22:09:25 +0000 (0:00:00.448) 0:00:01.691 ******* skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat_9.1.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.1.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** Thursday 18 August 2022 22:09:25 +0000 (0:00:00.060) 0:00:01.751 ******* changed: [sut] => { "changed": true, "rc": 0, "results": [ "Installed: python3-ply-3.11-14.el9.noarch", "Installed: python3-pyasn1-0.4.8-6.el9.noarch", "Installed: python3-cffi-1.14.5-5.el9.x86_64", "Installed: python3-pycparser-2.20-6.el9.noarch", "Installed: python3-cryptography-36.0.1-2.el9.x86_64" ] } TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** Thursday 18 August 2022 22:09:28 +0000 (0:00:03.110) 0:00:04.861 ******* changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "rc": 0, "results": [ "Installed: nss-softokn-3.79.0-11.el9_0.x86_64", "Installed: certmonger-0.79.14-7.el9.x86_64", "Installed: nss-softokn-freebl-3.79.0-11.el9_0.x86_64", "Installed: nss-sysinit-3.79.0-11.el9_0.x86_64", "Installed: nss-util-3.79.0-11.el9_0.x86_64", "Installed: nspr-4.34.0-11.el9_0.x86_64", "Installed: nss-3.79.0-11.el9_0.x86_64" ] } TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** Thursday 18 August 2022 22:09:32 +0000 (0:00:03.669) 0:00:08.531 ******* changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** Thursday 18 August 2022 22:09:32 +0000 (0:00:00.453) 0:00:08.985 ******* changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** Thursday 18 August 2022 22:09:32 +0000 (0:00:00.300) 0:00:09.285 ******* changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "basic.target system.slice systemd-journald.socket network.target syslog.target sysinit.target dbus.socket dbus-broker.service", "AllowIsolate": "no", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "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": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "no", "ConditionTimestampMonotonic": "0", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestampMonotonic": "0", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "0", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "65536", "LimitMEMLOCKSoft": "65536", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "13959", "LimitNPROCSoft": "13959", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "13959", "LimitSIGPENDINGSoft": "13959", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "0", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "[not set]", "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", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestampMonotonic": "0", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "[not set]", "TasksMax": "22334", "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": "disabled", "UtmpMode": "init", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "infinity" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ Thursday 18 August 2022 22:09:34 +0000 (0:00:01.108) 0:00:10.394 ******* changed: [sut] => (item={'name': 'mycert_key_size', 'dns': 'www.example.com', 'ca': 'self-sign', 'key_size': 4096}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "key_size": 4096, "name": "mycert_key_size" } } MSG: Certificate requested (new). PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* Thursday 18 August 2022 22:09:36 +0000 (0:00:02.740) 0:00:13.134 ******* ok: [sut] TASK [Verify each certificate] ************************************************* Thursday 18 August 2022 22:09:37 +0000 (0:00:00.720) 0:00:13.855 ******* included: /WORKDIR/dist-git-certificate-use_distro_python_cryptography-GEkvSr/tests/tasks/assert_certificate_parameters.yml for sut => (item={'path': '/etc/pki/tls/certs/mycert_key_size.crt', 'key_path': '/etc/pki/tls/private/mycert_key_size.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}], 'key_size': 4096}) TASK [Set virtualenv_path] ***************************************************** Thursday 18 August 2022 22:09:37 +0000 (0:00:00.056) 0:00:13.912 ******* ok: [sut] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* Thursday 18 August 2022 22:09:37 +0000 (0:00:00.042) 0:00:13.955 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install the package, force upgrade] ************************************** Thursday 18 August 2022 22:09:38 +0000 (0:00:01.062) 0:00:15.017 ******* changed: [sut] => { "changed": true, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "-U", "pip" ], "name": [ "pip" ], "requirements": null, "state": "latest", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Requirement already satisfied: pip in ./certificate-tests-venv/lib/python3.9/site-packages (21.2.3) Collecting pip Downloading pip-22.2.2-py3-none-any.whl (2.0 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 21.2.3 Uninstalling pip-21.2.3: Successfully uninstalled pip-21.2.3 Successfully installed pip-22.2.2 TASK [Ensure Python's cryptography is installed] ******************************* Thursday 18 August 2022 22:09:45 +0000 (0:00:06.652) 0:00:21.670 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Install certreader] ****************************************************** Thursday 18 August 2022 22:09:46 +0000 (0:00:01.058) 0:00:22.729 ******* changed: [sut] => { "changed": true, "cmd": [ "/tmp/certificate-tests-venv/bin/pip3", "install", "certreader>=0.1.1" ], "name": [ "certreader>=0.1.1" ], "requirements": null, "state": "present", "version": null, "virtualenv": "/tmp/certificate-tests-venv" } STDOUT: Collecting certreader>=0.1.1 Downloading certreader-0.1.1.tar.gz (4.4 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting cryptography Downloading cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl (4.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 16.4 MB/s eta 0:00:00 Collecting pyasn1 Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 13.5 MB/s eta 0:00:00 Collecting pyyaml Downloading PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 661.8/661.8 kB 21.5 MB/s eta 0:00:00 Collecting cffi>=1.12 Downloading cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.2/441.2 kB 22.1 MB/s eta 0:00:00 Collecting pycparser Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 15.5 MB/s eta 0:00:00 Using legacy 'setup.py install' for certreader, since package 'wheel' is not installed. Installing collected packages: pyasn1, pyyaml, pycparser, cffi, cryptography, certreader Running setup.py install for certreader: started Running setup.py install for certreader: finished with status 'done' Successfully installed certreader-0.1.1 cffi-1.15.1 cryptography-37.0.4 pyasn1-0.4.8 pycparser-2.21 pyyaml-6.0 TASK [Retrieve certificate file stats] ***************************************** Thursday 18 August 2022 22:09:50 +0000 (0:00:03.658) 0:00:26.387 ******* ok: [sut] => { "changed": false, "stat": { "atime": 1660860576.6221972, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "947e24495e7dd864892f54c4945442e17aab01ea", "ctime": 1660860576.6191971, "dev": 51716, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 16812843, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1660860576.6191971, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_key_size.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1643, "uid": 0, "version": "3040225234", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** Thursday 18 August 2022 22:09:50 +0000 (0:00:00.436) 0:00:26.824 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* Thursday 18 August 2022 22:09:50 +0000 (0:00:00.052) 0:00:26.877 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** Thursday 18 August 2022 22:09:50 +0000 (0:00:00.078) 0:00:26.955 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* Thursday 18 August 2022 22:09:50 +0000 (0:00:00.116) 0:00:27.071 ******* ok: [sut] => { "changed": false, "stat": { "atime": 1660860576.4951997, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "669fe17dd9d032ae1f806d57f6392b44ae02d988", "ctime": 1660860576.6191971, "dev": 51716, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 8401275, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1660860576.6191971, "nlink": 1, "path": "/etc/pki/tls/private/mycert_key_size.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 3272, "uid": 0, "version": "2609371100", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** Thursday 18 August 2022 22:09:51 +0000 (0:00:00.325) 0:00:27.397 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** Thursday 18 August 2022 22:09:51 +0000 (0:00:00.053) 0:00:27.451 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* Thursday 18 August 2022 22:09:51 +0000 (0:00:00.075) 0:00:27.527 ******* ok: [sut] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_key_size.crt" ], "delta": "0:00:00.277565", "end": "2022-08-18 22:09:51.943348", "rc": 0, "start": "2022-08-18 22:09:51.665783" } 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": "AD:ED:75:59:54:EA:00:A7:16:3F:64:F3:3E:64:7D:D6:CA:04:54:58", "critical": false }, "authorityKeyIdentifier": { "value": "CC:C0:E5:08:50:78:5A:02:EA:6C:A8:45:2C:31:BE:BA:A5:75:4A:EA", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9B:B9:21:68:57:78:7A:95:2F:77:68:9B:70:C6:FC:DA:04:A4:6B:8A:B9:53:FB:27:8D:2B:1B:D2:C1:D1:AF:7F:18:39:E0:9F:5E:0E:8B:E3:80:20:DB:EB:57:1E:5E:63:DE:EF:60:84:E7:7A:8C:2B:CA:A6:2A:78:84:EF:32:A4:95:2C:C1:FD:DF:EC:AC:EF:35:9B:AB:2C:78:0A:55:4B:39:0B:E6:C3:0A:77:CA:AF:F9:35:0A:50:4F:25:D0:5F:AC:25:B7:D5:09:EE:BE:3D:81:69:E8:7B:5F:4C:18:DE:B0:EC:A9:AE:BB:75:E0:9C:7F:92:32:B7:08:5C:84:CE:BF:25:29:57:25:D3:F6:6D:FD:66:AF:E5:EE:D0:EC:7C:0B:D2:E6:E0:20:04:ED:9C:FD:1E:C8:71:9F:78:BB:4B:63:05:0A:42:9F:68:B0:C2:87:90:09:DE:D8:62:79:60:93:A8:CA:04:E9:DE:86:96:AD:47:B5:7D:AD:28:4B:6F:AE:DE:04:13:64:15:EF:02:9B:07:20:22:94:82:72:EA:2C:24:E5:4A:2B:97:62:E3:F8:B6:E4:96:B6:47:39:53:D0:91:46:7F:CD:0F:53:A5:3E:2C:25:4D:8B:70:C4:52:83:DC:6C:48:36:C5:0F:89:EB:C8:D5:EE:74:0D:F3:BB" }, "key_size": 4096, "validity": { "not_valid_after": "2023-08-18 22:09:34", "not_valid_before": "2022-08-18 22:09:36" } } TASK [Load certificate YAML to cert_issued variable] *************************** Thursday 18 August 2022 22:09:51 +0000 (0:00:00.816) 0:00:28.343 ******* ok: [sut] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "CC:C0:E5:08:50:78:5A:02:EA:6C:A8:45:2C:31:BE:BA:A5:75:4A:EA" }, "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": "AD:ED:75:59:54:EA:00:A7:16:3F:64:F3:3E:64:7D:D6:CA:04:54:58" } }, "key_size": 4096, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9B:B9:21:68:57:78:7A:95:2F:77:68:9B:70:C6:FC:DA:04:A4:6B:8A:B9:53:FB:27:8D:2B:1B:D2:C1:D1:AF:7F:18:39:E0:9F:5E:0E:8B:E3:80:20:DB:EB:57:1E:5E:63:DE:EF:60:84:E7:7A:8C:2B:CA:A6:2A:78:84:EF:32:A4:95:2C:C1:FD:DF:EC:AC:EF:35:9B:AB:2C:78:0A:55:4B:39:0B:E6:C3:0A:77:CA:AF:F9:35:0A:50:4F:25:D0:5F:AC:25:B7:D5:09:EE:BE:3D:81:69:E8:7B:5F:4C:18:DE:B0:EC:A9:AE:BB:75:E0:9C:7F:92:32:B7:08:5C:84:CE:BF:25:29:57:25:D3:F6:6D:FD:66:AF:E5:EE:D0:EC:7C:0B:D2:E6:E0:20:04:ED:9C:FD:1E:C8:71:9F:78:BB:4B:63:05:0A:42:9F:68:B0:C2:87:90:09:DE:D8:62:79:60:93:A8:CA:04:E9:DE:86:96:AD:47:B5:7D:AD:28:4B:6F:AE:DE:04:13:64:15:EF:02:9B:07:20:22:94:82:72:EA:2C:24:E5:4A:2B:97:62:E3:F8:B6:E4:96:B6:47:39:53:D0:91:46:7F:CD:0F:53:A5:3E:2C:25:4D:8B:70:C4:52:83:DC:6C:48:36:C5:0F:89:EB:C8:D5:EE:74:0D:F3:BB" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-08-18 22:09:34", "not_valid_before": "2022-08-18 22:09:36" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** Thursday 18 August 2022 22:09:52 +0000 (0:00:00.098) 0:00:28.442 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** Thursday 18 August 2022 22:09:52 +0000 (0:00:00.121) 0:00:28.563 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* Thursday 18 August 2022 22:09:52 +0000 (0:00:00.097) 0:00:28.661 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** Thursday 18 August 2022 22:09:52 +0000 (0:00:00.081) 0:00:28.743 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** Thursday 18 August 2022 22:09:52 +0000 (0:00:00.072) 0:00:28.815 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ Thursday 18 August 2022 22:09:52 +0000 (0:00:00.109) 0:00:28.925 ******* ok: [sut] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_key_size.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.053672", "end": "2022-08-18 22:09:52.885589", "rc": 0, "start": "2022-08-18 22:09:52.831917" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** Thursday 18 August 2022 22:09:52 +0000 (0:00:00.361) 0:00:29.287 ******* ok: [sut] => { "changed": false } MSG: All assertions passed PLAY RECAP ********************************************************************* sut : ok=32 changed=8 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Thursday 18 August 2022 22:09:53 +0000 (0:00:00.141) 0:00:29.428 ******* =============================================================================== Install the package, force upgrade -------------------------------------- 6.65s linux-system-roles.certificate : Ensure provider packages are installed --- 3.67s Install certreader ------------------------------------------------------ 3.66s linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 3.11s linux-system-roles.certificate : Ensure certificate requests ------------ 2.74s Gathering Facts --------------------------------------------------------- 1.18s linux-system-roles.certificate : Ensure provider service is running ----- 1.11s Ensure python3 is installed --------------------------------------------- 1.06s Ensure Python's cryptography is installed ------------------------------- 1.06s Parse certificate ------------------------------------------------------- 0.82s Gathering Facts --------------------------------------------------------- 0.72s linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.45s linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.45s Retrieve certificate file stats ----------------------------------------- 0.44s Retrieve auto-renew flag ------------------------------------------------ 0.36s Retrieve key file stats ------------------------------------------------- 0.33s linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.30s Verify certificate auto-renew flag -------------------------------------- 0.14s Verify certificate subject ---------------------------------------------- 0.12s Verify certificate permissions ------------------------------------------ 0.12s ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- [DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callbacks_enabled instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ---^---^---^---^---^---