# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Test we can write any other configuration file as a drop-in] ************* TASK [Gathering Facts] ********************************************************* Thursday 11 August 2022 19:29:57 +0000 (0:00:00.020) 0:00:00.020 ******* ok: [sut] TASK [Skip if the system does not support drop in directory] ******************* Thursday 11 August 2022 19:29:58 +0000 (0:00:01.110) 0:00:01.131 ******* skipping: [sut] => { "skip_reason": "end_host conditional evaluated to False, continuing execution for sut" } MSG: end_host conditional evaluated to false, continuing execution for sut TASK [Backup configuration files] ********************************************** Thursday 11 August 2022 19:29:58 +0000 (0:00:00.042) 0:00:01.173 ******* 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:29:58 +0000 (0:00:00.039) 0:00:01.213 ******* 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:29:58 +0000 (0:00:00.037) 0:00:01.250 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 19:29:58 +0000 (0:00:00.029) 0:00:01.279 ******* 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:00 +0000 (0:00:02.247) 0:00:03.526 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.kixzn83h", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 19:30:01 +0000 (0:00:00.386) 0:00:03.912 ******* ok: [sut] => (item=/tmp/ssh_config.d_00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ssh_config.d_00-ansible.conf; then\n mkdir -p /tmp/ansible.kixzn83h/$(dirname /tmp/ssh_config.d_00-ansible.conf);\n cp /tmp/ssh_config.d_00-ansible.conf /tmp/ansible.kixzn83h/$(dirname /tmp/ssh_config.d_00-ansible.conf)\nfi\n", "delta": "0:00:00.005148", "end": "2022-08-11 19:30:01.395596", "item": "/tmp/ssh_config.d_00-ansible.conf", "rc": 0, "start": "2022-08-11 19:30:01.390448" } TASK [Run role] **************************************************************** Thursday 11 August 2022 19:30:01 +0000 (0:00:00.411) 0:00:04.324 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:30:01 +0000 (0:00:00.048) 0:00:04.372 ******* 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:01 +0000 (0:00:00.041) 0:00:04.413 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 19:30:03 +0000 (0:00:01.521) 0:00:05.935 ******* 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:03 +0000 (0:00:00.075) 0:00:06.011 ******* 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:05 +0000 (0:00:01.981) 0:00:07.993 ******* 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:05 +0000 (0:00:00.034) 0:00:08.027 ******* 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:05 +0000 (0:00:00.033) 0:00:08.060 ******* changed: [sut] => { "changed": true, "checksum": "134a8461ceac8f2d22205f68566daf5b8eb5cb1b", "dest": "/tmp/ssh_config.d_00-ansible.conf", "gid": 0, "group": "root", "md5sum": "2f19240ad6e71480c76da5718e2aa100", "mode": "0644", "owner": "root", "secontext": "unconfined_u:object_r:admin_home_t:s0", "size": 62, "src": "/root/.ansible/tmp/ansible-tmp-1660246205.261528-4313-73318210438131/source", "state": "file", "uid": 0 } TASK [Download the custom configuration file drop-in] ************************** Thursday 11 August 2022 19:30:06 +0000 (0:00:01.327) 0:00:09.388 ******* ok: [sut] => { "changed": false, "content": "IwojIEFuc2libGUgbWFuYWdlZAojCkNvbXByZXNzaW9uIHllcwpHU1NBUElBdXRoZW50aWNhdGlvbiBubwo=", "encoding": "base64", "source": "/tmp/ssh_config.d_00-ansible.conf" } TASK [Verify the options are in the file] ************************************** Thursday 11 August 2022 19:30:06 +0000 (0:00:00.410) 0:00:09.799 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 19:30:06 +0000 (0:00:00.052) 0:00:09.851 ******* 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:06 +0000 (0:00:00.036) 0:00:09.888 ******* ok: [sut] => (item=/tmp/ssh_config.d_00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.kixzn83h//tmp/ssh_config.d_00-ansible.conf; then\n cp /tmp/ansible.kixzn83h//tmp/ssh_config.d_00-ansible.conf $(dirname /tmp/ssh_config.d_00-ansible.conf)\nelif test -f /tmp/ssh_config.d_00-ansible.conf; then\n rm /tmp/ssh_config.d_00-ansible.conf\nfi\n", "delta": "0:00:00.006088", "end": "2022-08-11 19:30:07.247967", "item": "/tmp/ssh_config.d_00-ansible.conf", "rc": 0, "start": "2022-08-11 19:30:07.241879" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 19:30:07 +0000 (0:00:00.287) 0:00:10.175 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible.kixzn83h", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=16 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 19:30:07 +0000 (0:00:00.451) 0:00:10.626 ******* =============================================================================== Make sure openssh is installed before creating backup ------------------- 2.25s linux-system-roles.ssh : Ensure required packages are installed --------- 1.98s linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 1.52s linux-system-roles.ssh : Generate the configuration file ---------------- 1.33s Gathering Facts --------------------------------------------------------- 1.11s Remove temporary directory for backup files ----------------------------- 0.45s Backup files ------------------------------------------------------------ 0.41s Download the custom configuration file drop-in -------------------------- 0.41s Create a temporary directory for backup files --------------------------- 0.39s Restore backed up files and remove what was not present ----------------- 0.29s linux-system-roles.ssh : Set platform/version specific variables -------- 0.08s Verify the options are in the file -------------------------------------- 0.05s Run role ---------------------------------------------------------------- 0.05s Skip if the system does not support drop in directory ------------------- 0.04s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s Backup configuration files ---------------------------------------------- 0.04s Setup ------------------------------------------------------------------- 0.04s Restore configuration files --------------------------------------------- 0.04s linux-system-roles.ssh : Gather information about the user for user configuration --- 0.03s linux-system-roles.ssh : Make sure the ~/.ssh/ directory exists and has expected permissions --- 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. ---^---^---^---^---^---