reset_webcontent.yml 440 B

123456789101112131415161718
  1. ---
  2. - name: Ensure the web content is reverted to its original version
  3. hosts: web_servers
  4. gather_facts: false
  5. become: true
  6. tasks:
  7. - name: the original web content is deployed
  8. copy:
  9. content: "This is {{ inventory_hostname }}\n"
  10. dest: /var/www/html/index.html
  11. notify: Varnish Cache is clean
  12. handlers:
  13. - name: Varnish Cache is clean
  14. service:
  15. name: varnish
  16. state: restarted