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/tmpond44ouu 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/tmpkp2113mn/tests/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:14:38 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-7.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:14:39 +0000 (0:00:00.976) 0:00:00.989 ********* included: /tmp/tmpkp2113mn/tests/tasks/backup.yml for /cache/centos-7.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpkp2113mn/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:14:39 +0000 (0:00:00.028) 0:00:01.017 ********* included: /tmp/tmpkp2113mn/tests/tasks/setup.yml for /cache/centos-7.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpkp2113mn/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:14:39 +0000 (0:00:00.027) 0:00:01.044 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpkp2113mn/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:14:39 +0000 (0:00:00.020) 0:00:01.065 ********* ok: [/cache/centos-7.qcow2c.snap] => { "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/tmpkp2113mn/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:14:40 +0000 (0:00:00.649) 0:00:01.714 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.KRzr7B", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpkp2113mn/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:14:40 +0000 (0:00:00.392) 0:00:02.106 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.KRzr7B/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.KRzr7B/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003800", "end": "2022-07-21 20:14:40.126473", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:14:40.122673" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.KRzr7B/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.KRzr7B/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008977", "end": "2022-07-21 20:14:40.444732", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:14:40.435755" } TASK [Run role] **************************************************************** task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:14:41 +0000 (0:00:00.730) 0:00:02.837 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:14:41 +0000 (0:00:00.033) 0:00:02.870 ********* included: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/centos-7.qcow2c.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:14:41 +0000 (0:00:00.025) 0:00:02.896 ********* ok: [/cache/centos-7.qcow2c.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:14:41 +0000 (0:00:00.393) 0:00:03.289 ********* skipping: [/cache/centos-7.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-7.qcow2c.snap] => (item=CentOS_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/tmpkp2113mn/tests/roles/linux-system-roles.ssh/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:14:41 +0000 (0:00:00.051) 0:00:03.341 ********* ok: [/cache/centos-7.qcow2c.snap] => { "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/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:14:42 +0000 (0:00:00.487) 0:00:03.828 ********* skipping: [/cache/centos-7.qcow2c.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/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:14:42 +0000 (0:00:00.024) 0:00:03.853 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:14:42 +0000 (0:00:00.024) 0:00:03.878 ********* changed: [/cache/centos-7.qcow2c.snap] => { "backup_file": "/etc/ssh/ssh_config.4734.2022-07-21@20:14:42~", "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-1658434482.5489411-34357-253204717839547/source", "state": "file", "uid": 2 } META: role_complete for /cache/centos-7.qcow2c.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:14:43 +0000 (0:00:00.997) 0:00:04.876 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:14:43 +0000 (0:00:00.423) 0:00:05.299 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658434482.9079258, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658434482.4729257, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 9132842, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434482.1029258, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "18446744072433376073", "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/tmpkp2113mn/tests/tests_global_config_mode.yml:49 Thursday 21 July 2022 20:14:44 +0000 (0:00:00.317) 0:00:05.617 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:55 Thursday 21 July 2022 20:14:44 +0000 (0:00:00.044) 0:00:05.661 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:63 Thursday 21 July 2022 20:14:44 +0000 (0:00:00.035) 0:00:05.696 ********* included: /tmp/tmpkp2113mn/tests/tasks/restore.yml for /cache/centos-7.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpkp2113mn/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:14:44 +0000 (0:00:00.034) 0:00:05.731 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.KRzr7B//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.KRzr7B//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.003493", "end": "2022-07-21 20:14:43.653504", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:14:43.650011" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.KRzr7B//etc/ssh/ssh_config; then\n cp /tmp/ansible.KRzr7B//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.006499", "end": "2022-07-21 20:14:43.928958", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:14:43.922459" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpkp2113mn/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:14:44 +0000 (0:00:00.590) 0:00:06.321 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.KRzr7B", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-7.qcow2c.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:14:45 +0000 (0:00:00.454) 0:00:06.776 ********* =============================================================================== linux-system-roles.ssh : Generate the configuration file ---------------- 1.00s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 0.98s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:2 ------------------------- Backup files ------------------------------------------------------------ 0.73s /tmp/tmpkp2113mn/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.65s /tmp/tmpkp2113mn/tests/tasks/setup.yml:7 -------------------------------------- Restore backed up files and remove what was not present ----------------- 0.59s /tmp/tmpkp2113mn/tests/tasks/restore.yml:2 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.49s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Remove temporary directory for backup files ----------------------------- 0.45s /tmp/tmpkp2113mn/tests/tasks/restore.yml:15 ----------------------------------- Download the global configuration file ---------------------------------- 0.42s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:38 ------------------------ linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.39s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.39s /tmp/tmpkp2113mn/tests/tasks/backup.yml:5 ------------------------------------- Stat the configuration file too ----------------------------------------- 0.32s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:43 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.05s /tmp/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.04s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:49 ------------------------ Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:55 ------------------------ Restore configuration files --------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:63 ------------------------ Run role ---------------------------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:14 ------------------------ Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tests_global_config_mode.yml:11 ------------------------ Setup ------------------------------------------------------------------- 0.03s /tmp/tmpkp2113mn/tests/tasks/backup.yml:2 ------------------------------------- linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmpkp2113mn/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/tmpkp2113mn/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 --------- 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/tmpond44ouu 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/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:16:31 +0000 (0:00:00.012) 0:00:00.012 ********* ok: [/cache/centos-7.qcow2c.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:16:32 +0000 (0:00:00.979) 0:00:00.992 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml for /cache/centos-7.qcow2c.snap TASK [Setup] ******************************************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:16:32 +0000 (0:00:00.026) 0:00:01.018 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml for /cache/centos-7.qcow2c.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:16:32 +0000 (0:00:00.026) 0:00:01.044 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:16:32 +0000 (0:00:00.020) 0:00:01.065 ********* ok: [/cache/centos-7.qcow2c.snap] => { "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/tmp3c63ut4b/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:16:33 +0000 (0:00:00.649) 0:00:01.714 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.0ZAuxx", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:16:33 +0000 (0:00:00.391) 0:00:02.106 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.0ZAuxx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.0ZAuxx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003676", "end": "2022-07-21 20:16:33.684076", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:16:33.680400" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.0ZAuxx/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.0ZAuxx/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.009286", "end": "2022-07-21 20:16:34.010192", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:16:34.000906" } TASK [Run role] **************************************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:16:34 +0000 (0:00:00.736) 0:00:02.842 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:16:34 +0000 (0:00:00.037) 0:00:02.880 ********* included: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/centos-7.qcow2c.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:16:34 +0000 (0:00:00.028) 0:00:02.908 ********* ok: [/cache/centos-7.qcow2c.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:16:34 +0000 (0:00:00.396) 0:00:03.304 ********* skipping: [/cache/centos-7.qcow2c.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS.yml", "skip_reason": "Conditional result was False" } ok: [/cache/centos-7.qcow2c.snap] => (item=CentOS_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/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/CentOS_7.yml" ], "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.yml" } skipping: [/cache/centos-7.qcow2c.snap] => (item=CentOS_7.9.yml) => { "ansible_loop_var": "item", "changed": false, "item": "CentOS_7.9.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:16:34 +0000 (0:00:00.053) 0:00:03.358 ********* ok: [/cache/centos-7.qcow2c.snap] => { "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/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:16:35 +0000 (0:00:00.503) 0:00:03.862 ********* skipping: [/cache/centos-7.qcow2c.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/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:16:35 +0000 (0:00:00.025) 0:00:03.888 ********* skipping: [/cache/centos-7.qcow2c.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:16:35 +0000 (0:00:00.024) 0:00:03.912 ********* changed: [/cache/centos-7.qcow2c.snap] => { "backup_file": "/etc/ssh/ssh_config.4744.2022-07-21@20:16: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-1658434595.3802729-37341-256585593557705/source", "state": "file", "uid": 2 } META: role_complete for /cache/centos-7.qcow2c.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:16:36 +0000 (0:00:00.987) 0:00:04.899 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:16:36 +0000 (0:00:00.429) 0:00:05.329 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "stat": { "atime": 1658434596.4977257, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658434596.0557258, "dev": 64769, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 9132842, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658434595.6897259, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "950248829", "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/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:48 Thursday 21 July 2022 20:16:37 +0000 (0:00:00.327) 0:00:05.656 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:54 Thursday 21 July 2022 20:16:37 +0000 (0:00:00.049) 0:00:05.705 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:62 Thursday 21 July 2022 20:16:37 +0000 (0:00:00.039) 0:00:05.745 ********* included: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml for /cache/centos-7.qcow2c.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:16:37 +0000 (0:00:00.026) 0:00:05.772 ********* ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.0ZAuxx//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.0ZAuxx//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.003880", "end": "2022-07-21 20:16:37.259811", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 20:16:37.255931" } ok: [/cache/centos-7.qcow2c.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.0ZAuxx//etc/ssh/ssh_config; then\n cp /tmp/ansible.0ZAuxx//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.006593", "end": "2022-07-21 20:16:37.579236", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 20:16:37.572643" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:16:37 +0000 (0:00:00.636) 0:00:06.408 ********* ok: [/cache/centos-7.qcow2c.snap] => { "changed": false, "path": "/tmp/ansible.0ZAuxx", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/centos-7.qcow2c.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:16:38 +0000 (0:00:00.438) 0:00:06.847 ********* =============================================================================== fedora.linux_system_roles.ssh : Generate the configuration file --------- 0.99s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Gathering Facts --------------------------------------------------------- 0.98s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:2 --------------------- Backup files ------------------------------------------------------------ 0.74s /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.65s /tmp/tmp3c63ut4b/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.64s /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:2 -------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.50s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Remove temporary directory for backup files ----------------------------- 0.44s /tmp/tmp3c63ut4b/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the global configuration file ---------------------------------- 0.43s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:38 -------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.40s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Create a temporary directory for backup files --------------------------- 0.39s /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:5 --------------------------------- Stat the configuration file too ----------------------------------------- 0.33s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:43 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.05s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Verify the options are in the file -------------------------------------- 0.05s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:48 -------------------- Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:54 -------------------- Run role ---------------------------------------------------------------- 0.04s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:14 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Restore configuration files --------------------------------------------- 0.03s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:62 -------------------- Backup configuration files ---------------------------------------------- 0.03s /tmp/tmp3c63ut4b/tests/ssh/tests_global_config_mode.yml:11 -------------------- Setup ------------------------------------------------------------------- 0.03s /tmp/tmp3c63ut4b/tests/ssh/tasks/backup.yml:2 --------------------------------- fedora.linux_system_roles.ssh : Gather information about the user for user configuration --- 0.03s /tmp/tmpond44ouu/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10