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/tmpxzwiidf_ 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: tests_user_config.yml ************************************************ 1 plays in /tmp/tmpphxus3ul/tests/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:2 Thursday 21 July 2022 20:41:05 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:11 Thursday 21 July 2022 20:41:06 +0000 (0:00:01.102) 0:00:01.114 ********* included: /tmp/tmpphxus3ul/tests/tasks/backup.yml for /cache/centos-9.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpphxus3ul/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:41:06 +0000 (0:00:00.026) 0:00:01.141 ********* included: /tmp/tmpphxus3ul/tests/tasks/setup.yml for /cache/centos-9.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpphxus3ul/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:41:06 +0000 (0:00:00.023) 0:00:01.165 ********* skipping: [/cache/centos-9.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpphxus3ul/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:41:06 +0000 (0:00:00.020) 0:00:01.186 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpphxus3ul/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:41:07 +0000 (0:00:00.946) 0:00:02.132 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.hjf95tci", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpphxus3ul/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:41:08 +0000 (0:00:00.461) 0:00:02.593 ********* ok: [/cache/centos-9.qcow2.snap] => (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.hjf95tci/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.hjf95tci/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003141", "end": "2022-07-21 16:41:08.228243", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:41:08.225102" } ok: [/cache/centos-9.qcow2.snap] => (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.hjf95tci/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.hjf95tci/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008654", "end": "2022-07-21 16:41:08.581424", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:41:08.572770" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:14 Thursday 21 July 2022 20:41:08 +0000 (0:00:00.862) 0:00:03.456 ********* changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "gid": 1001, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:18 Thursday 21 July 2022 20:41:09 +0000 (0:00:00.554) 0:00:04.010 ********* changed: [/cache/centos-9.qcow2.snap] => { "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/tmpphxus3ul/tests/tests_user_config.yml:23 Thursday 21 July 2022 20:41:10 +0000 (0:00:00.601) 0:00:04.611 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:41:10 +0000 (0:00:00.032) 0:00:04.643 ********* included: /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:41:10 +0000 (0:00:00.025) 0:00:04.669 ********* ok: [/cache/centos-9.qcow2.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:41:10 +0000 (0:00:00.506) 0:00:05.176 ********* skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:41:10 +0000 (0:00:00.041) 0:00:05.217 ********* ok: [/cache/centos-9.qcow2.snap] => { "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/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:41:11 +0000 (0:00:00.806) 0:00:06.023 ********* ok: [/cache/centos-9.qcow2.snap] => { "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/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:41:12 +0000 (0:00:00.484) 0:00:06.507 ********* changed: [/cache/centos-9.qcow2.snap] => { "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/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:41:12 +0000 (0:00:00.521) 0:00:07.029 ********* changed: [/cache/centos-9.qcow2.snap] => { "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-1658436072.627431-61863-146836531696045/source", "state": "file", "uid": 1001 } META: role_complete for /cache/centos-9.qcow2.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:35 Thursday 21 July 2022 20:41:13 +0000 (0:00:01.120) 0:00:08.149 ********* ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:46 Thursday 21 July 2022 20:41:14 +0000 (0:00:00.382) 0:00:08.532 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:51 Thursday 21 July 2022 20:41:14 +0000 (0:00:00.493) 0:00:09.026 ********* [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/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436072.1472564, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "ctime": 1658436073.2532563, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 12602789, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0700", "mtime": 1658436073.2532563, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 20, "uid": 1001, "version": "2143465486", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:60 Thursday 21 July 2022 20:41:14 +0000 (0:00:00.398) 0:00:09.424 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:68 Thursday 21 July 2022 20:41:14 +0000 (0:00:00.037) 0:00:09.462 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436074.1482563, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658436073.2542565, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 16777386, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658436072.8462565, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "3470579433", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:75 Thursday 21 July 2022 20:41:15 +0000 (0:00:00.399) 0:00:09.861 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436074.1482563, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658436073.2542565, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 16777386, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658436072.8462565, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "3470579433", "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/tmpphxus3ul/tests/tests_user_config.yml:81 Thursday 21 July 2022 20:41:15 +0000 (0:00:00.388) 0:00:10.249 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:92 Thursday 21 July 2022 20:41:15 +0000 (0:00:00.051) 0:00:10.300 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:100 Thursday 21 July 2022 20:41:15 +0000 (0:00:00.036) 0:00:10.337 ********* changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "cmd": [ "ssh", "-vvv", "-G", "example" ], "delta": "0:00:00.007418", "end": "2022-07-21 16:41:15.860282", "rc": 0, "start": "2022-07-21 16:41:15.852864" } STDOUT: user somebody hostname example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false checkhostip no compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no fingerprinthash SHA256 forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapikeyexchange no gssapidelegatecredentials no gssapitrustdns no gssapirenewalforcesrekey no gssapikexalgorithms gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-group14-sha1-,gss-gex-sha1- hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no proxyusefdpass no pubkeyauthentication yes requesttty auto sessiontype default stdinnull no forkafterauthentication no streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false verifyhostkeydns false visualhostkey no updatehostkeys true canonicalizemaxdots 1 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 rsaminsize 1024 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com hostkeyalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa hostbasedacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,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-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 casignaturealgorithms ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256 loglevel DEBUG3 macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 securitykeyprovider internal pubkeyacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ecdsa_sk identityfile ~/.ssh/id_ed25519 identityfile ~/.ssh/id_ed25519_sk identityfile ~/.ssh/id_xmss canonicaldomains none globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile /home/tester123/.ssh/known_hosts /home/tester123/.ssh/known_hosts2 logverbose none permitremoteopen any addkeystoagent false forwardagent no connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos af21 cs1 rekeylimit 0 0 streamlocalbindmask 0177 syslogfacility USER STDERR: OpenSSH_8.7p1, OpenSSL 3.0.1 14 Dec 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: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/tester123/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/tester123/.ssh/known_hosts2' TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:110 Thursday 21 July 2022 20:41:16 +0000 (0:00:00.400) 0:00:10.737 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Download the global configuration files too] ***************************** task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:119 Thursday 21 July 2022 20:41:16 +0000 (0:00:00.047) 0:00:10.784 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:124 Thursday 21 July 2022 20:41:16 +0000 (0:00:00.382) 0:00:11.166 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpphxus3ul/tests/tests_user_config.yml:134 Thursday 21 July 2022 20:41:16 +0000 (0:00:00.078) 0:00:11.245 ********* included: /tmp/tmpphxus3ul/tests/tasks/restore.yml for /cache/centos-9.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpphxus3ul/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:41:16 +0000 (0:00:00.025) 0:00:11.270 ********* ok: [/cache/centos-9.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.hjf95tci//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.hjf95tci//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.003807", "end": "2022-07-21 16:41:16.781558", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:41:16.777751" } ok: [/cache/centos-9.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.hjf95tci//etc/ssh/ssh_config; then\n cp /tmp/ansible.hjf95tci//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.006762", "end": "2022-07-21 16:41:17.179989", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:41:17.173227" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpphxus3ul/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:41:17 +0000 (0:00:00.786) 0:00:12.056 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.hjf95tci", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=29 changed=5 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 Thursday 21 July 2022 20:41:17 +0000 (0:00:00.399) 0:00:12.456 ********* =============================================================================== linux-system-roles.ssh : Generate the configuration file ---------------- 1.12s /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 1.10s /tmp/tmpphxus3ul/tests/tests_user_config.yml:2 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.95s /tmp/tmpphxus3ul/tests/tasks/setup.yml:7 -------------------------------------- Backup files ------------------------------------------------------------ 0.86s /tmp/tmpphxus3ul/tests/tasks/backup.yml:13 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.81s /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Restore backed up files and remove what was not present ----------------- 0.79s /tmp/tmpphxus3ul/tests/tasks/restore.yml:2 ------------------------------------ Create a test user ------------------------------------------------------ 0.60s /tmp/tmpphxus3ul/tests/tests_user_config.yml:18 ------------------------------- Create a test group (with the same name as user) ------------------------ 0.55s /tmp/tmpphxus3ul/tests/tests_user_config.yml:14 ------------------------------- linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.52s /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.51s /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Download the created configuration file --------------------------------- 0.49s /tmp/tmpphxus3ul/tests/tests_user_config.yml:46 ------------------------------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.48s /tmp/tmpphxus3ul/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- Create a temporary directory for backup files --------------------------- 0.46s /tmp/tmpphxus3ul/tests/tasks/backup.yml:5 ------------------------------------- Test the effective configuration using ssh ------------------------------ 0.40s /tmp/tmpphxus3ul/tests/tests_user_config.yml:100 ------------------------------ Remove temporary directory for backup files ----------------------------- 0.40s /tmp/tmpphxus3ul/tests/tasks/restore.yml:15 ----------------------------------- Make sure the file is readable by user ---------------------------------- 0.40s /tmp/tmpphxus3ul/tests/tests_user_config.yml:68 ------------------------------- Stat the .ssh dir ------------------------------------------------------- 0.40s /tmp/tmpphxus3ul/tests/tests_user_config.yml:51 ------------------------------- Stat the configuration file --------------------------------------------- 0.39s /tmp/tmpphxus3ul/tests/tests_user_config.yml:75 ------------------------------- Gather information about the user --------------------------------------- 0.38s /tmp/tmpphxus3ul/tests/tests_user_config.yml:35 ------------------------------- Download the global configuration files too ----------------------------- 0.38s /tmp/tmpphxus3ul/tests/tests_user_config.yml:119 ------------------------------ 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/tmpxzwiidf_ 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: tests_user_config.yml ************************************************ 1 plays in /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:2 Thursday 21 July 2022 20:43:15 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-9.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:11 Thursday 21 July 2022 20:43:16 +0000 (0:00:01.090) 0:00:01.103 ********* included: /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml for /cache/centos-9.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:43:16 +0000 (0:00:00.027) 0:00:01.131 ********* included: /tmp/tmp1qbds5ja/tests/ssh/tasks/setup.yml for /cache/centos-9.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:43:16 +0000 (0:00:00.025) 0:00:01.157 ********* skipping: [/cache/centos-9.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:43:16 +0000 (0:00:00.021) 0:00:01.178 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:43:17 +0000 (0:00:00.920) 0:00:02.099 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.qyonczpp", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:43:17 +0000 (0:00:00.447) 0:00:02.546 ********* ok: [/cache/centos-9.qcow2.snap] => (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.qyonczpp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.qyonczpp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003595", "end": "2022-07-21 16:43:17.313805", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:43:17.310210" } ok: [/cache/centos-9.qcow2.snap] => (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.qyonczpp/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.qyonczpp/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008330", "end": "2022-07-21 16:43:17.665981", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:43:17.657651" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:14 Thursday 21 July 2022 20:43:18 +0000 (0:00:00.868) 0:00:03.415 ********* changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "gid": 1001, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:18 Thursday 21 July 2022 20:43:19 +0000 (0:00:00.574) 0:00:03.989 ********* changed: [/cache/centos-9.qcow2.snap] => { "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/tmp1qbds5ja/tests/ssh/tests_user_config.yml:23 Thursday 21 July 2022 20:43:19 +0000 (0:00:00.597) 0:00:04.587 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:43:19 +0000 (0:00:00.037) 0:00:04.625 ********* included: /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/centos-9.qcow2.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:43:19 +0000 (0:00:00.028) 0:00:04.653 ********* ok: [/cache/centos-9.qcow2.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:43:20 +0000 (0:00:00.502) 0:00:05.156 ********* skipping: [/cache/centos-9.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-9.qcow2.snap] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:43:20 +0000 (0:00:00.038) 0:00:05.195 ********* ok: [/cache/centos-9.qcow2.snap] => { "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/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:43:21 +0000 (0:00:00.789) 0:00:05.984 ********* ok: [/cache/centos-9.qcow2.snap] => { "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/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:43:21 +0000 (0:00:00.492) 0:00:06.476 ********* changed: [/cache/centos-9.qcow2.snap] => { "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/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:43:22 +0000 (0:00:00.513) 0:00:06.990 ********* changed: [/cache/centos-9.qcow2.snap] => { "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-1658436202.2515018-64799-210476116224957/source", "state": "file", "uid": 1001 } META: role_complete for /cache/centos-9.qcow2.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:35 Thursday 21 July 2022 20:43:23 +0000 (0:00:01.103) 0:00:08.094 ********* ok: [/cache/centos-9.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "1001", "1001", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:45 Thursday 21 July 2022 20:43:23 +0000 (0:00:00.372) 0:00:08.466 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:50 Thursday 21 July 2022 20:43:24 +0000 (0:00:00.474) 0:00:08.940 ********* [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/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436201.227805, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 0, "charset": "binary", "ctime": 1658436202.329805, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 12602789, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0700", "mtime": 1658436202.329805, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 20, "uid": 1001, "version": "8953380", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:58 Thursday 21 July 2022 20:43:24 +0000 (0:00:00.390) 0:00:09.330 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:66 Thursday 21 July 2022 20:43:24 +0000 (0:00:00.034) 0:00:09.365 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436203.1928048, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658436202.3308048, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 16777386, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658436201.921805, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "2621712987", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:73 Thursday 21 July 2022 20:43:24 +0000 (0:00:00.381) 0:00:09.747 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "stat": { "atime": 1658436203.1928048, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658436202.3308048, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 1001, "gr_name": "tester123", "inode": 16777386, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658436201.921805, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 1001, "version": "2621712987", "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/tmp1qbds5ja/tests/ssh/tests_user_config.yml:78 Thursday 21 July 2022 20:43:25 +0000 (0:00:00.372) 0:00:10.119 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:89 Thursday 21 July 2022 20:43:25 +0000 (0:00:00.053) 0:00:10.172 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:97 Thursday 21 July 2022 20:43:25 +0000 (0:00:00.037) 0:00:10.210 ********* changed: [/cache/centos-9.qcow2.snap] => { "changed": true, "cmd": [ "ssh", "-vvv", "-G", "example" ], "delta": "0:00:00.007283", "end": "2022-07-21 16:43:24.861001", "rc": 0, "start": "2022-07-21 16:43:24.853718" } STDOUT: user somebody hostname example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false checkhostip no compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no fingerprinthash SHA256 forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapikeyexchange no gssapidelegatecredentials no gssapitrustdns no gssapirenewalforcesrekey no gssapikexalgorithms gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-group14-sha1-,gss-gex-sha1- hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no proxyusefdpass no pubkeyauthentication yes requesttty auto sessiontype default stdinnull no forkafterauthentication no streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false verifyhostkeydns false visualhostkey no updatehostkeys true canonicalizemaxdots 1 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 rsaminsize 1024 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com hostkeyalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa hostbasedacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,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-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 casignaturealgorithms ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256 loglevel DEBUG3 macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 securitykeyprovider internal pubkeyacceptedalgorithms ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ecdsa_sk identityfile ~/.ssh/id_ed25519 identityfile ~/.ssh/id_ed25519_sk identityfile ~/.ssh/id_xmss canonicaldomains none globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile /home/tester123/.ssh/known_hosts /home/tester123/.ssh/known_hosts2 logverbose none permitremoteopen any addkeystoagent false forwardagent no connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos af21 cs1 rekeylimit 0 0 streamlocalbindmask 0177 syslogfacility USER STDERR: OpenSSH_8.7p1, OpenSSL 3.0.1 14 Dec 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: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/tester123/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/tester123/.ssh/known_hosts2' TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:106 Thursday 21 July 2022 20:43:25 +0000 (0:00:00.404) 0:00:10.614 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Download the global configuration files too] ***************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:114 Thursday 21 July 2022 20:43:25 +0000 (0:00:00.072) 0:00:10.687 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:119 Thursday 21 July 2022 20:43:26 +0000 (0:00:00.382) 0:00:11.069 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:129 Thursday 21 July 2022 20:43:26 +0000 (0:00:00.049) 0:00:11.118 ********* included: /tmp/tmp1qbds5ja/tests/ssh/tasks/restore.yml for /cache/centos-9.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:43:26 +0000 (0:00:00.024) 0:00:11.143 ********* ok: [/cache/centos-9.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.qyonczpp//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.qyonczpp//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.003289", "end": "2022-07-21 16:43:25.808687", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:43:25.805398" } ok: [/cache/centos-9.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.qyonczpp//etc/ssh/ssh_config; then\n cp /tmp/ansible.qyonczpp//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.005471", "end": "2022-07-21 16:43:26.150401", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:43:26.144930" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmp1qbds5ja/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:43:27 +0000 (0:00:00.755) 0:00:11.899 ********* ok: [/cache/centos-9.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.qyonczpp", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-9.qcow2.snap : ok=29 changed=5 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 Thursday 21 July 2022 20:43:27 +0000 (0:00:00.421) 0:00:12.320 ********* =============================================================================== fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.10s /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 1.09s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:2 ---------------------------- Make sure openssh is installed before creating backup ------------------- 0.92s /tmp/tmp1qbds5ja/tests/ssh/tasks/setup.yml:7 ---------------------------------- Backup files ------------------------------------------------------------ 0.87s /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml:13 -------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.79s /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Restore backed up files and remove what was not present ----------------- 0.76s /tmp/tmp1qbds5ja/tests/ssh/tasks/restore.yml:2 -------------------------------- Create a test user ------------------------------------------------------ 0.60s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:18 --------------------------- Create a test group (with the same name as user) ------------------------ 0.57s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:14 --------------------------- fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.51s /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.50s /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.49s /tmp/tmpxzwiidf_/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Download the created configuration file --------------------------------- 0.47s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:45 --------------------------- Create a temporary directory for backup files --------------------------- 0.45s /tmp/tmp1qbds5ja/tests/ssh/tasks/backup.yml:5 --------------------------------- Remove temporary directory for backup files ----------------------------- 0.42s /tmp/tmp1qbds5ja/tests/ssh/tasks/restore.yml:15 ------------------------------- Test the effective configuration using ssh ------------------------------ 0.40s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:97 --------------------------- Stat the .ssh dir ------------------------------------------------------- 0.39s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:50 --------------------------- Download the global configuration files too ----------------------------- 0.38s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:114 -------------------------- Make sure the file is readable by user ---------------------------------- 0.38s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:66 --------------------------- Stat the configuration file --------------------------------------------- 0.37s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:73 --------------------------- Gather information about the user --------------------------------------- 0.37s /tmp/tmp1qbds5ja/tests/ssh/tests_user_config.yml:35 ---------------------------