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/tmpond44ouu 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_match.yml ****************************************************** 1 plays in /tmp/tmpkp2113mn/tests/tests_match.yml PLAY [Verify default packages as well as additional are installed] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpkp2113mn/tests/tests_match.yml:2 Thursday 21 July 2022 20:15:03 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-7.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:11 Thursday 21 July 2022 20:15:04 +0000 (0:00:01.052) 0:00:01.064 ********* included: /tmp/tmpkp2113mn/tests/tasks/backup.yml for /cache/centos-7.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpkp2113mn/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:15:04 +0000 (0:00:00.025) 0:00:01.090 ********* included: /tmp/tmpkp2113mn/tests/tasks/setup.yml for /cache/centos-7.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpkp2113mn/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:15:04 +0000 (0:00:00.024) 0:00:01.114 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpkp2113mn/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:15:04 +0000 (0:00:00.021) 0:00:01.136 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpkp2113mn/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:15:04 +0000 (0:00:00.639) 0:00:01.775 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.kK2Mxs", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpkp2113mn/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:15:05 +0000 (0:00:00.388) 0:00:02.164 ********* ok: [/cache/centos-7.qcow2c.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.kK2Mxs/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.kK2Mxs/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003948", "end": "2022-07-21 20:15:04.733407", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:15:04.729459" } ok: [/cache/centos-7.qcow2c.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.kK2Mxs/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.kK2Mxs/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008925", "end": "2022-07-21 20:15:05.057236", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:15:05.048311" } TASK [Run role] **************************************************************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:14 Thursday 21 July 2022 20:15:06 +0000 (0:00:00.729) 0:00:02.894 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:15:06 +0000 (0:00:00.032) 0:00:02.927 ********* included: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/centos-7.qcow2c.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:15:06 +0000 (0:00:00.025) 0:00:02.953 ********* ok: [/cache/centos-7.qcow2c.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:15:06 +0000 (0:00:00.398) 0:00:03.351 ********* skipping: [/cache/centos-7.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } } }, "ansible_included_var_files": [ "/tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:15:06 +0000 (0:00:00.052) 0:00:03.404 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-7.4p1-22.el7_9.x86_64 providing openssh is already installed", "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:15:07 +0000 (0:00:00.491) 0:00:03.896 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:15:07 +0000 (0:00:00.026) 0:00:03.922 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:15:07 +0000 (0:00:00.023) 0:00:03.946 ********* changed: [/cache/centos-7.qcow2c.snap] => { "backup_file": "/etc/ssh/ssh_config.6819.2022-07-21@20:15:07~", "changed": true, "checksum": "2d52bd7a92154556a85b5648fae7b5c2c00ae1ff", "dest": "/etc/ssh/ssh_config", "gid": 0, "group": "root", "md5sum": "fd6c6700f814034939d889b85fd00fed", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 172, "src": "/root/.ansible/tmp/ansible-tmp-1658434507.175243-35099-61447873550066/source", "state": "file", "uid": 0 } META: role_complete for /cache/centos-7.qcow2c.snap TASK [Download the custom configuration file] ********************************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:42 Thursday 21 July 2022 20:15:08 +0000 (0:00:00.977) 0:00:04.924 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCk1hdGNoIHVzZXIgdGVzdHVzZXIKICBDb21wcmVzc2lvbiB5ZXMKTWF0Y2ggaG9zdCBleGFtcGxlCiAgSG9zdG5hbWUgZXhhbXBsZS5jb20KSG9zdCBsb2NhbAogIFVzZXIgbG9jYWx1c2VyCkhvc3QgcmVtb3RlCiAgSG9zdG5hbWUgcmVtb3RlLmV4YW1wbGUuY29tCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are in the file] ************************************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:47 Thursday 21 July 2022 20:15:08 +0000 (0:00:00.419) 0:00:05.343 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Run first ssh in test mode to evaluate the configuration] **************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:61 Thursday 21 July 2022 20:15:08 +0000 (0:00:00.052) 0:00:05.395 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "testuser@example" ], "delta": "0:00:00.007925", "end": "2022-07-21 20:15:07.874198", "rc": 0, "start": "2022-07-21 20:15:07.866273" } STDOUT: user testuser hostname example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression yes controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Run second ssh in test mode to evaluate the configuration] *************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:65 Thursday 21 July 2022 20:15:08 +0000 (0:00:00.314) 0:00:05.709 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "local" ], "delta": "0:00:00.008789", "end": "2022-07-21 20:15:08.197143", "rc": 0, "start": "2022-07-21 20:15:08.188354" } STDOUT: user localuser hostname local port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Run third ssh in test mode to evaluate the configuration] **************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:69 Thursday 21 July 2022 20:15:09 +0000 (0:00:00.327) 0:00:06.037 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "remote" ], "delta": "0:00:00.007939", "end": "2022-07-21 20:15:08.523521", "rc": 0, "start": "2022-07-21 20:15:08.515582" } STDOUT: user root hostname remote.example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Verify the options are correctly evaluated] ****************************** task path: /tmp/tmpkp2113mn/tests/tests_match.yml:73 Thursday 21 July 2022 20:15:09 +0000 (0:00:00.328) 0:00:06.366 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpkp2113mn/tests/tests_match.yml:94 Thursday 21 July 2022 20:15:09 +0000 (0:00:00.066) 0:00:06.432 ********* included: /tmp/tmpkp2113mn/tests/tasks/restore.yml for /cache/centos-7.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpkp2113mn/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:15:09 +0000 (0:00:00.025) 0:00:06.458 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.kK2Mxs//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.kK2Mxs//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.004014", "end": "2022-07-21 20:15:08.944689", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:15:08.940675" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.kK2Mxs//etc/ssh/ssh_config; then\n cp /tmp/ansible.kK2Mxs//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.006307", "end": "2022-07-21 20:15:09.226129", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:15:09.219822" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpkp2113mn/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:15:10 +0000 (0:00:00.605) 0:00:07.063 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.kK2Mxs", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-7.qcow2c.snap : ok=20 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:15:10 +0000 (0:00:00.455) 0:00:07.518 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 1.05s /tmp/tmpkp2113mn/tests/tests_match.yml:2 -------------------------------------- linux-system-roles.ssh : Generate the configuration file ---------------- 0.98s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Backup files ------------------------------------------------------------ 0.73s /tmp/tmpkp2113mn/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.64s /tmp/tmpkp2113mn/tests/tasks/setup.yml:7 -------------------------------------- Restore backed up files and remove what was not present ----------------- 0.61s /tmp/tmpkp2113mn/tests/tasks/restore.yml:2 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.49s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Remove temporary directory for backup files ----------------------------- 0.46s /tmp/tmpkp2113mn/tests/tasks/restore.yml:15 ----------------------------------- Download the custom configuration file ---------------------------------- 0.42s /tmp/tmpkp2113mn/tests/tests_match.yml:42 ------------------------------------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.40s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.39s /tmp/tmpkp2113mn/tests/tasks/backup.yml:5 ------------------------------------- Run third ssh in test mode to evaluate the configuration ---------------- 0.33s /tmp/tmpkp2113mn/tests/tests_match.yml:69 ------------------------------------- Run second ssh in test mode to evaluate the configuration --------------- 0.33s /tmp/tmpkp2113mn/tests/tests_match.yml:65 ------------------------------------- Run first ssh in test mode to evaluate the configuration ---------------- 0.31s /tmp/tmpkp2113mn/tests/tests_match.yml:61 ------------------------------------- Verify the options are correctly evaluated ------------------------------ 0.07s /tmp/tmpkp2113mn/tests/tests_match.yml:73 ------------------------------------- linux-system-roles.ssh : Set platform/version specific variables -------- 0.05s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.05s /tmp/tmpkp2113mn/tests/tests_match.yml:47 ------------------------------------- Run role ---------------------------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tests_match.yml:14 ------------------------------------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.03s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 ---------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tests_match.yml:94 ------------------------------------- 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/tmpond44ouu 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_match.yml ****************************************************** 1 plays in /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml PLAY [Verify default packages as well as additional are installed] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:2 Thursday 21 July 2022 20:16:55 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-7.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:11 Thursday 21 July 2022 20:16:56 +0000 (0:00:00.984) 0:00:00.997 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml for /cache/centos-7.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:16:56 +0000 (0:00:00.026) 0:00:01.023 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml for /cache/centos-7.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:16:56 +0000 (0:00:00.024) 0:00:01.048 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:16:56 +0000 (0:00:00.019) 0:00:01.068 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:16:56 +0000 (0:00:00.679) 0:00:01.748 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.L33y2L", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:16:57 +0000 (0:00:00.392) 0:00:02.140 ********* ok: [/cache/centos-7.qcow2c.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.L33y2L/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.L33y2L/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004022", "end": "2022-07-21 20:16:57.544217", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:16:57.540195" } ok: [/cache/centos-7.qcow2c.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.L33y2L/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.L33y2L/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.009613", "end": "2022-07-21 20:16:57.875581", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:16:57.865968" } TASK [Run role] **************************************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:14 Thursday 21 July 2022 20:16:58 +0000 (0:00:00.746) 0:00:02.886 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:16:58 +0000 (0:00:00.036) 0:00:02.923 ********* included: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/centos-7.qcow2c.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:16:58 +0000 (0:00:00.028) 0:00:02.952 ********* ok: [/cache/centos-7.qcow2c.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:16:58 +0000 (0:00:00.406) 0:00:03.358 ********* skipping: [/cache/centos-7.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } } }, "ansible_included_var_files": [ "/tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:16:58 +0000 (0:00:00.051) 0:00:03.409 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-7.4p1-22.el7_9.x86_64 providing openssh is already installed", "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [fedora.linux_system_roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:16:59 +0000 (0:00:00.507) 0:00:03.917 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:16:59 +0000 (0:00:00.022) 0:00:03.940 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:16:59 +0000 (0:00:00.022) 0:00:03.962 ********* changed: [/cache/centos-7.qcow2c.snap] => { "backup_file": "/etc/ssh/ssh_config.6829.2022-07-21@20:16:59~", "changed": true, "checksum": "2d52bd7a92154556a85b5648fae7b5c2c00ae1ff", "dest": "/etc/ssh/ssh_config", "gid": 0, "group": "root", "md5sum": "fd6c6700f814034939d889b85fd00fed", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 172, "src": "/root/.ansible/tmp/ansible-tmp-1658434619.2478547-38083-170698736394321/source", "state": "file", "uid": 0 } META: role_complete for /cache/centos-7.qcow2c.snap TASK [Download the custom configuration file] ********************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:42 Thursday 21 July 2022 20:17:00 +0000 (0:00:00.966) 0:00:04.929 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCk1hdGNoIHVzZXIgdGVzdHVzZXIKICBDb21wcmVzc2lvbiB5ZXMKTWF0Y2ggaG9zdCBleGFtcGxlCiAgSG9zdG5hbWUgZXhhbXBsZS5jb20KSG9zdCBsb2NhbAogIFVzZXIgbG9jYWx1c2VyCkhvc3QgcmVtb3RlCiAgSG9zdG5hbWUgcmVtb3RlLmV4YW1wbGUuY29tCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are in the file] ************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:47 Thursday 21 July 2022 20:17:00 +0000 (0:00:00.426) 0:00:05.356 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Run first ssh in test mode to evaluate the configuration] **************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:61 Thursday 21 July 2022 20:17:00 +0000 (0:00:00.050) 0:00:05.407 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "testuser@example" ], "delta": "0:00:00.008458", "end": "2022-07-21 20:17:00.715501", "rc": 0, "start": "2022-07-21 20:17:00.707043" } STDOUT: user testuser hostname example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression yes controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Run second ssh in test mode to evaluate the configuration] *************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:65 Thursday 21 July 2022 20:17:00 +0000 (0:00:00.320) 0:00:05.727 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "local" ], "delta": "0:00:00.008417", "end": "2022-07-21 20:17:01.039003", "rc": 0, "start": "2022-07-21 20:17:01.030586" } STDOUT: user localuser hostname local port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Run third ssh in test mode to evaluate the configuration] **************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:69 Thursday 21 July 2022 20:17:01 +0000 (0:00:00.327) 0:00:06.055 ********* changed: [/cache/centos-7.qcow2c.snap] => { "changed": true, "cmd": [ "ssh", "-G", "remote" ], "delta": "0:00:00.008638", "end": "2022-07-21 20:17:01.372111", "rc": 0, "start": "2022-07-21 20:17:01.363473" } STDOUT: user root hostname remote.example.com port 22 addressfamily any batchmode no canonicalizefallbacklocal yes canonicalizehostname false challengeresponseauthentication yes checkhostip yes compression no controlmaster false enablesshkeysign no clearallforwardings no exitonforwardfailure no forwardagent no forwardx11 no forwardx11trusted no gatewayports no gssapiauthentication no gssapidelegatecredentials no hashknownhosts no hostbasedauthentication no identitiesonly no kbdinteractiveauthentication yes nohostauthenticationforlocalhost no passwordauthentication yes permitlocalcommand no protocol 2 proxyusefdpass no pubkeyauthentication yes requesttty auto rhostsrsaauthentication no rsaauthentication yes streamlocalbindunlink no stricthostkeychecking ask tcpkeepalive yes tunnel false useprivilegedport no verifyhostkeydns false visualhostkey no updatehostkeys false canonicalizemaxdots 1 compressionlevel 6 connectionattempts 1 forwardx11timeout 1200 numberofpasswordprompts 3 serveralivecountmax 3 serveraliveinterval 0 ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss 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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 loglevel INFO 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 pubkeyacceptedkeytypes 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,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss xauthlocation /usr/bin/xauth identityfile ~/.ssh/id_rsa identityfile ~/.ssh/id_dsa identityfile ~/.ssh/id_ecdsa identityfile ~/.ssh/id_ed25519 canonicaldomains globalknownhostsfile /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 userknownhostsfile ~/.ssh/known_hosts ~/.ssh/known_hosts2 fingerprinthash SHA256 MD5 connecttimeout none tunneldevice any:any controlpersist no escapechar ~ ipqos lowdelay throughput rekeylimit 0 0 streamlocalbindmask 0177 TASK [Verify the options are correctly evaluated] ****************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:73 Thursday 21 July 2022 20:17:01 +0000 (0:00:00.327) 0:00:06.383 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:93 Thursday 21 July 2022 20:17:01 +0000 (0:00:00.057) 0:00:06.441 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml for /cache/centos-7.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:17:01 +0000 (0:00:00.027) 0:00:06.469 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.L33y2L//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.L33y2L//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.004262", "end": "2022-07-21 20:17:01.783540", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:17:01.779278" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.L33y2L//etc/ssh/ssh_config; then\n cp /tmp/ansible.L33y2L//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.006785", "end": "2022-07-21 20:17:02.063613", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:17:02.056828" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:17:02 +0000 (0:00:00.606) 0:00:07.075 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.L33y2L", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-7.qcow2c.snap : ok=20 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:17:02 +0000 (0:00:00.462) 0:00:07.537 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 0.98s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:2 ---------------------------------- fedora.linux_system_roles.ssh : Generate the configuration file --------- 0.97s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Backup files ------------------------------------------------------------ 0.75s /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.68s /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.61s /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:2 -------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.51s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Remove temporary directory for backup files ----------------------------- 0.46s /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the custom configuration file ---------------------------------- 0.43s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:42 --------------------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.41s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.39s /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:5 --------------------------------- Run second ssh in test mode to evaluate the configuration --------------- 0.33s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:65 --------------------------------- Run third ssh in test mode to evaluate the configuration ---------------- 0.33s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:69 --------------------------------- Run first ssh in test mode to evaluate the configuration ---------------- 0.32s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:61 --------------------------------- Verify the options are correctly evaluated ------------------------------ 0.06s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:73 --------------------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.05s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Verify the options are in the file -------------------------------------- 0.05s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:47 --------------------------------- Run role ---------------------------------------------------------------- 0.04s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:14 --------------------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Restore configuration files --------------------------------------------- 0.03s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:93 --------------------------------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmp3c63ut4b/tests/ssh/tests_match.yml:11 ---------------------------------