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

2023-05-18 Thread Todd Lewis
Let's start with the low-hanging fruit. Mustaches don't nest, so change this: client_nfs_export_server_list: "{{client_nfs_export_server_list| default([]) + ['{{ server_list }}'] }}" to this: client_nfs_export_server_list: "{{client_nfs_export_server_list| default([]) + [server_list ] }}" an

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

2023-05-18 Thread javed khan Siddque
The Input Which i passed *client_nfs_export_server_string_ui: '172.11.12.13, 127.0.0.1 , test123.kp.org'* there is some space before and after strings , which i require to trim and create a fresh list. expected output ok: [localhost] => { "msg": [ "172.11.12.13", "127.0

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

2023-05-18 Thread javed khan Siddque
Hi Dick, screenshots missed from my side. here we go. - name: "Converting String Input From - > client_nfs_export_server_string In A List After trim/split by comma -> client_nfs_export_server_list" ansible.builtin.set_fact: server_list: "{{ item | trim }}" client_nfs_export_server_lis