Re: [ansible-project] set_fact undefined variable issue when concat string to itself.

2020-02-26 Thread Shifa Shaikh
It helped. Thank you @Abhijeet On Wednesday, February 26, 2020 at 12:09:19 PM UTC+5:30, Abhijeet Kasurde wrote: > > You can try this - > > - set_fact: > excludefolders: "{{ excludefolders | default('') + ' -o -name ' + > item | default('') }}" > with_items: "{{ lookup('vars',

Re: [ansible-project] set_fact undefined variable issue when concat string to itself.

2020-02-25 Thread Abhijeet Kasurde
You can try this - - set_fact: excludefolders: "{{ excludefolders | default('') + ' -o -name ' + item | default('') }}" with_items: "{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}" On Wed, Feb 26, 2020 at 12:00 PM Shifa Shaikh wrote: > I need to set_fact variable and

[ansible-project] set_fact undefined variable issue when concat string to itself.

2020-02-25 Thread Shifa Shaikh
I need to set_fact variable and contact to itself a list of items as below: - set_fact: excludefolders: "{{ excludefolders + ' -o -name ' + item | default('') }}" with_items: "{{ lookup('vars', 'MY_' + Layer).split(',') }}" Getting error: FAILED! => {"msg": "The task