🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## [setup][1] * gather_subset ~~~ # Display facts from all hosts and store them indexed by I(hostname) at C(/tmp/facts). # ansible all -m setup --tree /tmp/facts # Display only facts regarding memory found by ansible on all hosts and output them. # ansible all -m setup -a 'filter=ansible_*_mb' # Display only facts returned by facter. # ansible all -m setup -a 'filter=facter_*' # Collect only facts returned by facter. # ansible all -m setup -a 'gather_subset=!all,!any,facter' # Display only facts about certain interfaces. # ansible all -m setup -a 'filter=ansible_eth[0-2]' # Restrict additional gathered facts to network and virtual (includes default minimum facts) # ansible all -m setup -a 'gather_subset=network,virtual' # Collect only network and virtual (excludes default minimum facts) # ansible all -m setup -a 'gather_subset=!all,!any,network,virtual' # Do not call puppet facter or ohai even if present. # ansible all -m setup -a 'gather_subset=!facter,!ohai' # Only collect the default minimum amount of facts: # ansible all -m setup -a 'gather_subset=!all' # Collect no facts, even the default minimum subset of facts: # ansible all -m setup -a 'gather_subset=!all,!min' # Display facts from Windows hosts with custom facts stored in C(C:\custom_facts). # ansible windows -m setup -a "fact_path='c:\custom_facts'" ~~~ [1]:https://docs.ansible.com/ansible/latest/modules/setup_module.html#setup-module