@Stefan i tried using quote but it does not help. Can you confirm if this
is the right way to use quote ? See below:
excludefolders: "{{ excludefolders + ' -o -name ' + item | quote |
default('') }}"
On Wednesday, February 26, 2020 at 12:42:57 PM UTC+5:30, Stefan Hornburg
(Racke) wrote:
>
On 2/26/20 8:05 AM, Shifa Shaikh wrote:
> Below is my playbook:
>
> |
> -set_fact:
> excludefolders:"{{ excludefolders + ' -o -name ' + item | default('')
> }}"
> with_items:"{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}"
>
>
> -debug:
> msg:"excludedfolder is {{
Below is my playbook:
- set_fact:
excludefolders: "{{ excludefolders + ' -o -name ' + item |
default('') }}"
with_items: "{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}"
- debug:
msg: "excludedfolder is {{ excludefolders }}"
I get the below output
ok: