ansible-playbook [core 2.17.5] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.12/site-packages/ansible ansible collection location = /tmp/collections-QvT executable location = /usr/local/bin/ansible-playbook python version = 3.12.6 (main, Sep 9 2024, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-2)] (/usr/bin/python3.12) jinja version = 3.1.4 libyaml = True No config file found; using defaults running playbook inside collection fedora.linux_system_roles redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug redirecting (type: callback) ansible.builtin.profile_tasks to ansible.posix.profile_tasks Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_custom_certificate.yml ***************************************** 1 plays in /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml PLAY [Test PostgreSQL server with ssl support using certificate role] ********** TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:3 Tuesday 15 October 2024 11:07:40 -0400 (0:00:00.007) 0:00:00.007 ******* [WARNING]: Platform linux on host managed-node2 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.17/reference_appendices/interpreter_discovery.html for more information. ok: [managed-node2] TASK [Generate certificate using certificate role] ***************************** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:10 Tuesday 15 October 2024 11:07:41 -0400 (0:00:01.101) 0:00:01.109 ******* included: fedora.linux_system_roles.certificate for managed-node2 TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Tuesday 15 October 2024 11:07:41 -0400 (0:00:00.059) 0:00:01.168 ******* included: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for managed-node2 TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Tuesday 15 October 2024 11:07:41 -0400 (0:00:00.029) 0:00:01.198 ******* skipping: [managed-node2] => { "changed": false, "false_condition": "__certificate_required_facts | difference(ansible_facts.keys() | list) | length > 0", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Check if system is ostree] ******* task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 Tuesday 15 October 2024 11:07:41 -0400 (0:00:00.050) 0:00:01.249 ******* ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.certificate : Set flag to indicate system is ostree] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Tuesday 15 October 2024 11:07:42 -0400 (0:00:00.546) 0:00:01.795 ******* ok: [managed-node2] => { "ansible_facts": { "__certificate_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Tuesday 15 October 2024 11:07:42 -0400 (0:00:00.022) 0:00:01.817 ******* skipping: [managed-node2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node2] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [managed-node2] => (item=CentOS_9.yml) => { "ansible_facts": { "__certificate_certmonger_packages": [ "certmonger", "python3-packaging" ] }, "ansible_included_var_files": [ "/tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/CentOS_9.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml" } ok: [managed-node2] => (item=CentOS_9.yml) => { "ansible_facts": { "__certificate_certmonger_packages": [ "certmonger", "python3-packaging" ] }, "ansible_included_var_files": [ "/tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/CentOS_9.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Tuesday 15 October 2024 11:07:42 -0400 (0:00:00.039) 0:00:01.857 ******* changed: [managed-node2] => { "changed": true, "rc": 0, "results": [ "Installed: python3-pyasn1-0.4.8-6.el9.noarch", "Installed: python3-cffi-1.14.5-5.el9.x86_64", "Installed: python3-ply-3.11-14.el9.noarch", "Installed: python3-pycparser-2.20-6.el9.noarch", "Installed: python3-cryptography-36.0.1-4.el9.x86_64" ] } TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Tuesday 15 October 2024 11:07:45 -0400 (0:00:03.746) 0:00:05.603 ******* changed: [managed-node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "rc": 0, "results": [ "Installed: python3-pyparsing-2.4.7-9.el9.noarch", "Installed: python3-packaging-20.9-5.el9.noarch", "Installed: certmonger-0.79.17-2.el9.x86_64" ] } TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Tuesday 15 October 2024 11:07:49 -0400 (0:00:03.287) 0:00:08.890 ******* changed: [managed-node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Tuesday 15 October 2024 11:07:49 -0400 (0:00:00.459) 0:00:09.350 ******* changed: [managed-node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Tuesday 15 October 2024 11:07:50 -0400 (0:00:00.368) 0:00:09.719 ******* changed: [managed-node2] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "enabled": true, "name": "certmonger", "state": "started", "status": { "AccessSELinuxContext": "system_u:object_r:certmonger_unit_file_t:s0", "ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "sysinit.target network.target system.slice systemd-journald.socket basic.target syslog.target dbus.socket dbus-broker.service", "AllowIsolate": "no", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "[not set]", "BusName": "org.fedorahosted.certmonger", "CPUAccounting": "yes", "CPUAffinityFromNUMA": "no", "CPUQuotaPerSecUSec": "infinity", "CPUQuotaPeriodUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "[not set]", "CPUUsageNSec": "[not set]", "CPUWeight": "[not set]", "CacheDirectoryMode": "0755", "CanFreeze": "yes", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore", "CleanResult": "success", "CollectMode": "inactive", "ConditionResult": "no", "ConditionTimestampMonotonic": "0", "ConfigurationDirectoryMode": "0755", "Conflicts": "shutdown.target", "ControlGroupId": "0", "ControlPID": "0", "CoredumpFilter": "0x33", "DefaultDependencies": "yes", "DefaultMemoryLow": "0", "DefaultMemoryMin": "0", "Delegate": "no", "Description": "Certificate monitoring and PKI enrollment", "DevicePolicy": "auto", "DynamicUser": "no", "EnvironmentFiles": "/etc/sysconfig/certmonger (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartEx": "{ path=/usr/sbin/certmonger ; argv[]=/usr/sbin/certmonger -S -p /run/certmonger.pid -n $OPTS ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExitType": "main", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FinalKillSignal": "9", "FragmentPath": "/usr/lib/systemd/system/certmonger.service", "FreezerState": "running", "GID": "[not set]", "GuessMainPID": "yes", "IOAccounting": "no", "IOReadBytes": "18446744073709551615", "IOReadOperations": "18446744073709551615", "IOSchedulingClass": "2", "IOSchedulingPriority": "4", "IOWeight": "[not set]", "IOWriteBytes": "18446744073709551615", "IOWriteOperations": "18446744073709551615", "IPAccounting": "no", "IPEgressBytes": "[no data]", "IPEgressPackets": "[no data]", "IPIngressBytes": "[no data]", "IPIngressPackets": "[no data]", "Id": "certmonger.service", "IgnoreOnIsolate": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestampMonotonic": "0", "JobRunningTimeoutUSec": "infinity", "JobTimeoutAction": "none", "JobTimeoutUSec": "infinity", "KeyringMode": "private", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "infinity", "LimitASSoft": "infinity", "LimitCORE": "infinity", "LimitCORESoft": "infinity", "LimitCPU": "infinity", "LimitCPUSoft": "infinity", "LimitDATA": "infinity", "LimitDATASoft": "infinity", "LimitFSIZE": "infinity", "LimitFSIZESoft": "infinity", "LimitLOCKS": "infinity", "LimitLOCKSSoft": "infinity", "LimitMEMLOCK": "8388608", "LimitMEMLOCKSoft": "8388608", "LimitMSGQUEUE": "819200", "LimitMSGQUEUESoft": "819200", "LimitNICE": "0", "LimitNICESoft": "0", "LimitNOFILE": "524288", "LimitNOFILESoft": "1024", "LimitNPROC": "13964", "LimitNPROCSoft": "13964", "LimitRSS": "infinity", "LimitRSSSoft": "infinity", "LimitRTPRIO": "0", "LimitRTPRIOSoft": "0", "LimitRTTIME": "infinity", "LimitRTTIMESoft": "infinity", "LimitSIGPENDING": "13964", "LimitSIGPENDINGSoft": "13964", "LimitSTACK": "infinity", "LimitSTACKSoft": "8388608", "LoadState": "loaded", "LockPersonality": "no", "LogLevelMax": "-1", "LogRateLimitBurst": "0", "LogRateLimitIntervalUSec": "0", "LogsDirectoryMode": "0755", "MainPID": "0", "ManagedOOMMemoryPressure": "auto", "ManagedOOMMemoryPressureLimit": "0", "ManagedOOMPreference": "none", "ManagedOOMSwap": "auto", "MemoryAccounting": "yes", "MemoryAvailable": "infinity", "MemoryCurrent": "[not set]", "MemoryDenyWriteExecute": "no", "MemoryHigh": "infinity", "MemoryLimit": "infinity", "MemoryLow": "0", "MemoryMax": "infinity", "MemoryMin": "0", "MemorySwapMax": "infinity", "MountAPIVFS": "no", "NFileDescriptorStore": "0", "NRestarts": "0", "NUMAPolicy": "n/a", "Names": "certmonger.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMPolicy": "stop", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "OnSuccessJobMode": "fail", "PIDFile": "/run/certmonger.pid", "PartOf": "dbus-broker.service", "Perpetual": "no", "PrivateDevices": "no", "PrivateIPC": "no", "PrivateMounts": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "PrivateUsers": "no", "ProcSubset": "all", "ProtectClock": "no", "ProtectControlGroups": "no", "ProtectHome": "no", "ProtectHostname": "no", "ProtectKernelLogs": "no", "ProtectKernelModules": "no", "ProtectKernelTunables": "no", "ProtectProc": "default", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "ReloadResult": "success", "ReloadSignal": "1", "RemainAfterExit": "no", "RemoveIPC": "no", "Requires": "sysinit.target dbus.socket system.slice", "Restart": "no", "RestartKillSignal": "15", "RestartUSec": "100ms", "RestrictNamespaces": "no", "RestrictRealtime": "no", "RestrictSUIDSGID": "no", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "RuntimeDirectoryPreserve": "no", "RuntimeMaxUSec": "infinity", "RuntimeRandomizedExtraUSec": "0", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitIntervalUSec": "10s", "StartupBlockIOWeight": "[not set]", "StartupCPUShares": "[not set]", "StartupCPUWeight": "[not set]", "StartupIOWeight": "[not set]", "StateChangeTimestampMonotonic": "0", "StateDirectoryMode": "0755", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SuccessAction": "none", "SyslogFacility": "3", "SyslogLevel": "6", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "2147483646", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "yes", "TasksCurrent": "[not set]", "TasksMax": "22342", "TimeoutAbortUSec": "1min 30s", "TimeoutCleanUSec": "infinity", "TimeoutStartFailureMode": "terminate", "TimeoutStartUSec": "1min 30s", "TimeoutStopFailureMode": "terminate", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "dbus", "UID": "[not set]", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "disabled", "UtmpMode": "init", "WatchdogSignal": "6", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "infinity" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Tuesday 15 October 2024 11:07:51 -0400 (0:00:00.969) 0:00:10.688 ******* changed: [managed-node2] => (item={'name': '/tmp/mycert', 'dns': 'www.example.com', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "dns": "www.example.com", "name": "/tmp/mycert" } } MSG: Certificate requested (new). TASK [fedora.linux_system_roles.certificate : Slurp the contents of the files] *** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Tuesday 15 October 2024 11:07:51 -0400 (0:00:00.838) 0:00:11.526 ******* failed: [managed-node2] (item=['cert', {'name': '/tmp/mycert', 'dns': 'www.example.com', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "cert", { "ca": "self-sign", "dns": "www.example.com", "name": "/tmp/mycert" } ] } MSG: file not found: /etc/pki/tls/certs//tmp/mycert.crt failed: [managed-node2] (item=['key', {'name': '/tmp/mycert', 'dns': 'www.example.com', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "key", { "ca": "self-sign", "dns": "www.example.com", "name": "/tmp/mycert" } ] } MSG: file not found: /etc/pki/tls/private//tmp/mycert.key failed: [managed-node2] (item=['ca', {'name': '/tmp/mycert', 'dns': 'www.example.com', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "item": [ "ca", { "ca": "self-sign", "dns": "www.example.com", "name": "/tmp/mycert" } ] } MSG: file not found: /etc/pki/tls/certs//tmp/mycert.crt TASK [Stop tracking certificate] *********************************************** task path: /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:48 Tuesday 15 October 2024 11:07:52 -0400 (0:00:01.108) 0:00:12.635 ******* fatal: [managed-node2]: FAILED! => { "changed": false, "cmd": [ "getcert", "stop-tracking", "-f", "/etc/pki/tls/certs/test_crt.crt" ], "delta": "0:00:00.026899", "end": "2024-10-15 11:07:53.366834", "rc": 1, "start": "2024-10-15 11:07:53.339935" } STDOUT: No request found that matched arguments. MSG: non-zero return code PLAY RECAP ********************************************************************* managed-node2 : ok=12 changed=6 unreachable=0 failed=2 skipped=1 rescued=0 ignored=0 Tuesday 15 October 2024 11:07:53 -0400 (0:00:00.423) 0:00:13.059 ******* =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 3.75s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 3.29s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 fedora.linux_system_roles.certificate : Slurp the contents of the files --- 1.11s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Gathering Facts --------------------------------------------------------- 1.10s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:3 fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.97s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 fedora.linux_system_roles.certificate : Ensure certificate requests ----- 0.84s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 fedora.linux_system_roles.certificate : Check if system is ostree ------- 0.55s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.46s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Stop tracking certificate ----------------------------------------------- 0.42s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:48 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.37s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Generate certificate using certificate role ----------------------------- 0.06s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/tests/postgresql/tests_custom_certificate.yml:10 fedora.linux_system_roles.certificate : Ensure ansible_facts used by role --- 0.05s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 fedora.linux_system_roles.certificate : Set platform/version specific variables --- 0.04s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 fedora.linux_system_roles.certificate : Set version specific variables --- 0.03s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 fedora.linux_system_roles.certificate : Set flag to indicate system is ostree --- 0.02s /tmp/collections-QvT/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15