Le 02/12/20 à 17h44, "Stefan Hornburg (Racke)" <[email protected]> a écrit : > > I saw that I can specify > > gather_facts: no > > in a playbook or a tasks list, but is it possible to precise it for a > > role ? > > > > I tried on top of a roles/xxx/tasks.yml (because it's a tasks list) but > > it throw a syntax error while loading yml
> Gathering facts takes place at the beginning of a play, so why would you > want to disable that in a role? Because it's the role himself who knows if it needs facts or not (more precisely the tasklist of the role should implies gather_facts or not). - In a play, I chain roles but I don't know exactly if one role needs fact or not - If I add a --limit to the play run, perhaps that all roles which needs facts are skipped (the target isn't in any group needing fact) so gather_facts will be useless in that case. -- Daniel La pensée vole et les mots vont à pied. Voilà tout le drame de l'écrivain. Julien Green -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20201203084315.42e11f95%40quad.
