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/tmpn177r5cy 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Thursday 21 July 2022 20:02:01 +0000 (0:00:00.017) 0:00:00.017 ********* ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:02:02 +0000 (0:00:01.316) 0:00:01.333 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.32s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_global_config_mode.yml ***************************************** 1 plays in /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:02:02 +0000 (0:00:00.011) 0:00:01.345 ********* ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:02:03 +0000 (0:00:01.056) 0:00:02.401 ********* included: /tmp/tmprk79jc_d/tests/tasks/backup.yml for /cache/rhel-8.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:02:03 +0000 (0:00:00.026) 0:00:02.428 ********* included: /tmp/tmprk79jc_d/tests/tasks/setup.yml for /cache/rhel-8.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmprk79jc_d/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:02:03 +0000 (0:00:00.025) 0:00:02.453 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmprk79jc_d/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:02:03 +0000 (0:00:00.021) 0:00:02.475 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:02:05 +0000 (0:00:01.507) 0:00:03.982 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.hyv64wed", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmprk79jc_d/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:02:05 +0000 (0:00:00.488) 0:00:04.470 ********* ok: [/cache/rhel-8.qcow2] => (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.hyv64wed/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.hyv64wed/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.008385", "end": "2022-07-21 16:02:04.935853", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:02:04.927468" } ok: [/cache/rhel-8.qcow2] => (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.hyv64wed/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.hyv64wed/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.007998", "end": "2022-07-21 16:02:05.294763", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:02:05.286765" } TASK [Run role] **************************************************************** task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:02:06 +0000 (0:00:00.873) 0:00:05.343 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:02:06 +0000 (0:00:00.033) 0:00:05.377 ********* included: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:02:06 +0000 (0:00:00.027) 0:00:05.404 ********* ok: [/cache/rhel-8.qcow2] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:02:07 +0000 (0:00:00.524) 0:00:05.928 ********* skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8.qcow2] => (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/tmprk79jc_d/tests/roles/linux-system-roles.ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:02:07 +0000 (0:00:00.056) 0:00:05.984 ********* ok: [/cache/rhel-8.qcow2] => { "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/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:02:08 +0000 (0:00:01.252) 0:00:07.237 ********* skipping: [/cache/rhel-8.qcow2] => { "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/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:02:08 +0000 (0:00:00.025) 0:00:07.263 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:02:08 +0000 (0:00:00.033) 0:00:07.296 ********* changed: [/cache/rhel-8.qcow2] => { "backup_file": "/etc/ssh/ssh_config.d/00-ansible.conf.22313.2022-07-21@16:02:08~", "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-1658433728.5174897-18819-156332410234484/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-8.qcow2 TASK [Download the global configuration file] ********************************** task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:02:09 +0000 (0:00:01.171) 0:00:08.467 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:02:10 +0000 (0:00:00.513) 0:00:08.981 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433728.9326394, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "ctime": 1658433728.4096394, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 990816, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433727.9816394, "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": "3334201088", "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/tmprk79jc_d/tests/tests_global_config_mode.yml:49 Thursday 21 July 2022 20:02:10 +0000 (0:00:00.402) 0:00:09.384 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:55 Thursday 21 July 2022 20:02:10 +0000 (0:00:00.044) 0:00:09.428 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:63 Thursday 21 July 2022 20:02:10 +0000 (0:00:00.035) 0:00:09.464 ********* included: /tmp/tmprk79jc_d/tests/tasks/restore.yml for /cache/rhel-8.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmprk79jc_d/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:02:10 +0000 (0:00:00.025) 0:00:09.490 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.hyv64wed//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.hyv64wed//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.005985", "end": "2022-07-21 16:02:09.839370", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:02:09.833385" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.hyv64wed//etc/ssh/ssh_config; then\n cp /tmp/ansible.hyv64wed//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.008677", "end": "2022-07-21 16:02:10.243996", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:02:10.235319" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmprk79jc_d/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:02:11 +0000 (0:00:00.807) 0:00:10.297 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "path": "/tmp/ansible.hyv64wed", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=19 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:02:11 +0000 (0:00:00.527) 0:00:10.824 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.51s /tmp/tmprk79jc_d/tests/tasks/setup.yml:7 -------------------------------------- set up internal repositories -------------------------------------------- 1.32s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- linux-system-roles.ssh : Ensure required packages are installed --------- 1.25s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- linux-system-roles.ssh : Generate the configuration file ---------------- 1.17s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 1.06s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:2 ------------------------- Backup files ------------------------------------------------------------ 0.87s /tmp/tmprk79jc_d/tests/tasks/backup.yml:13 ------------------------------------ Restore backed up files and remove what was not present ----------------- 0.81s /tmp/tmprk79jc_d/tests/tasks/restore.yml:2 ------------------------------------ Remove temporary directory for backup files ----------------------------- 0.53s /tmp/tmprk79jc_d/tests/tasks/restore.yml:15 ----------------------------------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.52s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Download the global configuration file ---------------------------------- 0.51s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:38 ------------------------ Create a temporary directory for backup files --------------------------- 0.49s /tmp/tmprk79jc_d/tests/tasks/backup.yml:5 ------------------------------------- Stat the configuration file too ----------------------------------------- 0.40s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:43 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.06s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.04s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:49 ------------------------ Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:55 ------------------------ Run role ---------------------------------------------------------------- 0.03s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:14 ------------------------ linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.03s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmprk79jc_d/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 ---------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:11 ------------------------ Restore configuration files --------------------------------------------- 0.03s /tmp/tmprk79jc_d/tests/tests_global_config_mode.yml:63 ------------------------ 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/tmpn177r5cy 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: rhel-8_setup.yml ***************************************************** 1 plays in /cache/rhel-8_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-8_setup.yml:5 Thursday 21 July 2022 20:05:01 +0000 (0:00:00.023) 0:00:00.024 ********* ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => (item=None) => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } ok: [/cache/rhel-8.qcow2] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:05:02 +0000 (0:00:01.289) 0:00:01.313 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.29s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_global_config_mode.yml ***************************************** 1 plays in /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:05:02 +0000 (0:00:00.012) 0:00:01.325 ********* ok: [/cache/rhel-8.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:05:03 +0000 (0:00:01.045) 0:00:02.370 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml for /cache/rhel-8.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:05:03 +0000 (0:00:00.026) 0:00:02.397 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml for /cache/rhel-8.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:05:04 +0000 (0:00:00.026) 0:00:02.423 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:05:04 +0000 (0:00:00.021) 0:00:02.445 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:05:05 +0000 (0:00:01.459) 0:00:03.905 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.ouy7lvwx", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:05:05 +0000 (0:00:00.492) 0:00:04.397 ********* ok: [/cache/rhel-8.qcow2] => (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.ouy7lvwx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.ouy7lvwx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.007598", "end": "2022-07-21 16:05:06.431748", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:05:06.424150" } ok: [/cache/rhel-8.qcow2] => (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.ouy7lvwx/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.ouy7lvwx/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.007961", "end": "2022-07-21 16:05:06.772012", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:05:06.764051" } TASK [Run role] **************************************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:05:06 +0000 (0:00:00.853) 0:00:05.251 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:05:06 +0000 (0:00:00.034) 0:00:05.286 ********* included: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-8.qcow2 TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:05:06 +0000 (0:00:00.026) 0:00:05.313 ********* ok: [/cache/rhel-8.qcow2] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:05:07 +0000 (0:00:00.529) 0:00:05.843 ********* skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-8.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-8.qcow2] => (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/tmpn177r5cy/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.qcow2] => (item=RedHat_8.6.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.6.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:05:07 +0000 (0:00:00.054) 0:00:05.897 ********* ok: [/cache/rhel-8.qcow2] => { "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/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:05:08 +0000 (0:00:01.242) 0:00:07.139 ********* skipping: [/cache/rhel-8.qcow2] => { "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/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:05:08 +0000 (0:00:00.023) 0:00:07.163 ********* skipping: [/cache/rhel-8.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:05:08 +0000 (0:00:00.025) 0:00:07.188 ********* changed: [/cache/rhel-8.qcow2] => { "backup_file": "/etc/ssh/ssh_config.d/00-ansible.conf.22303.2022-07-21@16:05:09~", "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-1658433908.8609838-22842-167077559327083/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-8.qcow2 TASK [Download the global configuration file] ********************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:05:09 +0000 (0:00:01.128) 0:00:08.317 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:05:10 +0000 (0:00:00.501) 0:00:08.819 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "stat": { "atime": 1658433910.3424196, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "ctime": 1658433909.8264198, "dev": 64515, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 991019, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658433909.4024198, "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": "3942248791", "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/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:48 Thursday 21 July 2022 20:05:10 +0000 (0:00:00.383) 0:00:09.203 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:54 Thursday 21 July 2022 20:05:10 +0000 (0:00:00.042) 0:00:09.246 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:62 Thursday 21 July 2022 20:05:10 +0000 (0:00:00.033) 0:00:09.280 ********* included: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml for /cache/rhel-8.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:05:10 +0000 (0:00:00.025) 0:00:09.305 ********* ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.ouy7lvwx//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.ouy7lvwx//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.006059", "end": "2022-07-21 16:05:11.222412", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:05:11.216353" } ok: [/cache/rhel-8.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.ouy7lvwx//etc/ssh/ssh_config; then\n cp /tmp/ansible.ouy7lvwx//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.006005", "end": "2022-07-21 16:05:11.580852", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:05:11.574847" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:05:11 +0000 (0:00:00.752) 0:00:10.058 ********* ok: [/cache/rhel-8.qcow2] => { "changed": false, "path": "/tmp/ansible.ouy7lvwx", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-8.qcow2 : ok=19 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:05:12 +0000 (0:00:00.519) 0:00:10.578 ********* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.46s /tmp/tmpl5tsfk0r/tests/ssh/tasks/setup.yml:7 ---------------------------------- set up internal repositories -------------------------------------------- 1.29s /cache/rhel-8_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 1.24s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.13s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 1.05s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:2 --------------------- Backup files ------------------------------------------------------------ 0.85s /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:13 -------------------------------- Restore backed up files and remove what was not present ----------------- 0.75s /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:2 -------------------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.53s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Remove temporary directory for backup files ----------------------------- 0.52s /tmp/tmpl5tsfk0r/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the global configuration file ---------------------------------- 0.50s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:38 -------------------- Create a temporary directory for backup files --------------------------- 0.49s /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:5 --------------------------------- Stat the configuration file too ----------------------------------------- 0.38s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:43 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.05s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Verify the options are in the file -------------------------------------- 0.04s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:48 -------------------- Run role ---------------------------------------------------------------- 0.03s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:14 -------------------- Verify the file has expected permissions -------------------------------- 0.03s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:54 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmpn177r5cy/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Setup ------------------------------------------------------------------- 0.03s /tmp/tmpl5tsfk0r/tests/ssh/tasks/backup.yml:2 --------------------------------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:11 -------------------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmpl5tsfk0r/tests/ssh/tests_global_config_mode.yml:62 --------------------