[constellation] Deploy crontab

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-03-26 08:57:22 +01:00
parent 984d3ecb36
commit 9f165ad9be
Signed by: _ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 23 additions and 1 deletions

View File

@ -20,7 +20,8 @@ glob_constellation:
user: 'constellation'
password: "{{ vault.constellation_django_db_password }}"
name: 'constellation'
front: True
front: true
crontab: true
applications:
- 'access'
- 'billing'

View File

@ -69,6 +69,14 @@
version: "{{ constellation.version }}"
recursive: true
- name: Install pip module with editable flag (development)
when: constellation.version != "master"
pip:
name:
- "{{ project_path }}"
editable: true
state: latest
- name: Install and upgrade constellation (production)
when: constellation.version == "master"
pip:
@ -99,6 +107,15 @@
dest: "{{ project_path }}/settings_local.py"
state: link
- name: Deploy crontab
when: constellation.crontab
template:
src: "cron.d/constellation.j2"
dest: "/etc/cron.d/constellation"
owner: root
group: root
mode: 0644
- name: Compile messages
when: not constellation.front
django_manage:

View File

@ -0,0 +1,4 @@
{{ ansible_header }}
# m h dom mon dow user command
24 4 * * * root constellation check_consistency