-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook-deploy.yml
38 lines (32 loc) · 1014 Bytes
/
playbook-deploy.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
34
35
36
37
38
---
- hosts: luftsensor_deploy
vars:
www_dest: /var/www/feinstaub
repo_dest: /home/administrator/proj/luftdaten.tbs1.de
python_venv: /home/administrator/proj/luftdaten.tbs1.de-ve
tasks:
- name: create target directory in web root
file:
state: directory
owner: administrator
group: www-data
path: '{{ www_dest }}'
- name: copying files into web dir
copy:
src: current_values_render/
dest: '{{ www_dest }}'
group: www-data
- name: update/checkout git repo
git:
repo: 'https://github.com/tbs1-bo/luftdaten.tbs1.de.git'
dest: '{{ repo_dest }}'
- name: install dependency paho-mqtt
pip:
name: paho-mqtt
virtualenv: '{{ python_venv }}'
virtualenv_python: python3
- name: create cronjob
cron:
name: feinstaub_render_page
minute: '*'
job: 'cd {{ www_dest }} && {{ python_venv }}/bin/python feinstaub_render.py --template current_values.tpl.html --target index.html'