# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Test we can write global config with given permissions] ****************** TASK [Gathering Facts] ********************************************************* Thursday 11 August 2022 19:39:17 +0000 (0:00:00.019) 0:00:00.019 ******* ok: [sut] TASK [Backup configuration files] ********************************************** Thursday 11 August 2022 19:39:19 +0000 (0:00:01.119) 0:00:01.139 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-4MxgHW/tests/tasks/backup.yml for sut TASK [Setup] ******************************************************************* Thursday 11 August 2022 19:39:19 +0000 (0:00:00.038) 0:00:01.177 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-4MxgHW/tests/tasks/setup.yml for sut TASK [Ensure facts used by test] *********************************************** Thursday 11 August 2022 19:39:19 +0000 (0:00:00.038) 0:00:01.216 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 19:39:19 +0000 (0:00:00.031) 0:00:01.247 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** Thursday 11 August 2022 19:39:21 +0000 (0:00:02.072) 0:00:03.320 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.khmdajge", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 19:39:21 +0000 (0:00:00.373) 0:00:03.694 ******* ok: [sut] => (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.khmdajge/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.khmdajge/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004223", "end": "2022-08-11 19:39:21.999904", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:39:21.995681" } ok: [sut] => (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.khmdajge/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.khmdajge/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.013774", "end": "2022-08-11 19:39:22.240194", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:39:22.226420" } TASK [Run role] **************************************************************** Thursday 11 August 2022 19:39:22 +0000 (0:00:00.644) 0:00:04.339 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:39:22 +0000 (0:00:00.047) 0:00:04.386 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-4MxgHW/tests/roles/linux-system-roles.ssh/tasks/set_vars.yml for sut TASK [linux-system-roles.ssh : Ensure ansible_facts used by role] ************** Thursday 11 August 2022 19:39:22 +0000 (0:00:00.038) 0:00:04.424 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:39:22 +0000 (0:00:00.450) 0:00:04.875 ******* skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [sut] => (item=RedHat_8.yml) => { "ansible_facts": { "__ssh_defaults": { "Include": "/etc/ssh/ssh_config.d/*.conf" }, "__ssh_drop_in_name": "00-ansible", "__ssh_supports_drop_in": true }, "ansible_included_var_files": [ "/WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-4MxgHW/tests/roles/linux-system-roles.ssh/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [sut] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* Thursday 11 August 2022 19:39:22 +0000 (0:00:00.076) 0:00:04.951 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.ssh : Gather information about the user for user configuration] *** Thursday 11 August 2022 19:39:24 +0000 (0:00:01.758) 0:00:06.710 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions] *** Thursday 11 August 2022 19:39:24 +0000 (0:00:00.038) 0:00:06.748 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** Thursday 11 August 2022 19:39:24 +0000 (0:00:00.037) 0:00:06.786 ******* changed: [sut] => { "changed": true, "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "dest": "/etc/ssh/ssh_config.d/00-ansible.conf", "gid": 2, "group": "daemon", "md5sum": "2f19240ad6e71480c76da5718e2aa100", "mode": "0600", "owner": "daemon", "secontext": "system_u:object_r:etc_t:s0", "size": 62, "src": "/root/.ansible/tmp/ansible-tmp-1660246764.8268628-6765-73139947934300/source", "state": "file", "uid": 2 } TASK [Download the global configuration file] ********************************** Thursday 11 August 2022 19:39:26 +0000 (0:00:01.291) 0:00:08.077 ******* ok: [sut] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Stat the configuration file too] ***************************************** Thursday 11 August 2022 19:39:26 +0000 (0:00:00.415) 0:00:08.493 ******* ok: [sut] => { "changed": false, "stat": { "atime": 1660246766.398312, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "us-ascii", "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "ctime": 1660246765.9273171, "dev": 51715, "device_type": 0, "executable": false, "exists": true, "gid": 2, "gr_name": "daemon", "inode": 503316738, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "text/plain", "mode": "0600", "mtime": 1660246765.4413223, "nlink": 1, "path": "/etc/ssh/ssh_config.d/00-ansible.conf", "pw_name": "daemon", "readable": true, "rgrp": false, "roth": false, "rusr": true, "size": 62, "uid": 2, "version": "3506522149", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Verify the options are in the file] ************************************** Thursday 11 August 2022 19:39:26 +0000 (0:00:00.281) 0:00:08.774 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify the file has expected permissions] ******************************** Thursday 11 August 2022 19:39:26 +0000 (0:00:00.067) 0:00:08.841 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 19:39:26 +0000 (0:00:00.052) 0:00:08.893 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-4MxgHW/tests/tasks/restore.yml for sut TASK [Restore backed up files and remove what was not present] ***************** Thursday 11 August 2022 19:39:26 +0000 (0:00:00.036) 0:00:08.930 ******* ok: [sut] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.khmdajge//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.khmdajge//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.005368", "end": "2022-08-11 19:39:27.116231", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:39:27.110863" } ok: [sut] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.khmdajge//etc/ssh/ssh_config; then\n cp /tmp/ansible.khmdajge//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.007668", "end": "2022-08-11 19:39:27.347567", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:39:27.339899" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 19:39:27 +0000 (0:00:00.515) 0:00:09.446 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible.khmdajge", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=18 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 19:39:27 +0000 (0:00:00.434) 0:00:09.880 ******* =============================================================================== Make sure openssh is installed before creating backup ------------------- 2.07s linux-system-roles.ssh : Ensure required packages are installed --------- 1.76s linux-system-roles.ssh : Generate the configuration file ---------------- 1.29s Gathering Facts --------------------------------------------------------- 1.12s Backup files ------------------------------------------------------------ 0.64s Restore backed up files and remove what was not present ----------------- 0.52s linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.45s Remove temporary directory for backup files ----------------------------- 0.43s Download the global configuration file ---------------------------------- 0.42s Create a temporary directory for backup files --------------------------- 0.37s Stat the configuration file too ----------------------------------------- 0.28s linux-system-roles.ssh : Set platform/version specific variables -------- 0.08s Verify the options are in the file -------------------------------------- 0.07s Verify the file has expected permissions -------------------------------- 0.05s Run role ---------------------------------------------------------------- 0.05s Backup configuration files ---------------------------------------------- 0.04s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s linux-system-roles.ssh : Gather information about the user for user configuration --- 0.04s Setup ------------------------------------------------------------------- 0.04s linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 0.04s ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- [DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callbacks_enabled instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ---^---^---^---^---^---