--
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/705f9907-6f37-49f6-9372-aad55d12fc4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
vars and defaults are exposed to the playbook. If set to yes the variables will be available to tasks following the include_role task. This functionality differs from standard variable exposure for roles listed under the rolesheader or import_role as they are exposed at playbook parsing time, and available to earlier roles and tasks as well.This behavior is expected.The variables defined in Role A should be scoped for A unless defined within your inventory or any of the other places outside the role that variables are defined.If variables from a role were implicitly available broadly through their declaration, you can have nasty side effects and potential security problems.
Recommend looking at https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html for more info.Sent from my iPhone
I have defined a role : say A--another role B which includes role Ain role B when I try to use variables defined in A, I get var undefined error.I tried using public: yes when including role A. Still same issue.This is correct behaviour?Or I should be able to use variables defined in a role in my tasks/ role tasks after including it?
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...@googlegroups.com.
This option dictates whether the role'svarsanddefaultsare exposed to the playbook. If set toyesthe variables will be available to tasks following theinclude_roletask. This functionality differs from standard variable exposure for roles listed under therolesheader orimport_roleas they are exposed at playbook parsing time, and available to earlier roles and tasks as well.
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/2693cf44-e414-4227-bb7d-d790da3e3722%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAMcshKb%3DJCnfsfM6RxhTNJoHG52CPV0%2BgT_jB6g93shZU2b3_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.