Yes, those are stored in the variable cache globally, and should be accessible within the same play from any other task.
On Tue, Dec 2, 2014 at 10:40 PM, Ananda Debnath <[email protected]> wrote: > From what I'm hearing I should be able to directly access registered > vars/set_fact facts onwards from where I declare and define it regardless > of the play I'm in... correct? > > On Monday, December 1, 2014 11:56:45 PM UTC-6, Ananda Debnath wrote: >> >> Thanks James. >> >> I understand the recommendation - I'll look into decoupling one of these >> days. For now though, I have a hard dependency - inventory-vm-A/role-A is >> generating a signed cloudfront url (using aws creds that exist in vm-A) >> that needs to be downloaded by inventory-vm-B/role-B without needing to >> ship aws credentials to vm-B - and all of it needs to run in the same play. >> >> I can't seem to be able to access registered variables directly though - >> if I call debug on the registered variable carrying the cloudfront URL >> within any other task item in role-A, it works fine. Calling debug on the >> same var in role-B (which is running on inventory vm-B) in the same play >> (i.e. listed sequentially within the same site.yml file) - shows a blank >> value. The only way I've been able to access it is by using >> hostvars[vm-A][reg-var-name]. Simply using "{{ reg-var-name }}" only works >> in role-A tasks and not role-B tasks. >> >> I'm using Ansible 1.7.2 on Ubuntu 14.04. >> >> -- > 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/2eee9fea-1c2a-4304-bdcf-3c751f54ca41%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2eee9fea-1c2a-4304-bdcf-3c751f54ca41%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/CAMFyvFjMa0UMe3-E9EppV7-QyrthxrSUQ78ZS8Zi6Dj8BH7TUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
