Test role locally with Molecule ansible
Run full Molecule test suite: create, converge, verify, destroy
molecule test -s default
more ansible
all 56 commands →
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'
Skip specific tags
ansible-playbook site.yml -i inventory.ini --skip-tags 'slow,optional'