Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
60b1aeb7
Commit
60b1aeb7
authored
Aug 14, 2013
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making handlers smarter, applying them where appropriate.
parent
e3b2ee50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
54 deletions
+24
-54
playbooks/roles/notifier/handlers/main.yml
+6
-7
playbooks/roles/notifier/tasks/deploy.yml
+16
-0
playbooks/roles/notifier/tasks/main.yml
+2
-47
No files found.
playbooks/roles/notifier/handlers/main.yml
View file @
60b1aeb7
...
...
@@ -3,13 +3,6 @@
##
## for future compliance, when the API comes on line.
##
-
name
:
notifier | restart the notifier service
service
:
name=notifier state=restarted
-
name
:
notifier | restart supervisor
service
:
name=supervisor state=restarted
notify
:
-
notifier | install notifier-celery-workers
-
name
:
notifier | install notifier-celery-beat
supervisorctl
:
name=notifier-celery-beat state=present
...
...
@@ -17,6 +10,12 @@
-
name
:
notifier | install notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=present
-
name
:
notifier | restart notifier
supervisorctl
:
name=notifier-celery-beat state=restarted
notify
:
-
notifier | install notifier-celery-workers
-
notifier | install notifier-celery-beat
-
name
:
notifier | restart notifier-celery-beat
supervisorctl
:
name=notifier-celery-beat state=restarted
...
...
playbooks/roles/notifier/tasks/deploy.yml
View file @
60b1aeb7
...
...
@@ -5,6 +5,8 @@
copy
:
src=git_ssh.sh dest=/tmp/git_ssh.sh
force=yes owner=root group=adm mode=750
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -18,6 +20,8 @@
copy
:
src={{ notifier_git_identity_path }} dest=/etc/git-identity
force=yes owner=ubuntu group=adm mode=60
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -30,6 +34,8 @@
version={{ notifier_version }}
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -43,6 +49,8 @@
file
:
path={{ notifier_code_dir }} state=directory owner={{ notifier_user }}
group={{ notifier_user }} mode=2750 recurse=yes
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -54,6 +62,8 @@
#
-
name
:
notifier | remove read-only ssh key for the content repo
file
:
path=/etc/git-identity state=absent
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -65,6 +75,8 @@
#
-
name
:
notifier | remove ssh script
file
:
path=/tmp/git_ssh.sh state=absent
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -77,6 +89,8 @@
virtualenv="{{ notifier_venv_dir }}" state=present
sudo
:
true
sudo_user
:
"
{{
notifier_user
}}"
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
@@ -88,6 +102,8 @@
cd {{ notifier_code_dir }} && {{ notifier_venv_dir }}/bin/python manage.py syncdb
sudo
:
true
sudo_user
:
"
{{
notifier_user
}}"
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
...
...
playbooks/roles/notifier/tasks/main.yml
View file @
60b1aeb7
...
...
@@ -126,29 +126,6 @@
-
install
-
update
# TODO: Add version improvement
#
# name: notifier | check if dd is installed
# command: test -e /etc/dd-agent/datadog.conf
# register: dd_present
# ignore_errors: yes
# tags:
# - notifier
# - install
# - update
#
# name: notifier | install datadog agent
# shell: bash -c "$(wget -qO- http://dtdg.co/agent-install-ubuntu)"
# environment:
# DD_API_KEY: "{{ notifier_dd_api_key }}"
# when: dd_present|failed
# tags:
# - notifier
# - install
# - update
# - ubuntu
-
name
:
notifier | create notifier/bin directory
file
:
path="{{ notifier_home }}/bin" mode=2775 state=directory
...
...
@@ -157,17 +134,6 @@
-
install
-
update
-
name
:
notifier | create job script
copy
:
>
src=opt/notifier/bin/forums_digest.sh
dest={{ notifier_home }}/bin/forums_digest.sh
owner={{ notifier_user }}
group={{ notifier_user }}
tags
:
-
notifier
-
install
-
update
-
name
:
notifier | make the script executable
file
:
path={{ notifier_home }}/bin/forums_digest.sh state=file mode=2755
tags
:
...
...
@@ -175,21 +141,10 @@
-
install
-
update
#- name: notifier | add cron job
# cron:
# name="forums digest" hour={{ notifier_cron_hour }}
# minute="{{ notifier_cron_minute }}" job="$HOME/forums_digest.sh 1440"
# sudo: true
# sudo_user: "{{ notifier_user }}"
# tags:
# - notifier
# - install
# - update
-
name
:
notifier | supervisord config for celery workers
template
:
src=etc/supervisor/conf.d/notifier-celery-workers.conf.j2 dest=/etc/supervisor/conf.d/notifier-celery-workers.conf
notify
:
notifier | restart
supervisor
notify
:
notifier | restart
notifier-celery-workers
tags
:
-
notifier
-
install
...
...
@@ -198,7 +153,7 @@
-
name
:
notifier | supervisord config for celery beat
template
:
src=etc/supervisor/conf.d/notifier-celery-beat.conf.j2 dest=/etc/supervisor/conf.d/notifier-celery-beat.conf
notify
:
notifier | restart
supervisor
notify
:
notifier | restart
notifier-celery-beat
tags
:
-
notifier
-
install
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment