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/tmptxteqxd0 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_global_config_mode.yml ***************************************** 1 plays in /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:20:22 +0000 (0:00:00.013) 0:00:00.013 ********* ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:20:23 +0000 (0:00:01.130) 0:00:01.144 ********* included: /tmp/tmp46lt5otd/tests/tasks/backup.yml for /cache/rhel-8-y.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmp46lt5otd/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:20:23 +0000 (0:00:00.026) 0:00:01.170 ********* included: /tmp/tmp46lt5otd/tests/tasks/setup.yml for /cache/rhel-8-y.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmp46lt5otd/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:20:23 +0000 (0:00:00.024) 0:00:01.194 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmp46lt5otd/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:20:23 +0000 (0:00:00.018) 0:00:01.213 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmp46lt5otd/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:20:25 +0000 (0:00:01.390) 0:00:02.604 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.npf56hib", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmp46lt5otd/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:20:25 +0000 (0:00:00.489) 0:00:03.093 ********* ok: [/cache/rhel-8-y.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.npf56hib/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.npf56hib/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.007698", "end": "2022-07-21 16:20:26.687439", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:20:26.679741" } ok: [/cache/rhel-8-y.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.npf56hib/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.npf56hib/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.007348", "end": "2022-07-21 16:20:27.039473", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:20:27.032125" } TASK [Run role] **************************************************************** task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:20:26 +0000 (0:00:00.866) 0:00:03.960 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:20:26 +0000 (0:00:00.034) 0:00:03.994 ********* included: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:20:26 +0000 (0:00:00.026) 0:00:04.020 ********* ok: [/cache/rhel-8-y.qcow2.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:20:27 +0000 (0:00:00.510) 0:00:04.530 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_facts": { "__ssh_defaults": { "Include": "/etc/ssh/ssh_config.d/*.conf" }, "__ssh_drop_in_name": "00-ansible", "__ssh_supports_drop_in": true }, "ansible_included_var_files": [ "/tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:20:27 +0000 (0:00:00.052) 0:00:04.583 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:20:28 +0000 (0:00:01.288) 0:00:05.871 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:20:28 +0000 (0:00:00.026) 0:00:05.898 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:20:28 +0000 (0:00:00.024) 0:00:05.922 ********* changed: [/cache/rhel-8-y.qcow2.snap] => { "backup_file": "/etc/ssh/ssh_config.d/00-ansible.conf.17071.2022-07-21@16:20:30~", "changed": true, "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "dest": "/etc/ssh/ssh_config.d/00-ansible.conf", "gid": 2, "group": "daemon", "md5sum": "2f19240ad6e71480c76da5718e2aa100", "mode": "0600", "owner": "daemon", "secontext": "system_u:object_r:etc_t:s0", "size": 62, "src": "/root/.ansible/tmp/ansible-tmp-1658434828.7540596-40754-60704202950262/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-8-y.qcow2.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:20:29 +0000 (0:00:01.122) 0:00:07.045 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:20:30 +0000 (0:00:00.507) 0:00:07.553 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1658434830.6183968, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "ctime": 1658434830.1183968, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 8896518, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434829.6933968, "nlink": 1, "path": "/etc/ssh/ssh_config.d/00-ansible.conf", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 62, "uid": 2, "version": "2276714367", "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/tmp46lt5otd/tests/tests_global_config_mode.yml:49 Thursday 21 July 2022 20:20:30 +0000 (0:00:00.392) 0:00:07.945 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:55 Thursday 21 July 2022 20:20:30 +0000 (0:00:00.048) 0:00:07.994 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:63 Thursday 21 July 2022 20:20:30 +0000 (0:00:00.037) 0:00:08.031 ********* included: /tmp/tmp46lt5otd/tests/tasks/restore.yml for /cache/rhel-8-y.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmp46lt5otd/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:20:30 +0000 (0:00:00.026) 0:00:08.058 ********* ok: [/cache/rhel-8-y.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.npf56hib//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.npf56hib//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.006603", "end": "2022-07-21 16:20:31.540709", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:20:31.534106" } ok: [/cache/rhel-8-y.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.npf56hib//etc/ssh/ssh_config; then\n cp /tmp/ansible.npf56hib//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.006970", "end": "2022-07-21 16:20:31.899853", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:20:31.892883" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmp46lt5otd/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:20:31 +0000 (0:00:00.766) 0:00:08.825 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.npf56hib", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:20:32 +0000 (0:00:00.531) 0:00:09.356 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.39s /tmp/tmp46lt5otd/tests/tasks/setup.yml:7 -------------------------------------- linux-system-roles.ssh : Ensure required packages are installed --------- 1.29s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Gathering Facts --------------------------------------------------------- 1.13s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:2 ------------------------- linux-system-roles.ssh : Generate the configuration file ---------------- 1.12s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Backup files ------------------------------------------------------------ 0.87s /tmp/tmp46lt5otd/tests/tasks/backup.yml:13 ------------------------------------ Restore backed up files and remove what was not present ----------------- 0.77s /tmp/tmp46lt5otd/tests/tasks/restore.yml:2 ------------------------------------ Remove temporary directory for backup files ----------------------------- 0.53s /tmp/tmp46lt5otd/tests/tasks/restore.yml:15 ----------------------------------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.51s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Download the global configuration file ---------------------------------- 0.51s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:38 ------------------------ Create a temporary directory for backup files --------------------------- 0.49s /tmp/tmp46lt5otd/tests/tasks/backup.yml:5 ------------------------------------- Stat the configuration file too ----------------------------------------- 0.39s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:43 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.05s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.05s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:49 ------------------------ Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:55 ------------------------ Run role ---------------------------------------------------------------- 0.03s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:14 ------------------------ linux-system-roles.ssh : Gather information about the user for user configuration --- 0.03s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:63 ------------------------ Backup configuration files ---------------------------------------------- 0.03s /tmp/tmp46lt5otd/tests/tests_global_config_mode.yml:11 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmp46lt5otd/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 ---------- Setup ------------------------------------------------------------------- 0.02s /tmp/tmp46lt5otd/tests/tasks/backup.yml:2 ------------------------------------- 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/tmptxteqxd0 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_global_config_mode.yml ***************************************** 1 plays in /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:22:59 +0000 (0:00:00.014) 0:00:00.014 ********* ok: [/cache/rhel-8-y.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:23:00 +0000 (0:00:01.118) 0:00:01.132 ********* included: /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml for /cache/rhel-8-y.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:23:00 +0000 (0:00:00.027) 0:00:01.159 ********* included: /tmp/tmpni6azq3t/tests/ssh/tasks/setup.yml for /cache/rhel-8-y.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpni6azq3t/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:23:00 +0000 (0:00:00.027) 0:00:01.187 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpni6azq3t/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:23:00 +0000 (0:00:00.021) 0:00:01.208 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:23:02 +0000 (0:00:01.407) 0:00:02.616 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.z6tj2vqp", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:23:02 +0000 (0:00:00.494) 0:00:03.111 ********* ok: [/cache/rhel-8-y.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.z6tj2vqp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.z6tj2vqp/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.008490", "end": "2022-07-21 16:23:02.422156", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:23:02.413666" } ok: [/cache/rhel-8-y.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.z6tj2vqp/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.z6tj2vqp/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008502", "end": "2022-07-21 16:23:02.770306", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:23:02.761804" } TASK [Run role] **************************************************************** task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:23:03 +0000 (0:00:00.856) 0:00:03.968 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:23:03 +0000 (0:00:00.036) 0:00:04.004 ********* included: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-8-y.qcow2.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:23:03 +0000 (0:00:00.027) 0:00:04.032 ********* ok: [/cache/rhel-8-y.qcow2.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:23:03 +0000 (0:00:00.503) 0:00:04.535 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.yml) => { "ansible_facts": { "__ssh_defaults": { "Include": "/etc/ssh/ssh_config.d/*.conf" }, "__ssh_drop_in_name": "00-ansible", "__ssh_supports_drop_in": true }, "ansible_included_var_files": [ "/tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [/cache/rhel-8-y.qcow2.snap] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:23:03 +0000 (0:00:00.051) 0:00:04.586 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:23:05 +0000 (0:00:01.295) 0:00:05.881 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:23:05 +0000 (0:00:00.024) 0:00:05.906 ********* skipping: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:23:05 +0000 (0:00:00.024) 0:00:05.931 ********* changed: [/cache/rhel-8-y.qcow2.snap] => { "backup_file": "/etc/ssh/ssh_config.d/00-ansible.conf.17067.2022-07-21@16:23:05~", "changed": true, "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "dest": "/etc/ssh/ssh_config.d/00-ansible.conf", "gid": 2, "group": "daemon", "md5sum": "2f19240ad6e71480c76da5718e2aa100", "mode": "0600", "owner": "daemon", "secontext": "system_u:object_r:etc_t:s0", "size": 62, "src": "/root/.ansible/tmp/ansible-tmp-1658434985.4052634-44137-27568514351804/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-8-y.qcow2.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:23:06 +0000 (0:00:01.122) 0:00:07.053 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:23:06 +0000 (0:00:00.512) 0:00:07.566 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "stat": { "atime": 1658434986.3548815, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "ctime": 1658434985.8468814, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 8896705, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434985.4358814, "nlink": 1, "path": "/etc/ssh/ssh_config.d/00-ansible.conf", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 62, "uid": 2, "version": "451124789", "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/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:48 Thursday 21 July 2022 20:23:07 +0000 (0:00:00.394) 0:00:07.960 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:54 Thursday 21 July 2022 20:23:07 +0000 (0:00:00.045) 0:00:08.005 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:62 Thursday 21 July 2022 20:23:07 +0000 (0:00:00.034) 0:00:08.039 ********* included: /tmp/tmpni6azq3t/tests/ssh/tasks/restore.yml for /cache/rhel-8-y.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpni6azq3t/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:23:07 +0000 (0:00:00.026) 0:00:08.066 ********* ok: [/cache/rhel-8-y.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.z6tj2vqp//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.z6tj2vqp//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.007913", "end": "2022-07-21 16:23:07.261970", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:23:07.254057" } ok: [/cache/rhel-8-y.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.z6tj2vqp//etc/ssh/ssh_config; then\n cp /tmp/ansible.z6tj2vqp//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.005627", "end": "2022-07-21 16:23:07.609735", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:23:07.604108" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpni6azq3t/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:23:08 +0000 (0:00:00.742) 0:00:08.809 ********* ok: [/cache/rhel-8-y.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.z6tj2vqp", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8-y.qcow2.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:23:08 +0000 (0:00:00.529) 0:00:09.338 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.41s /tmp/tmpni6azq3t/tests/ssh/tasks/setup.yml:7 ---------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 1.30s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.12s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 1.12s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:2 --------------------- Backup files ------------------------------------------------------------ 0.86s /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:13 -------------------------------- Restore backed up files and remove what was not present ----------------- 0.74s /tmp/tmpni6azq3t/tests/ssh/tasks/restore.yml:2 -------------------------------- Remove temporary directory for backup files ----------------------------- 0.53s /tmp/tmpni6azq3t/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the global configuration file ---------------------------------- 0.51s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:38 -------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.50s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.49s /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:5 --------------------------------- Stat the configuration file too ----------------------------------------- 0.39s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:43 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.05s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Verify the options are in the file -------------------------------------- 0.05s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:48 -------------------- Run role ---------------------------------------------------------------- 0.04s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:14 -------------------- Verify the file has expected permissions -------------------------------- 0.03s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:54 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Setup ------------------------------------------------------------------- 0.03s /tmp/tmpni6azq3t/tests/ssh/tasks/backup.yml:2 --------------------------------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:11 -------------------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmpni6azq3t/tests/ssh/tests_global_config_mode.yml:62 -------------------- fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.02s /tmp/tmptxteqxd0/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10