$ ansible-playbook -v --connection=local _testing_populated_loop.yml
Using /home/hector/repos/ansible-playbooks/ansible.cfg as config file
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Example playbook to populate a dinamically created list list] **************************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:43 +0200 (0:00:00.065) 0:00:00.065 *******
ok: [localhost]
TASK [Include a subtask to populate the list] ************************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.622) 0:00:00.688 *******
included: /home/hector/repos/ansible-playbooks/_testing_populated_loop_task.yml for localhost
included: /home/hector/repos/ansible-playbooks/_testing_populated_loop_task.yml for localhost
included: /home/hector/repos/ansible-playbooks/_testing_populated_loop_task.yml for localhost
included: /home/hector/repos/ansible-playbooks/_testing_populated_loop_task.yml for localhost
TASK [Obtain the VPN name with an arbitrary command] *****************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.070) 0:00:00.758 *******
changed: [localhost] => changed=true
cmd:
- echo
- VPN-NAME-vpn-1
delta: '0:00:00.001349'
end: '2019-08-29 11:37:44.550232'
rc: 0
start: '2019-08-29 11:37:44.548883'
stderr: ''
stderr_lines: <omitted>
stdout: VPN-NAME-vpn-1
stdout_lines: <omitted>
TASK [Add to the list the newly obtained VPN name] *******************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.155) 0:00:00.913 *******
ok: [localhost] => changed=false
ansible_facts:
vpn_names:
- VPN-NAME-vpn-1
TASK [Obtain the VPN name with an arbitrary command] *****************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.026) 0:00:00.940 *******
changed: [localhost] => changed=true
cmd:
- echo
- VPN-NAME-vpn-2
delta: '0:00:00.001360'
end: '2019-08-29 11:37:44.667445'
rc: 0
start: '2019-08-29 11:37:44.666085'
stderr: ''
stderr_lines: <omitted>
stdout: VPN-NAME-vpn-2
stdout_lines: <omitted>
TASK [Add to the list the newly obtained VPN name] *******************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.090) 0:00:01.031 *******
ok: [localhost] => changed=false
ansible_facts:
vpn_names:
- VPN-NAME-vpn-1
- VPN-NAME-vpn-2
TASK [Obtain the VPN name with an arbitrary command] *****************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.026) 0:00:01.057 *******
changed: [localhost] => changed=true
cmd:
- echo
- VPN-NAME-vpn-3
delta: '0:00:00.001349'
end: '2019-08-29 11:37:44.784794'
rc: 0
start: '2019-08-29 11:37:44.783445'
stderr: ''
stderr_lines: <omitted>
stdout: VPN-NAME-vpn-3
stdout_lines: <omitted>
TASK [Add to the list the newly obtained VPN name] *******************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.091) 0:00:01.148 *******
ok: [localhost] => changed=false
ansible_facts:
vpn_names:
- VPN-NAME-vpn-1
- VPN-NAME-vpn-2
- VPN-NAME-vpn-3
TASK [Obtain the VPN name with an arbitrary command] *****************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.026) 0:00:01.174 *******
changed: [localhost] => changed=true
cmd:
- echo
- VPN-NAME-vpn-4
delta: '0:00:00.001419'
end: '2019-08-29 11:37:44.903063'
rc: 0
start: '2019-08-29 11:37:44.901644'
stderr: ''
stderr_lines: <omitted>
stdout: VPN-NAME-vpn-4
stdout_lines: <omitted>
TASK [Add to the list the newly obtained VPN name] *******************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.092) 0:00:01.266 *******
ok: [localhost] => changed=false
ansible_facts:
vpn_names:
- VPN-NAME-vpn-1
- VPN-NAME-vpn-2
- VPN-NAME-vpn-3
- VPN-NAME-vpn-4
TASK [Show the created list] *****************************************************************************************************************************************************************************************************************
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.029) 0:00:01.296 *******
ok: [localhost] =>
vpn_names:
- VPN-NAME-vpn-1
- VPN-NAME-vpn-2
- VPN-NAME-vpn-3
- VPN-NAME-vpn-4
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost : ok=14 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Thursday 29 August 2019 11:37:44 +0200 (0:00:00.010) 0:00:01.307 *******
===============================================================================
Gathering Facts ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.62s
Obtain the VPN name with an arbitrary command ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.16s
Obtain the VPN name with an arbitrary command ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.09s
Obtain the VPN name with an arbitrary command ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.09s
Obtain the VPN name with an arbitrary command ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.09s
Include a subtask to populate the list ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.07s
Add to the list the newly obtained VPN name ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.03s
Add to the list the newly obtained VPN name ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.03s
Add to the list the newly obtained VPN name ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.03s
Add to the list the newly obtained VPN name ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.03s
Show the created list ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.01s