Thank you, dude.
It worked perfectly.
On Friday, November 10, 2017 at 7:44:25 AM UTC+5:30, Rajesh Rajendran wrote:
>
> ---
> - hosts: localhost
> gather_facts: false
> vars:
> neo4j:
> name: neo4j
> api_service:
> name: api_service
> pid: /var/api/pid
> tasks:
> - debug:
> msg: "{{item.pid|default('/var/run/{{item.name}}/{{item.name
> }}.pid')}}"
> with_items:
> - "{{ vars[service] }}"
>
> ansible-playbook play.yml --extra-vars service=api-service
>
> how will I debug both dictionaries?
> I know that I can't give
> --extra-vars service=api-service,neo4j or as a llist
>
> or is there any way to dynamically iterate using user given dictionaries.
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c3d50076-1809-471e-b3cd-f6455fbab191%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.