ansible all -i inventory -m setup -a "filter=ansible_eth*"
We can skip that by specifying the same in config file.
Let's create an entry in the project root folder.
ansible.cfg
After that, you can enter the command without specifying inventory file
ansible all -m setup -a "filter=ansible_eth*"
We can skip that by specifying the same in config file.
Let's create an entry in the project root folder.
ansible.cfg
[defaults]
inventory = ~/ans/inventory.yml
After that, you can enter the command without specifying inventory file
ansible all -m setup -a "filter=ansible_eth*"
No comments:
Post a Comment