Re: [ansible-project] trying to convert a dummy String with list but skipping the first iteration

2023-05-19 Thread Narmada Karthika
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

Re: [ansible-project] trying to convert a dummy String with list but skipping the first iteration

2023-05-19 Thread javed khan Siddque
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

Re: [ansible-project] trying to convert a dummy String with list but skipping the first iteration

2023-05-19 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
% 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(

Re: [ansible-project] trying to convert a dummy String with list but skipping the first iteration

2023-05-18 Thread Dick Visser
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

[ansible-project] trying to convert a dummy String with list but skipping the first iteration

2023-05-18 Thread javed khan Siddque
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