-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
126 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
# vim:sw=2:ft=ansible | ||
|
||
dependencies: | ||
- Stouts.deploy | ||
- Stouts.python | ||
- Stouts.nginx | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
--- | ||
|
||
- name: Setup py configuration file | ||
copy: content="{{ item.cfg.content|default(item.cfg) }}" dest={{ item.cfg.path|default(wsgi_etc_dir + '/config.py') }} | ||
copy: content="{{ item.cfg.content|default(item.cfg) }}" dest={{ item.cfg.path|default("/opt/%s/etc/config.py" % item.name) }} | ||
when: item.cfg|default(None) | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" | ||
notify: wsgi restart | ||
|
||
- name: Setup uWSGI applications | ||
template: src=uwsgi.ini.j2 dest={{item.etc_dir|default(wsgi_etc_dir)}}/{{item.name}}-uwsgi.ini owner={{wsgi_user}} group={{wsgi_group}} | ||
template: src=uwsgi.ini.j2 dest={{item.etc_dir|default("/opt/%s/etc" % item.name)}}/{{item.name}}-uwsgi.ini owner={{wsgi_user}} group={{wsgi_group}} | ||
when: item.server|default(wsgi_server) == 'uwsgi' | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" | ||
notify: wsgi restart | ||
|
||
- name: Setup Upstart | ||
template: src=upstart-{{item.server|default(wsgi_server)}}.conf.j2 dest=/etc/init/{{item.name}}-wsgi.conf owner=root group=root mode=0644 | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" | ||
when: wsgi_service == 'upstart' | ||
notify: wsgi restart | ||
|
||
- name: Setup Init | ||
template: src=init-{{item.server|default(wsgi_server)}}.j2 dest=/etc/init.d/{{item.name}}-wsgi owner=root group=root mode=0755 | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" | ||
when: wsgi_service == 'init' | ||
notify: wsgi restart | ||
|
||
- name: Setup SystemD | ||
template: src=systemd-{{item.server|default(wsgi_server)}}.j2 dest=/etc/systemd/system/{{item.name}}-wsgi.service owner=root group=root mode=0644 | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" | ||
when: wsgi_service == 'systemd' | ||
notify: wsgi restart | ||
|
||
- name: Ensure that the services are started | ||
service: name={{item.name}}-wsgi state=started enabled=yes | ||
ignore_errors: yes | ||
with_items: wsgi_applications | ||
with_items: "{{wsgi_applications}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
- name: Prepare configuration directories | ||
file: state=directory path={{item.etc_dir|default(wsgi_etc_dir)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: wsgi_applications | ||
file: state=directory path={{item.etc_dir|default("/opt/%s/etc" % item.name)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: "{{wsgi_applications}}" | ||
|
||
- name: Prepare run directories | ||
file: state=directory path={{item.run_dir|default(wsgi_run_dir)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: wsgi_applications | ||
file: state=directory path={{item.run_dir|default("/opt/%s/run" % item.name)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: "{{wsgi_applications}}" | ||
|
||
- name: Prepare log directories | ||
file: state=directory path={{item.log_dir|default(wsgi_log_dir)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: wsgi_applications | ||
file: state=directory path={{item.log_dir|default("/opt/%s/log" % item.name)}} owner={{wsgi_user}} group={{wsgi_group}} | ||
with_items: "{{wsgi_applications}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.