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/tmpke2c_s6q 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: rhel-7_setup.yml ***************************************************** 1 plays in /cache/rhel-7_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-7_setup.yml:5 Wednesday 06 July 2022 22:30:23 +0000 (0:00:00.017) 0:00:00.018 ******** ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:30:24 +0000 (0:00:01.414) 0:00:01.432 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.41s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 22:30:24 +0000 (0:00:00.020) 0:00:01.452 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [linux-system-roles.certificate : Set version specific variables] ********* task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:30:25 +0000 (0:00:00.924) 0:00:02.377 ******** included: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml for /cache/rhel-7.qcow2 TASK [linux-system-roles.certificate : Ensure ansible_facts used by role] ****** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:30:25 +0000 (0:00:00.024) 0:00:02.402 ******** ok: [/cache/rhel-7.qcow2] TASK [linux-system-roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:8 Wednesday 06 July 2022 22:30:25 +0000 (0:00:00.391) 0:00:02.793 ******** skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-7.qcow2] => (item=RedHat_7.yml) => { "ansible_facts": { "__certificate_default_directory": "/etc/pki/tls", "__certificate_packages": [ "python-pyasn1", "python-cryptography", "python-dbus" ] }, "ansible_included_var_files": [ "/tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/vars/RedHat_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.yml" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:30:25 +0000 (0:00:00.052) 0:00:02.845 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python2-pyasn1-0.1.9-7.el7.noarch providing python-pyasn1 is already installed", "python2-cryptography-1.7.2-2.el7.x86_64 providing python-cryptography is already installed", "dbus-python-1.1.1-9.el7.x86_64 providing python-dbus is already installed" ] } TASK [linux-system-roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:30:27 +0000 (0:00:01.103) 0:00:03.949 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [ "certmonger-0.78.4-17.el7_9.x86_64 providing certmonger is already installed" ] } TASK [linux-system-roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:30:27 +0000 (0:00:00.567) 0:00:04.516 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:30:28 +0000 (0:00:00.460) 0:00:04.977 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.certificate : Ensure provider service is running] ***** task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:30:28 +0000 (0:00:00.344) 0:00:05.321 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 18:25:22 EDT", "ActiveEnterTimestampMonotonic": "168479309", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "syslog.target basic.target systemd-journald.socket network.target dbus.service system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:25:22 EDT", "AssertTimestampMonotonic": "168468173", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "18446744073709551615", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "18446744073709551615", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 18:25:22 EDT", "ConditionTimestampMonotonic": "168468173", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "EnvironmentFile": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "12368", "ExecMainStartTimestamp": "Wed 2022-07-06 18:25:22 EDT", "ExecMainStartTimestampMonotonic": "168468803", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /var/run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 18:25:22 EDT", "InactiveExitTimestampMonotonic": "168468833", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "65536", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "4096", "LimitNPROC": "14956", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "14956", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "12368", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/var/run/certmonger.pid", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target system.slice", "Restart": "no", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 18:25:22 EDT", "WatchdogTimestampMonotonic": "168479205", "WatchdogUSec": "0" } } TASK [linux-system-roles.certificate : Ensure certificate requests] ************ task path: /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Wednesday 06 July 2022 22:30:29 +0000 (0:00:00.674) 0:00:05.996 ******** changed: [/cache/rhel-7.qcow2] => (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/rhel-7.qcow2] => (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/rhel-7.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 22:30:30 +0000 (0:00:01.759) 0:00:07.755 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 22:30:31 +0000 (0:00:00.715) 0:00:08.471 ******** included: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (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/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (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/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:30:31 +0000 (0:00:00.052) 0:00:08.523 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:30:31 +0000 (0:00:00.061) 0:00:08.585 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python3-3.6.8-18.el7.x86_64 providing python3 is already installed" ] } TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:30:32 +0000 (0:00:00.563) 0:00:09.148 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:30:33 +0000 (0:00:01.083) 0:00:10.232 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:30:34 +0000 (0:00:00.855) 0:00:11.087 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146629.5497878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "4b35dfbda9d4e84760ca75cd99ed45af59023bf4", "ctime": 1657146629.5467877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883798, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146629.5467877, "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": "1179842695", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:30:34 +0000 (0:00:00.439) 0:00:11.526 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:30:34 +0000 (0:00:00.061) 0:00:11.588 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 22:30:34 +0000 (0:00:00.077) 0:00:11.666 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 22:30:34 +0000 (0:00:00.043) 0:00:11.709 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146629.5007877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "f6f25ce1cde36c0238e92acfd3163d54a2705126", "ctime": 1657146629.5467877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883797, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146629.5467877, "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": "18446744072072009689", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.321) 0:00:12.031 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.032) 0:00:12.064 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.046) 0:00:12.110 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.256732", "end": "2022-07-06 18:30:35.399310", "rc": 0, "start": "2022-07-06 18:30:35.142578" } 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": "A1:16:D5:B6:71:6D:01:C7:AA:A3:FB:BD:21:0F:AA:9C:27:34:32:06", "critical": false }, "authorityKeyIdentifier": { "value": "5C:B5:F9:EF:37:B6:3A:00:66:75:0F:29:55:98:7E:09:7A:9C:E0:10", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AD:15:FB:AE:47:21:D1:C5:EF:2B:8B:D1:59:BC:D8:A2:81:A9:B7:51:15:C5:90:1D:47:29:46:B4:69:34:23:C8:79:C5:AC:62:94:C6:11:BC:52:40:C1:E8:E4:19:A5:A4:55:97:71:81:84:13:05:C9:A9:3B:41:AA:FF:44:31:F5:99:A6:95:1A:42:9E:69:79:69:A5:27:10:AB:2C:BC:A7:D4:95:04:EC:87:DE:C3:D3:7C:A0:6F:7F:2B:19:DB:40:C2:36:69:09:5B:ED:F9:2C:A6:23:4A:51:00:28:20:A7:BE:14:A5:0D:7E:26:23:BD:9D:75:CD:1A:A2:3C:BC:7C:08:D3:F6:0C:7F:66:C9:37:CA:B4:1C:B4:BD:96:58:0B:DB:FE:19:27:AE:5E:E8:E3:94:37:58:76:1C:DE:E5:19:B9:92:9F:63:73:98:B6:4C:7F:A9:F9:4F:A9:44:E5:BF:BD:EB:08:08:FA:44:3A:B1:F7:5E:C6:5D:35:DA:CF:AE:F2:02:74:62:2E:EE:58:DC:F4:11:C1:EE:7D:97:56:D7:85:B9:D2:95:AF:6C:07:84:09:0F:93:C7:7F:EA:A5:C8:B3:7D:E2:2E:91:06:0D:85:94:23:B0:24:07:D1:CE:C3:7F:96:95:67:85:7B:A6:DF:CE:13:B4:74:9C:69:3A:BE" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:30:29" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.652) 0:00:12.762 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5C:B5:F9:EF:37:B6:3A:00:66:75:0F:29:55:98:7E:09:7A:9C:E0:10" }, "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": "A1:16:D5:B6:71:6D:01:C7:AA:A3:FB:BD:21:0F:AA:9C:27:34:32:06" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "AD:15:FB:AE:47:21:D1:C5:EF:2B:8B:D1:59:BC:D8:A2:81:A9:B7:51:15:C5:90:1D:47:29:46:B4:69:34:23:C8:79:C5:AC:62:94:C6:11:BC:52:40:C1:E8:E4:19:A5:A4:55:97:71:81:84:13:05:C9:A9:3B:41:AA:FF:44:31:F5:99:A6:95:1A:42:9E:69:79:69:A5:27:10:AB:2C:BC:A7:D4:95:04:EC:87:DE:C3:D3:7C:A0:6F:7F:2B:19:DB:40:C2:36:69:09:5B:ED:F9:2C:A6:23:4A:51:00:28:20:A7:BE:14:A5:0D:7E:26:23:BD:9D:75:CD:1A:A2:3C:BC:7C:08:D3:F6:0C:7F:66:C9:37:CA:B4:1C:B4:BD:96:58:0B:DB:FE:19:27:AE:5E:E8:E3:94:37:58:76:1C:DE:E5:19:B9:92:9F:63:73:98:B6:4C:7F:A9:F9:4F:A9:44:E5:BF:BD:EB:08:08:FA:44:3A:B1:F7:5E:C6:5D:35:DA:CF:AE:F2:02:74:62:2E:EE:58:DC:F4:11:C1:EE:7D:97:56:D7:85:B9:D2:95:AF:6C:07:84:09:0F:93:C7:7F:EA:A5:C8:B3:7D:E2:2E:91:06:0D:85:94:23:B0:24:07:D1:CE:C3:7F:96:95:67:85:7B:A6:DF:CE:13:B4:74:9C:69:3A:BE" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:30:29" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.043) 0:00:12.806 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.041) 0:00:12.847 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.028) 0:00:12.876 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 22:30:35 +0000 (0:00:00.039) 0:00:12.915 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 22:30:36 +0000 (0:00:00.039) 0:00:12.955 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:30:36 +0000 (0:00:00.041) 0:00:12.996 ******** ok: [/cache/rhel-7.qcow2] => { "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.082307", "end": "2022-07-06 18:30:36.023132", "rc": 0, "start": "2022-07-06 18:30:35.940825" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:30:36 +0000 (0:00:00.387) 0:00:13.384 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:30:36 +0000 (0:00:00.046) 0:00:13.431 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:30:36 +0000 (0:00:00.027) 0:00:13.458 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python3-3.6.8-18.el7.x86_64 providing python3 is already installed" ] } TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:30:37 +0000 (0:00:00.551) 0:00:14.010 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:30:38 +0000 (0:00:00.959) 0:00:14.969 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:30:38 +0000 (0:00:00.817) 0:00:15.786 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146630.3337877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a050656a085c7f4fb6500758047fc0bb58429508", "ctime": 1657146630.3307877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883802, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146630.3307877, "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": "504050062", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.315) 0:00:16.102 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.033) 0:00:16.135 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:49 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.045) 0:00:16.180 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:55 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.043) 0:00:16.223 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146630.2867877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "d1668c23bb8aff07633a1ee6ce17a148c7470301", "ctime": 1657146630.3307877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883801, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146630.3307877, "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": "18446744073420242852", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:60 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.325) 0:00:16.549 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:66 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.032) 0:00:16.581 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:78 Wednesday 06 July 2022 22:30:39 +0000 (0:00:00.045) 0:00:16.627 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.246925", "end": "2022-07-06 18:30:39.825536", "rc": 0, "start": "2022-07-06 18:30:39.578611" } 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": "CB:E3:39:B1:95:B9:C5:4B:C9:FD:93:D8:36:43:C7:75:B9:C5:D2:DB", "critical": false }, "authorityKeyIdentifier": { "value": "5C:B5:F9:EF:37:B6:3A:00:66:75:0F:29:55:98:7E:09:7A:9C:E0:10", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "44:16:7C:80:98:23:96:2B:5F:7D:6C:23:87:9D:46:63:C5:E5:45:1E:A1:31:0B:C1:C0:1E:54:E9:16:09:84:0A:6E:06:24:8F:8B:C3:74:EA:03:68:2F:5B:90:51:02:68:2F:6A:FB:5E:2D:90:DA:8A:C6:41:D5:0A:A2:DB:46:6C:38:0A:6A:0D:FC:67:A1:8E:C2:6B:CF:97:EF:C6:C2:64:E6:C6:7E:4C:84:E1:80:3A:56:A8:D2:1E:91:53:C3:00:75:33:10:77:88:2D:1B:78:85:87:49:67:E3:9A:17:B8:02:78:0A:3E:C8:A4:3E:F4:0E:F4:E2:A1:D0:2E:67:53:C0:DA:BF:60:AA:2E:46:75:FE:D8:D4:05:5E:9E:FF:E7:CC:71:4C:7A:BE:2E:2D:2A:26:EE:36:D8:CA:C6:4B:FF:38:40:F6:72:2D:4A:1A:CB:FA:8D:79:15:94:07:4E:55:9F:76:F0:E6:AF:70:38:D1:94:89:8C:93:0D:2D:3A:65:EC:2D:E7:30:41:1D:93:95:63:36:12:4E:79:4F:35:73:7F:CD:EF:03:E6:EC:71:D0:EB:1E:9D:3E:C7:42:A1:6E:A7:42:AE:87:E6:C5:A2:C0:39:45:5D:48:36:D4:DA:BC:CC:5E:19:77:B7:D2:52:17:F0:15:D0:3C:93:03:22:C7" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:30:30" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.561) 0:00:17.189 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "5C:B5:F9:EF:37:B6:3A:00:66:75:0F:29:55:98:7E:09:7A:9C:E0:10" }, "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": "CB:E3:39:B1:95:B9:C5:4B:C9:FD:93:D8:36:43:C7:75:B9:C5:D2:DB" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "44:16:7C:80:98:23:96:2B:5F:7D:6C:23:87:9D:46:63:C5:E5:45:1E:A1:31:0B:C1:C0:1E:54:E9:16:09:84:0A:6E:06:24:8F:8B:C3:74:EA:03:68:2F:5B:90:51:02:68:2F:6A:FB:5E:2D:90:DA:8A:C6:41:D5:0A:A2:DB:46:6C:38:0A:6A:0D:FC:67:A1:8E:C2:6B:CF:97:EF:C6:C2:64:E6:C6:7E:4C:84:E1:80:3A:56:A8:D2:1E:91:53:C3:00:75:33:10:77:88:2D:1B:78:85:87:49:67:E3:9A:17:B8:02:78:0A:3E:C8:A4:3E:F4:0E:F4:E2:A1:D0:2E:67:53:C0:DA:BF:60:AA:2E:46:75:FE:D8:D4:05:5E:9E:FF:E7:CC:71:4C:7A:BE:2E:2D:2A:26:EE:36:D8:CA:C6:4B:FF:38:40:F6:72:2D:4A:1A:CB:FA:8D:79:15:94:07:4E:55:9F:76:F0:E6:AF:70:38:D1:94:89:8C:93:0D:2D:3A:65:EC:2D:E7:30:41:1D:93:95:63:36:12:4E:79:4F:35:73:7F:CD:EF:03:E6:EC:71:D0:EB:1E:9D:3E:C7:42:A1:6E:A7:42:AE:87:E6:C5:A2:C0:39:45:5D:48:36:D4:DA:BC:CC:5E:19:77:B7:D2:52:17:F0:15:D0:3C:93:03:22:C7" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:30:30" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.043) 0:00:17.232 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:96 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.043) 0:00:17.275 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:105 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.031) 0:00:17.306 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:112 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.042) 0:00:17.349 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:125 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.042) 0:00:17.391 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.043) 0:00:17.435 ******** ok: [/cache/rhel-7.qcow2] => { "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.067391", "end": "2022-07-06 18:30:40.447722", "rc": 0, "start": "2022-07-06 18:30:40.380331" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.383) 0:00:17.818 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=54 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:30:40 +0000 (0:00:00.076) 0:00:17.895 ******** =============================================================================== linux-system-roles.certificate : Ensure certificate requests ------------ 1.76s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 set up internal repositories -------------------------------------------- 1.41s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.10s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Install the package, force upgrade -------------------------------------- 1.08s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 ------------- Install the package, force upgrade -------------------------------------- 0.96s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 0.92s /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml:2 ------------------------------ Install certreader ------------------------------------------------------ 0.86s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 ------------- Install certreader ------------------------------------------------------ 0.82s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.72s /tmp/tmpjbt6cq54/tests/tests_no_auto_renew.yml:17 ----------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.67s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:88 - Parse certificate ------------------------------------------------------- 0.65s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:78 ------------- linux-system-roles.certificate : Ensure provider packages are installed --- 0.57s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 0.56s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:6 -------------- Parse certificate ------------------------------------------------------- 0.56s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:78 ------------- Ensure python3 is installed --------------------------------------------- 0.55s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.46s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.44s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.39s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.39s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:141 ------------ Retrieve auto-renew flag ------------------------------------------------ 0.38s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:141 ------------ 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/tmpke2c_s6q 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: rhel-7_setup.yml ***************************************************** 1 plays in /cache/rhel-7_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-7_setup.yml:5 Wednesday 06 July 2022 22:40:03 +0000 (0:00:00.018) 0:00:00.018 ******** ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-7.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:40:04 +0000 (0:00:01.428) 0:00:01.447 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.43s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_no_auto_renew.yml ********************************************** 2 plays in /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml:2 Wednesday 06 July 2022 22:40:04 +0000 (0:00:00.022) 0:00:01.469 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Wednesday 06 July 2022 22:40:05 +0000 (0:00:00.933) 0:00:02.403 ******** included: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for /cache/rhel-7.qcow2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Wednesday 06 July 2022 22:40:05 +0000 (0:00:00.027) 0:00:02.430 ******** ok: [/cache/rhel-7.qcow2] TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:7 Wednesday 06 July 2022 22:40:06 +0000 (0:00:00.412) 0:00:02.842 ******** skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-7.qcow2] => (item=RedHat_7.yml) => { "ansible_facts": { "__certificate_default_directory": "/etc/pki/tls", "__certificate_packages": [ "python-pyasn1", "python-cryptography", "python-dbus" ] }, "ansible_included_var_files": [ "/tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/RedHat_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.yml" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Wednesday 06 July 2022 22:40:06 +0000 (0:00:00.051) 0:00:02.894 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python2-pyasn1-0.1.9-7.el7.noarch providing python-pyasn1 is already installed", "python2-cryptography-1.7.2-2.el7.x86_64 providing python-cryptography is already installed", "dbus-python-1.1.1-9.el7.x86_64 providing python-dbus is already installed" ] } TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Wednesday 06 July 2022 22:40:07 +0000 (0:00:01.138) 0:00:04.033 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "rc": 0, "results": [ "certmonger-0.78.4-17.el7_9.x86_64 providing certmonger is already installed" ] } TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Wednesday 06 July 2022 22:40:08 +0000 (0:00:00.569) 0:00:04.603 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Wednesday 06 July 2022 22:40:08 +0000 (0:00:00.475) 0:00:05.078 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Wednesday 06 July 2022 22:40:08 +0000 (0:00:00.349) 0:00:05.427 ******** ok: [/cache/rhel-7.qcow2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": false, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestamp": "Wed 2022-07-06 18:34:59 EDT", "ActiveEnterTimestampMonotonic": "168076552", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "basic.target systemd-journald.socket dbus.service syslog.target network.target system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Wed 2022-07-06 18:34:59 EDT", "AssertTimestampMonotonic": "168065283", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "18446744073709551615", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "18446744073709551615", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "CollectMode": "inactive", "ConditionResult": "yes", "ConditionTimestamp": "Wed 2022-07-06 18:34:59 EDT", "ConditionTimestampMonotonic": "168065282", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/certmonger.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "EnvironmentFile": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "12367", "ExecMainStartTimestamp": "Wed 2022-07-06 18:34:59 EDT", "ExecMainStartTimestampMonotonic": "168065868", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /var/run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Wed 2022-07-06 18:34:59 EDT", "InactiveExitTimestampMonotonic": "168065897", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "65536", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "4096", "LimitNPROC": "14956", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "14956", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "12367", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PIDFile": "/var/run/certmonger.pid", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target system.slice", "Restart": "no", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "WantedBy": "multi-user.target", "WatchdogTimestamp": "Wed 2022-07-06 18:34:59 EDT", "WatchdogTimestampMonotonic": "168076513", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Wednesday 06 July 2022 22:40:09 +0000 (0:00:00.666) 0:00:06.094 ******** changed: [/cache/rhel-7.qcow2] => (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/rhel-7.qcow2] => (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/rhel-7.qcow2 META: ran handlers META: ran handlers PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml:17 Wednesday 06 July 2022 22:40:11 +0000 (0:00:01.891) 0:00:07.985 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml:42 Wednesday 06 July 2022 22:40:12 +0000 (0:00:00.682) 0:00:08.668 ******** included: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (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/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (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/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:40:12 +0000 (0:00:00.044) 0:00:08.713 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:40:12 +0000 (0:00:00.030) 0:00:08.743 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python3-3.6.8-18.el7.x86_64 providing python3 is already installed" ] } TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:40:12 +0000 (0:00:00.591) 0:00:09.335 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:40:13 +0000 (0:00:01.077) 0:00:10.413 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:40:14 +0000 (0:00:00.797) 0:00:11.210 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147209.4523168, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "44db8978f5c680d488ccc24dd91dbf48f644aed0", "ctime": 1657147209.4483166, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884917, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147209.4483166, "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": "18446744073449365951", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.420) 0:00:11.631 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.031) 0:00:11.662 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.047) 0:00:11.710 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.042) 0:00:11.752 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147209.4043167, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "7484c31a6ac0dc4d61e7d8ae561e490703b8b7d6", "ctime": 1657147209.4483166, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884916, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147209.4483166, "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": "146022437", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.321) 0:00:12.074 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.029) 0:00:12.104 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 22:40:15 +0000 (0:00:00.047) 0:00:12.151 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_no_auto_renew.crt" ], "delta": "0:00:00.253822", "end": "2022-07-06 18:40:15.212756", "rc": 0, "start": "2022-07-06 18:40:14.958934" } 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": "C4:CF:EF:1F:B0:83:19:A1:23:E0:88:C1:C1:4C:9A:28:2D:19:30:71", "critical": false }, "authorityKeyIdentifier": { "value": "AA:FA:3B:D5:1D:F9:BA:48:A3:9E:42:C6:70:FF:42:C3:C1:C4:59:A8", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9D:3A:E7:19:8C:B7:9C:20:C2:6A:1F:38:8D:D9:D7:A5:4F:88:56:A9:89:71:05:C1:03:E2:0C:DC:00:9E:A3:77:DB:C8:B1:BA:BB:40:ED:C6:CE:4D:AB:21:45:04:24:D1:C2:1A:47:EA:2E:61:99:40:4E:BC:D6:12:6C:03:5E:E0:07:7D:70:69:B7:CA:D6:99:24:89:81:65:28:A2:CF:13:EE:C0:2D:DE:2C:90:52:42:6F:92:C1:0C:31:75:7B:62:E4:1E:C9:F8:FF:AA:D0:64:58:9F:6A:BA:72:BF:28:2B:2C:9F:1C:9C:99:FD:B3:EA:B2:3D:1E:98:1D:97:B7:F1:E6:FC:C7:EC:9D:18:C0:60:B2:C0:96:E7:FD:B6:40:A3:8C:82:19:94:01:47:29:8E:EB:D0:97:62:78:F7:AE:CF:10:92:28:DB:4E:85:26:96:F5:3F:A9:0E:ED:8E:C5:12:9E:EC:6D:81:58:CA:CC:25:35:5D:07:5B:42:A2:B7:7A:2D:B5:B4:87:55:83:17:32:2E:7C:87:26:9C:6B:8F:45:6C:78:57:E7:19:ED:45:6C:3B:5E:AE:1A:3D:58:5C:F1:AF:35:D3:F5:87:E0:F8:12:A0:59:FB:E7:F0:8F:86:0D:3E:27:07:ED:98:F9:09:03:E9:BC:6A:66:A2:3D:23:D1" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:40:09" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.657) 0:00:12.809 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "AA:FA:3B:D5:1D:F9:BA:48:A3:9E:42:C6:70:FF:42:C3:C1:C4:59:A8" }, "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": "C4:CF:EF:1F:B0:83:19:A1:23:E0:88:C1:C1:4C:9A:28:2D:19:30:71" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9D:3A:E7:19:8C:B7:9C:20:C2:6A:1F:38:8D:D9:D7:A5:4F:88:56:A9:89:71:05:C1:03:E2:0C:DC:00:9E:A3:77:DB:C8:B1:BA:BB:40:ED:C6:CE:4D:AB:21:45:04:24:D1:C2:1A:47:EA:2E:61:99:40:4E:BC:D6:12:6C:03:5E:E0:07:7D:70:69:B7:CA:D6:99:24:89:81:65:28:A2:CF:13:EE:C0:2D:DE:2C:90:52:42:6F:92:C1:0C:31:75:7B:62:E4:1E:C9:F8:FF:AA:D0:64:58:9F:6A:BA:72:BF:28:2B:2C:9F:1C:9C:99:FD:B3:EA:B2:3D:1E:98:1D:97:B7:F1:E6:FC:C7:EC:9D:18:C0:60:B2:C0:96:E7:FD:B6:40:A3:8C:82:19:94:01:47:29:8E:EB:D0:97:62:78:F7:AE:CF:10:92:28:DB:4E:85:26:96:F5:3F:A9:0E:ED:8E:C5:12:9E:EC:6D:81:58:CA:CC:25:35:5D:07:5B:42:A2:B7:7A:2D:B5:B4:87:55:83:17:32:2E:7C:87:26:9C:6B:8F:45:6C:78:57:E7:19:ED:45:6C:3B:5E:AE:1A:3D:58:5C:F1:AF:35:D3:F5:87:E0:F8:12:A0:59:FB:E7:F0:8F:86:0D:3E:27:07:ED:98:F9:09:03:E9:BC:6A:66:A2:3D:23:D1" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:40:09" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.044) 0:00:12.853 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.048) 0:00:12.901 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.040) 0:00:12.942 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.045) 0:00:12.987 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.044) 0:00:13.031 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.044) 0:00:13.075 ******** ok: [/cache/rhel-7.qcow2] => { "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.082051", "end": "2022-07-06 18:40:15.870927", "rc": 0, "start": "2022-07-06 18:40:15.788876" } STDOUT: no TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:40:16 +0000 (0:00:00.388) 0:00:13.464 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:40:17 +0000 (0:00:00.044) 0:00:13.509 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Ensure python3 is installed] ********************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 Wednesday 06 July 2022 22:40:17 +0000 (0:00:00.027) 0:00:13.536 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "python3-3.6.8-18.el7.x86_64 providing python3 is already installed" ] } TASK [Install the package, force upgrade] ************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:11 Wednesday 06 July 2022 22:40:17 +0000 (0:00:00.532) 0:00:14.069 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (21.3.1) TASK [Install certreader] ****************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 Wednesday 06 July 2022 22:40:18 +0000 (0:00:00.945) 0:00:15.015 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/pip", "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.6/site-packages (3.4.8) Requirement already satisfied: certreader>=0.1.1 in ./certificate-tests-venv/lib/python3.6/site-packages (0.1.1) Requirement already satisfied: cffi>=1.12 in ./certificate-tests-venv/lib/python3.6/site-packages (from cryptography<35) (1.15.1) Requirement already satisfied: pyasn1 in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (0.4.8) Requirement already satisfied: pyyaml in ./certificate-tests-venv/lib/python3.6/site-packages (from certreader>=0.1.1) (6.0) Requirement already satisfied: pycparser in ./certificate-tests-venv/lib/python3.6/site-packages (from cffi>=1.12->cryptography<35) (2.21) TASK [Retrieve certificate file stats] ***************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:26 Wednesday 06 July 2022 22:40:19 +0000 (0:00:00.781) 0:00:15.797 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147210.2323167, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "cd31c4e10c1d9ef9973e43d49ea8b8c7cf54336f", "ctime": 1657147210.2293167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884921, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147210.2293167, "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": "18446744071585188919", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:31 Wednesday 06 July 2022 22:40:19 +0000 (0:00:00.310) 0:00:16.107 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:37 Wednesday 06 July 2022 22:40:19 +0000 (0:00:00.032) 0:00:16.139 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:47 Wednesday 06 July 2022 22:40:19 +0000 (0:00:00.046) 0:00:16.185 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:53 Wednesday 06 July 2022 22:40:19 +0000 (0:00:00.044) 0:00:16.230 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147210.1843166, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "cc2df055aee681fd409036bb7b513404965027e4", "ctime": 1657147210.2293167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884920, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147210.2293167, "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": "18446744072047760977", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:58 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.337) 0:00:16.568 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:64 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.032) 0:00:16.600 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.045) 0:00:16.646 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/defaultcert.crt" ], "delta": "0:00:00.261293", "end": "2022-07-06 18:40:19.624990", "rc": 0, "start": "2022-07-06 18:40:19.363697" } 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": "70:49:16:37:9A:83:18:5D:D7:F7:6E:22:DA:3D:60:15:12:58:1B:30", "critical": false }, "authorityKeyIdentifier": { "value": "AA:FA:3B:D5:1D:F9:BA:48:A3:9E:42:C6:70:FF:42:C3:C1:C4:59:A8", "critical": false } }, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9F:2A:7F:DA:9A:87:A2:90:DD:16:7E:10:AD:D6:4C:1F:C4:59:DE:94:C7:DB:BA:9C:FB:6E:83:BB:4B:C6:60:05:44:72:B9:62:60:37:9E:92:49:DF:94:63:89:5D:23:B6:D3:B6:4B:BD:9A:83:44:42:98:6F:B9:73:14:EE:97:A5:AF:3D:D9:5F:8C:D3:23:4B:20:9E:8D:41:F0:D0:6D:31:AC:AA:81:9C:7B:97:F2:13:BC:97:0C:DF:72:8A:B6:B1:62:1A:3B:4E:12:04:8B:66:D1:0E:22:C1:C9:E9:64:52:B9:C8:84:18:41:91:99:E0:74:E4:8B:16:0B:4A:0F:19:8C:D0:22:9F:BD:DF:CD:60:B6:27:AE:BB:43:6E:9F:25:80:A7:7F:04:38:D5:B3:DF:4E:4D:C5:98:57:BA:C1:05:2B:8E:11:C4:C1:B9:9C:26:63:D6:30:E3:05:42:B9:13:A9:FA:5D:CA:F1:DF:B0:42:EB:CB:58:11:7C:E1:2C:B9:D5:19:6C:A8:91:92:5D:C0:3F:7E:42:5F:6E:F3:07:19:54:5B:50:82:A2:D1:CE:A7:06:EE:6E:5E:16:56:CC:11:72:7B:40:9F:6C:F1:4B:DD:5A:5A:F5:BF:B8:23:43:83:4E:9B:CD:3E:94:06:09:9C:14:28:1A:41:63:7E:7A:FA" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:40:10" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:79 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.577) 0:00:17.223 ******** ok: [/cache/rhel-7.qcow2] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "AA:FA:3B:D5:1D:F9:BA:48:A3:9E:42:C6:70:FF:42:C3:C1:C4:59:A8" }, "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": "70:49:16:37:9A:83:18:5D:D7:F7:6E:22:DA:3D:60:15:12:58:1B:30" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "9F:2A:7F:DA:9A:87:A2:90:DD:16:7E:10:AD:D6:4C:1F:C4:59:DE:94:C7:DB:BA:9C:FB:6E:83:BB:4B:C6:60:05:44:72:B9:62:60:37:9E:92:49:DF:94:63:89:5D:23:B6:D3:B6:4B:BD:9A:83:44:42:98:6F:B9:73:14:EE:97:A5:AF:3D:D9:5F:8C:D3:23:4B:20:9E:8D:41:F0:D0:6D:31:AC:AA:81:9C:7B:97:F2:13:BC:97:0C:DF:72:8A:B6:B1:62:1A:3B:4E:12:04:8B:66:D1:0E:22:C1:C9:E9:64:52:B9:C8:84:18:41:91:99:E0:74:E4:8B:16:0B:4A:0F:19:8C:D0:22:9F:BD:DF:CD:60:B6:27:AE:BB:43:6E:9F:25:80:A7:7F:04:38:D5:B3:DF:4E:4D:C5:98:57:BA:C1:05:2B:8E:11:C4:C1:B9:9C:26:63:D6:30:E3:05:42:B9:13:A9:FA:5D:CA:F1:DF:B0:42:EB:CB:58:11:7C:E1:2C:B9:D5:19:6C:A8:91:92:5D:C0:3F:7E:42:5F:6E:F3:07:19:54:5B:50:82:A2:D1:CE:A7:06:EE:6E:5E:16:56:CC:11:72:7B:40:9F:6C:F1:4B:DD:5A:5A:F5:BF:B8:23:43:83:4E:9B:CD:3E:94:06:09:9C:14:28:1A:41:63:7E:7A:FA" }, "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:40:10" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.043) 0:00:17.266 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:91 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.043) 0:00:17.310 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:99 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.030) 0:00:17.340 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:106 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.039) 0:00:17.379 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:118 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.039) 0:00:17.419 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132 Wednesday 06 July 2022 22:40:20 +0000 (0:00:00.039) 0:00:17.459 ******** ok: [/cache/rhel-7.qcow2] => { "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.078302", "end": "2022-07-06 18:40:20.256039", "rc": 0, "start": "2022-07-06 18:40:20.177737" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:141 Wednesday 06 July 2022 22:40:21 +0000 (0:00:00.389) 0:00:17.848 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=54 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:40:21 +0000 (0:00:00.052) 0:00:17.901 ******** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.89s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 set up internal repositories -------------------------------------------- 1.43s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.14s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install the package, force upgrade -------------------------------------- 1.08s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Install the package, force upgrade -------------------------------------- 0.95s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:11 - Gathering Facts --------------------------------------------------------- 0.93s /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml:2 ------------------ Install certreader ------------------------------------------------------ 0.80s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Install certreader ------------------------------------------------------ 0.78s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.68s /tmp/tmp5zfmitu6/tests/certificate/tests_no_auto_renew.yml:17 ----------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.67s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Parse certificate ------------------------------------------------------- 0.66s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 - Ensure python3 is installed --------------------------------------------- 0.59s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- Parse certificate ------------------------------------------------------- 0.58s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.57s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 0.53s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.48s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.42s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:26 - fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.41s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.39s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve auto-renew flag ------------------------------------------------ 0.39s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132