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:31:25 +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:31:27 +0000 (0:00:01.398) 0:00:01.416 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.40s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:2 Wednesday 06 July 2022 22:31:27 +0000 (0:00:00.022) 0:00:01.439 ******** 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:31:28 +0000 (0:00:00.904) 0:00:02.344 ******** 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:31:28 +0000 (0:00:00.025) 0:00:02.369 ******** 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:31:28 +0000 (0:00:00.405) 0:00:02.775 ******** 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:31:28 +0000 (0:00:00.051) 0:00:02.826 ******** 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:31:29 +0000 (0:00:01.202) 0:00:04.028 ******** 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:31:30 +0000 (0:00:00.554) 0:00:04.583 ******** 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:31:30 +0000 (0:00:00.475) 0:00:05.058 ******** 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:31:31 +0000 (0:00:00.335) 0:00:05.394 ******** 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:31:31 +0000 (0:00:00.665) 0:00:06.060 ******** changed: [/cache/rhel-7.qcow2] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': 'touch /etc/pki/after_cert.tmp\n'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } } MSG: Certificate requested (new). Pre/Post run hooks updated. 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_run_hooks.yml:17 Wednesday 06 July 2022 22:31:33 +0000 (0:00:01.194) 0:00:07.254 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:31 Wednesday 06 July 2022 22:31:33 +0000 (0:00:00.698) 0:00:07.952 ******** included: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:31:33 +0000 (0:00:00.041) 0:00:07.994 ******** 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:31:33 +0000 (0:00:00.027) 0:00:08.021 ******** 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:31:34 +0000 (0:00:00.539) 0:00:08.560 ******** 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:31:35 +0000 (0:00:01.106) 0:00:09.667 ******** 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:31:36 +0000 (0:00:00.822) 0:00:10.490 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146692.5597878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1bd7f75c386e26bf83c89fa1996d348fb6801409", "ctime": 1657146692.5567877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883852, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146692.5567877, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "18446744071969803994", "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:31:36 +0000 (0:00:00.426) 0:00:10.916 ******** 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:31:36 +0000 (0:00:00.063) 0:00:10.980 ******** 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:31:36 +0000 (0:00:00.103) 0:00:11.083 ******** 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:31:37 +0000 (0:00:00.045) 0:00:11.129 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146692.5047877, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "2f3739460f8d1bf22cb227852692477ddf96675d", "ctime": 1657146692.5567877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883850, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146692.5567877, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1704, "uid": 0, "version": "1096726608", "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:31:37 +0000 (0:00:00.320) 0:00:11.450 ******** 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:31:37 +0000 (0:00:00.031) 0:00:11.482 ******** 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:31:37 +0000 (0:00:00.046) 0:00:11.528 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.252116", "end": "2022-07-06 18:31:37.639283", "rc": 0, "start": "2022-07-06 18:31:37.387167" } 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": "06:41:31:D8:69:D2:FE:46:B8:EA:06:17:59:CE:C8:7E:BE:65:DB:08", "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": "7D:2B:CF:2C:60:76:53:A7:42:45:1C:B4:C9:57:85:B7:6E:AE:55:68:44:44:D1:39:85:FD:81:02:62:F2:40:9E:CA:9F:0B:A9:04:46:65:E5:40:C1:7B:22:3A:40:AE:35:DD:04:64:05:39:07:3D:2E:C5:73:D8:B9:38:F1:83:87:DB:91:87:50:7B:FC:1A:0A:3B:D9:82:C1:04:9D:56:8A:59:73:D4:A1:42:6B:C0:C0:81:4B:81:2D:66:BD:69:57:20:0F:D4:A6:DC:BB:E8:4E:58:E7:36:10:A6:F0:B7:52:F4:0B:4A:8A:63:50:30:72:BC:77:AA:94:F7:DB:37:AA:18:B1:E4:8B:5B:7D:44:C5:C8:85:E6:C5:A7:BF:20:97:6D:DE:0E:A7:19:4C:6C:E9:F4:B5:8E:DB:26:D1:10:8C:72:84:F9:1A:E4:C9:27:10:15:4F:B0:0D:B1:DA:42:26:5A:04:10:95:14:54:EE:6C:7C:5C:9E:21:5D:D6:E0:4C:95:29:59:2D:B6:19:1E:5C:D4:0F:52:C1:06:42:47:B1:D4:E0:D4:03:FF:6B:59:20:E0:28:64:FF:09:1C:D9:E7:2D:EC:8B:3B:32:65:35:F4:49:10:7F:55:0C:35:67:23:4B:57:C5:03:F6:FF:FB:DC:53:20:C1:14:15:74:54:9D" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:31:32" } } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:31:38 +0000 (0:00:00.651) 0:00:12.180 ******** 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": "06:41:31:D8:69:D2:FE:46:B8:EA:06:17:59:CE:C8:7E:BE:65:DB:08" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "7D:2B:CF:2C:60:76:53:A7:42:45:1C:B4:C9:57:85:B7:6E:AE:55:68:44:44:D1:39:85:FD:81:02:62:F2:40:9E:CA:9F:0B:A9:04:46:65:E5:40:C1:7B:22:3A:40:AE:35:DD:04:64:05:39:07:3D:2E:C5:73:D8:B9:38:F1:83:87:DB:91:87:50:7B:FC:1A:0A:3B:D9:82:C1:04:9D:56:8A:59:73:D4:A1:42:6B:C0:C0:81:4B:81:2D:66:BD:69:57:20:0F:D4:A6:DC:BB:E8:4E:58:E7:36:10:A6:F0:B7:52:F4:0B:4A:8A:63:50:30:72:BC:77:AA:94:F7:DB:37:AA:18:B1:E4:8B:5B:7D:44:C5:C8:85:E6:C5:A7:BF:20:97:6D:DE:0E:A7:19:4C:6C:E9:F4:B5:8E:DB:26:D1:10:8C:72:84:F9:1A:E4:C9:27:10:15:4F:B0:0D:B1:DA:42:26:5A:04:10:95:14:54:EE:6C:7C:5C:9E:21:5D:D6:E0:4C:95:29:59:2D:B6:19:1E:5C:D4:0F:52:C1:06:42:47:B1:D4:E0:D4:03:FF:6B:59:20:E0:28:64:FF:09:1C:D9:E7:2D:EC:8B:3B:32:65:35:F4:49:10:7F:55:0C:35:67:23:4B:57:C5:03:F6:FF:FB:DC:53:20:C1:14:15:74:54:9D" }, "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:31:32" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:31:38 +0000 (0:00:00.043) 0:00:12.223 ******** 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:31:38 +0000 (0:00:00.043) 0:00:12.266 ******** 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:31:38 +0000 (0:00:00.031) 0:00:12.297 ******** 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:31:38 +0000 (0:00:00.043) 0:00:12.341 ******** 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:31:38 +0000 (0:00:00.044) 0:00:12.385 ******** 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:31:38 +0000 (0:00:00.043) 0:00:12.429 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_run_hooks.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.076241", "end": "2022-07-06 18:31:38.277870", "rc": 0, "start": "2022-07-06 18:31:38.201629" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:150 Wednesday 06 July 2022 22:31:38 +0000 (0:00:00.386) 0:00:12.816 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:39 Wednesday 06 July 2022 22:31:38 +0000 (0:00:00.044) 0:00:12.861 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146692.5597878, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1bd7f75c386e26bf83c89fa1996d348fb6801409", "ctime": 1657146692.5567877, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883852, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146692.5567877, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "18446744071969803994", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:43 Wednesday 06 July 2022 22:31:39 +0000 (0:00:00.310) 0:00:13.172 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146692.5547876, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657146692.5547876, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883851, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657146692.5547876, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "18446744071818824459", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:47 Wednesday 06 July 2022 22:31:39 +0000 (0:00:00.315) 0:00:13.487 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146692.5917876, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657146692.5917876, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883853, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657146692.5917876, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1764721430", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:51 Wednesday 06 July 2022 22:31:39 +0000 (0:00:00.317) 0:00:13.804 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:58 Wednesday 06 July 2022 22:31:39 +0000 (0:00:00.030) 0:00:13.835 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:66 Wednesday 06 July 2022 22:31:39 +0000 (0:00:00.029) 0:00:13.864 ******** changed: [/cache/rhel-7.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006360", "end": "2022-07-06 18:31:39.634773", "rc": 0, "start": "2022-07-06 18:31:39.628413" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:72 Wednesday 06 July 2022 22:31:40 +0000 (0:00:00.308) 0:00:14.173 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=40 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:31:40 +0000 (0:00:00.048) 0:00:14.221 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.40s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.20s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- linux-system-roles.certificate : Ensure certificate requests ------------ 1.19s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 Install the package, force upgrade -------------------------------------- 1.11s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 0.90s /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:2 ---------------------------------- Install certreader ------------------------------------------------------ 0.82s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.70s /tmp/tmpjbt6cq54/tests/tests_run_hooks.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.55s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:22 - Ensure python3 is installed --------------------------------------------- 0.54s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:6 -------------- linux-system-roles.certificate : Ensure pre-scripts hooks directory exists --- 0.48s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:33 - Retrieve certificate file stats ----------------------------------------- 0.43s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:26 ------------- linux-system-roles.certificate : Ensure ansible_facts used by role ------ 0.41s /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 ------------ linux-system-roles.certificate : Ensure post-scripts hooks directory exists --- 0.34s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:59 - Retrieve key file stats ------------------------------------------------- 0.32s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:55 ------------- Get post-run file timestamp --------------------------------------------- 0.32s /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:47 --------------------------------- Get pre-run file timestamp ---------------------------------------------- 0.32s /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:43 --------------------------------- Get certificate timestamp ----------------------------------------------- 0.31s /tmp/tmpjbt6cq54/tests/tests_run_hooks.yml:39 --------------------------------- 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:41:07 +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:41:08 +0000 (0:00:01.441) 0:00:01.459 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.44s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_run_hooks.yml ************************************************** 2 plays in /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:2 Wednesday 06 July 2022 22:41:08 +0000 (0:00:00.023) 0:00:01.482 ******** 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:41:09 +0000 (0:00:00.900) 0:00:02.383 ******** 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:41:09 +0000 (0:00:00.028) 0:00:02.412 ******** 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:41:10 +0000 (0:00:00.413) 0:00:02.825 ******** 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:41:10 +0000 (0:00:00.052) 0:00:02.878 ******** 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:41:11 +0000 (0:00:01.136) 0:00:04.015 ******** 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:41:12 +0000 (0:00:00.591) 0:00:04.607 ******** 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:41:12 +0000 (0:00:00.452) 0:00:05.059 ******** 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:41:12 +0000 (0:00:00.334) 0:00:05.394 ******** 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:41:13 +0000 (0:00:00.655) 0:00:06.050 ******** changed: [/cache/rhel-7.qcow2] => (item={'name': 'mycert_run_hooks', 'dns': 'www.example.com', 'ca': 'self-sign', 'run_before': 'touch /etc/pki/before_cert.tmp\n', 'run_after': 'touch /etc/pki/after_cert.tmp\n'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_run_hooks", "run_after": "touch /etc/pki/after_cert.tmp\n", "run_before": "touch /etc/pki/before_cert.tmp\n" } } MSG: Certificate requested (new). Pre/Post run hooks updated. 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_run_hooks.yml:17 Wednesday 06 July 2022 22:41:14 +0000 (0:00:01.056) 0:00:07.106 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:31 Wednesday 06 July 2022 22:41:15 +0000 (0:00:00.692) 0:00:07.799 ******** included: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_run_hooks.crt', 'key_path': '/etc/pki/tls/private/mycert_run_hooks.key', 'subject': [{'name': 'commonName', 'oid': '2.5.4.3', 'value': 'www.example.com'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:2 Wednesday 06 July 2022 22:41:15 +0000 (0:00:00.036) 0:00:07.836 ******** 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:41:15 +0000 (0:00:00.058) 0:00:07.894 ******** 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:41:15 +0000 (0:00:00.586) 0:00:08.480 ******** 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:41:17 +0000 (0:00:01.127) 0:00:09.608 ******** 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:41:17 +0000 (0:00:00.796) 0:00:10.404 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147273.3113167, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a4a58a750261ded9e07a3a05f98379c6ec11da99", "ctime": 1657147273.3083167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884962, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147273.3083167, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "18446744072241361491", "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:41:18 +0000 (0:00:00.436) 0:00:10.841 ******** 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:41:18 +0000 (0:00:00.061) 0:00:10.902 ******** 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:41:18 +0000 (0:00:00.073) 0:00:10.976 ******** 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:41:18 +0000 (0:00:00.097) 0:00:11.074 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147273.2583168, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "1b9a6f07ab6ce0ea5d63faf52c1415726a213b0a", "ctime": 1657147273.3083167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884960, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147273.3083167, "nlink": 1, "path": "/etc/pki/tls/private/mycert_run_hooks.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "18446744073612739344", "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:41:18 +0000 (0:00:00.322) 0:00:11.396 ******** 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:41:18 +0000 (0:00:00.031) 0:00:11.428 ******** 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:41:18 +0000 (0:00:00.046) 0:00:11.475 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_run_hooks.crt" ], "delta": "0:00:00.268165", "end": "2022-07-06 18:41:18.503662", "rc": 0, "start": "2022-07-06 18:41:18.235497" } 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": "92:E2:52:D1:B4:75:6F:0E:D8:FD:50:D8:A3:A4:72:0C:D6:7E:C5:00", "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": "6E:0A:D7:60:6A:33:C2:45:CD:11:EE:3A:C6:DA:AE:39:73:44:D4:63:EF:33:83:CB:4D:D8:23:D3:F9:70:23:F9:A4:CC:0B:93:E8:CE:A5:34:13:41:CC:45:9E:FB:47:C3:F0:5B:E2:61:C8:9B:3C:0A:FF:1E:2B:12:8D:7C:20:54:F8:B3:43:C2:CB:ED:A9:78:F7:EE:65:46:EA:8A:25:94:2A:20:CB:B4:EA:C5:CB:7E:17:E5:D3:18:72:44:26:35:2D:75:FF:4A:6D:74:76:E3:6C:D2:49:44:7F:33:36:AA:13:7C:63:F0:17:4E:16:94:20:C6:1A:87:5A:63:61:B0:01:12:6E:53:FA:5B:73:1B:79:AA:34:C7:B3:DE:1F:B2:F1:D5:D2:73:16:FF:5B:30:3C:04:80:FA:EF:0C:88:6A:63:77:51:0A:F5:16:3C:E3:6C:C3:95:2A:B7:66:08:B6:C3:01:5E:B7:C2:93:EC:EA:FC:77:E2:E0:E9:45:28:D9:B0:36:1F:5F:09:03:B6:09:E2:13:4D:66:AA:96:D8:1A:5D:4A:17:A0:2E:20:FA:DA:06:F8:00:78:61:F8:46:48:E1:1A:CF:DF:01:C1:ED:CD:DC:AA:D6:93:8D:A0:97:E0:F8:89:24:82:B7:5F:EB:E6:39:B7:BB:0E:2C:95:60:5E" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:41:13" } } 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:41:19 +0000 (0:00:00.674) 0:00:12.150 ******** 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": "92:E2:52:D1:B4:75:6F:0E:D8:FD:50:D8:A3:A4:72:0C:D6:7E:C5:00" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "6E:0A:D7:60:6A:33:C2:45:CD:11:EE:3A:C6:DA:AE:39:73:44:D4:63:EF:33:83:CB:4D:D8:23:D3:F9:70:23:F9:A4:CC:0B:93:E8:CE:A5:34:13:41:CC:45:9E:FB:47:C3:F0:5B:E2:61:C8:9B:3C:0A:FF:1E:2B:12:8D:7C:20:54:F8:B3:43:C2:CB:ED:A9:78:F7:EE:65:46:EA:8A:25:94:2A:20:CB:B4:EA:C5:CB:7E:17:E5:D3:18:72:44:26:35:2D:75:FF:4A:6D:74:76:E3:6C:D2:49:44:7F:33:36:AA:13:7C:63:F0:17:4E:16:94:20:C6:1A:87:5A:63:61:B0:01:12:6E:53:FA:5B:73:1B:79:AA:34:C7:B3:DE:1F:B2:F1:D5:D2:73:16:FF:5B:30:3C:04:80:FA:EF:0C:88:6A:63:77:51:0A:F5:16:3C:E3:6C:C3:95:2A:B7:66:08:B6:C3:01:5E:B7:C2:93:EC:EA:FC:77:E2:E0:E9:45:28:D9:B0:36:1F:5F:09:03:B6:09:E2:13:4D:66:AA:96:D8:1A:5D:4A:17:A0:2E:20:FA:DA:06:F8:00:78:61:F8:46:48:E1:1A:CF:DF:01:C1:ED:CD:DC:AA:D6:93:8D:A0:97:E0:F8:89:24:82:B7:5F:EB:E6:39:B7:BB:0E:2C:95:60:5E" }, "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:41:13" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:41:19 +0000 (0:00:00.043) 0:00:12.193 ******** 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:41:19 +0000 (0:00:00.044) 0:00:12.237 ******** 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:41:19 +0000 (0:00:00.031) 0:00:12.268 ******** 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:41:19 +0000 (0:00:00.042) 0:00:12.311 ******** 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:41:19 +0000 (0:00:00.043) 0:00:12.355 ******** 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:41:19 +0000 (0:00:00.044) 0:00:12.399 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_run_hooks.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.097481", "end": "2022-07-06 18:41:19.175088", "rc": 0, "start": "2022-07-06 18:41:19.077607" } 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:41:20 +0000 (0:00:00.419) 0:00:12.819 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get certificate timestamp] *********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:39 Wednesday 06 July 2022 22:41:20 +0000 (0:00:00.044) 0:00:12.863 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147273.3113167, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "a4a58a750261ded9e07a3a05f98379c6ec11da99", "ctime": 1657147273.3083167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884962, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147273.3083167, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_run_hooks.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "18446744072241361491", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get pre-run file timestamp] ********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:43 Wednesday 06 July 2022 22:41:20 +0000 (0:00:00.311) 0:00:13.175 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147273.3063166, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657147273.3063166, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884961, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657147273.3063166, "nlink": 1, "path": "/etc/pki/before_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "861410196", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Get post-run file timestamp] ********************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:47 Wednesday 06 July 2022 22:41:20 +0000 (0:00:00.307) 0:00:13.483 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147273.3423166, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "ctime": 1657147273.3423166, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884963, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "inode/x-empty", "mode": "0600", "mtime": 1657147273.3423166, "nlink": 1, "path": "/etc/pki/after_cert.tmp", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 0, "uid": 0, "version": "1688752868", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Assert file created before cert] ***************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:51 Wednesday 06 July 2022 22:41:21 +0000 (0:00:00.306) 0:00:13.789 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Assert file created after cert] ****************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:58 Wednesday 06 July 2022 22:41:21 +0000 (0:00:00.032) 0:00:13.822 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Get the ansible_managed comment in pre/post-scripts] ********************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:66 Wednesday 06 July 2022 22:41:21 +0000 (0:00:00.032) 0:00:13.854 ******** changed: [/cache/rhel-7.qcow2] => { "changed": true, "cmd": [ "find", "/etc/certmonger/pre-scripts", "/etc/certmonger/post-scripts", "-type", "f", "-exec", "grep", "^# Ansible managed", "{}", ";" ], "delta": "0:00:00.006204", "end": "2022-07-06 18:41:20.527212", "rc": 0, "start": "2022-07-06 18:41:20.521008" } STDOUT: # Ansible managed # Ansible managed TASK [Verify the ansible_managed comment in pre/post-scripts] ****************** task path: /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:72 Wednesday 06 July 2022 22:41:21 +0000 (0:00:00.313) 0:00:14.167 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=40 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:41:21 +0000 (0:00:00.050) 0:00:14.218 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.44s /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.13s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:11 - fedora.linux_system_roles.certificate : Ensure certificate requests ----- 1.06s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:99 Gathering Facts --------------------------------------------------------- 0.90s /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:2 ---------------------- Install certreader ------------------------------------------------------ 0.80s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.69s /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:17 --------------------- Parse certificate ------------------------------------------------------- 0.67s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.66s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 0.59s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:22 Ensure python3 is installed --------------------------------------------- 0.59s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.45s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.44s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:26 - Retrieve auto-renew flag ------------------------------------------------ 0.42s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132 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 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.33s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Retrieve key file stats ------------------------------------------------- 0.32s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:53 - Get the ansible_managed comment in pre/post-scripts --------------------- 0.31s /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:66 --------------------- Get certificate timestamp ----------------------------------------------- 0.31s /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:39 --------------------- Get pre-run file timestamp ---------------------------------------------- 0.31s /tmp/tmp5zfmitu6/tests/certificate/tests_run_hooks.yml:43 ---------------------