Hands-on task
This task is step 7 of the course “Terraform and Ansible”
Ansible: run by tags
Write a playbook /root/tagged.yml with two tasks: one tagged deploy (creates /tmp/deployed), the other tagged cleanup (creates /tmp/cleaned). Run it with the deploy tag only, so that just the first task is applied. Each tag must run only its own task — both deploy and cleanup.
Reference:ansible
What you'll practise:
- ansible
- tags
- --tags
- file module
- selective run