Hi,
Thanks . As I wrote, B is dependent (a child) of role A.
In B task there is no template module called with source is sudoer2.j2. A has one like this so when a host has role B - the first role A is called and that template module is called. But it does not use the source sudoer2.j2 located in role B templates folder. it uses the source file from the templates folder of role A.
At the moment I have to put the template module in role B tasks and that is called twice - role A with role A templates source and then role B with role B template source. The end result is OK but because each repeated run - role A sees that the file has changed (because the source of B templates is different from A) then it templates it again, and then B does the same.
So end result is also OK but the template module always run!
The expected behaviour are:
* We do not need to call the template task on role B.
* If in role B templates folder has the source file, then when the template task in role A is called it should use the source file from the template folder of role B because it is closer role to the target host.
cheers