[constellation] Deploy crontab
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
parent
984d3ecb36
commit
9f165ad9be
|
@ -20,7 +20,8 @@ glob_constellation:
|
||||||
user: 'constellation'
|
user: 'constellation'
|
||||||
password: "{{ vault.constellation_django_db_password }}"
|
password: "{{ vault.constellation_django_db_password }}"
|
||||||
name: 'constellation'
|
name: 'constellation'
|
||||||
front: True
|
front: true
|
||||||
|
crontab: true
|
||||||
applications:
|
applications:
|
||||||
- 'access'
|
- 'access'
|
||||||
- 'billing'
|
- 'billing'
|
||||||
|
|
|
@ -69,6 +69,14 @@
|
||||||
version: "{{ constellation.version }}"
|
version: "{{ constellation.version }}"
|
||||||
recursive: true
|
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)
|
- name: Install and upgrade constellation (production)
|
||||||
when: constellation.version == "master"
|
when: constellation.version == "master"
|
||||||
pip:
|
pip:
|
||||||
|
@ -99,6 +107,15 @@
|
||||||
dest: "{{ project_path }}/settings_local.py"
|
dest: "{{ project_path }}/settings_local.py"
|
||||||
state: link
|
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
|
- name: Compile messages
|
||||||
when: not constellation.front
|
when: not constellation.front
|
||||||
django_manage:
|
django_manage:
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{{ ansible_header }}
|
||||||
|
|
||||||
|
# m h dom mon dow user command
|
||||||
|
24 4 * * * root constellation check_consistency
|
Loading…
Reference in New Issue