Hands-on task
Ansible: handler on change
Write a playbook /root/handler.yml: a task creates the file /etc/svc.conf (the copy module) and on its change notifies a handler that creates a marker file /var/run/reloaded. After the run both files must exist. The playbook must work from scratch, when neither file exists, and on a second run without a config change the handler must not fire. Write the playbook in the Editor tab and run ansible-playbook in the terminal.
- ansible
- handlers
- notify
- copy module
- idempotency