Commit a90dd101 by Jason Bau

notifier changes

parent a94af726
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#- hosts: tag_environment_prod:&tag_function_webserver #- hosts: tag_environment_prod:&tag_function_webserver
# or we can get subsets of them by name # or we can get subsets of them by name
#- hosts: ~tag_Name_app1_prod #- hosts: ~tag_Name_app1_prod
#- hosts: ~tag_Name_app2_prod - hosts: ~tag_Name_app2_prod
## this is the test box ## this is the test box
- hosts: ~tag_Name_app4_prod #- hosts: ~tag_Name_app4_prod
#- hosts: ~tag_Name_app(4|1|2)_prod #- hosts: ~tag_Name_app(4|1|2)_prod
## you can also do security group, but don't do that ## you can also do security group, but don't do that
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB #- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
......
...@@ -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
...@@ -45,6 +49,7 @@ ...@@ -45,6 +49,7 @@
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