Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uWSGI service #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
service: name=nginx state=restarted enabled=yes

- name: restart apache2
service: name=apache2 state=restarted enabled=yes

- name: restart uwsgi
service: name=uwsgi state=restarted enabled=yes
service: name=apache2 state=restarted enabled=yes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

carriage return end of file :)

14 changes: 12 additions & 2 deletions tasks/app_config_uwsgi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@
owner={{ uwsgi_user }}
group={{ uwsgi_group }}
state=link

- name: UWSGI check base directory exists
stat:
path: "{{ django_deployment_root_folder }}/{{ url }}/current"
register: p

notify:
- restart uwsgi
- name: UWSGI show base directory existence
debug: var=p.stat.exists

- name: UWSGI restart service
service: name=uwsgi state=restarted enabled=yes
when: p.stat.exists

rescue:
- debug: msg='Error caught during the UWSGI configuration'
- file: path=/etc/uwsgi/apps-available/{{ websiteproject }}.ini state=absent
Expand Down