Service handlers and error handlers

A task can notify if a change has been made, then a handler can be triggered. Example: name: change_port lineinfile: path=/etc/httpd/http.conf regexp=‘^port’ line=‘port=8080’ notify: Restart_Apache handlers: name: Restart_Apache service: name=apache2 status=restarted Error management of tasks: To ignore a change status –> changed_when: false For instance uname or service status Force a change status if a … Continue reading Service handlers and error handlers