diff options
author | Ivan Dolgov <ivan@dolgov.fi> | 2018-02-15 13:06:39 +0200 |
---|---|---|
committer | Ivan Dolgov <ivan@dolgov.fi> | 2018-02-15 13:06:39 +0200 |
commit | e482b627d056986229a87bc18358a7240e6819b6 (patch) | |
tree | 79b61f4208ff0af64315ac980ec21dd396160692 /roles/apache_server/tasks/main.yml | |
parent | 185d58b54f4c0afdefc63c6f776bf6093feac51d (diff) | |
parent | 6d8fc6b0d76f3dddabeba61365e6036dd869a917 (diff) | |
download | debian-ansible-e482b627d056986229a87bc18358a7240e6819b6.tar.gz |
Merge branch 'liw/htpasswd'
Diffstat (limited to 'roles/apache_server/tasks/main.yml')
-rw-r--r-- | roles/apache_server/tasks/main.yml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/roles/apache_server/tasks/main.yml b/roles/apache_server/tasks/main.yml index 8a14b35..0f59f67 100644 --- a/roles/apache_server/tasks/main.yml +++ b/roles/apache_server/tasks/main.yml @@ -1,5 +1,6 @@ - name: install rsync (so one can publish files via server) - apt: name=rsync + apt: + name: rsync - name: install apache2 apt: name=apache2 @@ -31,6 +32,16 @@ mode: 0644 with_items: "{{ static_sites }}" +- name: "install htpasswd files" + copy: + content: "{{ item.htpasswd }}" + dest: "/srv/http/{{ item.domain }}.htpasswd" + owner: root + group: root + mode: 0644 + with_items: "{{ static_sites }}" + when: item.htpasswd is defined + - name: enable apache sites shell: a2ensite "{{ item.domain }}" with_items: "{{ static_sites }}" |