Show inventory graph ansible
Display inventory group hierarchy as a tree
ansible-inventory -i inventory.ini --graph
more ansible
all 56 commands →
Test role locally with Molecule
molecule test -s default
Test connectivity (ping)
ansible all -i inventory.ini -m ping
Run ad-hoc shell command
ansible webservers -i inventory.ini -m shell -a 'df -h' -b
Gather facts for a host
ansible myhost -i inventory.ini -m setup | jq '.ansible_facts.ansible_distribution'
Run playbook with tags
ansible-playbook site.yml -i inventory.ini --tags 'nginx,ssl'