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/tmp6e14t4bh 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/tmpsqnv7rd5/tests/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:2 Thursday 21 July 2022 20:27:36 +0000 (0:00:00.012) 0:00:00.012 ********* [DEPRECATION WARNING]: ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/rhel-6.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:11 Thursday 21 July 2022 20:27:37 +0000 (0:00:00.983) 0:00:00.995 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml for /cache/rhel-6.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:27:37 +0000 (0:00:00.028) 0:00:01.024 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml for /cache/rhel-6.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:27:37 +0000 (0:00:00.027) 0:00:01.051 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:27:37 +0000 (0:00:00.055) 0:00:01.107 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-123.el6_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:27:38 +0000 (0:00:00.597) 0:00:01.704 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.rViLea", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:27:38 +0000 (0:00:00.352) 0:00:02.057 ********* ok: [/cache/rhel-6.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.rViLea/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.rViLea/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003645", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:27:38.425521", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:27:38.421876" } ok: [/cache/rhel-6.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.rViLea/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.rViLea/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008499", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:27:38.687158", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:27:38.678659" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:14 Thursday 21 July 2022 20:27:39 +0000 (0:00:00.672) 0:00:02.729 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "gid": 501, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:18 Thursday 21 July 2022 20:27:39 +0000 (0:00:00.484) 0:00:03.213 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 501, "home": "/home/tester123", "name": "tester123", "shell": "/bin/bash", "state": "present", "system": false, "uid": 501 } TASK [Run role] **************************************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:23 Thursday 21 July 2022 20:27:40 +0000 (0:00:00.540) 0:00:03.754 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:27:40 +0000 (0:00:00.037) 0:00:03.791 ********* included: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-6.qcow2.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:27:40 +0000 (0:00:00.029) 0:00:03.821 ********* ok: [/cache/rhel-6.qcow2.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:27:40 +0000 (0:00:00.381) 0:00:04.202 ********* skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.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" ] } }, "__ssh_supports_validate": false }, "ansible_included_var_files": [ "/tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/vars/RedHat_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.yml" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.10.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:27:40 +0000 (0:00:00.057) 0:00:04.259 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-123.el6_9.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-123.el6_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/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:27:41 +0000 (0:00:00.482) 0:00:04.742 ********* ok: [/cache/rhel-6.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:27:41 +0000 (0:00:00.401) 0:00:05.143 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "gid": 501, "group": "tester123", "mode": "0700", "owner": "tester123", "path": "/home/tester123/.ssh/", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 4096, "state": "directory", "uid": 501 } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:27:42 +0000 (0:00:00.447) 0:00:05.591 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "dest": "/home/tester123/.ssh/config", "gid": 501, "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-1658435262.1135147-49001-125031455484040/source", "state": "file", "uid": 501 } META: role_complete for /cache/rhel-6.qcow2.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:35 Thursday 21 July 2022 20:27:42 +0000 (0:00:00.956) 0:00:06.548 ********* ok: [/cache/rhel-6.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:46 Thursday 21 July 2022 20:27:43 +0000 (0:00:00.316) 0:00:06.865 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:51 Thursday 21 July 2022 20:27:43 +0000 (0:00:00.385) 0:00:07.251 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435261.552, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "binary", "ctime": 1658435262.494, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 262, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "application/x-directory", "mode": "0700", "mtime": 1658435262.494, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 4096, "uid": 501, "version": "18446744072063578695", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:60 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.328) 0:00:07.579 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:68 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.066) 0:00:07.646 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435263.214, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435262.495, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435262.127, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "18446744072063578701", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:75 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.292) 0:00:07.938 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435263.214, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435262.495, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435262.127, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "18446744072063578701", "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/tmpsqnv7rd5/tests/tests_user_config.yml:81 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.279) 0:00:08.218 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:92 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.052) 0:00:08.270 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:100 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.037) 0:00:08.308 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:110 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.034) 0:00:08.342 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Download the global configuration files too] ***************************** task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:119 Thursday 21 July 2022 20:27:44 +0000 (0:00:00.036) 0:00:08.378 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkhvc3QgKgogIEZvcndhcmRYMTFUcnVzdGVkIHllcwogIEdTU0FQSUF1dGhlbnRpY2F0aW9uIHllcwogIFNlbmRFbnYgTEFORyBMQ19DVFlQRSBMQ19OVU1FUklDIExDX1RJTUUgTENfQ09MTEFURSBMQ19NT05FVEFSWSBMQ19NRVNTQUdFUwpTZW5kRW52IExDX1BBUEVSIExDX05BTUUgTENfQUREUkVTUyBMQ19URUxFUEhPTkUgTENfTUVBU1VSRU1FTlQKU2VuZEVudiBMQ19JREVOVElGSUNBVElPTiBMQ19BTEwgTEFOR1VBR0UKU2VuZEVudiBYTU9ESUZJRVJTCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:124 Thursday 21 July 2022 20:27:45 +0000 (0:00:00.258) 0:00:08.636 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:134 Thursday 21 July 2022 20:27:45 +0000 (0:00:00.067) 0:00:08.703 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml for /cache/rhel-6.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:27:45 +0000 (0:00:00.030) 0:00:08.734 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.rViLea//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.rViLea//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.003482", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:27:44.993428", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:27:44.989946" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.rViLea//etc/ssh/ssh_config; then\n cp /tmp/ansible.rViLea//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.005493", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:27:45.239618", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:27:45.234125" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:27:45 +0000 (0:00:00.541) 0:00:09.275 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.rViLea", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-6.qcow2.snap : ok=28 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:27:45 +0000 (0:00:00.277) 0:00:09.553 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 0.98s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:2 -------------------------------- linux-system-roles.ssh : Generate the configuration file ---------------- 0.96s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Backup files ------------------------------------------------------------ 0.67s /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.60s /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:7 -------------------------------------- Restore backed up files and remove what was not present ----------------- 0.54s /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:2 ------------------------------------ Create a test user ------------------------------------------------------ 0.54s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:18 ------------------------------- Create a test group (with the same name as user) ------------------------ 0.48s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:14 ------------------------------- linux-system-roles.ssh : Ensure required packages are installed --------- 0.48s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.45s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.40s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- Download the created configuration file --------------------------------- 0.39s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:46 ------------------------------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.38s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.35s /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:5 ------------------------------------- Stat the .ssh dir ------------------------------------------------------- 0.33s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:51 ------------------------------- Gather information about the user --------------------------------------- 0.32s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:35 ------------------------------- Make sure the file is readable by user ---------------------------------- 0.29s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:68 ------------------------------- Stat the configuration file --------------------------------------------- 0.28s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:75 ------------------------------- Remove temporary directory for backup files ----------------------------- 0.28s /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:15 ----------------------------------- Download the global configuration files too ----------------------------- 0.26s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:119 ------------------------------ Verify the options are NOT in the global configuration file ------------- 0.07s /tmp/tmpsqnv7rd5/tests/tests_user_config.yml:124 ------------------------------ 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/tmp6e14t4bh 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/tmpyr9b2k_r/tests/ssh/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:2 Thursday 21 July 2022 20:29:11 +0000 (0:00:00.013) 0:00:00.013 ********* [DEPRECATION WARNING]: ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/rhel-6.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:11 Thursday 21 July 2022 20:29:12 +0000 (0:00:01.003) 0:00:01.016 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml for /cache/rhel-6.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:29:12 +0000 (0:00:00.030) 0:00:01.046 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml for /cache/rhel-6.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:29:12 +0000 (0:00:00.050) 0:00:01.097 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:29:12 +0000 (0:00:00.023) 0:00:01.120 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-123.el6_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:29:13 +0000 (0:00:00.635) 0:00:01.755 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.qUno3V", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:29:13 +0000 (0:00:00.350) 0:00:02.106 ********* ok: [/cache/rhel-6.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.qUno3V/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.qUno3V/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004235", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:29:13.629608", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:29:13.625373" } ok: [/cache/rhel-6.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.qUno3V/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.qUno3V/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008666", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:29:13.897536", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:29:13.888870" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:14 Thursday 21 July 2022 20:29:14 +0000 (0:00:00.698) 0:00:02.804 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "gid": 501, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:18 Thursday 21 July 2022 20:29:15 +0000 (0:00:00.475) 0:00:03.280 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "comment": "", "create_home": true, "group": 501, "home": "/home/tester123", "name": "tester123", "shell": "/bin/bash", "state": "present", "system": false, "uid": 501 } TASK [Run role] **************************************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:23 Thursday 21 July 2022 20:29:15 +0000 (0:00:00.541) 0:00:03.821 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:29:15 +0000 (0:00:00.040) 0:00:03.861 ********* included: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-6.qcow2.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:29:15 +0000 (0:00:00.032) 0:00:03.894 ********* ok: [/cache/rhel-6.qcow2.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:29:16 +0000 (0:00:00.382) 0:00:04.276 ********* skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.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" ] } }, "__ssh_supports_validate": false }, "ansible_included_var_files": [ "/tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/RedHat_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.yml" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.10.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:29:16 +0000 (0:00:00.057) 0:00:04.333 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-123.el6_9.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-123.el6_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/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:29:16 +0000 (0:00:00.495) 0:00:04.829 ********* ok: [/cache/rhel-6.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/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/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:29:16 +0000 (0:00:00.401) 0:00:05.230 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "gid": 501, "group": "tester123", "mode": "0700", "owner": "tester123", "path": "/home/tester123/.ssh/", "secontext": "unconfined_u:object_r:user_home_t:s0", "size": 4096, "state": "directory", "uid": 501 } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:29:17 +0000 (0:00:00.466) 0:00:05.696 ********* changed: [/cache/rhel-6.qcow2.snap] => { "changed": true, "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "dest": "/home/tester123/.ssh/config", "gid": 501, "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-1658435357.5683048-51592-86314722643878/source", "state": "file", "uid": 501 } META: role_complete for /cache/rhel-6.qcow2.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:35 Thursday 21 July 2022 20:29:18 +0000 (0:00:00.961) 0:00:06.657 ********* ok: [/cache/rhel-6.qcow2.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:45 Thursday 21 July 2022 20:29:18 +0000 (0:00:00.307) 0:00:06.965 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:50 Thursday 21 July 2022 20:29:19 +0000 (0:00:00.420) 0:00:07.385 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435356.781, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "binary", "ctime": 1658435357.736, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 262, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "application/x-directory", "mode": "0700", "mtime": 1658435357.736, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 4096, "uid": 501, "version": "18446744073584119168", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:58 Thursday 21 July 2022 20:29:19 +0000 (0:00:00.315) 0:00:07.701 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:66 Thursday 21 July 2022 20:29:19 +0000 (0:00:00.038) 0:00:07.740 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435358.476, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435357.737, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435357.3669999, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "18446744073584119174", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:73 Thursday 21 July 2022 20:29:19 +0000 (0:00:00.317) 0:00:08.057 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435358.476, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435357.737, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435357.3669999, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "18446744073584119174", "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/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:78 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.301) 0:00:08.359 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:89 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.052) 0:00:08.411 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:97 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.036) 0:00:08.448 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:106 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.037) 0:00:08.485 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Download the global configuration files too] ***************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:114 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.036) 0:00:08.522 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkhvc3QgKgogIEZvcndhcmRYMTFUcnVzdGVkIHllcwogIEdTU0FQSUF1dGhlbnRpY2F0aW9uIHllcwogIFNlbmRFbnYgTEFORyBMQ19DVFlQRSBMQ19OVU1FUklDIExDX1RJTUUgTENfQ09MTEFURSBMQ19NT05FVEFSWSBMQ19NRVNTQUdFUwpTZW5kRW52IExDX1BBUEVSIExDX05BTUUgTENfQUREUkVTUyBMQ19URUxFUEhPTkUgTENfTUVBU1VSRU1FTlQKU2VuZEVudiBMQ19JREVOVElGSUNBVElPTiBMQ19BTEwgTEFOR1VBR0UKU2VuZEVudiBYTU9ESUZJRVJTCg==", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Verify the options are NOT in the global configuration file] ************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:119 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.272) 0:00:08.794 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:129 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.047) 0:00:08.842 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml for /cache/rhel-6.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:29:20 +0000 (0:00:00.029) 0:00:08.871 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.qUno3V//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.qUno3V//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.003650", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:29:20.259031", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:29:20.255381" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.qUno3V//etc/ssh/ssh_config; then\n cp /tmp/ansible.qUno3V//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.006531", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:29:20.522760", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:29:20.516229" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:29:21 +0000 (0:00:00.563) 0:00:09.435 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.qUno3V", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-6.qcow2.snap : ok=28 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:29:21 +0000 (0:00:00.298) 0:00:09.733 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 1.00s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:2 ---------------------------- fedora.linux_system_roles.ssh : Generate the configuration file --------- 0.96s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Backup files ------------------------------------------------------------ 0.70s /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.64s /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.56s /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:2 -------------------------------- Create a test user ------------------------------------------------------ 0.54s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:18 --------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.50s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Create a test group (with the same name as user) ------------------------ 0.48s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:14 --------------------------- fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.47s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Download the created configuration file --------------------------------- 0.42s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:45 --------------------------- fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.40s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.38s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.35s /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:5 --------------------------------- Make sure the file is readable by user ---------------------------------- 0.32s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:66 --------------------------- Stat the .ssh dir ------------------------------------------------------- 0.32s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:50 --------------------------- Gather information about the user --------------------------------------- 0.31s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:35 --------------------------- Stat the configuration file --------------------------------------------- 0.30s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:73 --------------------------- Remove temporary directory for backup files ----------------------------- 0.30s /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the global configuration files too ----------------------------- 0.27s /tmp/tmpyr9b2k_r/tests/ssh/tests_user_config.yml:114 -------------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.06s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7