Commit c45fc145 by Jason Bau

fix perms on notifier db, and also fix syncdb

parent 8e8a6dcd
...@@ -30,9 +30,13 @@ ...@@ -30,9 +30,13 @@
tags: tags:
- deploy - deploy
# Syncdb for whatever reason always creates the file owned by www-data:www-data, and then
# complains it can't write because it's running as notifier. So this is to touch the file into
# place with proper perms first.
- name: notifier | fix permissions on notifer db file - name: notifier | fix permissions on notifer db file
shell: > file: >
chmod 0664 {{ NOTIFIER_DB_DIR }}/* path={{ NOTIFIER_DB_DIR }}/notifier.db state=touch owner={{ NOTIFIER_USER }} group={{ NOTIFIER_WEB_USER }}
mode=0664
sudo: true sudo: true
notify: notify:
- notifier | restart notifier-scheduler - notifier | restart notifier-scheduler
...@@ -43,8 +47,9 @@ ...@@ -43,8 +47,9 @@
- name: notifier | syncdb - name: notifier | syncdb
shell: > shell: >
cd {{ NOTIFIER_CODE_DIR }} && {{ NOTIFIER_VENV_DIR }}/bin/python manage.py syncdb cd {{ NOTIFIER_CODE_DIR }} && {{ NOTIFIER_VENV_DIR }}/bin/python manage.py syncdb
sudo: true sudo: true
sudo_user: "{{ NOTIFIER_USER }}" sudo_user: "{{ NOTIFIER_USER }}"
environment: notifier_env_vars
notify: notify:
- notifier | restart notifier-scheduler - notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers - notifier | restart notifier-celery-workers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment