On 06.12.2016 14:39, [email protected] wrote:
is it possible to run playbooks in an "offline" mode where setup wouldn't
make any remote requests, leaving out any facts that require it?

we sometimes have limited internet connectivity and playbooks that are only doing local work will hang on setup. running with `gather_facts = false`
allows the playbook to execute, but then conditionals that check
`ansible_distribution` fail, even though we can't need internet access to
figure that out.

Take a look into facts caching
https://docs.ansible.com/ansible/playbooks_variables.html#fact-caching.


i've read about `gather_subset` at configuration
<http://docs.ansible.com/ansible/intro_configuration.html> and setup
<http://docs.ansible.com/ansible/setup_module.html>... maybe that's what `!network` does? it's not clear from the documentation (just says "gather
network facts" as far as i can find).

Facts is gathered from the remote host so connectivity is needed.
network is just facts about the network on the remote host, all the other would need to connect to gathers the facts anyway, so !network would not make any difference.

--
Kai Stian Olstad

--
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/081858bbeae06065faa2939752f37f91%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to