Skip to content

Commit 26d5011

Browse files
committed
Fix #18: Specify apache vhost.conf location
1 parent d7e5ecf commit 26d5011

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Required Configuration variables
3333
- `conf.dev_path`: The local path of the project, eg ~/workspace/python/myproject.
3434
- `conf.host_path`: The remote path, where the wsgi index script lies, eg /var/www/vhosts/subscription/domain.
3535
- `conf.host_user`: The remote user to whom to transfer ownership after operations.
36+
- `conf.vhost_conf_path`: The remote path, where the apache configuration override (`vhost.conf`) is located.
3637

3738
Optional Configuration variables
3839
--------------------------------

examples/django_deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
vars_files:
1414
- ../conf/django_sites.yml
15+
- "{{ secret_file|default('secret') }}"
1516

1617
vars:
1718
conf: "{{ django_sites[project] }}"

examples/django_sites.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ django_sites:
77
domain_name: myproject.com
88
dev_path: ~/workspace/python/project
99
host_path: /var/www/vhosts/mysite.com/myproject.com
10+
vhost_conf_path: /var/www/vhosts/system/myproject.com/conf
1011
host_user: username
1112
wsgi_script: ninedev/wsgi_mod.py
1213
wsgi_threads: 3

meta/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ galaxy_info:
2020
- utopic
2121
- vivid
2222
- wily
23+
- xenial
24+
- yakkety
25+
- zesty
2326
galaxy_tags:
2427
- system
2528
- development

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@
128128
state: touch
129129

130130
- name: Configure Apache
131-
template: src="vhost.conf.j2" dest="/var/www/vhosts/{{ conf.domain_name }}/conf/vhost.conf" backup=yes
131+
template: src="vhost.conf.j2" dest="{{ conf.vhost_conf_path }}/vhost.conf" backup=yes
132132
become: true
133133
when: conf.domain_name is defined
134134
notify:
135135
- Reconfigure Plesk domain
136136
- Restart Apache
137137

138138
- name: Configure Apache SSL
139-
template: src="vhost_ssl.conf.j2" dest="/var/www/vhosts/{{ conf.domain_name }}/conf/vhost_ssl.conf" backup=yes
139+
template: src="vhost_ssl.conf.j2" dest="{{ conf.vhost_conf_path }}/vhost_ssl.conf" backup=yes
140140
become: true
141141
when: conf.domain_name is defined
142142
notify:

0 commit comments

Comments
 (0)