# 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 20:03:20 +0000 (0:00:00.021) 0:00:00.021 ******* ok: [sut] TASK [Skip if the system does not support drop in directory] ******************* Thursday 11 August 2022 20:03:21 +0000 (0:00:01.135) 0:00:01.156 ******* 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 20:03:21 +0000 (0:00:00.044) 0:00:01.200 ******* 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:03:21 +0000 (0:00:00.040) 0:00:01.240 ******* 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:03:21 +0000 (0:00:00.037) 0:00:01.278 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Make sure openssh is installed before creating backup] ******************* Thursday 11 August 2022 20:03:21 +0000 (0:00:00.029) 0:00:01.308 ******* ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Create a temporary directory for backup files] *************************** Thursday 11 August 2022 20:03:22 +0000 (0:00:01.162) 0:00:02.471 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/tmp/ansible.efsmd4pw", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup files] ************************************************************ Thursday 11 August 2022 20:03:22 +0000 (0:00:00.394) 0:00:02.865 ******* 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.efsmd4pw/$(dirname /tmp/ssh_config.d_00-ansible.conf);\n cp /tmp/ssh_config.d_00-ansible.conf /tmp/ansible.efsmd4pw/$(dirname /tmp/ssh_config.d_00-ansible.conf)\nfi\n", "delta": "0:00:00.003786", "end": "2022-08-11 20:03:23.283788", "item": "/tmp/ssh_config.d_00-ansible.conf", "rc": 0, "start": "2022-08-11 20:03:23.280002" } TASK [Run role] **************************************************************** Thursday 11 August 2022 20:03:23 +0000 (0:00:00.390) 0:00:03.256 ******* TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 20:03:23 +0000 (0:00:00.048) 0:00:03.305 ******* 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:03:23 +0000 (0:00:00.039) 0:00:03.345 ******* ok: [sut] TASK [linux-system-roles.ssh : Set platform/version specific variables] ******** Thursday 11 August 2022 20:03:23 +0000 (0:00:00.431) 0:00:03.776 ******* 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:03:23 +0000 (0:00:00.073) 0:00:03.850 ******* 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:03:24 +0000 (0:00:00.984) 0:00:04.834 ******* 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:03:24 +0000 (0:00:00.036) 0:00:04.871 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.ssh : Generate the configuration file] **************** Thursday 11 August 2022 20:03:24 +0000 (0:00:00.035) 0:00:04.907 ******* 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-1660248205.051792-4407-115577297571614/source", "state": "file", "uid": 0 } TASK [Download the custom configuration file drop-in] ************************** Thursday 11 August 2022 20:03:26 +0000 (0:00:01.233) 0:00:06.141 ******* 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 20:03:26 +0000 (0:00:00.396) 0:00:06.538 ******* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [Restore configuration files] ********************************************* Thursday 11 August 2022 20:03:26 +0000 (0:00:00.053) 0:00:06.592 ******* 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:03:26 +0000 (0:00:00.037) 0:00:06.629 ******* ok: [sut] => (item=/tmp/ssh_config.d_00-ansible.conf) => { "ansible_loop_var": "item", "changed": false, "cmd": "if test -f /tmp/ansible.efsmd4pw//tmp/ssh_config.d_00-ansible.conf; then\n cp /tmp/ansible.efsmd4pw//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.004979", "end": "2022-08-11 20:03:26.926242", "item": "/tmp/ssh_config.d_00-ansible.conf", "rc": 0, "start": "2022-08-11 20:03:26.921263" } TASK [Remove temporary directory for backup files] ***************************** Thursday 11 August 2022 20:03:26 +0000 (0:00:00.269) 0:00:06.898 ******* ok: [sut] => { "changed": false, "path": "/tmp/ansible.efsmd4pw", "state": "absent" } PLAY RECAP ********************************************************************* sut : ok=16 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 Thursday 11 August 2022 20:03:27 +0000 (0:00:00.442) 0:00:07.340 ******* =============================================================================== linux-system-roles.ssh : Generate the configuration file ---------------- 1.23s Make sure openssh is installed before creating backup ------------------- 1.16s Gathering Facts --------------------------------------------------------- 1.14s linux-system-roles.ssh : Ensure required packages are installed --------- 0.98s Remove temporary directory for backup files ----------------------------- 0.44s linux-system-roles.ssh : Ensure ansible_facts used by role -------------- 0.43s Download the custom configuration file drop-in -------------------------- 0.40s Create a temporary directory for backup files --------------------------- 0.39s Backup files ------------------------------------------------------------ 0.39s Restore backed up files and remove what was not present ----------------- 0.27s linux-system-roles.ssh : Set platform/version specific variables -------- 0.07s 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 Backup configuration files ---------------------------------------------- 0.04s linux-system-roles.ssh : Set platform/version specific variables -------- 0.04s Setup ------------------------------------------------------------------- 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. ---^---^---^---^---^---