Re: [ansible-project] Accessing Cfg file values within nested loops + using sections + passing section in cmd argument

2020-10-19 Thread Akshay Kumar
Hi D.Visser, Sorry for not being able to share the info properly , i am using the below playbook - hosts: localhost vars_files: - "{{ config }}.cfg" tasks: - name: run ls shell: "'{{ item.command }}' '{{ item.dir }}'" when: "'{{ item.command }}' == 'ls'" with_items: "{{

Re: [ansible-project] Accessing Cfg file values within nested loops + using sections + passing section in cmd argument

2020-10-19 Thread Dick Visser
This is too abstract to comment on in a useful way. What does "not able to use" mean - does it fail? Please provide the real, actual, working playbook and try to use less opaque terms. Also, what is the overall goal you are trying to achieve? >From the little information you've shared, the

[ansible-project] Accessing Cfg file values within nested loops + using sections + passing section in cmd argument

2020-10-19 Thread Akshay Kumar
Hi All, Hope all is well with everyone during these bad times because of covid :-). I would like to know some good advices from the community on a scenario am working on , it goes as followed: Cfg file: SectionA: ls: dirname: Command: List cp: srcdirname: