thank you all for your findings and recommendations
In the same playbook I would like to explain one more scenario , I am using
set_facts to use above playbook output as input in the playbook, and I have
variables.yml
It has to go through loop and get the server details from each environment,
wil
Thanks Walter,
This one worked
client_nfs_export_server_list: "{{ client_nfs_export_server_string_ui.split(
',') | map('trim') | list }}"
On Friday, May 19, 2023 at 5:13:49 PM UTC+5:30 Rowe, Walter P. (Fed) wrote:
> % ansible -e 'input="172.11.12.13, 127.0.0.1 , test123.kp.org"' -m debug
> -a
% ansible -e 'input="172.11.12.13, 127.0.0.1 , test123.kp.org"' -m debug -a
msg="{{ input | split(',') | map('trim') | list }}" localhost -i localhost,
localhost | SUCCESS => {
"msg": [
"172.11.12.13",
"127.0.0.1",
"test123.kp.org"
]
}
Note the use of "map(
Hii
i am trying to convert a dummy String with list but skipping the first
> iteration
>
"Dummy string" - unclear what that is
Convert string with list - unclear what that means
Convert string with list but skipping first iteration - unclear. Do you
want to skip the first iteration? or does that
Hi Team,
i am trying to convert a dummy String with list but skipping the first
iteration
i am getting below output
*"client_nfs_export_server_list": *
*["127.0.0.1","test123.kp.org",
"myserver.nndc.kp.org","{{ item | trim }}" ]*
skipping