Inventory variables are resolved after roles are read in, so yes moving the vault file to the vars_files section is the correct placement.
On Wed, May 21, 2014 at 9:16 AM, Derptacos <[email protected]> wrote: > The file is in group_vars > > > On Wednesday, 21 May 2014 10:10:03 UTC-4, James Cammarata wrote: > >> Where in the playbook are you specifying the vault file? Is it in >> vars_files or somewhere else? >> >> >> On Wed, May 21, 2014 at 8:54 AM, Derptacos <[email protected]> wrote: >> >>> I have a playbook that requires a value from a vault - but I am >>> consistently running into issues regarding the existence of this variable >>> (lets call this variable private_key) >>> >>> In the vault I have: >>> >>> foo: >>> private_key: | >>> "........." >>> >>> In the playbook I have: >>> >>> - { role: bar, bar: { >>> 'private_key': '{{foo.private_key}}', >>> } >>> } >>> >>> The error itself: One or more undefined variables: 'dict object' has no >>> attribute 'private_key' >>> >>> When are the values within the vault resolved when running a playbook? >>> Or am I approaching the use of vault values the incorrect way? >>> >>> Thank you! >>> >>> >>> -- >>> 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/2b26dd67-f214-4e2c-ab22- >>> 57d02a27c108%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/2b26dd67-f214-4e2c-ab22-57d02a27c108%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/6e3ea10a-98b1-4ce2-a516-756584313698%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/6e3ea10a-98b1-4ce2-a516-756584313698%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/CAMFyvFgB-JbH4EdhJ%2BUWtG6czxSUWrPDnfx%2Bpv35d1giwp1m%2Bw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
