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/tmpn177r5cy 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-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Thursday 21 July 2022 20:03:28 +0000 (0:00:00.017) 0:00:00.017 ********* ok: [/cache/rhel-8.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-8.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-8.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-8.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-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:03:29 +0000 (0:00:01.303) 0:00:01.321 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.30s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_user_config.yml ************************************************ 1 plays in /tmp/tmprk79jc_d/tests/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:2 Thursday 21 July 2022 20:03:29 +0000 (0:00:00.035) 0:00:01.356 ********* ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:11 Thursday 21 July 2022 20:03:30 +0000 (0:00:01.031) 0:00:02.387 ********* included: /tmp/tmprk79jc_d/tests/tasks/backup.yml for /cache/rhel-8.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:03:30 +0000 (0:00:00.026) 0:00:02.414 ********* included: /tmp/tmprk79jc_d/tests/tasks/setup.yml for /cache/rhel-8.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmprk79jc_d/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:03:30 +0000 (0:00:00.025) 0:00:02.440 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmprk79jc_d/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:03:31 +0000 (0:00:00.021) 0:00:02.462 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:03:32 +0000 (0:00:01.455) 0:00:03.917 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.fmfx6usp", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:03:32 +0000 (0:00:00.495) 0:00:04.413 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.fmfx6usp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.fmfx6usp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.008235", "end": "2022-07-21 16:03:32.303293", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:03:32.295058" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.fmfx6usp/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.fmfx6usp/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008073", "end": "2022-07-21 16:03:32.667641", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:03:32.659568" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:14 Thursday 21 July 2022 20:03:33 +0000 (0:00:00.874) 0:00:05.288 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "gid": 1001, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:18 Thursday 21 July 2022 20:03:34 +0000 (0:00:00.763) 0:00:06.051 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/tester123", "name": "tester123", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001 } TASK [Run role] **************************************************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:23 Thursday 21 July 2022 20:03:35 +0000 (0:00:00.770) 0:00:06.821 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:03:35 +0000 (0:00:00.033) 0:00:06.855 ********* included: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:03:35 +0000 (0:00:00.027) 0:00:06.883 ********* ok: [/cache/rhel-8.qcow2] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:03:35 +0000 (0:00:00.509) 0:00:07.393 ********* skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_facts": { "__ssh_defaults": { "Include": "/etc/ssh/ssh_config.d/*.conf" }, "__ssh_drop_in_name": "00-ansible", "__ssh_supports_drop_in": true }, "ansible_included_var_files": [ "/tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:03:35 +0000 (0:00:00.049) 0:00:07.442 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:03:37 +0000 (0:00:01.251) 0:00:08.693 ********* ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:03:37 +0000 (0:00:00.519) 0:00:09.213 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "gid": 1001, "group": "tester123", "mode": "0700", "owner": "tester123", "path": "/home/tester123/.ssh/", "secontext": "unconfined_u:object_r:ssh_home_t:s0", "size": 6, "state": "directory", "uid": 1001 } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:03:38 +0000 (0:00:00.556) 0:00:09.770 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "dest": "/home/tester123/.ssh/config", "gid": 1001, "group": "tester123", "md5sum": "df1b5553fea0fc8007bd9d80d983bbbe", "mode": "0600", "owner": "tester123", "secontext": "unconfined_u:object_r:ssh_home_t:s0", "size": 98, "src": "/root/.ansible/tmp/ansible-tmp-1658433818.3904905-21133-258707480036604/source", "state": "file", "uid": 1001 } META: role_complete for /cache/rhel-8.qcow2 TASK [Gather information about the user] *************************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:35 Thursday 21 July 2022 20:03:39 +0000 (0:00:01.127) 0:00:10.897 ********* ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:46 Thursday 21 July 2022 20:03:39 +0000 (0:00:00.373) 0:00:11.271 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:51 Thursday 21 July 2022 20:03:40 +0000 (0:00:00.475) 0:00:11.746 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433817.1466393, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "ctime": 1658433818.2596393, "dev": 64515, "device_type": 0, "executable": true, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 8442002, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0700", "mtime": 1658433818.2596393, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 20, "uid": 1001, "version": "3378371732", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:60 Thursday 21 July 2022 20:03:40 +0000 (0:00:00.421) 0:00:12.168 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:68 Thursday 21 July 2022 20:03:40 +0000 (0:00:00.061) 0:00:12.229 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433819.1296394, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658433818.2666395, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 17574199, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433817.8416393, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "1473117327", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:75 Thursday 21 July 2022 20:03:41 +0000 (0:00:00.419) 0:00:12.649 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433819.1296394, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658433818.2666395, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 17574199, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433817.8416393, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "1473117327", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify the options are in the file] ************************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:81 Thursday 21 July 2022 20:03:41 +0000 (0:00:00.371) 0:00:13.021 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:92 Thursday 21 July 2022 20:03:41 +0000 (0:00:00.074) 0:00:13.095 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:100 Thursday 21 July 2022 20:03:41 +0000 (0:00:00.060) 0:00:13.156 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "cmd": [ "ssh", "-vvv", "-G", "example" ], "delta": "0:00:00.006661", "end": "2022-07-21 16:03:40.937712", "rc": 0, "start": "2022-07-21 16:03:40.931051" } STDOUT: user somebody hostname example.com port 22 addkeystoagent false addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no fingerprinthash SHA256 forwardagent no forwardx11 no forwardx11trusted yes gatewayports no gssapiauthentication no gssapikeyexchange no gssapidelegatecredentials no gssapitrustdns no gssapirenewalforcesrekey no gssapikexalgorithms gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1- hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no proxyusefdpass no pubkeyauthentication yes requesttty auto streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc hostkeyalgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa hostbasedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa loglevel DEBUG3 macs hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 pubkeyacceptedkeytypes ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 identityfile ~/.ssh/id_xmss canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 sendenv LANG sendenv LC_CTYPE sendenv LC_NUMERIC sendenv LC_TIME sendenv LC_COLLATE sendenv LC_MONETARY sendenv LC_MESSAGES sendenv LC_PAPER sendenv LC_NAME sendenv LC_ADDRESS sendenv LC_TELEPHONE sendenv LC_MEASUREMENT sendenv LC_IDENTIFICATION sendenv LC_ALL sendenv LANGUAGE sendenv XMODIFIERS connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos af21 cs1 rekeylimit 0 0 streamlocalbindmask 0177 syslogfacility USER STDERR: OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021 debug1: Reading configuration data /home/tester123/.ssh/config debug1: /home/tester123/.ssh/config line 5: Applying options for example debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/00-ansible.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/00-ansible.conf debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host example.com originally example debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final' debug2: match not found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only) debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] debug1: configuration requests final Match pass debug1: re-parsing configuration debug1: Reading configuration data /home/tester123/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/00-ansible.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/00-ansible.conf debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host example.com originally example debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final' debug2: match found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:110 Thursday 21 July 2022 20:03:42 +0000 (0:00:00.403) 0:00:13.560 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Download the global configuration files too] ***************************** task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:119 Thursday 21 July 2022 20:03:42 +0000 (0:00:00.070) 0:00:13.630 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkluY2x1ZGUgL2V0Yy9zc2gvc3NoX2NvbmZpZy5kLyouY29uZgo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:124 Thursday 21 July 2022 20:03:42 +0000 (0:00:00.387) 0:00:14.017 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmprk79jc_d/tests/tests_user_config.yml:134 Thursday 21 July 2022 20:03:42 +0000 (0:00:00.074) 0:00:14.091 ********* included: /tmp/tmprk79jc_d/tests/tasks/restore.yml for /cache/rhel-8.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmprk79jc_d/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:03:42 +0000 (0:00:00.027) 0:00:14.119 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.fmfx6usp//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.fmfx6usp//etc/ssh/ssh_config.d/00-ansible.conf $(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nelif test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n rm /etc/ssh/ssh_config.d/00-ansible.conf\nfi\n", "delta": "0:00:00.006018", "end": "2022-07-21 16:03:41.924693", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:03:41.918675" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.fmfx6usp//etc/ssh/ssh_config; then\n cp /tmp/ansible.fmfx6usp//etc/ssh/ssh_config $(dirname /etc/ssh/ssh_config)\nelif test -f /etc/ssh/ssh_config; then\n rm /etc/ssh/ssh_config\nfi\n", "delta": "0:00:00.006352", "end": "2022-07-21 16:03:42.285250", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:03:42.278898" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmprk79jc_d/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:03:43 +0000 (0:00:00.789) 0:00:14.909 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "path": "/tmp/ansible.fmfx6usp", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=31 changed=5 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Thursday 21 July 2022 20:03:43 +0000 (0:00:00.384) 0:00:15.293 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.46s /tmp/tmprk79jc_d/tests/tasks/setup.yml:7 -------------------------------------- set up internal repositories -------------------------------------------- 1.30s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- linux-system-roles.ssh : Ensure required packages are installed --------- 1.25s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- linux-system-roles.ssh : Generate the configuration file ---------------- 1.13s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 1.03s /tmp/tmprk79jc_d/tests/tests_user_config.yml:2 -------------------------------- Backup files ------------------------------------------------------------ 0.87s /tmp/tmprk79jc_d/tests/tasks/backup.yml:13 ------------------------------------ Restore backed up files and remove what was not present ----------------- 0.79s /tmp/tmprk79jc_d/tests/tasks/restore.yml:2 ------------------------------------ Create a test user ------------------------------------------------------ 0.77s /tmp/tmprk79jc_d/tests/tests_user_config.yml:18 ------------------------------- Create a test group (with the same name as user) ------------------------ 0.76s /tmp/tmprk79jc_d/tests/tests_user_config.yml:14 ------------------------------- linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.56s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.52s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.51s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.50s /tmp/tmprk79jc_d/tests/tasks/backup.yml:5 ------------------------------------- Download the created configuration file --------------------------------- 0.48s /tmp/tmprk79jc_d/tests/tests_user_config.yml:46 ------------------------------- Stat the .ssh dir ------------------------------------------------------- 0.42s /tmp/tmprk79jc_d/tests/tests_user_config.yml:51 ------------------------------- Make sure the file is readable by user ---------------------------------- 0.42s /tmp/tmprk79jc_d/tests/tests_user_config.yml:68 ------------------------------- Test the effective configuration using ssh ------------------------------ 0.40s /tmp/tmprk79jc_d/tests/tests_user_config.yml:100 ------------------------------ Download the global configuration files too ----------------------------- 0.39s /tmp/tmprk79jc_d/tests/tests_user_config.yml:119 ------------------------------ Remove temporary directory for backup files ----------------------------- 0.38s /tmp/tmprk79jc_d/tests/tasks/restore.yml:15 ----------------------------------- Gather information about the user --------------------------------------- 0.37s /tmp/tmprk79jc_d/tests/tests_user_config.yml:35 ------------------------------- 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/tmpn177r5cy 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-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Thursday 21 July 2022 20:06:29 +0000 (0:00:00.017) 0:00:00.017 ********* ok: [/cache/rhel-8.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-8.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-8.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-8.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-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:06:30 +0000 (0:00:01.294) 0:00:01.312 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.29s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_user_config.yml ************************************************ 1 plays in /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:2 Thursday 21 July 2022 20:06:30 +0000 (0:00:00.015) 0:00:01.327 ********* ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:11 Thursday 21 July 2022 20:06:31 +0000 (0:00:01.048) 0:00:02.376 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml for /cache/rhel-8.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:06:31 +0000 (0:00:00.025) 0:00:02.401 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml for /cache/rhel-8.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:06:31 +0000 (0:00:00.024) 0:00:02.426 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:06:31 +0000 (0:00:00.023) 0:00:02.449 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:06:32 +0000 (0:00:01.419) 0:00:03.868 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.etxqo38g", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:06:33 +0000 (0:00:00.492) 0:00:04.360 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.etxqo38g/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.etxqo38g/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.008227", "end": "2022-07-21 16:06:33.873452", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:06:33.865225" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.etxqo38g/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.etxqo38g/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008490", "end": "2022-07-21 16:06:34.239928", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:06:34.231438" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:14 Thursday 21 July 2022 20:06:34 +0000 (0:00:00.879) 0:00:05.240 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "gid": 1001, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:18 Thursday 21 July 2022 20:06:35 +0000 (0:00:00.751) 0:00:05.991 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/tester123", "name": "tester123", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001 } TASK [Run role] **************************************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:23 Thursday 21 July 2022 20:06:35 +0000 (0:00:00.813) 0:00:06.805 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:06:35 +0000 (0:00:00.038) 0:00:06.843 ********* included: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:06:35 +0000 (0:00:00.028) 0:00:06.871 ********* ok: [/cache/rhel-8.qcow2] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:06:36 +0000 (0:00:00.513) 0:00:07.384 ********* skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8.qcow2] => (item=RedHat_8.yml) => { "ansible_facts": { "__ssh_defaults": { "Include": "/etc/ssh/ssh_config.d/*.conf" }, "__ssh_drop_in_name": "00-ansible", "__ssh_supports_drop_in": true }, "ansible_included_var_files": [ "/tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:06:36 +0000 (0:00:00.058) 0:00:07.443 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:06:37 +0000 (0:00:01.246) 0:00:08.689 ********* ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:06:38 +0000 (0:00:00.513) 0:00:09.202 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "gid": 1001, "group": "tester123", "mode": "0700", "owner": "tester123", "path": "/home/tester123/.ssh/", "secontext": "unconfined_u:object_r:ssh_home_t:s0", "size": 6, "state": "directory", "uid": 1001 } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:06:38 +0000 (0:00:00.522) 0:00:09.725 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "dest": "/home/tester123/.ssh/config", "gid": 1001, "group": "tester123", "md5sum": "df1b5553fea0fc8007bd9d80d983bbbe", "mode": "0600", "owner": "tester123", "secontext": "unconfined_u:object_r:ssh_home_t:s0", "size": 98, "src": "/root/.ansible/tmp/ansible-tmp-1658433998.88115-25156-233790614387330/source", "state": "file", "uid": 1001 } META: role_complete for /cache/rhel-8.qcow2 TASK [Gather information about the user] *************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:35 Thursday 21 July 2022 20:06:39 +0000 (0:00:01.115) 0:00:10.840 ********* ok: [/cache/rhel-8.qcow2] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:45 Thursday 21 July 2022 20:06:40 +0000 (0:00:00.372) 0:00:11.212 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:50 Thursday 21 July 2022 20:06:40 +0000 (0:00:00.486) 0:00:11.698 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433998.7234197, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "ctime": 1658433999.8274198, "dev": 64515, "device_type": 0, "executable": true, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 9246337, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0700", "mtime": 1658433999.8274198, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 20, "uid": 1001, "version": "772041421", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:58 Thursday 21 July 2022 20:06:41 +0000 (0:00:00.391) 0:00:12.090 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:66 Thursday 21 July 2022 20:06:41 +0000 (0:00:00.036) 0:00:12.126 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658434000.7014198, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658433999.8314197, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 17574570, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433999.4184196, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "3224735747", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:73 Thursday 21 July 2022 20:06:41 +0000 (0:00:00.435) 0:00:12.562 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658434000.7014198, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658433999.8314197, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 17574570, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433999.4184196, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "3224735747", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify the options are in the file] ************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:78 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.380) 0:00:12.942 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:89 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.049) 0:00:12.992 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:97 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.058) 0:00:13.050 ********* changed: [/cache/rhel-8.qcow2] => { "changed": true, "cmd": [ "ssh", "-vvv", "-G", "example" ], "delta": "0:00:00.006328", "end": "2022-07-21 16:06:42.488406", "rc": 0, "start": "2022-07-21 16:06:42.482078" } STDOUT: user somebody hostname example.com port 22 addkeystoagent false addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no fingerprinthash SHA256 forwardagent no forwardx11 no forwardx11trusted yes gatewayports no gssapiauthentication no gssapikeyexchange no gssapidelegatecredentials no gssapitrustdns no gssapirenewalforcesrekey no gssapikexalgorithms gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1- hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no proxyusefdpass no pubkeyauthentication yes requesttty auto streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc hostkeyalgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa hostbasedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa loglevel DEBUG3 macs hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 pubkeyacceptedkeytypes ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 identityfile ~/.ssh/id_xmss canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 sendenv LANG sendenv LC_CTYPE sendenv LC_NUMERIC sendenv LC_TIME sendenv LC_COLLATE sendenv LC_MONETARY sendenv LC_MESSAGES sendenv LC_PAPER sendenv LC_NAME sendenv LC_ADDRESS sendenv LC_TELEPHONE sendenv LC_MEASUREMENT sendenv LC_IDENTIFICATION sendenv LC_ALL sendenv LANGUAGE sendenv XMODIFIERS connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos af21 cs1 rekeylimit 0 0 streamlocalbindmask 0177 syslogfacility USER STDERR: OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021 debug1: Reading configuration data /home/tester123/.ssh/config debug1: /home/tester123/.ssh/config line 5: Applying options for example debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/00-ansible.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/00-ansible.conf debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host example.com originally example debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final' debug2: match not found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only) debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] debug1: configuration requests final Match pass debug1: re-parsing configuration debug1: Reading configuration data /home/tester123/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/00-ansible.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/00-ansible.conf debug3: /etc/ssh/ssh_config line 4: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host example.com originally example debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final' debug2: match found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:106 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.439) 0:00:13.490 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Download the global configuration files too] ***************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:114 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.049) 0:00:13.539 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkluY2x1ZGUgL2V0Yy9zc2gvc3NoX2NvbmZpZy5kLyouY29uZgo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:119 Thursday 21 July 2022 20:06:42 +0000 (0:00:00.357) 0:00:13.897 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:129 Thursday 21 July 2022 20:06:43 +0000 (0:00:00.074) 0:00:13.972 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml for /cache/rhel-8.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:06:43 +0000 (0:00:00.026) 0:00:13.998 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.etxqo38g//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.etxqo38g//etc/ssh/ssh_config.d/00-ansible.conf $(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nelif test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n rm /etc/ssh/ssh_config.d/00-ansible.conf\nfi\n", "delta": "0:00:00.008221", "end": "2022-07-21 16:06:43.430659", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:06:43.422438" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.etxqo38g//etc/ssh/ssh_config; then\n cp /tmp/ansible.etxqo38g//etc/ssh/ssh_config $(dirname /etc/ssh/ssh_config)\nelif test -f /etc/ssh/ssh_config; then\n rm /etc/ssh/ssh_config\nfi\n", "delta": "0:00:00.005899", "end": "2022-07-21 16:06:43.790328", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:06:43.784429" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:06:43 +0000 (0:00:00.788) 0:00:14.786 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "path": "/tmp/ansible.etxqo38g", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=31 changed=5 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 Thursday 21 July 2022 20:06:44 +0000 (0:00:00.366) 0:00:15.152 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.42s /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:7 ---------------------------------- set up internal repositories -------------------------------------------- 1.29s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 1.25s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.12s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 1.05s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:2 ---------------------------- Backup files ------------------------------------------------------------ 0.88s /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:13 -------------------------------- Create a test user ------------------------------------------------------ 0.81s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:18 --------------------------- Restore backed up files and remove what was not present ----------------- 0.79s /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:2 -------------------------------- Create a test group (with the same name as user) ------------------------ 0.75s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:14 --------------------------- fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.52s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.51s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.51s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.49s /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:5 --------------------------------- Download the created configuration file --------------------------------- 0.49s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:45 --------------------------- Test the effective configuration using ssh ------------------------------ 0.44s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:97 --------------------------- Make sure the file is readable by user ---------------------------------- 0.44s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:66 --------------------------- Stat the .ssh dir ------------------------------------------------------- 0.39s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:50 --------------------------- Stat the configuration file --------------------------------------------- 0.38s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:73 --------------------------- Gather information about the user --------------------------------------- 0.37s /tmp/tmpl5tsfk0r/tests/ssh/tests_user_config.yml:35 --------------------------- Remove temporary directory for backup files ----------------------------- 0.37s /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:15 -------------------------------