Merge pull request #24 from ThijsFeryn/removedefaultvhost

PR #24: Allow default vhost file to be removed on Debian/Ubuntu.
This commit is contained in:
Jeff Geerling 2015-07-23 12:00:15 -05:00
commit 2597e7380c
4 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@ apache_enablerepo: ""
apache_listen_port: 80
apache_listen_port_ssl: 443
apache_remove_default_vhost: false
apache_create_vhosts: true
apache_vhosts_filename: "vhosts.conf"

View file

@ -39,3 +39,9 @@
dest: "{{ apache_conf_path }}/sites-enabled/{{ apache_vhosts_filename }}"
state: link
when: apache_create_vhosts
- name: Remove default vhost symlink in sites-enabled.
file:
path: "{{ apache_conf_path }}/sites-enabled/{{ apache_default_vhost_filename }}"
state: absent
when: apache_remove_default_vhost

View file

@ -1,5 +1,6 @@
---
apache_vhosts_version: "2.2"
apache_default_vhost_filename: 000-default
apache_ports_configuration_items:
- {
regexp: "^Listen ",

View file

@ -1,5 +1,6 @@
---
apache_vhosts_version: "2.4"
apache_default_vhost_filename: 000-default.conf
apache_ports_configuration_items:
- {
regexp: "^Listen ",