remove-unwanted.yml 665 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Remove unwanted sites
  3. file: path={{nginx_conf_dir}}/{{ item[0] }}/{{ item[1] }}.conf state=absent
  4. with_nested:
  5. - [ 'sites-enabled', 'sites-available']
  6. - nginx_remove_sites
  7. notify:
  8. - reload nginx
  9. tags: [configuration,nginx]
  10. - name: Remove unwanted conf
  11. file: path={{nginx_conf_dir}}/conf.d/{{ item[1] }}.conf state=absent
  12. with_items: nginx_remove_configs
  13. notify:
  14. - reload nginx
  15. tags: [configuration,nginx]
  16. - name: Remove unwanted auth_basic_files
  17. file: path={{nginx_conf_dir}}/auth_basic/{{ item[1] }} state=absent
  18. with_items: nginx_remove_auth_basic_files
  19. notify:
  20. - reload nginx
  21. tags: [configuration,nginx]