# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Test we can write global config with default configuration] ************** TASK [Gathering Facts] ********************************************************* Thursday 11 August 2022 19:30:15 +0000 (0:00:00.020) 0:00:00.020 ******* ok: [sut] TASK [Backup configuration files] ********************************************** Thursday 11 August 2022 19:30:16 +0000 (0:00:01.068) 0:00:01.088 ******* 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:30:16 +0000 (0:00:00.037) 0:00:01.126 ******* 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:30:16 +0000 (0:00:00.037) 0:00:01.163 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 19:30:16 +0000 (0:00:00.032) 0:00:01.196 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** Thursday 11 August 2022 19:30:18 +0000 (0:00:01.967) 0:00:03.164 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.nf5z63vx", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 19:30:18 +0000 (0:00:00.367) 0:00:03.531 ******* 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.nf5z63vx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf);\n cp /etc/ssh/ssh_config.d/00-ansible.conf /tmp/ansible.nf5z63vx/$(dirname /etc/ssh/ssh_config.d/00-ansible.conf)\nfi\n", "delta": "0:00:00.004059", "end": "2022-08-11 19:30:19.364917", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:30:19.360858" } 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.nf5z63vx/$(dirname /etc/ssh/ssh_config);\n cp /etc/ssh/ssh_config /tmp/ansible.nf5z63vx/$(dirname /etc/ssh/ssh_config)\nfi\n", "delta": "0:00:00.013803", "end": "2022-08-11 19:30:19.600630", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:30:19.586827" } TASK [Run role] **************************************************************** Thursday 11 August 2022 19:30:19 +0000 (0:00:00.637) 0:00:04.169 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:30:19 +0000 (0:00:00.047) 0:00:04.217 ******* 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:30:19 +0000 (0:00:00.037) 0:00:04.254 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:30:20 +0000 (0:00:00.440) 0:00:04.695 ******* 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:30:20 +0000 (0:00:00.076) 0:00:04.771 ******* 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:30:21 +0000 (0:00:01.710) 0:00:06.482 ******* 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:30:21 +0000 (0:00:00.036) 0:00:06.518 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** Thursday 11 August 2022 19:30:22 +0000 (0:00:00.035) 0:00:06.553 ******* changed: [sut] => { "changed": true, "checksum": "f38a8a96250e45899f48c98e601512d496860083", "dest": "/etc/ssh/ssh_config.d/00-ansible.conf", "gid": 0, "group": "root", "md5sum": "db0ebde88fc58af96a9426da8aab8059", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 279, "src": "/root/.ansible/tmp/ansible-tmp-1660246222.120634-4473-257159885338930/source", "state": "file", "uid": 0 } TASK [Download the global configuration file] ********************************** Thursday 11 August 2022 19:30:23 +0000 (0:00:01.268) 0:00:07.822 ******* ok: [sut] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpDb250cm9sTWFzdGVyIGF1dG8KQ29udHJvbFBhdGggfi8uc3NoLy5jbSVDCkZvcndhcmRYMTEgbm8KR1NTQVBJQXV0aGVudGljYXRpb24gbm8KTWF0Y2ggYWxsCiAgR1NTQVBJQXV0aGVudGljYXRpb24geWVzCk1hdGNoIGV4ZWMgdHJ1ZQogIFVzZXIgbm9ib2R5Ckhvc3QgZXhhbXBsZQogIEhvc3RuYW1lIGV4YW1wbGUuY29tCiAgVXNlciBzb21lYm9keQpIb3N0IGxvY2FsCiAgSG9zdG5hbWUgbG9jYWwuZXhhbXBsZS5jb20K", "encoding": "base64", "source": "/etc/ssh/ssh_config.d/00-ansible.conf" } TASK [Verify the options are in the file] ************************************** Thursday 11 August 2022 19:30:23 +0000 (0:00:00.408) 0:00:08.231 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Verify the defaults are not in the drop-in file] ************************* Thursday 11 August 2022 19:30:23 +0000 (0:00:00.089) 0:00:08.320 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 19:30:23 +0000 (0:00:00.071) 0:00:08.392 ******* 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:30:23 +0000 (0:00:00.036) 0:00:08.428 ******* ok: [sut] => (item=/etc/ssh/ssh_config.d/00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.nf5z63vx//etc/ssh/ssh_config.d/00-ansible.conf; then\n cp /tmp/ansible.nf5z63vx//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.005262", "end": "2022-08-11 19:30:24.137361", "item": "/etc/ssh/ssh_config.d/00-ansible.conf", "rc": 0, "start": "2022-08-11 19:30:24.132099" } ok: [sut] => (item=/etc/ssh/ssh_config) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.nf5z63vx//etc/ssh/ssh_config; then\n cp /tmp/ansible.nf5z63vx//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.007840", "end": "2022-08-11 19:30:24.391529", "item": "/etc/ssh/ssh_config", "rc": 0, "start": "2022-08-11 19:30:24.383689" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 19:30:24 +0000 (0:00:00.531) 0:00:08.959 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible.nf5z63vx", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=17 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 19:30:24 +0000 (0:00:00.426) 0:00:09.386 ******* =============================================================================== Make sure openssh is installed before creating backup ------------------- 1.97s linux-system-roles.ssh : Ensure required packages are installed --------- 1.71s linux-system-roles.ssh : Generate the configuration file ---------------- 1.27s Gathering Facts --------------------------------------------------------- 1.07s Backup files ------------------------------------------------------------ 0.64s Restore backed up files and remove what was not present ----------------- 0.53s 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.41s Create a temporary directory for backup files --------------------------- 0.37s Verify the options are in the file -------------------------------------- 0.09s linux-system-roles.ssh : Set platform/version specific variables -------- 0.08s Verify the defaults are not in the drop-in file ------------------------- 0.07s Run role ---------------------------------------------------------------- 0.05s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s Setup ------------------------------------------------------------------- 0.04s Backup configuration files ---------------------------------------------- 0.04s linux-system-roles.ssh : Gather information about the user for user configuration --- 0.04s Restore configuration files --------------------------------------------- 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. ---^---^---^---^---^---