Commit 0195e005 by e0d

Conditional runs for speedup.

New tasks for supervisor jobs.
Basic datadog install.
Cleanup.
parent cb12e7d3
......@@ -24,9 +24,19 @@
- install
- update
- name: notifier | check if incommon ca is installed
command: test -e /usr/share/ca-certificates/incommon/InCommonServerCA.crt
register: incommon_present
ignore_errors: yes
tags:
- notifier
- install
- update
- name: common | create incommon ca directory
file:
path="/usr/share/ca-certificates/incommon" mode=2775 state=directory
when: incommon_present|failed
tags:
- notifier
- install
......@@ -35,6 +45,7 @@
- name: common | retrieve incommon server CA
shell: curl https://www.incommon.org/cert/repository/InCommonServerCA.txt -o /usr/share/ca-certificates/incommon/InCommonServerCA.crt
when: incommon_present|failed
tags:
- notifier
- install
......@@ -115,4 +126,69 @@
- 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: common | create notifier/bin directory
file:
path="{{ notifier_home }}/bin" mode=2775 state=directory
tags:
- notifier
- 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:
- notifier
- install
- update
- name: notifier | add cron job
cron: name="forums digest" hour="0" job="$HOME/forums_digest.sh 1440"
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
tags:
- notifier
- install
- update
- include: deploy.yml
\ No newline at end of file
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