Add default weight
This commit is contained in:
parent
71373ccf00
commit
18f00c5e5f
1 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue