Ansible Roles

23 views
Skip to first unread message

Divyank Gupta

unread,
Jun 12, 2019, 5:52:25 AM6/12/19
to Ansible Project
How do i declare a global variable, so that it can be used for multiple roles? And how to use that variable in roles tasks?

Jonathan Lozada De La Matta

unread,
Jun 12, 2019, 6:17:22 AM6/12/19
to ansible...@googlegroups.com
you can try group_vars or vars declared in the playbook.  https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html

Jonathan Lozada De La Matta on mobile
 

From: ansible...@googlegroups.com on behalf of Divyank Gupta <divya...@gmail.com>
Sent: Wednesday, June 12, 2019 5:52 AM
To: Ansible Project
Subject: [ansible-project] Ansible Roles
 
How do i declare a global variable, so that it can be used for multiple roles? And how to use that variable in roles tasks?

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0047048f-66b2-4055-91f6-403197d5aa57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages