@jean-chistophe manicot
> I just don't understand why the ansible team has decided that become keywords cannot affect include_vars. It's just a module that always runs on the controller, but what's the difference with all other modules which are affected by become keywords but are delegated on the localhost? It just does not make any sense to me. Or maybe I'm missing a fundamental piece of the inner workings.
It was not as much a 'decision' as a 'consequence', include_vars is
NOT a module, it is an action plugin, both types work as 'task
actions' but action plugins execute inside the ansible process on the
controller while modules execute on a remote machine. We mostly hide
this distinction from the user but it creates several issues like
'become doesn't affect action plugins', also why we recently added
'attributes' to inform people of long standing behaviors that were not
noticed/ignored unless you hit a corner case like this.
So yes, you were missing a piece of the inner workings, one that was
purposefully hidden from users. 99% of the time this does not matter
much, but this case ended up being in the 1%.
--
----------
Brian Coca