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/tmp6e14t4bh 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/tmpsqnv7rd5/tests/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:26:52 +0000 (0:00:00.012) 0:00:00.012 ********* [DEPRECATION WARNING]: ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/rhel-6.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:26:53 +0000 (0:00:00.957) 0:00:00.970 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml for /cache/rhel-6.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:2 Thursday 21 July 2022 20:26:53 +0000 (0:00:00.029) 0:00:00.999 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml for /cache/rhel-6.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:2 Thursday 21 July 2022 20:26:53 +0000 (0:00:00.028) 0:00:01.028 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:7 Thursday 21 July 2022 20:26:53 +0000 (0:00:00.023) 0:00:01.051 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-123.el6_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:5 Thursday 21 July 2022 20:26:54 +0000 (0:00:00.621) 0:00:01.673 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.QgNnET", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:13 Thursday 21 July 2022 20:26:54 +0000 (0:00:00.365) 0:00:02.038 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.QgNnET/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.QgNnET/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003382", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:26:54.726368", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:26:54.722986" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.QgNnET/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.QgNnET/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.007969", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:26:55.019182", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:26:55.011213" } TASK [Run role] **************************************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:26:55 +0000 (0:00:00.677) 0:00:02.716 ********* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 Thursday 21 July 2022 20:26:55 +0000 (0:00:00.037) 0:00:02.753 ********* included: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for /cache/rhel-6.qcow2.snap TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:26:55 +0000 (0:00:00.029) 0:00:02.782 ********* ok: [/cache/rhel-6.qcow2.snap] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 Thursday 21 July 2022 20:26:55 +0000 (0:00:00.385) 0:00:03.168 ********* skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } }, "__ssh_supports_validate": false }, "ansible_included_var_files": [ "/tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/vars/RedHat_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.yml" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.10.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 Thursday 21 July 2022 20:26:55 +0000 (0:00:00.055) 0:00:03.224 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-123.el6_9.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-123.el6_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/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:10 Thursday 21 July 2022 20:26:56 +0000 (0:00:00.482) 0:00:03.707 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:17 Thursday 21 July 2022 20:26:56 +0000 (0:00:00.025) 0:00:03.732 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** task path: /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 Thursday 21 July 2022 20:26:56 +0000 (0:00:00.024) 0:00:03.756 ********* changed: [/cache/rhel-6.qcow2.snap] => { "backup_file": "/etc/ssh/ssh_config.4009.2022-07-21@16:26:56~", "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-1658435216.59032-47552-168664394769779/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-6.qcow2.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:26:57 +0000 (0:00:00.979) 0:00:04.735 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:26:57 +0000 (0:00:00.404) 0:00:05.140 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435217.445, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658435217.026, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435216.637, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "18446744072063578271", "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/tmpsqnv7rd5/tests/tests_global_config_mode.yml:49 Thursday 21 July 2022 20:26:58 +0000 (0:00:00.291) 0:00:05.431 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:55 Thursday 21 July 2022 20:26:58 +0000 (0:00:00.053) 0:00:05.484 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:63 Thursday 21 July 2022 20:26:58 +0000 (0:00:00.040) 0:00:05.525 ********* included: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml for /cache/rhel-6.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:2 Thursday 21 July 2022 20:26:58 +0000 (0:00:00.029) 0:00:05.555 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.QgNnET//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.QgNnET//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.003584", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:26:58.197906", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:26:58.194322" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.QgNnET//etc/ssh/ssh_config; then\n cp /tmp/ansible.QgNnET//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.006249", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:26:58.455395", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:26:58.449146" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:15 Thursday 21 July 2022 20:26:58 +0000 (0:00:00.599) 0:00:06.154 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.QgNnET", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-6.qcow2.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:26:59 +0000 (0:00:00.427) 0:00:06.582 ********* =============================================================================== linux-system-roles.ssh : Generate the configuration file ---------------- 0.98s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:28 --------- Gathering Facts --------------------------------------------------------- 0.96s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:2 ------------------------- Backup files ------------------------------------------------------------ 0.68s /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:13 ------------------------------------ Make sure openssh is installed before creating backup ------------------- 0.62s /tmp/tmpsqnv7rd5/tests/tasks/setup.yml:7 -------------------------------------- Restore backed up files and remove what was not present ----------------- 0.60s /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:2 ------------------------------------ linux-system-roles.ssh : Ensure required packages are installed --------- 0.48s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:5 ---------- Remove temporary directory for backup files ----------------------------- 0.43s /tmp/tmpsqnv7rd5/tests/tasks/restore.yml:15 ----------------------------------- Download the global configuration file ---------------------------------- 0.40s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:38 ------------------------ linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.39s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:2 ------ Create a temporary directory for backup files --------------------------- 0.37s /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:5 ------------------------------------- Stat the configuration file too ----------------------------------------- 0.29s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:43 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.06s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml:8 ------ Verify the options are in the file -------------------------------------- 0.05s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:49 ------------------------ Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:55 ------------------------ Run role ---------------------------------------------------------------- 0.04s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:14 ------------------------ linux-system-roles.ssh : Set platform/version specific variables -------- 0.03s /tmp/tmpsqnv7rd5/tests/roles/linux-system-roles.ssh/tasks/main.yml:2 ---------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:63 ------------------------ Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpsqnv7rd5/tests/tests_global_config_mode.yml:11 ------------------------ Setup ------------------------------------------------------------------- 0.03s /tmp/tmpsqnv7rd5/tests/tasks/backup.yml:2 ------------------------------------- linux-system-roles.ssh : Gather information about the user for user configuration --- 0.03s /tmp/tmpsqnv7rd5/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/tmp6e14t4bh 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/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:2 Thursday 21 July 2022 20:28:27 +0000 (0:00:00.012) 0:00:00.012 ********* [DEPRECATION WARNING]: ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [/cache/rhel-6.qcow2.snap] META: ran handlers TASK [Backup configuration files] ********************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:11 Thursday 21 July 2022 20:28:28 +0000 (0:00:00.985) 0:00:00.997 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml for /cache/rhel-6.qcow2.snap TASK [Setup] ******************************************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:2 Thursday 21 July 2022 20:28:28 +0000 (0:00:00.029) 0:00:01.027 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml for /cache/rhel-6.qcow2.snap TASK [Ensure facts used by test] *********************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:2 Thursday 21 July 2022 20:28:28 +0000 (0:00:00.028) 0:00:01.055 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:7 Thursday 21 July 2022 20:28:28 +0000 (0:00:00.046) 0:00:01.102 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-clients-5.3p1-123.el6_9.x86_64 providing openssh-clients is already installed" ] } TASK [Create a temporary directory for backup files] *************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:5 Thursday 21 July 2022 20:28:29 +0000 (0:00:00.611) 0:00:01.713 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.QxxCSV", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 4096, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:13 Thursday 21 July 2022 20:28:29 +0000 (0:00:00.360) 0:00:02.074 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config.d/00-ansible.conf; then\n mkdir -p /tmp/ansible.QxxCSV/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.QxxCSV/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003367", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:28:29.533717", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:28:29.530350" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /etc/ssh/ssh_config; then\n mkdir -p /tmp/ansible.QxxCSV/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.QxxCSV/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.008622", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:28:29.821923", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:28:29.813301" } TASK [Run role] **************************************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:14 Thursday 21 July 2022 20:28:30 +0000 (0:00:00.669) 0:00:02.743 ********* TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Thursday 21 July 2022 20:28:30 +0000 (0:00:00.038) 0:00:02.782 ********* included: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml for /cache/rhel-6.qcow2.snap TASK [fedora.linux_system_roles.ssh : Ensure ansible_facts used by role] ******* task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Thursday 21 July 2022 20:28:30 +0000 (0:00:00.030) 0:00:02.812 ********* ok: [/cache/rhel-6.qcow2.snap] TASK [fedora.linux_system_roles.ssh : Set platform/version specific variables] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Thursday 21 July 2022 20:28:30 +0000 (0:00:00.356) 0:00:03.168 ********* skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.yml) => { "ansible_facts": { "__ssh_defaults": { "Host": { "Condition": "*", "ForwardX11Trusted": true, "GSSAPIAuthentication": true, "SendEnv": [ "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES", "LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT", "LC_IDENTIFICATION LC_ALL LANGUAGE", "XMODIFIERS" ] } }, "__ssh_supports_validate": false }, "ansible_included_var_files": [ "/tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/vars/RedHat_6.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.yml" } skipping: [/cache/rhel-6.qcow2.snap] => (item=RedHat_6.10.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_6.10.yml", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Ensure required packages are installed] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Thursday 21 July 2022 20:28:30 +0000 (0:00:00.056) 0:00:03.225 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "rc": 0, "results": [ "openssh-5.3p1-123.el6_9.x86_64 providing openssh is already installed", "openssh-clients-5.3p1-123.el6_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/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:10 Thursday 21 July 2022 20:28:31 +0000 (0:00:00.490) 0:00:03.715 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:17 Thursday 21 July 2022 20:28:31 +0000 (0:00:00.025) 0:00:03.741 ********* skipping: [/cache/rhel-6.qcow2.snap] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.ssh : Generate the configuration file] ********* task path: /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Thursday 21 July 2022 20:28:31 +0000 (0:00:00.027) 0:00:03.768 ********* changed: [/cache/rhel-6.qcow2.snap] => { "backup_file": "/etc/ssh/ssh_config.4014.2022-07-21@16:28:31~", "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-1658435311.5877662-50143-85292140657866/source", "state": "file", "uid": 2 } META: role_complete for /cache/rhel-6.qcow2.snap TASK [Download the global configuration file] ********************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:38 Thursday 21 July 2022 20:28:32 +0000 (0:00:00.957) 0:00:04.726 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwpIb3N0ICoKICBGb3J3YXJkWDExVHJ1c3RlZCB5ZXMKICBHU1NBUElBdXRoZW50aWNhdGlvbiB5ZXMKICBTZW5kRW52IExBTkcgTENfQ1RZUEUgTENfTlVNRVJJQyBMQ19USU1FIExDX0NPTExBVEUgTENfTU9ORVRBUlkgTENfTUVTU0FHRVMKU2VuZEVudiBMQ19QQVBFUiBMQ19OQU1FIExDX0FERFJFU1MgTENfVEVMRVBIT05FIExDX01FQVNVUkVNRU5UClNlbmRFbnYgTENfSURFTlRJRklDQVRJT04gTENfQUxMIExBTkdVQUdFClNlbmRFbnYgWE1PRElGSUVSUwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config" } TASK [Stat the configuration file too] ***************************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:43 Thursday 21 July 2022 20:28:32 +0000 (0:00:00.404) 0:00:05.130 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "stat": { "atime": 1658435312.21, "attr_flags": "e", "attributes": [ "extents" ], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "fde705cd3631e9b04386125a8f64876b46322ada", "ctime": 1658435311.793, "dev": 64513, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 395418, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1658435311.417, "nlink": 1, "path": "/etc/ssh/ssh_config", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 323, "uid": 2, "version": "18446744073584118744", "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/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:48 Thursday 21 July 2022 20:28:33 +0000 (0:00:00.288) 0:00:05.418 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:54 Thursday 21 July 2022 20:28:33 +0000 (0:00:00.046) 0:00:05.465 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* task path: /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:62 Thursday 21 July 2022 20:28:33 +0000 (0:00:00.044) 0:00:05.509 ********* included: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml for /cache/rhel-6.qcow2.snap TASK [Restore backed up files and remove what was not present] ***************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:2 Thursday 21 July 2022 20:28:33 +0000 (0:00:00.031) 0:00:05.540 ********* ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.QxxCSV//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.QxxCSV//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.003452", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:28:32.945931", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-07-21 16:28:32.942479" } ok: [/cache/rhel-6.qcow2.snap] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.QxxCSV//etc/ssh/ssh_config; then\n cp /tmp/ansible.QxxCSV//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.005678", "deprecations": [ { "collection_name": null, "msg": "ansible-core 2.13 will require Python 2.7 or newer on the target. Current version: 2.6.6 (r266:84292, Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]", "version": "2.13" } ], "end": "2022-07-21 16:28:33.193137", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-07-21 16:28:33.187459" } TASK [Remove temporary directory for backup files] ***************************** task path: /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:15 Thursday 21 July 2022 20:28:33 +0000 (0:00:00.573) 0:00:06.114 ********* ok: [/cache/rhel-6.qcow2.snap] => { "changed": false, "path": "/tmp/ansible.QxxCSV", "state": "absent" } META: ran handlers META: ran handlers PLAY RECAP ********************************************************************* /cache/rhel-6.qcow2.snap : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 21 July 2022 20:28:34 +0000 (0:00:00.435) 0:00:06.549 ********* =============================================================================== Gathering Facts --------------------------------------------------------- 0.99s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:2 --------------------- fedora.linux_system_roles.ssh : Generate the configuration file --------- 0.96s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:28 Backup files ------------------------------------------------------------ 0.67s /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:13 -------------------------------- Make sure openssh is installed before creating backup ------------------- 0.61s /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:7 ---------------------------------- Restore backed up files and remove what was not present ----------------- 0.57s /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:2 -------------------------------- fedora.linux_system_roles.ssh : Ensure required packages are installed --- 0.49s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:5 Remove temporary directory for backup files ----------------------------- 0.44s /tmp/tmpyr9b2k_r/tests/ssh/tasks/restore.yml:15 ------------------------------- Download the global configuration file ---------------------------------- 0.40s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:38 -------------------- Create a temporary directory for backup files --------------------------- 0.36s /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:5 --------------------------------- fedora.linux_system_roles.ssh : Ensure ansible_facts used by role ------- 0.36s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:2 Stat the configuration file too ----------------------------------------- 0.29s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:43 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.06s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/set_vars.yml:7 Ensure facts used by test ----------------------------------------------- 0.05s /tmp/tmpyr9b2k_r/tests/ssh/tasks/setup.yml:2 ---------------------------------- Verify the options are in the file -------------------------------------- 0.05s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:48 -------------------- Verify the file has expected permissions -------------------------------- 0.04s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:54 -------------------- Run role ---------------------------------------------------------------- 0.04s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:14 -------------------- Restore configuration files --------------------------------------------- 0.03s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:62 -------------------- fedora.linux_system_roles.ssh : Set platform/version specific variables --- 0.03s /tmp/tmp6e14t4bh/ansible_collections/fedora/linux_system_roles/roles/ssh/tasks/main.yml:2 Backup configuration files ---------------------------------------------- 0.03s /tmp/tmpyr9b2k_r/tests/ssh/tests_global_config_mode.yml:11 -------------------- Setup ------------------------------------------------------------------- 0.03s /tmp/tmpyr9b2k_r/tests/ssh/tasks/backup.yml:2 ---------------------------------