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: [email protected] on behalf of Divyank Gupta <[email protected]> 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 [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0047048f-66b2-4055-91f6-403197d5aa57%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/0047048f-66b2-4055-91f6-403197d5aa57%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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/SN6PR08MB3984F79B7B2AF72AFAD84B11A6EC0%40SN6PR08MB3984.namprd08.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.
