Thanks Ed.
Looks like include_vars provides me with a workaround. For my use case, I
'patch' the main playbook with the additional include_vars task, run the
play, and then remove the patch after the play completes.
Thanks again!
On Sunday, 10 December 2017 10:08:26 UTC+13, Ed Costello
I hit a similar issue a while back and found
https://github.com/ansible/ansible/issues/24987 which explains why
refresh_inventory doesn't cover this case.
Based on that, I ended up using include_vars to explicitly include the
variables onto the hosts after creating the yml file. E.g.
- hosts:
Hi,
I'd already tried a InventoryManager instance refresh_inventory call within
my code, which didn't work. I added the meta call to a test playbook, and
see the same thing i.e. the vars from all.yml are not present, but the vars
from the other group_vars are.
On Friday, 8 December 2017
Have a look here:
http://docs.ansible.com/ansible/latest/meta_module.html
meta: refresh_inventory
is what you need.
On 8 December 2017 at 07:36, Paul Cuzner wrote:
>
> Some further testing
>
> If I switch the playbook to one that simple dumps all vars on a host, I
>