How do you scaffold a new role or collection?
BeginnerProductionRapid-Fire Commands
Answer
ansible-galaxy role init roles/nginx
ansible-galaxy collection init acme.platform
cd roles/nginx && molecule init scenario default --driver-name docker
Most teams keep their own skeleton with the house lint config, README template and Molecule scenario: ansible-galaxy role init --role-skeleton=skeletons/role roles/nginx.
More on Rapid-Fire Commands
How do you see which hosts a playbook would run against, without running it?BeginnerHow do you list the tasks and tags a playbook contains?BeginnerHow do you inspect the inventory structure and a host's variables?BeginnerHow do you restart a service on a group with an ad-hoc command?BeginnerHow do you resume a playbook from a specific task or step through it?BeginnerHow do you re-run a playbook only on the hosts that failed?Intermediate