Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Add config for each site
Browse files Browse the repository at this point in the history
  • Loading branch information
David Fernandez committed Jul 8, 2017
1 parent f1ee7bb commit 068f059
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ansible/roles/services/apache/tasks/site_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: Add site config
template:
src: sites-enabled.conf.j2
dest: "/opt/dockerapps/{{ instance_name }}/sites-enabled/{{ site.subdomain }}.conf"
owner: root
group: root
mode: 0644
when: site.config_file is not defined

- name: Manage htpasswd users
htpasswd:
path: "/opt/dockerapps/{{ instance_name }}/htpasswd/.htpasswd_{{ site.subdomain }}"
name: "{{ user.username }}"
password: "{{ user.password }}"
with_items: "{{ site.htpasswd_users | default ([]) }}"
loop_control:
loop_var: user

0 comments on commit 068f059

Please sign in to comment.