--- - name: "Apache installation" hosts: 1-1.practice-k8s.cloud force_handlers: yes tasks: - name: "Apache configuration" template: src: "inventory.conf.j2" dest: "/etc/httpd/conf.d/inventory.conf" owner: "apache" group: "apache" notify: [ "Restart apache service" ] - name: copy nothing - intended to fail copy: src: /tmp/nothing dest: /var/www/html/nothing.html handlers: - name: "Restart apache service" service: name: "httpd" state: "restarted"