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/tmpharb6qhc 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/tmptgthu93e/tests/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:2 Thursday 21 July 2022 20:30:07 +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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/centos-6.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:11 Thursday 21 July 2022 20:30:08 +0000 (0:00:01.016) 0:00:01.029 ********* included: /tmp/tmptgthu93e/tests/tasks/backup.yml for /cache/centos-6.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmptgthu93e/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:30:08 +0000 (0:00:00.030) 0:00:01.059 ********* included: /tmp/tmptgthu93e/tests/tasks/setup.yml for /cache/centos-6.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmptgthu93e/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:30:08 +0000 (0:00:00.029) 0:00:01.089 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmptgthu93e/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:30:08 +0000 (0:00:00.056) 0:00:01.146 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-124.el6_10.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmptgthu93e/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:30:09 +0000 (0:00:00.605) 0:00:01.751 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.fNHBZQ", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmptgthu93e/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:30:09 +0000 (0:00:00.362) 0:00:02.114 ********* ok: [/cache/centos-6.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.fNHBZQ/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.fNHBZQ/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003884", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:30:09.328874", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:30:09.324990" } ok: [/cache/centos-6.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.fNHBZQ/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.fNHBZQ/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008919", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:30:09.593626", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:30:09.584707" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:14 Thursday 21 July 2022 20:30:10 +0000 (0:00:00.708) 0:00:02.822 ********* changed: [/cache/centos-6.qcow2c.snap] => { "changed": true, "gid": 501, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:18 Thursday 21 July 2022 20:30:11 +0000 (0:00:00.492) 0:00:03.315 ********* changed: [/cache/centos-6.qcow2c.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/tmptgthu93e/tests/tests_user_config.yml:23 Thursday 21 July 2022 20:30:11 +0000 (0:00:00.554) 0:00:03.870 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:30:11 +0000 (0:00:00.037) 0:00:03.908 ********* included: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/centos-6.qcow2c.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:30:11 +0000 (0:00:00.029) 0:00:03.937 ********* ok: [/cache/centos-6.qcow2c.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:30:12 +0000 (0:00:00.382) 0:00:04.319 ********* skipping: [/cache/centos-6.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-6.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-6.qcow2c.snap] => (item=CentOS_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/tmptgthu93e/tests/roles/linux-system-roles.ssh/vars/CentOS_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_6.yml" } skipping: [/cache/centos-6.qcow2c.snap] => (item=CentOS_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_6.10.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:30:12 +0000 (0:00:00.052) 0:00:04.372 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-124.el6_10.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-124.el6_10.x86_64 providing openssh-clients is already installed" ] } TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:30:12 +0000 (0:00:00.496) 0:00:04.868 ********* ok: [/cache/centos-6.qcow2c.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/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:30:13 +0000 (0:00:00.387) 0:00:05.255 ********* changed: [/cache/centos-6.qcow2c.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/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:30:13 +0000 (0:00:00.453) 0:00:05.708 ********* changed: [/cache/centos-6.qcow2c.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-1658435413.6315587-53142-84949822633363/source", "state": "file", "uid": 501 } META: role_complete for /cache/centos-6.qcow2c.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:35 Thursday 21 July 2022 20:30:14 +0000 (0:00:00.947) 0:00:06.656 ********* ok: [/cache/centos-6.qcow2c.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:46 Thursday 21 July 2022 20:30:14 +0000 (0:00:00.326) 0:00:06.983 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:51 Thursday 21 July 2022 20:30:15 +0000 (0:00:00.407) 0:00:07.391 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435412.48, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "binary", "ctime": 1658435413.4029999, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273628, "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": 1658435413.4029999, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 4096, "uid": 501, "version": "1423265457", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:60 Thursday 21 July 2022 20:30:15 +0000 (0:00:00.320) 0:00:07.711 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:68 Thursday 21 July 2022 20:30:15 +0000 (0:00:00.073) 0:00:07.785 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435414.161, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435413.405, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273483, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435413.042, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "1423265463", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:75 Thursday 21 July 2022 20:30:15 +0000 (0:00:00.333) 0:00:08.118 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435414.161, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435413.405, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273483, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435413.042, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "1423265463", "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/tmptgthu93e/tests/tests_user_config.yml:81 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.289) 0:00:08.407 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:92 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.050) 0:00:08.458 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:100 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.035) 0:00:08.494 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:110 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.033) 0:00:08.527 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Download the global configuration files too] ***************************** task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:119 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.032) 0:00:08.560 ********* ok: [/cache/centos-6.qcow2c.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/tmptgthu93e/tests/tests_user_config.yml:124 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.264) 0:00:08.824 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmptgthu93e/tests/tests_user_config.yml:134 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.049) 0:00:08.874 ********* included: /tmp/tmptgthu93e/tests/tasks/restore.yml for /cache/centos-6.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmptgthu93e/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:30:16 +0000 (0:00:00.030) 0:00:08.904 ********* ok: [/cache/centos-6.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.fNHBZQ//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.fNHBZQ//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.003840", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:30:15.965666", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:30:15.961826" } ok: [/cache/centos-6.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.fNHBZQ//etc/ssh/ssh_config; then\n cp /tmp/ansible.fNHBZQ//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.005974", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:30:16.225150", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:30:16.219176" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmptgthu93e/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:30:17 +0000 (0:00:00.547) 0:00:09.452 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.fNHBZQ", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-6.qcow2c.snap : ok=28 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:30:17 +0000 (0:00:00.283) 0:00:09.735 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 1.02s /tmp/tmptgthu93e/tests/tests_user_config.yml:2 -------------------------------- linux-system-roles.ssh : Generate the configuration file ---------------- 0.95s /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Backup files ------------------------------------------------------------ 0.71s /tmp/tmptgthu93e/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.61s /tmp/tmptgthu93e/tests/tasks/setup.yml:7 -------------------------------------- Create a test user ------------------------------------------------------ 0.55s /tmp/tmptgthu93e/tests/tests_user_config.yml:18 ------------------------------- Restore backed up files and remove what was not present ----------------- 0.55s /tmp/tmptgthu93e/tests/tasks/restore.yml:2 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.50s /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Create a test group (with the same name as user) ------------------------ 0.49s /tmp/tmptgthu93e/tests/tests_user_config.yml:14 ------------------------------- linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.45s /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- Download the created configuration file --------------------------------- 0.41s /tmp/tmptgthu93e/tests/tests_user_config.yml:46 ------------------------------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.39s /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.38s /tmp/tmptgthu93e/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.36s /tmp/tmptgthu93e/tests/tasks/backup.yml:5 ------------------------------------- Make sure the file is readable by user ---------------------------------- 0.33s /tmp/tmptgthu93e/tests/tests_user_config.yml:68 ------------------------------- Gather information about the user --------------------------------------- 0.33s /tmp/tmptgthu93e/tests/tests_user_config.yml:35 ------------------------------- Stat the .ssh dir ------------------------------------------------------- 0.32s /tmp/tmptgthu93e/tests/tests_user_config.yml:51 ------------------------------- Stat the configuration file --------------------------------------------- 0.29s /tmp/tmptgthu93e/tests/tests_user_config.yml:75 ------------------------------- Remove temporary directory for backup files ----------------------------- 0.28s /tmp/tmptgthu93e/tests/tasks/restore.yml:15 ----------------------------------- Download the global configuration files too ----------------------------- 0.26s /tmp/tmptgthu93e/tests/tests_user_config.yml:119 ------------------------------ Verify the ~/.ssh has sensible permissions ------------------------------ 0.07s /tmp/tmptgthu93e/tests/tests_user_config.yml:60 ------------------------------- 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/tmpharb6qhc 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/tmpyajtit7a/tests/ssh/tests_user_config.yml PLAY [Test a creation of configuration file in the user directory] ************* TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:2 Thursday 21 July 2022 20:31:44 +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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/centos-6.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:11 Thursday 21 July 2022 20:31:45 +0000 (0:00:01.013) 0:00:01.026 ********* included: /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml for /cache/centos-6.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:31:45 +0000 (0:00:00.029) 0:00:01.056 ********* included: /tmp/tmpyajtit7a/tests/ssh/tasks/setup.yml for /cache/centos-6.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpyajtit7a/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:31:45 +0000 (0:00:00.048) 0:00:01.104 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpyajtit7a/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:31:45 +0000 (0:00:00.023) 0:00:01.128 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-124.el6_10.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:31:45 +0000 (0:00:00.605) 0:00:01.733 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.GRVxKy", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:31:46 +0000 (0:00:00.367) 0:00:02.101 ********* ok: [/cache/centos-6.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.GRVxKy/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.GRVxKy/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004208", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:31:46.278802", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:31:46.274594" } ok: [/cache/centos-6.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.GRVxKy/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.GRVxKy/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008641", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:31:46.564480", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:31:46.555839" } TASK [Create a test group (with the same name as user)] ************************ task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:14 Thursday 21 July 2022 20:31:46 +0000 (0:00:00.789) 0:00:02.891 ********* changed: [/cache/centos-6.qcow2c.snap] => { "changed": true, "gid": 501, "name": "tester123", "state": "present", "system": false } TASK [Create a test user] ****************************************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:18 Thursday 21 July 2022 20:31:47 +0000 (0:00:00.491) 0:00:03.383 ********* changed: [/cache/centos-6.qcow2c.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/tmpyajtit7a/tests/ssh/tests_user_config.yml:23 Thursday 21 July 2022 20:31:47 +0000 (0:00:00.550) 0:00:03.934 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:31:47 +0000 (0:00:00.041) 0:00:03.975 ********* included: /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/centos-6.qcow2c.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:31:48 +0000 (0:00:00.030) 0:00:04.005 ********* ok: [/cache/centos-6.qcow2c.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:31:48 +0000 (0:00:00.378) 0:00:04.384 ********* skipping: [/cache/centos-6.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-6.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-6.qcow2c.snap] => (item=CentOS_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/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/CentOS_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_6.yml" } skipping: [/cache/centos-6.qcow2c.snap] => (item=CentOS_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_6.10.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:31:48 +0000 (0:00:00.059) 0:00:04.444 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-124.el6_10.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-124.el6_10.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/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:31:48 +0000 (0:00:00.483) 0:00:04.927 ********* ok: [/cache/centos-6.qcow2c.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/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:31:49 +0000 (0:00:00.427) 0:00:05.355 ********* changed: [/cache/centos-6.qcow2c.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/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:31:49 +0000 (0:00:00.474) 0:00:05.829 ********* changed: [/cache/centos-6.qcow2c.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-1658435509.941517-55753-223464158610955/source", "state": "file", "uid": 501 } META: role_complete for /cache/centos-6.qcow2c.snap TASK [Gather information about the user] *************************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:35 Thursday 21 July 2022 20:31:51 +0000 (0:00:01.340) 0:00:07.170 ********* ok: [/cache/centos-6.qcow2c.snap] => { "ansible_facts": { "getent_passwd": { "tester123": [ "x", "501", "501", "", "/home/tester123", "/bin/bash" ] } }, "changed": false } TASK [Download the created configuration file] ********************************* task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:45 Thursday 21 July 2022 20:31:51 +0000 (0:00:00.341) 0:00:07.511 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkdTU0FQSUF1dGhlbnRpY2F0aW9uIG5vCkhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQo=", "encoding": "base64", "source": "/home/tester123/.ssh/config" } TASK [Stat the .ssh dir] ******************************************************* task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:50 Thursday 21 July 2022 20:31:51 +0000 (0:00:00.453) 0:00:07.965 ********* [WARNING]: Module remote_tmp /home/tester123/.ansible/tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435509.498, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "binary", "ctime": 1658435510.804, "dev": 64513, "device_type": 0, "executable": true, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273628, "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": 1658435510.804, "nlink": 2, "path": "/home/tester123/.ssh", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 4096, "uid": 501, "version": "160266563", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": true } } TASK [Verify the ~/.ssh has sensible permissions] ****************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:58 Thursday 21 July 2022 20:31:52 +0000 (0:00:00.382) 0:00:08.347 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Make sure the file is readable by user] ********************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:66 Thursday 21 July 2022 20:31:52 +0000 (0:00:00.042) 0:00:08.390 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435511.624, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435510.806, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273483, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435510.314, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "160266569", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Stat the configuration file] ********************************************* task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:73 Thursday 21 July 2022 20:31:52 +0000 (0:00:00.410) 0:00:08.800 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658435511.624, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "33e5d453ffc19413f8e74630b334c90d4e22a1dd", "ctime": 1658435510.806, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 501, "gr_name": "tester123", "inode": 273483, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435510.314, "nlink": 1, "path": "/home/tester123/.ssh/config", "pw_name": "tester123", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 98, "uid": 501, "version": "160266569", "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/tmpyajtit7a/tests/ssh/tests_user_config.yml:78 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.288) 0:00:09.089 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has sensible permissions] ******************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:89 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.065) 0:00:09.154 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Test the effective configuration using ssh] ****************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:97 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.041) 0:00:09.196 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure the effective configuration is expected] *********************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:106 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.040) 0:00:09.236 ********* skipping: [/cache/centos-6.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Download the global configuration files too] ***************************** task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:114 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.038) 0:00:09.275 ********* ok: [/cache/centos-6.qcow2c.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/tmpyajtit7a/tests/ssh/tests_user_config.yml:119 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.299) 0:00:09.574 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:129 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.054) 0:00:09.629 ********* included: /tmp/tmpyajtit7a/tests/ssh/tasks/restore.yml for /cache/centos-6.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpyajtit7a/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:31:53 +0000 (0:00:00.028) 0:00:09.657 ********* ok: [/cache/centos-6.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.GRVxKy//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.GRVxKy//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.003894", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:31:53.631412", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:31:53.627518" } ok: [/cache/centos-6.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.GRVxKy//etc/ssh/ssh_config; then\n cp /tmp/ansible.GRVxKy//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.006156", "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, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]", "version": "2.13" } ], "end": "2022-07-21 20:31:53.894474", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:31:53.888318" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpyajtit7a/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:31:54 +0000 (0:00:00.561) 0:00:10.219 ********* ok: [/cache/centos-6.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.GRVxKy", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-6.qcow2c.snap : ok=28 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:31:54 +0000 (0:00:00.283) 0:00:10.502 ********* =============================================================================== fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.34s /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 1.01s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:2 ---------------------------- Backup files ------------------------------------------------------------ 0.79s /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.61s /tmp/tmpyajtit7a/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.56s /tmp/tmpyajtit7a/tests/ssh/tasks/restore.yml:2 -------------------------------- Create a test user ------------------------------------------------------ 0.55s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:18 --------------------------- Create a test group (with the same name as user) ------------------------ 0.49s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:14 --------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.48s /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.47s /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Download the created configuration file --------------------------------- 0.45s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:45 --------------------------- fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.43s /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Make sure the file is readable by user ---------------------------------- 0.41s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:66 --------------------------- Stat the .ssh dir ------------------------------------------------------- 0.38s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:50 --------------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.38s /tmp/tmpharb6qhc/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.37s /tmp/tmpyajtit7a/tests/ssh/tasks/backup.yml:5 --------------------------------- Gather information about the user --------------------------------------- 0.34s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:35 --------------------------- Download the global configuration files too ----------------------------- 0.30s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:114 -------------------------- Stat the configuration file --------------------------------------------- 0.29s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:73 --------------------------- Remove temporary directory for backup files ----------------------------- 0.28s /tmp/tmpyajtit7a/tests/ssh/tasks/restore.yml:15 ------------------------------- Verify the options are in the file -------------------------------------- 0.07s /tmp/tmpyajtit7a/tests/ssh/tests_user_config.yml:78 ---------------------------