# 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 20:26:08 +0000 (0:00:00.020) 0:00:00.020 ******* ok: [sut] TASK [Backup configuration files] ********************************************** Thursday 11 August 2022 20:26:09 +0000 (0:00:01.132) 0:00:01.152 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-DoWXN5/tests/tasks/backup.yml for sut TASK [Setup] ******************************************************************* Thursday 11 August 2022 20:26:09 +0000 (0:00:00.036) 0:00:01.189 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-DoWXN5/tests/tasks/setup.yml for sut TASK [Ensure facts used by test] *********************************************** Thursday 11 August 2022 20:26:09 +0000 (0:00:00.035) 0:00:01.225 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 20:26:09 +0000 (0:00:00.031) 0:00:01.256 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** Thursday 11 August 2022 20:26:10 +0000 (0:00:01.180) 0:00:02.437 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.0osd9ta5", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 20:26:11 +0000 (0:00:00.397) 0:00:02.835 ******* 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.0osd9ta5/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.0osd9ta5/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.003878", "end": "2022-08-11 20:26:11.567780", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 20:26:11.563902" } 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.0osd9ta5/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.0osd9ta5/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.011866", "end": "2022-08-11 20:26:11.806321", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 20:26:11.794455" } TASK [Run role] **************************************************************** Thursday 11 August 2022 20:26:11 +0000 (0:00:00.641) 0:00:03.476 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 20:26:11 +0000 (0:00:00.047) 0:00:03.524 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-DoWXN5/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 20:26:11 +0000 (0:00:00.040) 0:00:03.565 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 20:26:12 +0000 (0:00:00.443) 0:00:04.009 ******* 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_9.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-DoWXN5/tests/roles/linux-system-roles.ssh/vars/RedHat_9.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.yml" } skipping: [sut] => (item=RedHat_9.1.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_9.1.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Ensure required packages are installed] ********* Thursday 11 August 2022 20:26:12 +0000 (0:00:00.075) 0:00:04.084 ******* 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 20:26:13 +0000 (0:00:00.969) 0:00:05.054 ******* 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 20:26:13 +0000 (0:00:00.036) 0:00:05.090 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** Thursday 11 August 2022 20:26:13 +0000 (0:00:00.035) 0:00:05.126 ******* 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-1660249573.5874927-11069-142296435997393/source", "state": "file", "uid": 0 } TASK [Download the global configuration file] ********************************** Thursday 11 August 2022 20:26:14 +0000 (0:00:01.250) 0:00:06.376 ******* 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 20:26:15 +0000 (0:00:00.415) 0:00:06.792 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 20:26:15 +0000 (0:00:00.070) 0:00:06.862 ******* included: /WORKDIR/dist-git-ssh-cast-value-to-string-in-jinja-DoWXN5/tests/tasks/restore.yml for sut TASK [Restore backed up files and remove what was not present] ***************** Thursday 11 August 2022 20:26:15 +0000 (0:00:00.036) 0:00:06.899 ******* ok: [sut] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.0osd9ta5//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.0osd9ta5//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.005133", "end": "2022-08-11 20:26:15.511647", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 20:26:15.506514" } ok: [sut] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.0osd9ta5//etc/ssh/ssh_config; then\n cp /tmp/ansible.0osd9ta5//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.006633", "end": "2022-08-11 20:26:15.743125", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 20:26:15.736492" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 20:26:15 +0000 (0:00:00.515) 0:00:07.414 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible.0osd9ta5", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=16 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 20:26:16 +0000 (0:00:00.434) 0:00:07.848 ******* =============================================================================== linux-system-roles.ssh : Generate the configuration file ---------------- 1.25s Make sure openssh is installed before creating backup ------------------- 1.18s Gathering Facts --------------------------------------------------------- 1.13s linux-system-roles.ssh : Ensure required packages are installed --------- 0.97s 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.44s Remove temporary directory for backup files ----------------------------- 0.43s Download the global configuration file ---------------------------------- 0.42s Create a temporary directory for backup files --------------------------- 0.40s linux-system-roles.ssh : Set platform/version specific variables -------- 0.08s Verify the options are in the file -------------------------------------- 0.07s Run role ---------------------------------------------------------------- 0.05s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s Backup configuration files ---------------------------------------------- 0.04s Restore configuration files --------------------------------------------- 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 Ensure facts used by test ----------------------------------------------- 0.03s ---^---^---^---^---^--- # 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. ---^---^---^---^---^---