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:12 +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:14 +0000 (0:00:01.449) 0:00:01.468 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.45s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_provider.yml *************************************************** 2 plays in /tmp/tmpjbt6cq54/tests/tests_provider.yml PLAY [Test issuing certificate with certmonger provider] *********************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_provider.yml:2 Wednesday 06 July 2022 22:31:14 +0000 (0:00:00.019) 0:00:01.487 ******** 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:14 +0000 (0:00:00.941) 0:00:02.428 ******** 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:14 +0000 (0:00:00.026) 0:00:02.454 ******** 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:15 +0000 (0:00:00.412) 0:00:02.867 ******** 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:15 +0000 (0:00:00.051) 0:00:02.918 ******** 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:16 +0000 (0:00:01.108) 0:00:04.026 ******** 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:17 +0000 (0:00:00.566) 0:00:04.593 ******** 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:17 +0000 (0:00:00.463) 0:00:05.056 ******** 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:17 +0000 (0:00:00.340) 0:00:05.397 ******** 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:18 +0000 (0:00:00.663) 0:00:06.060 ******** changed: [/cache/rhel-7.qcow2] => (item={'name': 'mycert_provider', 'dns': 'www.example.com', 'ca': 'self-sign', 'provider': 'certmonger'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_provider", "provider": "certmonger" } } 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_provider.yml:13 Wednesday 06 July 2022 22:31:19 +0000 (0:00:01.193) 0:00:07.254 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmpjbt6cq54/tests/tests_provider.yml:27 Wednesday 06 July 2022 22:31:20 +0000 (0:00:00.686) 0:00:07.940 ******** included: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_provider.crt', 'key_path': '/etc/pki/tls/private/mycert_provider.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:20 +0000 (0:00:00.041) 0:00:07.982 ******** 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:20 +0000 (0:00:00.027) 0:00:08.009 ******** 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:21 +0000 (0:00:00.548) 0:00:08.558 ******** 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:22 +0000 (0:00:01.070) 0:00:09.629 ******** 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:22 +0000 (0:00:00.797) 0:00:10.427 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146679.2757876, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "16240fa83e3889205f055cc03e9a95e9c54a42c0", "ctime": 1657146679.2727876, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883849, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146679.2727876, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_provider.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "1474725038", "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:23 +0000 (0:00:00.441) 0:00:10.869 ******** 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:23 +0000 (0:00:00.033) 0:00:10.902 ******** 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:23 +0000 (0:00:00.084) 0:00:10.987 ******** 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:23 +0000 (0:00:00.067) 0:00:11.054 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657146679.2257876, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "10b1c1cb8b09a82f48faa7a449d953da36c80efc", "ctime": 1657146679.2727876, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 883807, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657146679.2727876, "nlink": 1, "path": "/etc/pki/tls/private/mycert_provider.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "832466002", "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:23 +0000 (0:00:00.332) 0:00:11.386 ******** 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:23 +0000 (0:00:00.054) 0:00:11.441 ******** 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:24 +0000 (0:00:00.043) 0:00:11.485 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_provider.crt" ], "delta": "0:00:00.257774", "end": "2022-07-06 18:31:24.255301", "rc": 0, "start": "2022-07-06 18:31:23.997527" } 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": "C2:78:86:44:12:B4:E4:79:B5:7A:24:C5:04:EA:B5:BE:28:64:60:3E", "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": "61:DA:4D:49:EB:EF:E6:78:83:9F:EC:D3:53:F7:85:25:9B:76:CF:A7:E7:B7:2B:F9:13:E6:79:EB:14:36:EE:56:86:3B:BF:54:75:68:67:9E:84:74:8C:5E:78:13:6E:37:18:7D:E8:92:FA:CE:A7:75:A9:9A:1C:B2:EA:4A:72:51:22:8B:67:8B:EE:D4:57:5C:2C:A0:C5:88:B5:E5:84:79:39:DB:6B:1C:D6:65:F8:FC:9F:30:FF:1A:69:23:9C:AD:8C:9F:D0:49:14:AE:F1:9A:5A:48:C1:28:E0:D2:6B:BE:46:C7:47:7D:38:6C:C9:77:47:34:EE:F7:74:34:22:50:99:7E:BF:92:C6:0A:50:7B:FA:37:87:3B:9F:89:65:83:E2:9D:F3:B1:20:9A:14:E7:37:94:D8:33:D7:3A:1D:26:71:A1:B3:42:21:78:6A:DD:A6:B7:81:3C:B2:14:80:6C:88:9F:41:FC:88:86:4F:C7:D9:21:8D:60:B3:6E:D5:FB:9B:7A:11:32:21:F6:2B:F0:12:2B:9A:80:47:DC:26:01:A7:69:DF:07:8E:1A:48:D8:AB:22:E5:BE:1D:F5:08:C5:05:61:D7:81:66:07:12:10:24:11:CD:67:46:01:2D:99:EE:F1:57:B8:4C:92:75:09:04:53:78:1C:E5:25:2F:CC" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:25:22", "not_valid_before": "2022-07-06 22:31:19" } } 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:24 +0000 (0:00:00.651) 0:00:12.136 ******** 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": "C2:78:86:44:12:B4:E4:79:B5:7A:24:C5:04:EA:B5:BE:28:64:60:3E" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "61:DA:4D:49:EB:EF:E6:78:83:9F:EC:D3:53:F7:85:25:9B:76:CF:A7:E7:B7:2B:F9:13:E6:79:EB:14:36:EE:56:86:3B:BF:54:75:68:67:9E:84:74:8C:5E:78:13:6E:37:18:7D:E8:92:FA:CE:A7:75:A9:9A:1C:B2:EA:4A:72:51:22:8B:67:8B:EE:D4:57:5C:2C:A0:C5:88:B5:E5:84:79:39:DB:6B:1C:D6:65:F8:FC:9F:30:FF:1A:69:23:9C:AD:8C:9F:D0:49:14:AE:F1:9A:5A:48:C1:28:E0:D2:6B:BE:46:C7:47:7D:38:6C:C9:77:47:34:EE:F7:74:34:22:50:99:7E:BF:92:C6:0A:50:7B:FA:37:87:3B:9F:89:65:83:E2:9D:F3:B1:20:9A:14:E7:37:94:D8:33:D7:3A:1D:26:71:A1:B3:42:21:78:6A:DD:A6:B7:81:3C:B2:14:80:6C:88:9F:41:FC:88:86:4F:C7:D9:21:8D:60:B3:6E:D5:FB:9B:7A:11:32:21:F6:2B:F0:12:2B:9A:80:47:DC:26:01:A7:69:DF:07:8E:1A:48:D8:AB:22:E5:BE:1D:F5:08:C5:05:61:D7:81:66:07:12:10:24:11:CD:67:46:01:2D:99:EE:F1:57:B8:4C:92:75:09:04:53:78:1C:E5:25:2F:CC" }, "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:19" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:87 Wednesday 06 July 2022 22:31:24 +0000 (0:00:00.041) 0:00:12.177 ******** 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:24 +0000 (0:00:00.039) 0:00:12.217 ******** 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:24 +0000 (0:00:00.028) 0:00:12.246 ******** 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:24 +0000 (0:00:00.039) 0:00:12.286 ******** 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:24 +0000 (0:00:00.041) 0:00:12.327 ******** 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:24 +0000 (0:00:00.041) 0:00:12.368 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_provider.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.077715", "end": "2022-07-06 18:31:24.862878", "rc": 0, "start": "2022-07-06 18:31:24.785163" } 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:25 +0000 (0:00:00.371) 0:00:12.740 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=33 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:31:25 +0000 (0:00:00.050) 0:00:12.790 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.45s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- linux-system-roles.certificate : Ensure certificate requests ------------ 1.19s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:100 linux-system-roles.certificate : Ensure certificate role dependencies are installed --- 1.11s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/main.yml:5 -- Install the package, force upgrade -------------------------------------- 1.07s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:11 ------------- Gathering Facts --------------------------------------------------------- 0.94s /tmp/tmpjbt6cq54/tests/tests_provider.yml:2 ----------------------------------- Install certreader ------------------------------------------------------ 0.80s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:18 ------------- Gathering Facts --------------------------------------------------------- 0.69s /tmp/tmpjbt6cq54/tests/tests_provider.yml:13 ---------------------------------- linux-system-roles.certificate : Ensure provider service is running ----- 0.66s /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.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.41s /tmp/tmpjbt6cq54/tests/roles/linux-system-roles.certificate/tasks/set_vars.yml:2 Retrieve auto-renew flag ------------------------------------------------ 0.37s /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.33s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:55 ------------- Verify certificate file owner and group --------------------------------- 0.08s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:37 ------------- Verify certificate permissions ------------------------------------------ 0.07s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:49 ------------- Verify if key file exists ----------------------------------------------- 0.05s /tmp/tmpjbt6cq54/tests/tasks/assert_certificate_parameters.yml:60 ------------- 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:54 +0000 (0:00:00.017) 0:00:00.017 ******** 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:55 +0000 (0:00:01.404) 0:00:01.422 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.40s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_provider.yml *************************************************** 2 plays in /tmp/tmp5zfmitu6/tests/certificate/tests_provider.yml PLAY [Test issuing certificate with certmonger provider] *********************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_provider.yml:2 Wednesday 06 July 2022 22:40:55 +0000 (0:00:00.020) 0:00:01.442 ******** 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:56 +0000 (0:00:00.928) 0:00:02.371 ******** 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:56 +0000 (0:00:00.027) 0:00:02.398 ******** 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:56 +0000 (0:00:00.412) 0:00:02.810 ******** 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:56 +0000 (0:00:00.053) 0:00:02.864 ******** 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:58 +0000 (0:00:01.112) 0:00:03.976 ******** 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:58 +0000 (0:00:00.567) 0:00:04.544 ******** 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:59 +0000 (0:00:00.472) 0:00:05.016 ******** 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:59 +0000 (0:00:00.337) 0:00:05.353 ******** 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:00 +0000 (0:00:00.646) 0:00:06.000 ******** changed: [/cache/rhel-7.qcow2] => (item={'name': 'mycert_provider', 'dns': 'www.example.com', 'ca': 'self-sign', 'provider': 'certmonger'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "mycert_provider", "provider": "certmonger" } } 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_provider.yml:13 Wednesday 06 July 2022 22:41:01 +0000 (0:00:01.061) 0:00:07.061 ******** ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Verify each certificate] ************************************************* task path: /tmp/tmp5zfmitu6/tests/certificate/tests_provider.yml:27 Wednesday 06 July 2022 22:41:01 +0000 (0:00:00.688) 0:00:07.750 ******** included: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml for /cache/rhel-7.qcow2 => (item={'path': '/etc/pki/tls/certs/mycert_provider.crt', 'key_path': '/etc/pki/tls/private/mycert_provider.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:01 +0000 (0:00:00.040) 0:00:07.791 ******** 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:01 +0000 (0:00:00.029) 0:00:07.821 ******** 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:02 +0000 (0:00:00.571) 0:00:08.392 ******** 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:03 +0000 (0:00:01.112) 0:00:09.504 ******** 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:04 +0000 (0:00:00.793) 0:00:10.298 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147259.9523168, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "e87978f60760f4fbf3476fecc2eff029d22338a8", "ctime": 1657147259.9493167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884927, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147259.9493167, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_provider.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1294, "uid": 0, "version": "18446744073174288977", "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:04 +0000 (0:00:00.449) 0:00:10.747 ******** 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:04 +0000 (0:00:00.034) 0:00:10.782 ******** 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:04 +0000 (0:00:00.071) 0:00:10.854 ******** 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:05 +0000 (0:00:00.073) 0:00:10.928 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1657147259.9043167, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5b1c5cdb245e16548de5494e55150e5507be48ff", "ctime": 1657147259.9493167, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 884926, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1657147259.9493167, "nlink": 1, "path": "/etc/pki/tls/private/mycert_provider.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "18446744072427304163", "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:05 +0000 (0:00:00.356) 0:00:11.285 ******** 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:05 +0000 (0:00:00.061) 0:00:11.346 ******** 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:05 +0000 (0:00:00.047) 0:00:11.393 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": [ "/tmp/certificate-tests-venv/bin/certreader2json", "/etc/pki/tls/certs/mycert_provider.crt" ], "delta": "0:00:00.255850", "end": "2022-07-06 18:41:05.088132", "rc": 0, "start": "2022-07-06 18:41:04.832282" } STDOUT: { "subject": [ { "name": "commonName", "oid": "2.5.4.3", "value": "www.example.com" } ], "extensions": { "keyUsage": { "value": [ "digital_signature", "key_encipherment" ], "critical": false }, "subjectAltName": { "value": [ { "name": "DNS", "value": "www.example.com" } ], "critical": false }, "extendedKeyUsage": { "value": [ { "name": "id-kp-serverAuth", "oid": "1.3.6.1.5.5.7.3.1" }, { "name": "id-kp-clientAuth", "oid": "1.3.6.1.5.5.7.3.2" } ], "critical": false }, "basicConstraints": { "value": { "ca": false }, "critical": true }, "subjectKeyIdentifier": { "value": "B7:C1:69:58:E5:9E:7F:C6:08:40:F4:8A:EF:4A:AA:67:8D:2E:89:18", "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": "2C:5E:82:6B:C2:BA:84:59:47:E3:3E:E0:1A:7D:B2:71:86:6F:3E:A1:F1:93:AC:83:47:68:14:6E:33:DC:2A:8F:75:F7:37:67:64:CF:90:BA:C8:23:9C:AA:0F:57:53:69:00:FF:DB:2A:36:07:B0:1F:42:86:42:C8:8D:C3:13:FB:BC:3F:15:C2:87:EE:A8:8D:D7:0E:4A:56:ED:6F:D0:0E:AE:31:42:C1:93:24:7E:61:28:4D:13:7F:E4:91:5D:ED:E8:1E:5D:F6:70:E2:35:43:D1:5D:E5:3D:1A:43:CF:37:96:30:C8:72:C2:D5:30:53:50:F2:D2:F3:65:C7:4A:0C:D7:FA:31:ED:DB:2F:2C:80:AC:D6:B9:C9:61:A4:2A:5E:C9:A1:5F:C9:72:F7:87:A0:98:53:B4:54:76:F9:1F:E5:78:10:85:BA:45:2A:23:C6:62:FF:72:CC:62:B9:FB:DA:BB:EF:90:C9:7A:B3:46:2C:B5:BB:96:98:99:E6:90:CD:8B:1F:31:34:07:43:2A:C8:E8:09:4B:9F:7F:47:41:FC:8D:F0:B9:5B:00:39:7A:88:A6:02:BA:35:F3:C7:C8:1F:AE:3D:91:8F:B5:72:E8:FA:B1:CF:7D:38:D5:50:41:01:55:59:F6:71:E8:C7:E3:3E:1C:17:5C:AA:FD:81:CD:9C" }, "key_size": 2048, "validity": { "not_valid_after": "2023-07-06 22:34:59", "not_valid_before": "2022-07-06 22:40:59" } } 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:06 +0000 (0:00:00.686) 0:00:12.079 ******** 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": "B7:C1:69:58:E5:9E:7F:C6:08:40:F4:8A:EF:4A:AA:67:8D:2E:89:18" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "2C:5E:82:6B:C2:BA:84:59:47:E3:3E:E0:1A:7D:B2:71:86:6F:3E:A1:F1:93:AC:83:47:68:14:6E:33:DC:2A:8F:75:F7:37:67:64:CF:90:BA:C8:23:9C:AA:0F:57:53:69:00:FF:DB:2A:36:07:B0:1F:42:86:42:C8:8D:C3:13:FB:BC:3F:15:C2:87:EE:A8:8D:D7:0E:4A:56:ED:6F:D0:0E:AE:31:42:C1:93:24:7E:61:28:4D:13:7F:E4:91:5D:ED:E8:1E:5D:F6:70:E2:35:43:D1:5D:E5:3D:1A:43:CF:37:96:30:C8:72:C2:D5:30:53:50:F2:D2:F3:65:C7:4A:0C:D7:FA:31:ED:DB:2F:2C:80:AC:D6:B9:C9:61:A4:2A:5E:C9:A1:5F:C9:72:F7:87:A0:98:53:B4:54:76:F9:1F:E5:78:10:85:BA:45:2A:23:C6:62:FF:72:CC:62:B9:FB:DA:BB:EF:90:C9:7A:B3:46:2C:B5:BB:96:98:99:E6:90:CD:8B:1F:31:34:07:43:2A:C8:E8:09:4B:9F:7F:47:41:FC:8D:F0:B9:5B:00:39:7A:88:A6:02:BA:35:F3:C7:C8:1F:AE:3D:91:8F:B5:72:E8:FA:B1:CF:7D:38:D5:50:41:01:55:59:F6:71:E8:C7:E3:3E:1C:17:5C:AA:FD:81:CD:9C" }, "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:59" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:83 Wednesday 06 July 2022 22:41:06 +0000 (0:00:00.043) 0:00:12.123 ******** 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:06 +0000 (0:00:00.043) 0:00:12.167 ******** 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:06 +0000 (0:00:00.031) 0:00:12.198 ******** 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:06 +0000 (0:00:00.043) 0:00:12.242 ******** 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:06 +0000 (0:00:00.043) 0:00:12.286 ******** 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:06 +0000 (0:00:00.043) 0:00:12.329 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_provider.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.089133", "end": "2022-07-06 18:41:05.742863", "rc": 0, "start": "2022-07-06 18:41:05.653730" } 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:06 +0000 (0:00:00.404) 0:00:12.734 ******** ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=33 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Wednesday 06 July 2022 22:41:06 +0000 (0:00:00.051) 0:00:12.786 ******** =============================================================================== set up internal repositories -------------------------------------------- 1.40s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 1.11s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Install the package, force upgrade -------------------------------------- 1.11s /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.93s /tmp/tmp5zfmitu6/tests/certificate/tests_provider.yml:2 ----------------------- Install certreader ------------------------------------------------------ 0.79s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:18 - Gathering Facts --------------------------------------------------------- 0.69s /tmp/tmp5zfmitu6/tests/certificate/tests_provider.yml:13 ---------------------- Parse certificate ------------------------------------------------------- 0.69s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:74 - fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.65s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:88 Ensure python3 is installed --------------------------------------------- 0.57s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:6 -- 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 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.47s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:33 Retrieve certificate file stats ----------------------------------------- 0.45s /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.40s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:132 Retrieve key file stats ------------------------------------------------- 0.36s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:53 - fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.34s /tmp/tmpke2c_s6q/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:59 Verify certificate permissions ------------------------------------------ 0.07s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:47 - Verify certificate file owner and group --------------------------------- 0.07s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:37 - Verify if key file exists ----------------------------------------------- 0.06s /tmp/tmp5zfmitu6/tests/certificate/tasks/assert_certificate_parameters.yml:58 -