from ansible's documentation I don't understand how ansible handles fact gathering when using roles: Are a host's facts gathered at each single playbook run? Or at each "role" run? Or only once?
In most cases one would want to gather facts only once in the beginning, but is this the case and/or how can I check this?
21 juin 2017 10:29 "Frank Thommen" <lists.ansible@drosera.ch> a écrit:
Hi,
from ansible's documentation I don't understand how ansible handles fact gathering when using
roles: Are a host's facts gathered at each single playbook run? Or at each "role" run? Or only
once?
In most cases one would want to gather facts only once in the beginning, but is this the case
and/or how can I check this?
This is at playbook level, not at role level
For me the gathering fact happens each time a new block of hosts/tasks in the playbook
You can control it by using gather_facts: no to skip it.