Thank you so much for the response - I appreciate it.
For other weary internet travellers, I went with the annoying, but simplest
change, of explicitly defining localhost in every one of my inventories:
ungrouped:
hosts:
# defined explicitly so {{ inventory_dir }} will be defined
localhost:
vars:
ansible_connection: local
ansible_python_interpreter: "{{ansible_playbook_python}}"
And coupled that with this assertion where needed:
tasks:
- name: Check that inventory_dir is defined for localhost
assert:
fail_msg: "inventory_dir was none, make sure you have localhost defined in
your inventory"
that:
- "inventory_dir is defined"
--Anthony
On Thursday, May 16, 2019 at 5:34:29 PM UTC+10, ishan jain wrote:
>
> Yes, we did, as this was the structure of every single playbook in our
> project. But to be honest, i am blanking out on the solution that we did.
> Since I moved to another company last year, i don't have access to the code
> base any more :(
> I will try to stress my memory to blurt out the solution.
>
> BR,
> Ishan
>
> On Thursday, 16 May 2019 07:38:15 UTC+2, Anthony Truskinger wrote:
>>
>> Did you ever find a solution to this?
>>
>
--
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/92ccb97d-2fe1-46cc-a1e6-e2ea625e6a21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.