possible to run playbooks in offline mode?

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.

i’ve read about gather_subset at configuration and setup… maybe that’s what !network does? it’s not clear from the documentation (just says “gather network facts” as far as i can find).

thanks.

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&gt; and setup
<http://docs.ansible.com/ansible/setup_module.html&gt;\.\.\. 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.