zammad: Aktualisiere cron-Job

This commit is contained in:
phil 2022-03-04 15:38:44 +01:00
parent 46a310a65b
commit 1034729a2a
4 changed files with 19 additions and 12 deletions

View file

@ -1,6 +1,4 @@
--- ---
cron_file: /etc/cron.d/zammad
es_version: "7.10.2" es_version: "7.10.2"
es_url: "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{{ es_version }}-amd64.deb" es_url: "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-{{ es_version }}-amd64.deb"
es_dl_path: /data es_dl_path: /data

16
tasks/cron.yml Normal file
View file

@ -0,0 +1,16 @@
---
- name: "cron | Setze Umgebungsvariablen"
cron:
user: "{{ zammad_user }}"
name: RAILS_ENV
job: production
env: true
- name: "cron | Richte cron ein"
cron:
user: "{{ zammad_user }}"
name: "Loesche unbenutzte Zammad-Kunden"
minute: "1"
hour: "1"
day: "1"
job: " cd {{ zammad_home }} && chronic rbenv exec rails r {{ local_scripts_dir }}/zammad-delete-customers.rb"

View file

@ -10,6 +10,9 @@
- import_tasks: zammad.yml - import_tasks: zammad.yml
tags: zammad tags: zammad
- import_tasks: cron.yml
tags: cron
- import_tasks: ruby.yml - import_tasks: ruby.yml
tags: ruby tags: ruby

View file

@ -41,16 +41,6 @@
dest: "{{ local_scripts_dir }}/zammad-updater" dest: "{{ local_scripts_dir }}/zammad-updater"
mode: 0755 mode: 0755
- name: "zammad | Richte cron ein"
cron:
cron_file: "{{ cron_file }}"
user: "{{ zammad_user }}"
name: "Loesche unbenutzte Zammad-Kunden"
minute: "1"
hour: "1"
day: "1"
job: " chronic cd {{ zammad_home }} && RAILS_ENV=production rbenv exec rails r {{ local_scripts_dir }}/zammad-delete-customers.rb"
- name: "zammad | Erstelle Alias" - name: "zammad | Erstelle Alias"
lineinfile: lineinfile:
path: /root/.bashrc path: /root/.bashrc