remove-defaults.yml 378 B

123456789101112131415
  1. ---
  2. - name: Disable the default site
  3. file: path={{nginx_conf_dir}}/sites-enabled/default state=absent
  4. notify:
  5. - reload nginx
  6. tags: [configuration,nginx]
  7. - name: Remove the default configuration
  8. file: path={{nginx_conf_dir}}/conf.d/default.conf state=absent
  9. when: >
  10. 'default' not in nginx_configs.keys()
  11. notify:
  12. - reload nginx
  13. tags: [configuration,nginx]