-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdotshipper-installer-ansible.yml
33 lines (24 loc) · 1.36 KB
/
dotshipper-installer-ansible.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- name: set up pre-reqs for dotshipper utility box
hosts: "{{ machineName }}"
gather_facts: true
tasks:
- name: make sure python pip is installed
yum: name=python-pip state=present
- name: make sure python redis is installed
pip: name=redis version=2.10.5
- name: make sure python requests is installed
pip: name=requests version=2.10.0
- name: make sure python jinja2 is installed
pip: name=jinja2 version=2.8
- name: make sure vertica_python is installed
pip: name=vertica_python version=0.6.6
- name: pull the pyTableFormat repo from github
git: repo=https://github.com/rendicott/pyTableFormat.git dest=/usr/pyTableFormat
- name: pull the dotshipper repo from github
git: repo=https://github.com/rendicott/dotshipper.git dest=/usr/dotshipper
- name: copy pyTableFormat to the dotshipper folder
command: cp /usr/pyTableFormat/pyTableFormat.py /usr/dotshipper/pyTableFormat.py
- name: make sure crontab line is in file
cron: name="Dotshipper Vertica To Anodot Job" hour="11" minute="5" job="python /usr/dotshipper/dotshipper.py --configfile /usr/dotshipper/dotshipper.ini -d 0 --query_lag_hours=96 -l /var/log/dotshipper/dotshipper.py.`date +\%Y\%m\%d\%H\%M\%S`.log >/dev/null 2>&1"
- name: make sure /var/log/dotshipper dir exists
file: path=/var/log/dotshipper state=directory