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: <dirPath>
       Command: List
    cp:
      srcdirname: <path>
      tgtDirname: <path>
      command: copy

SectionB:
    ls:
      dirname: <dir path>
      command: List

And in playbook right now i am accessing it using with_dict  and 
include_vars but i am not able to use cmd line argument for "section" for 
eg if i say 
ansible-playbook playbook.yaml -e section=SectionA  

Any suggestions of how we can access the values of dicts by first checking 
the section of Cfg file which is passed on cmd line and then performing 
action according to the command in the dict values.

Thanks in advance for your response .

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/616cc23d-4a80-4b66-9498-443b13f0710en%40googlegroups.com.

Reply via email to