# STDOUT: ---v---v---v---v---v--- ansible-playbook [core 2.16.0] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/ansible-2.16/lib/python3.11/site-packages/ansible ansible collection location = /WORKDIR/git-weekly-cis96jn8xk/.collection executable location = /opt/ansible-2.16/bin/ansible-playbook python version = 3.11.5 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/opt/ansible-2.16/bin/python) jinja version = 3.1.2 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: tests_subject.yml **************************************************** 2 plays in /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml PLAY [Issue simple self-signed certificate] ************************************ TASK [Gathering Facts] ********************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml:2 Saturday 13 January 2024 14:43:55 +0000 (0:00:00.013) 0:00:00.013 ****** ok: [sut] TASK [fedora.linux_system_roles.certificate : Set version specific variables] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:2 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.843) 0:00:00.857 ****** included: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml for sut TASK [fedora.linux_system_roles.certificate : Ensure ansible_facts used by role] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:2 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.011) 0:00:00.868 ****** skipping: [sut] => { "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: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.018) 0:00:00.887 ****** ok: [sut] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.certificate : Set flag to indicate system is ostree] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:15 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.181) 0:00:01.068 ****** ok: [sut] => { "ansible_facts": { "__certificate_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.certificate : Set platform/version specific variables] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.015) 0:00:01.083 ****** skipping: [sut] => (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: [sut] => (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: [sut] => (item=CentOS_7.yml) => { "ansible_facts": { "__certificate_default_directory": "/etc/pki/tls", "__certificate_packages": [ "python-pyasn1", "python-cryptography", "python-dbus" ] }, "ansible_included_var_files": [ "/WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [sut] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 Saturday 13 January 2024 14:43:56 +0000 (0:00:00.024) 0:00:01.108 ****** changed: [sut] => { "changed": true, "changes": { "installed": [ "python-pyasn1", "python-cryptography" ] }, "rc": 0, "results": [ "dbus-python-1.1.1-9.el7.x86_64 providing python-dbus is already installed", "Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nResolving Dependencies\n--> Running transaction check\n---> Package python2-cryptography.x86_64 0:1.7.2-2.el7 will be installed\n--> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-2.el7.x86_64\n--> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-2.el7.x86_64\n---> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed\n--> Running transaction check\n---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed\n--> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64\n---> Package python-idna.noarch 0:2.4-1.el7 will be installed\n--> Running transaction check\n---> Package python-pycparser.noarch 0:2.14-1.el7 will be installed\n--> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch\n--> Running transaction check\n---> Package python-ply.noarch 0:3.4-11.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python2-cryptography x86_64 1.7.2-2.el7 base 502 k\n python2-pyasn1 noarch 0.1.9-7.el7 base 100 k\nInstalling for dependencies:\n python-cffi x86_64 1.6.0-5.el7 base 218 k\n python-idna noarch 2.4-1.el7 base 94 k\n python-ply noarch 3.4-11.el7 base 123 k\n python-pycparser noarch 2.14-1.el7 base 104 k\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+4 Dependent packages)\n\nTotal download size: 1.1 M\nInstalled size: 5.8 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 3.6 MB/s | 1.1 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : python2-pyasn1-0.1.9-7.el7.noarch 1/6 \n Installing : python-ply-3.4-11.el7.noarch 2/6 \n Installing : python-pycparser-2.14-1.el7.noarch 3/6 \n Installing : python-cffi-1.6.0-5.el7.x86_64 4/6 \n Installing : python-idna-2.4-1.el7.noarch 5/6 \n Installing : python2-cryptography-1.7.2-2.el7.x86_64 6/6 \n Verifying : python-idna-2.4-1.el7.noarch 1/6 \n Verifying : python-pycparser-2.14-1.el7.noarch 2/6 \n Verifying : python-ply-3.4-11.el7.noarch 3/6 \n Verifying : python-cffi-1.6.0-5.el7.x86_64 4/6 \n Verifying : python2-pyasn1-0.1.9-7.el7.noarch 5/6 \n Verifying : python2-cryptography-1.7.2-2.el7.x86_64 6/6 \n\nInstalled:\n python2-cryptography.x86_64 0:1.7.2-2.el7 python2-pyasn1.noarch 0:0.1.9-7.el7\n\nDependency Installed:\n python-cffi.x86_64 0:1.6.0-5.el7 python-idna.noarch 0:2.4-1.el7 \n python-ply.noarch 0:3.4-11.el7 python-pycparser.noarch 0:2.14-1.el7 \n\nComplete!\n" ] } lsrpackages: python-cryptography python-dbus python-pyasn1 TASK [fedora.linux_system_roles.certificate : Ensure provider packages are installed] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Saturday 13 January 2024 14:44:03 +0000 (0:00:06.832) 0:00:07.941 ****** changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "changes": { "installed": [ "certmonger" ] }, "rc": 0, "results": [ "Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nResolving Dependencies\n--> Running transaction check\n---> Package certmonger.x86_64 0:0.78.4-17.el7_9 will be installed\n--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libxmlrpc_util.so.3()(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libxmlrpc_client.so.3()(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libxmlrpc.so.3()(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libtevent.so.0()(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Processing Dependency: libtalloc.so.2()(64bit) for package: certmonger-0.78.4-17.el7_9.x86_64\n--> Running transaction check\n---> Package libtalloc.x86_64 0:2.1.16-1.el7 will be installed\n---> Package libtevent.x86_64 0:0.9.39-1.el7 will be installed\n---> Package xmlrpc-c.x86_64 0:1.32.5-1905.svn2451.el7 will be installed\n---> Package xmlrpc-c-client.x86_64 0:1.32.5-1905.svn2451.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n certmonger x86_64 0.78.4-17.el7_9 updates 608 k\nInstalling for dependencies:\n libtalloc x86_64 2.1.16-1.el7 base 33 k\n libtevent x86_64 0.9.39-1.el7 base 41 k\n xmlrpc-c x86_64 1.32.5-1905.svn2451.el7 base 130 k\n xmlrpc-c-client x86_64 1.32.5-1905.svn2451.el7 base 32 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 843 k\nInstalled size: 3.3 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 2.1 MB/s | 843 kB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtalloc-2.1.16-1.el7.x86_64 1/5 \n Installing : xmlrpc-c-1.32.5-1905.svn2451.el7.x86_64 2/5 \n Installing : xmlrpc-c-client-1.32.5-1905.svn2451.el7.x86_64 3/5 \n Installing : libtevent-0.9.39-1.el7.x86_64 4/5 \n Installing : certmonger-0.78.4-17.el7_9.x86_64 5/5 \n Verifying : xmlrpc-c-1.32.5-1905.svn2451.el7.x86_64 1/5 \n Verifying : libtalloc-2.1.16-1.el7.x86_64 2/5 \n Verifying : certmonger-0.78.4-17.el7_9.x86_64 3/5 \n Verifying : xmlrpc-c-client-1.32.5-1905.svn2451.el7.x86_64 4/5 \n Verifying : libtevent-0.9.39-1.el7.x86_64 5/5 \n\nInstalled:\n certmonger.x86_64 0:0.78.4-17.el7_9 \n\nDependency Installed:\n libtalloc.x86_64 0:2.1.16-1.el7 \n libtevent.x86_64 0:0.9.39-1.el7 \n xmlrpc-c.x86_64 0:1.32.5-1905.svn2451.el7 \n xmlrpc-c-client.x86_64 0:1.32.5-1905.svn2451.el7 \n\nComplete!\n" ] } lsrpackages: certmonger TASK [fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 Saturday 13 January 2024 14:44:07 +0000 (0:00:03.419) 0:00:11.360 ****** changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//pre-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Saturday 13 January 2024 14:44:07 +0000 (0:00:00.214) 0:00:11.574 ****** changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/etc/certmonger//post-scripts", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [fedora.linux_system_roles.certificate : Ensure provider service is running] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Saturday 13 January 2024 14:44:07 +0000 (0:00:00.152) 0:00:11.727 ****** changed: [sut] => (item=certmonger) => { "__certificate_provider": "certmonger", "ansible_loop_var": "__certificate_provider", "changed": true, "enabled": true, "name": "certmonger", "state": "started", "status": { "ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "syslog.target system.slice dbus.service systemd-journald.socket basic.target network.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "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": "no", "ConditionTimestampMonotonic": "0", "Conflicts": "shutdown.target", "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": "0", "ExecMainStartTimestampMonotonic": "0", "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", "InactiveExitTimestampMonotonic": "0", "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": "14311", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "14311", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "0", "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": "dead", "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": "disabled", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0" } } TASK [fedora.linux_system_roles.certificate : Ensure certificate requests] ***** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.478) 0:00:12.205 ****** changed: [sut] => (item={'name': 'mycert_subject', 'dns': 'www.example.com', 'common_name': 'Some other common name', 'country': 'US', 'state': 'NC', 'locality': 'Raleigh', 'organization': 'Red Hat', 'organizational_unit': 'Linux', 'ca': 'self-sign'}) => { "ansible_loop_var": "item", "changed": true, "item": { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } } MSG: Certificate requested (new). TASK [fedora.linux_system_roles.certificate : Slurp the contents of the files] *** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.763) 0:00:12.968 ****** skipping: [sut] => (item=['cert', {'name': 'mycert_subject', 'dns': 'www.example.com', 'common_name': 'Some other common name', 'country': 'US', 'state': 'NC', 'locality': 'Raleigh', 'organization': 'Red Hat', 'organizational_unit': 'Linux', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "false_condition": "certificate_test_mode | d(false)", "item": [ "cert", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } skipping: [sut] => (item=['key', {'name': 'mycert_subject', 'dns': 'www.example.com', 'common_name': 'Some other common name', 'country': 'US', 'state': 'NC', 'locality': 'Raleigh', 'organization': 'Red Hat', 'organizational_unit': 'Linux', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "false_condition": "certificate_test_mode | d(false)", "item": [ "key", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } skipping: [sut] => (item=['ca', {'name': 'mycert_subject', 'dns': 'www.example.com', 'common_name': 'Some other common name', 'country': 'US', 'state': 'NC', 'locality': 'Raleigh', 'organization': 'Red Hat', 'organizational_unit': 'Linux', 'ca': 'self-sign'}]) => { "ansible_loop_var": "item", "changed": false, "false_condition": "certificate_test_mode | d(false)", "item": [ "ca", { "ca": "self-sign", "common_name": "Some other common name", "country": "US", "dns": "www.example.com", "locality": "Raleigh", "name": "mycert_subject", "organization": "Red Hat", "organizational_unit": "Linux", "state": "NC" } ], "skip_reason": "Conditional result was False" } skipping: [sut] => { "changed": false } MSG: All items skipped TASK [fedora.linux_system_roles.certificate : Create return data] ************** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:160 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.024) 0:00:12.992 ****** skipping: [sut] => { "changed": false, "false_condition": "certificate_test_mode | d(false)", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Stop tracking certificates] ****** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:176 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.016) 0:00:13.009 ****** skipping: [sut] => { "changed": false, "false_condition": "certificate_test_mode | d(false)", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.certificate : Remove files] ******************** task path: /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:181 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.018) 0:00:13.028 ****** skipping: [sut] => { "changed": false, "false_condition": "certificate_test_mode | d(false)", "skip_reason": "Conditional result was False" } PLAY [Verify certificate] ****************************************************** TASK [Gathering Facts] ********************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml:19 Saturday 13 January 2024 14:44:08 +0000 (0:00:00.028) 0:00:13.057 ****** ok: [sut] TASK [Verify each certificate] ************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml:48 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.503) 0:00:13.561 ****** included: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml for sut => (item={'path': '/etc/pki/tls/certs/mycert_subject.crt', 'key_path': '/etc/pki/tls/private/mycert_subject.key', 'subject': [{'name': 'countryName', 'oid': '2.5.4.6', 'value': 'US'}, {'name': 'stateOrProvinceName', 'oid': '2.5.4.8', 'value': 'NC'}, {'name': 'localityName', 'oid': '2.5.4.7', 'value': 'Raleigh'}, {'name': 'organizationName', 'oid': '2.5.4.10', 'value': 'Red Hat'}, {'name': 'organizationalUnitName', 'oid': '2.5.4.11', 'value': 'Linux'}, {'name': 'commonName', 'oid': '2.5.4.3', 'value': 'Some other common name'}], 'subject_alt_name': [{'name': 'DNS', 'value': 'www.example.com'}]}) TASK [Set virtualenv_path] ***************************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:2 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.018) 0:00:13.579 ****** ok: [sut] => { "ansible_facts": { "__virtualenv_path": "/tmp/certificate-tests-venv" }, "changed": false } TASK [Check if system is ostree] *********************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:9 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.008) 0:00:13.587 ****** skipping: [sut] => { "changed": false, "false_condition": "not __certificate_is_ostree is defined", "skip_reason": "Conditional result was False" } TASK [Set flag to indicate system is ostree] *********************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:14 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.011) 0:00:13.599 ****** skipping: [sut] => { "changed": false, "false_condition": "not __certificate_is_ostree is defined", "skip_reason": "Conditional result was False" } TASK [Ensure python3 is installed] ********************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:18 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.010) 0:00:13.609 ****** ok: [sut] => { "changed": false, "rc": 0, "results": [ "python2-cryptography-1.7.2-2.el7.x86_64 providing python2-cryptography is already installed", "python2-cryptography-1.7.2-2.el7.x86_64 providing python2-cryptography is already installed" ] } lsrpackages: python2-cryptography TASK [Ensure python3 is installed] ********************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:28 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.354) 0:00:13.964 ****** skipping: [sut] => { "changed": false, "false_condition": "ansible_distribution_major_version != \"7\"", "skip_reason": "Conditional result was False" } TASK [Retrieve certificate file stats] ***************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:38 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.010) 0:00:13.974 ****** ok: [sut] => { "changed": false, "stat": { "atime": 1705157048.6486979, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "6ac209e82b788e30c1713073708e35124a3d913e", "ctime": 1705157048.6456978, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 169950, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1705157048.6456978, "nlink": 1, "path": "/etc/pki/tls/certs/mycert_subject.crt", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1407, "uid": 0, "version": "195018239", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if certificate file exists] *************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:43 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.136) 0:00:14.111 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate file owner and group] ********************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:49 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.012) 0:00:14.123 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate permissions] ****************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:59 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.023) 0:00:14.147 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Retrieve key file stats] ************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:65 Saturday 13 January 2024 14:44:09 +0000 (0:00:00.020) 0:00:14.167 ****** ok: [sut] => { "changed": false, "stat": { "atime": 1705157048.6006978, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "5fd3a974b8c644d21bce748df98989cca7ac9c82", "ctime": 1705157048.6456978, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 169949, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1705157048.6456978, "nlink": 1, "path": "/etc/pki/tls/private/mycert_subject.key", "pw_name": "root", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 1708, "uid": 0, "version": "195018226", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify if key file exists] *********************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:70 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.135) 0:00:14.303 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify key file owner and group] ***************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:76 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.011) 0:00:14.315 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Parse certificate] ******************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:86 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.021) 0:00:14.337 ****** ok: [sut] => { "certificate": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "F8:2F:77:62:5D:F4:FE:D3:3E:87:3C:6E:12:5C:68:83:40:6D:A6:DE" }, "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": [ "key_encipherment", "digital_signature" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "37:A2:E1:19:A7:5F:A7:38:68:36:D4:8A:28:A1:DC:AE:F2:FB:B3:BF" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "17:44:B0:F1:E6:22:D8:91:1D:D1:2F:A1:26:9E:C5:A8:53:6D:E9:21:A0:0B:7A:C3:3D:B1:C9:C9:D4:7C:97:A0:5A:4D:F2:42:A9:5E:35:AB:97:93:DB:11:4D:05:3D:04:17:2E:61:8A:10:DA:E6:6E:54:81:E6:E1:88:50:23:A3:DC:41:4B:24:4E:F9:57:11:C5:F7:B6:C3:E5:6C:45:F7:FF:07:1A:44:A1:C0:57:1A:2A:3B:DC:AD:28:2E:B3:F6:81:14:6F:64:EE:8E:1E:93:F6:67:92:0A:19:02:20:15:86:53:80:F2:A0:BF:33:1C:FD:D5:F0:60:44:1D:EF:C8:D5:9E:7C:57:A1:0C:1A:2A:04:13:94:90:8B:32:9F:6C:0E:60:A0:3E:B9:C1:B5:18:3E:75:45:0A:61:47:2C:0B:2D:79:B0:62:BE:71:22:6E:A3:7F:85:2C:34:77:51:DD:38:66:26:AB:02:39:A0:F5:5A:F1:C1:95:97:5D:3F:10:1A:4C:FD:6F:6B:D3:81:AB:68:9D:3F:23:86:84:67:44:BF:34:C7:44:4A:AC:7A:B6:38:52:49:59:03:7D:66:C1:40:78:E6:CE:A8:D4:BC:D7:55:F8:D4:DD:05:3F:8B:89:28:02:BA:08:DD:E8:B5:03:A9:51:E3:CD:3E:B1:81:C1" }, "subject": [ { "name": "localityName", "oid": "2.5.4.7", "value": "Raleigh" }, { "name": "countryName", "oid": "2.5.4.6", "value": "US" }, { "name": "stateOrProvinceName", "oid": "2.5.4.8", "value": "NC" }, { "name": "commonName", "oid": "2.5.4.3", "value": "Some other common name" }, { "name": "organizationName", "oid": "2.5.4.10", "value": "Red Hat" }, { "name": "organizationalUnitName", "oid": "2.5.4.11", "value": "Linux" } ], "validity": { "not_valid_after": "20250113144408Z", "not_valid_before": "20240113144408Z" } }, "changed": false } TASK [Load certificate YAML to cert_issued variable] *************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:92 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.410) 0:00:14.747 ****** ok: [sut] => { "ansible_facts": { "cert_issued": { "extensions": { "authorityKeyIdentifier": { "critical": false, "value": "F8:2F:77:62:5D:F4:FE:D3:3E:87:3C:6E:12:5C:68:83:40:6D:A6:DE" }, "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": [ "key_encipherment", "digital_signature" ] }, "subjectAltName": { "critical": false, "value": [ { "name": "DNS", "value": "www.example.com" } ] }, "subjectKeyIdentifier": { "critical": false, "value": "37:A2:E1:19:A7:5F:A7:38:68:36:D4:8A:28:A1:DC:AE:F2:FB:B3:BF" } }, "key_size": 2048, "signature_algorithm": { "algorithm": "sha256WithRSAEncryption", "signature": "17:44:B0:F1:E6:22:D8:91:1D:D1:2F:A1:26:9E:C5:A8:53:6D:E9:21:A0:0B:7A:C3:3D:B1:C9:C9:D4:7C:97:A0:5A:4D:F2:42:A9:5E:35:AB:97:93:DB:11:4D:05:3D:04:17:2E:61:8A:10:DA:E6:6E:54:81:E6:E1:88:50:23:A3:DC:41:4B:24:4E:F9:57:11:C5:F7:B6:C3:E5:6C:45:F7:FF:07:1A:44:A1:C0:57:1A:2A:3B:DC:AD:28:2E:B3:F6:81:14:6F:64:EE:8E:1E:93:F6:67:92:0A:19:02:20:15:86:53:80:F2:A0:BF:33:1C:FD:D5:F0:60:44:1D:EF:C8:D5:9E:7C:57:A1:0C:1A:2A:04:13:94:90:8B:32:9F:6C:0E:60:A0:3E:B9:C1:B5:18:3E:75:45:0A:61:47:2C:0B:2D:79:B0:62:BE:71:22:6E:A3:7F:85:2C:34:77:51:DD:38:66:26:AB:02:39:A0:F5:5A:F1:C1:95:97:5D:3F:10:1A:4C:FD:6F:6B:D3:81:AB:68:9D:3F:23:86:84:67:44:BF:34:C7:44:4A:AC:7A:B6:38:52:49:59:03:7D:66:C1:40:78:E6:CE:A8:D4:BC:D7:55:F8:D4:DD:05:3F:8B:89:28:02:BA:08:DD:E8:B5:03:A9:51:E3:CD:3E:B1:81:C1" }, "subject": [ { "name": "localityName", "oid": "2.5.4.7", "value": "Raleigh" }, { "name": "countryName", "oid": "2.5.4.6", "value": "US" }, { "name": "stateOrProvinceName", "oid": "2.5.4.8", "value": "NC" }, { "name": "commonName", "oid": "2.5.4.3", "value": "Some other common name" }, { "name": "organizationName", "oid": "2.5.4.10", "value": "Red Hat" }, { "name": "organizationalUnitName", "oid": "2.5.4.11", "value": "Linux" } ], "validity": { "not_valid_after": "20250113144408Z", "not_valid_before": "20240113144408Z" } } }, "changed": false } TASK [Verify certificate subject] ********************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:96 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.012) 0:00:14.760 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate SAN] ************************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:104 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.020) 0:00:14.781 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify key size] ********************************************************* task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:112 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.011) 0:00:14.792 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Key Usage] ******************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:119 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.020) 0:00:14.813 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify certificate Extended Key Usage] *********************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:130 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.023) 0:00:14.837 ****** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Retrieve auto-renew flag] ************************************************ task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:143 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.023) 0:00:14.861 ****** ok: [sut] => { "changed": false, "cmd": "set -euo pipefail; getcert list -f /etc/pki/tls/certs/mycert_subject.crt | grep 'auto-renew' | sed 's/^\\s\\+auto-renew: //g'", "delta": "0:00:00.047656", "end": "2024-01-13 14:44:10.890092", "rc": 0, "start": "2024-01-13 14:44:10.842436" } STDOUT: yes TASK [Verify certificate auto-renew flag] ************************************** task path: /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:152 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.235) 0:00:15.096 ****** ok: [sut] => { "changed": false } MSG: All assertions passed PLAY RECAP ********************************************************************* sut : ok=31 changed=6 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0 Saturday 13 January 2024 14:44:10 +0000 (0:00:00.026) 0:00:15.122 ****** =============================================================================== fedora.linux_system_roles.certificate : Ensure certificate role dependencies are installed --- 6.83s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:5 fedora.linux_system_roles.certificate : Ensure provider packages are installed --- 3.42s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:23 Gathering Facts --------------------------------------------------------- 0.84s /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml:2 ---------------------- fedora.linux_system_roles.certificate : Ensure certificate requests ----- 0.76s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:101 Gathering Facts --------------------------------------------------------- 0.50s /WORKDIR/git-weekly-cis96jn8xk/tests/tests_subject.yml:19 --------------------- fedora.linux_system_roles.certificate : Ensure provider service is running --- 0.48s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:90 Parse certificate ------------------------------------------------------- 0.41s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:86 Ensure python3 is installed --------------------------------------------- 0.35s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:18 Retrieve auto-renew flag ------------------------------------------------ 0.24s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:143 fedora.linux_system_roles.certificate : Ensure pre-scripts hooks directory exists --- 0.21s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:35 fedora.linux_system_roles.certificate : Check if system is ostree ------- 0.18s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:10 fedora.linux_system_roles.certificate : Ensure post-scripts hooks directory exists --- 0.15s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:61 Retrieve certificate file stats ----------------------------------------- 0.14s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:38 Retrieve key file stats ------------------------------------------------- 0.14s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:65 fedora.linux_system_roles.certificate : Remove files -------------------- 0.03s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:181 Verify certificate auto-renew flag -------------------------------------- 0.03s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:152 fedora.linux_system_roles.certificate : Set platform/version specific variables --- 0.02s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/set_vars.yml:19 fedora.linux_system_roles.certificate : Slurp the contents of the files --- 0.02s /WORKDIR/git-weekly-cis96jn8xk/.collection/ansible_collections/fedora/linux_system_roles/roles/certificate/tasks/main.yml:152 Verify certificate Extended Key Usage ----------------------------------- 0.02s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:130 Verify certificate Key Usage -------------------------------------------- 0.02s /WORKDIR/git-weekly-cis96jn8xk/tests/tasks/assert_certificate_parameters.yml:119 ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- [DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, does not fit var naming standard, use the singular form ANSIBLE_COLLECTIONS_PATH instead. This feature will be removed from ansible-core in version 2.19. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ---^---^---^---^---^---