diff --git a/tasks/configure.yml b/tasks/configure.yml index 9a800ba..aed4d00 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -82,7 +82,7 @@ - name: Ensure vhosts are configured template: src: templates/vhost.conf.j2 - dest: "/etc/apache2/sites-available/{{ item.weight }}-{{ item.vhostname }}.conf" + dest: "/etc/apache2/sites-available/{{ item.weight | default('25' }}-{{ item.vhostname }}.conf" owner: root group: root mode: '0644' @@ -93,8 +93,8 @@ - name: Ensure vhost is enabled file: - src: "/etc/apache2/sites-available/{{ item.weight }}-{{ item.vhostname }}.conf" - dest: "/etc/apache2/sites-enabled/{{ item.weight }}-{{ item.vhostname }}.conf" + src: "/etc/apache2/sites-available/{{ item.weight | default('25') }}-{{ item.vhostname }}.conf" + dest: "/etc/apache2/sites-enabled/{{ item.weight | default('25') }}-{{ item.vhostname }}.conf" state: link with_items: "{{ vhosts }}" notify: