On Wed, Jan 4, 2017, at 05:42, Andreas Olsson wrote: > Indeed it looks as if facts aren't being gathered, which is kind of > odd, since it should happen by default. By then each play should > contain the following at the start. > > TASK [setup] > ******************************************************************* > ok: [localhost.localdomain]
I found no indication of this in my run log, so facts gathering was not happening. > Any chance that your ansible.cfg has a non-default value for the > gathering[1] option? Such as it being set to explicit? That's right. I had "gathering=explicit" in my configuration file, since I had used ansible only for command execution, and obviously gathering facts was wasting lots of time for those kind of tasks. Thanks, that clears it. I tried overriding my configuration file from the command line: ansible-playbook -v -l <hostname> -e gather_facts=true ./playbook.yml and: ansible-playbook -v -l <hostname> -e gathering=implicit ./playbook.yml but none worked. Changing the playbook file by adding "gather_facts: true" worked instead. Not sure if that's an accepted practice. Opinions? I'm still unsure about this error message when the facts gathering is not happening: "Could not detect which package manager to use. Try gathering facts or setting the \"use\" option." what is the "use" option? Thanks, -- Cosimo -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1483532743.3173353.836972801.7CA4C1BE%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
