Skip to content

Commit 8aec18e

Browse files
committed
Fix #14: move apache configure task in the end
1 parent 2fc340c commit 8aec18e

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ Task description
8585

8686
Create a virtualenv if it does not exist.
8787

88-
6. Configure Apache
89-
90-
Configure Apache to execute the wsgi script using the provided template file.
91-
Only executes if a `domain_name` is provided.
92-
If the configuration changes, causes Plesk to reconfigure the domain in the end (notifies handler).
93-
If the configuration changes, causes Apache to restart in the end (notifies handler).
94-
9588
7. Configure New Relic
9689

9790
If `newrelic` is defined configures New Relic.
@@ -157,3 +150,11 @@ Task description
157150
22. Close ownership to Plesk server group
158151

159152
Reset target directory ownership to the appropriate Plesk permissions.
153+
154+
23. Configure Apache
155+
156+
Configure Apache to execute the wsgi script using the provided template file.
157+
Only executes if a `domain_name` is provided.
158+
If the configuration changes, causes Plesk to reconfigure the domain in the end (notifies handler).
159+
If the configuration changes, causes Apache to restart in the end (notifies handler).
160+

tasks/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
register: mkvirtualenv
2626
failed_when: 'mkvirtualenv.changed and "New python executable" not in mkvirtualenv.stdout'
2727

28-
- name: Configure Apache
29-
template: src="vhost.conf.j2" dest="/var/www/vhosts/{{ conf.domain_name }}/conf/vhost.conf" backup=yes
30-
become: true
31-
when: conf.domain_name is defined
32-
notify:
33-
- Reconfigure Plesk domain
34-
- Restart Apache
35-
3628
- name: Configure New Relic
3729
template: src="newrelic.ini.j2" dest="{{ virtualenv_dir }}/{{ project }}.newrelic.ini" backup=yes
3830
when: newrelic is defined
@@ -120,3 +112,11 @@
120112
group: "{{ plesk_server_group }}"
121113
state: directory
122114
become: true
115+
116+
- name: Configure Apache
117+
template: src="vhost.conf.j2" dest="/var/www/vhosts/{{ conf.domain_name }}/conf/vhost.conf" backup=yes
118+
become: true
119+
when: conf.domain_name is defined
120+
notify:
121+
- Reconfigure Plesk domain
122+
- Restart Apache

0 commit comments

Comments
 (0)