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/tmp0677phw8 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-7_setup.yml ***************************************************** 1 plays in /cache/rhel-7_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-7_setup.yml:5 Thursday 21 July 2022 20:08:29 +0000 (0:00:00.017) 0:00:00.017 ********* ok: [/cache/rhel-7.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-7.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-7.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-7.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-7.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-7.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:08:31 +0000 (0:00:01.328) 0:00:01.345 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.33s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_global_config_mode.yml ***************************************** 1 plays in /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:08:31 +0000 (0:00:00.031) 0:00:01.376 ********* ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:08:32 +0000 (0:00:00.918) 0:00:02.295 ********* included: /tmp/tmpwdhrsu3c/tests/tasks/backup.yml for /cache/rhel-7.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmpwdhrsu3c/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:08:32 +0000 (0:00:00.024) 0:00:02.320 ********* included: /tmp/tmpwdhrsu3c/tests/tasks/setup.yml for /cache/rhel-7.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpwdhrsu3c/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:08:32 +0000 (0:00:00.024) 0:00:02.344 ********* skipping: [/cache/rhel-7.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpwdhrsu3c/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:08:32 +0000 (0:00:00.021) 0:00:02.366 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpwdhrsu3c/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:08:32 +0000 (0:00:00.644) 0:00:03.011 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.G99XCq", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpwdhrsu3c/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:08:33 +0000 (0:00:00.420) 0:00:03.431 ********* ok: [/cache/rhel-7.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.G99XCq/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.G99XCq/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003971", "end": "2022-07-21 16:08:34.059874", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:08:34.055903" } ok: [/cache/rhel-7.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.G99XCq/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.G99XCq/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.009237", "end": "2022-07-21 16:08:34.345742", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:08:34.336505" } TASK [Run role] **************************************************************** task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:08:34 +0000 (0:00:00.728) 0:00:04.160 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:08:34 +0000 (0:00:00.033) 0:00:04.193 ********* included: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-7.qcow2 TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:08:34 +0000 (0:00:00.026) 0:00:04.220 ********* ok: [/cache/rhel-7.qcow2] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:08:34 +0000 (0:00:00.404) 0:00:04.624 ********* skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-7.qcow2] => (item=RedHat_7.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } } }, "ansible_included_var_files": [ "/tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/vars/RedHat_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.yml" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:08:34 +0000 (0:00:00.050) 0:00:04.674 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "openssh-7.4p1-22.el7_9.x86_64 providing openssh is already installed", "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:08:35 +0000 (0:00:00.489) 0:00:05.164 ********* skipping: [/cache/rhel-7.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/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:08:35 +0000 (0:00:00.024) 0:00:05.189 ********* skipping: [/cache/rhel-7.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:08:35 +0000 (0:00:00.024) 0:00:05.213 ********* changed: [/cache/rhel-7.qcow2] => { "backup_file": "/etc/ssh/ssh_config.12318.2022-07-21@16:08:36~", "changed": true, "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "dest": "/etc/ssh/ssh_config", "gid": 2, "group": "daemon", "md5sum": "8b090a0053eb3578a147db357310570b", "mode": "0600", "owner": "daemon", "secontext": "system_u:object_r:etc_t:s0", "size": 323, "src": "/root/.ansible/tmp/ansible-tmp-1658434115.2162237-26853-208004455197993/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-7.qcow2 TASK [Download the global configuration file] ********************************** task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:08:36 +0000 (0:00:00.989) 0:00:06.203 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:08:36 +0000 (0:00:00.434) 0:00:06.637 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1658434116.8220127, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658434116.3780127, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 5080534, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434116.0050125, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "18446744072996536330", "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/tmpwdhrsu3c/tests/tests_global_config_mode.yml:49 Thursday 21 July 2022 20:08:36 +0000 (0:00:00.334) 0:00:06.972 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:55 Thursday 21 July 2022 20:08:36 +0000 (0:00:00.044) 0:00:07.017 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:63 Thursday 21 July 2022 20:08:36 +0000 (0:00:00.032) 0:00:07.049 ********* included: /tmp/tmpwdhrsu3c/tests/tasks/restore.yml for /cache/rhel-7.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpwdhrsu3c/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:08:37 +0000 (0:00:00.023) 0:00:07.072 ********* ok: [/cache/rhel-7.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.G99XCq//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.G99XCq//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.003805", "end": "2022-07-21 16:08:37.559971", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:08:37.556166" } ok: [/cache/rhel-7.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.G99XCq//etc/ssh/ssh_config; then\n cp /tmp/ansible.G99XCq//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.006587", "end": "2022-07-21 16:08:37.842518", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:08:37.835931" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpwdhrsu3c/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:08:37 +0000 (0:00:00.583) 0:00:07.656 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "path": "/tmp/ansible.G99XCq", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=19 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:08:38 +0000 (0:00:00.462) 0:00:08.119 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.33s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- linux-system-roles.ssh : Generate the configuration file ---------------- 0.99s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 0.92s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:2 ------------------------- Backup files ------------------------------------------------------------ 0.73s /tmp/tmpwdhrsu3c/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.64s /tmp/tmpwdhrsu3c/tests/tasks/setup.yml:7 -------------------------------------- Restore backed up files and remove what was not present ----------------- 0.58s /tmp/tmpwdhrsu3c/tests/tasks/restore.yml:2 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.49s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Remove temporary directory for backup files ----------------------------- 0.46s /tmp/tmpwdhrsu3c/tests/tasks/restore.yml:15 ----------------------------------- Download the global configuration file ---------------------------------- 0.43s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:38 ------------------------ Create a temporary directory for backup files --------------------------- 0.42s /tmp/tmpwdhrsu3c/tests/tasks/backup.yml:5 ------------------------------------- linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.40s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Stat the configuration file too ----------------------------------------- 0.33s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:43 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.05s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.04s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:49 ------------------------ Run role ---------------------------------------------------------------- 0.03s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:14 ------------------------ Verify the file has expected permissions -------------------------------- 0.03s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:55 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 ---------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.02s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.02s /tmp/tmpwdhrsu3c/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 --------- Backup configuration files ---------------------------------------------- 0.02s /tmp/tmpwdhrsu3c/tests/tests_global_config_mode.yml:11 ------------------------ 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/tmp0677phw8 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-7_setup.yml ***************************************************** 1 plays in /cache/rhel-7_setup.yml PLAY [Setup repos] ************************************************************* META: ran handlers TASK [set up internal repositories] ******************************************** task path: /cache/rhel-7_setup.yml:5 Thursday 21 July 2022 20:10:42 +0000 (0:00:00.018) 0:00:00.018 ********* ok: [/cache/rhel-7.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-7.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-7.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-7.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-7.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-7.qcow2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Thursday 21 July 2022 20:10:43 +0000 (0:00:01.337) 0:00:01.356 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.34s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- PLAYBOOK: tests_global_config_mode.yml ***************************************** 1 plays in /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:10:43 +0000 (0:00:00.033) 0:00:01.389 ********* ok: [/cache/rhel-7.qcow2] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:10:44 +0000 (0:00:00.911) 0:00:02.300 ********* included: /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml for /cache/rhel-7.qcow2 TASK [Setup] ******************************************************************* task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:10:44 +0000 (0:00:00.025) 0:00:02.326 ********* included: /tmp/tmpxz37r5cb/tests/ssh/tasks/setup.yml for /cache/rhel-7.qcow2 TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:10:44 +0000 (0:00:00.025) 0:00:02.351 ********* skipping: [/cache/rhel-7.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:10:44 +0000 (0:00:00.019) 0:00:02.371 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:10:45 +0000 (0:00:00.657) 0:00:03.029 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.CcN15Z", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:10:45 +0000 (0:00:00.420) 0:00:03.450 ********* ok: [/cache/rhel-7.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.CcN15Z/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.CcN15Z/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003783", "end": "2022-07-21 16:10:45.996898", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:10:45.993115" } ok: [/cache/rhel-7.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.CcN15Z/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.CcN15Z/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.010282", "end": "2022-07-21 16:10:46.289190", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:10:46.278908" } TASK [Run role] **************************************************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:10:46 +0000 (0:00:00.739) 0:00:04.189 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:10:46 +0000 (0:00:00.039) 0:00:04.229 ********* included: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-7.qcow2 TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:10:46 +0000 (0:00:00.027) 0:00:04.257 ********* ok: [/cache/rhel-7.qcow2] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:10:46 +0000 (0:00:00.420) 0:00:04.678 ********* skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-7.qcow2] => (item=RedHat_7.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } } }, "ansible_included_var_files": [ "/tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/RedHat_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.yml" } skipping: [/cache/rhel-7.qcow2] => (item=RedHat_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:10:46 +0000 (0:00:00.049) 0:00:04.727 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "rc": 0, "results": [ "openssh-7.4p1-22.el7_9.x86_64 providing openssh is already installed", "openssh-clients-7.4p1-22.el7_9.x86_64 providing openssh-clients is already installed" ] } TASK [fedora.linux_system_roles.ssh : Gather information about the user for user configuration] *** task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:10:47 +0000 (0:00:00.501) 0:00:05.229 ********* skipping: [/cache/rhel-7.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/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:10:47 +0000 (0:00:00.023) 0:00:05.252 ********* skipping: [/cache/rhel-7.qcow2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:10:47 +0000 (0:00:00.025) 0:00:05.277 ********* changed: [/cache/rhel-7.qcow2] => { "backup_file": "/etc/ssh/ssh_config.12321.2022-07-21@16:10:48~", "changed": true, "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "dest": "/etc/ssh/ssh_config", "gid": 2, "group": "daemon", "md5sum": "8b090a0053eb3578a147db357310570b", "mode": "0600", "owner": "daemon", "secontext": "system_u:object_r:etc_t:s0", "size": 323, "src": "/root/.ansible/tmp/ansible-tmp-1658434247.415907-30655-227378688600346/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-7.qcow2 TASK [Download the global configuration file] ********************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:10:48 +0000 (0:00:01.011) 0:00:06.289 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:10:48 +0000 (0:00:00.449) 0:00:06.738 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "stat": { "atime": 1658434248.841263, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658434248.382263, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 5080535, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434248.006263, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "1113264396", "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/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:48 Thursday 21 July 2022 20:10:49 +0000 (0:00:00.317) 0:00:07.056 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:54 Thursday 21 July 2022 20:10:49 +0000 (0:00:00.045) 0:00:07.101 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:62 Thursday 21 July 2022 20:10:49 +0000 (0:00:00.034) 0:00:07.136 ********* included: /tmp/tmpxz37r5cb/tests/ssh/tasks/restore.yml for /cache/rhel-7.qcow2 TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:10:49 +0000 (0:00:00.024) 0:00:07.161 ********* ok: [/cache/rhel-7.qcow2] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.CcN15Z//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.CcN15Z//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.004008", "end": "2022-07-21 16:10:49.575477", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:10:49.571469" } ok: [/cache/rhel-7.qcow2] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.CcN15Z//etc/ssh/ssh_config; then\n cp /tmp/ansible.CcN15Z//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.007294", "end": "2022-07-21 16:10:49.855176", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:10:49.847882" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpxz37r5cb/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:10:49 +0000 (0:00:00.581) 0:00:07.742 ********* ok: [/cache/rhel-7.qcow2] => { "changed": false, "path": "/tmp/ansible.CcN15Z", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-7.qcow2 : ok=19 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:10:50 +0000 (0:00:00.443) 0:00:08.185 ********* =============================================================================== set up internal repositories -------------------------------------------- 1.34s /cache/rhel-7_setup.yml:5 ----------------------------------------------------- fedora.linux_system_roles.ssh : Generate the configuration file --------- 1.01s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 0.91s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:2 --------------------- Backup files ------------------------------------------------------------ 0.74s /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.66s /tmp/tmpxz37r5cb/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.58s /tmp/tmpxz37r5cb/tests/ssh/tasks/restore.yml:2 -------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.50s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Download the global configuration file ---------------------------------- 0.45s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:38 -------------------- Remove temporary directory for backup files ----------------------------- 0.44s /tmp/tmpxz37r5cb/tests/ssh/tasks/restore.yml:15 ------------------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.42s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.42s /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:5 --------------------------------- Stat the configuration file too ----------------------------------------- 0.32s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:43 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.05s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Verify the options are in the file -------------------------------------- 0.05s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:48 -------------------- Run role ---------------------------------------------------------------- 0.04s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:14 -------------------- Verify the file has expected permissions -------------------------------- 0.03s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:54 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Setup ------------------------------------------------------------------- 0.03s /tmp/tmpxz37r5cb/tests/ssh/tasks/backup.yml:2 --------------------------------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpxz37r5cb/tests/ssh/tests_global_config_mode.yml:11 -------------------- fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.03s /tmp/tmp0677phw8/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17