# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Test options precedence when mixing ssh dict and ssh_* variables] ******** TASK [Gathering Facts] ********************************************************* Thursday 11 August 2022 19:55:29 +0000 (0:00:00.020) 0:00:00.020 ******* ok: [sut] TASK [Backup configuration files] ********************************************** Thursday 11 August 2022 19:55:30 +0000 (0:00:01.044) 0:00:01.065 ******* 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:55:30 +0000 (0:00:00.038) 0:00:01.103 ******* 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:55:30 +0000 (0:00:00.042) 0:00:01.146 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 19:55:30 +0000 (0:00:00.037) 0:00:01.183 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** Thursday 11 August 2022 19:55:32 +0000 (0:00:01.952) 0:00:03.136 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible._4hghwra", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 19:55:32 +0000 (0:00:00.378) 0:00:03.514 ******* 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._4hghwra/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible._4hghwra/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004035", "end": "2022-08-11 19:55:33.141746", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:55:33.137711" } 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._4hghwra/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible._4hghwra/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.012656", "end": "2022-08-11 19:55:33.391108", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:55:33.378452" } TASK [Run role] **************************************************************** Thursday 11 August 2022 19:55:33 +0000 (0:00:00.653) 0:00:04.168 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:55:33 +0000 (0:00:00.046) 0:00:04.215 ******* 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:55:33 +0000 (0:00:00.040) 0:00:04.255 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:55:33 +0000 (0:00:00.447) 0:00:04.703 ******* 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:55:34 +0000 (0:00:00.076) 0:00:04.780 ******* 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:55:35 +0000 (0:00:01.686) 0:00:06.467 ******* 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:55:35 +0000 (0:00:00.036) 0:00:06.503 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** Thursday 11 August 2022 19:55:35 +0000 (0:00:00.036) 0:00:06.539 ******* changed: [sut] => { "changed": true, "checksum": "2771a93b02b62ba49a971a92a8f08cd527a3ef0a", "dest": "/etc/ssh/ssh_config.d/00-ansible.conf", "gid": 0, "group": "root", "md5sum": "d3ac25fe0e97e20c58467fe15bdd8cca", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 57, "src": "/root/.ansible/tmp/ansible-tmp-1660247735.899183-11095-67922538686874/source", "state": "file", "uid": 0 } TASK [Download the global configuration file] ********************************** Thursday 11 August 2022 19:55:37 +0000 (0:00:01.266) 0:00:07.806 ******* ok: [sut] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojClBvcnQgMjIyClN0cmljdEhvc3RLZXlDaGVja2luZyB5ZXMK", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Verify the options are in the file] ************************************** Thursday 11 August 2022 19:55:37 +0000 (0:00:00.408) 0:00:08.214 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 19:55:37 +0000 (0:00:00.071) 0:00:08.286 ******* 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:55:37 +0000 (0:00:00.037) 0:00:08.323 ******* ok: [sut] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible._4hghwra//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible._4hghwra//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.005091", "end": "2022-08-11 19:55:37.824858", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:55:37.819767" } ok: [sut] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible._4hghwra//etc/ssh/ssh_config; then\n cp /tmp/ansible._4hghwra//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.007080", "end": "2022-08-11 19:55:38.049564", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:55:38.042484" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 19:55:38 +0000 (0:00:00.502) 0:00:08.826 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible._4hghwra", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=16 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 19:55:38 +0000 (0:00:00.428) 0:00:09.254 ******* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.95s linux-system-roles.ssh : Ensure required packages are installed --------- 1.69s linux-system-roles.ssh : Generate the configuration file ---------------- 1.27s Gathering Facts --------------------------------------------------------- 1.04s Backup files ------------------------------------------------------------ 0.65s Restore backed up files and remove what was not present ----------------- 0.50s 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.41s Create a temporary directory for backup files --------------------------- 0.38s linux-system-roles.ssh : Set platform/version specific variables -------- 0.08s Verify the options are in the file -------------------------------------- 0.07s Run role ---------------------------------------------------------------- 0.05s Setup ------------------------------------------------------------------- 0.04s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s Backup configuration files ---------------------------------------------- 0.04s Ensure facts used by test ----------------------------------------------- 0.04s Restore configuration files --------------------------------------------- 0.04s linux-system-roles.ssh : Gather information about the user for user configuration --- 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. ---^---^---^---^---^---