From 18f00c5e5ffe27bbf2914f5a2310e9f83d7c7666 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 7 Dec 2022 14:15:01 +0200 Subject: [PATCH] Add default weight --- tasks/configure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: