library/roles/apache: Fix the fact that ubuntu 12.04 and 14.04 have different paths for the additional configurations.

This commit is contained in:
Andrea Dell'Amico 2016-09-13 18:41:27 +02:00
parent 9335dbfbe6
commit ce6fcc45fe
2 changed files with 11 additions and 3 deletions

View File

@ -29,7 +29,7 @@
- name: Create the basic auth file
htpasswd: path={{ item.auth_file }} name={{ item.username }} password={{ item.password }} create=yes state={{ item.state }}
with_items: '{{ apache_basic_users }}'
with_items: '{{ apache_basic_users | default([]) }}'
when: apache_basic_users is defined and not apache_basic_auth_single_file
tags:
- apache

View File

@ -5,14 +5,22 @@
with_items: '{{ apache_letsencrypt_proxy_modules }}'
notify: apache2 reload
- name: Install the letsencrypt conf
- name: Install the apache letsencrypt directives on trusty
template: src={{ item }}.j2 dest=/etc/apache2/conf-available/{{ item }} owner=root group=root mode=0644
with_items: '{{ apache_letsencrypt_proxy_conf }}'
when: is_trusty
notify: apache2 reload
- name: Enable the letsencrypt conf
- name: Enable the apache letsencrypt directives on trusty
file: src=/etc/apache2/conf-available/{{ item }} dest=/etc/apache2/conf-enabled/{{ item }} state=link
with_items: '{{ apache_letsencrypt_proxy_conf }}'
when: is_trusty
notify: apache2 reload
- name: Install the apache letsencrypt directives on precise
template: src={{ item }}.j2 dest=/etc/apache2/conf.d/{{ item }} owner=root group=root mode=0644
with_items: '{{ apache_letsencrypt_proxy_conf }}'
when: is_precise
notify: apache2 reload
- name: Create the acme hooks directory if it does not yet exist