abrt: Update faf-local-post cron task

- Removed crons that are already in upstream playbook
- Changed formatting of actions
- Put actions into block to check the "not devel" only once
- Fixed bare variable evaluation

Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
This commit is contained in:
Martin Kutlak
2019-07-04 16:00:43 +02:00
committed by Miroslav Suchý
parent 4b0be54c6b
commit b2b06dfe23

View File

@@ -16,116 +16,101 @@
special_time: daily
state: present
- name: match unknown packages
cron:
name: "match unknown packages"
user: faf
job: "faf match-unknown-packages -d >> /var/log/faf/match-unknown-packages.log 2>&1"
special_time: daily
state: present
- name: Run crons when not devel
block:
- name: pull associates
cron:
name: "cron for pull associates"
user: faf
job: "faf pull-associates -o fedora >> /var/log/faf/pull-associates.log 2>&1"
special_time: monthly
state: present
- name: pull releases, components and associates
cron:
name: "cron for {{ item.what }} {{ item.distro }}"
user: faf
job: "faf {{ item.what }} -o {{ item.distro }} -d >> /var/log/faf/{{ item.what }}-{{ item.distro }}.log 2>&1"
special_time: daily
state: present
when: not devel
with_items:
- { what: "pull-releases", distro: "fedora" }
- { what: "pull-components", distro: "fedora" }
- { what: "find-components", distro: "fedora" }
- { what: "pull-releases", distro: "centos" }
- { what: "pull-components", distro: "centos" }
- { what: "find-components", distro: "centos" }
- name: koops_to_xorg.py
cron:
name: "koops_to_xorg.py"
user: faf
job: "/etc/faf/koops_to_xorg.py >> /var/log/faf/koops-to-xorg.log 2>&1"
special_time: daily
state: present
- name: pull associates
cron:
name: "cron for pull associates"
user: faf
job: "faf pull-associates -o fedora >> /var/log/faf/pull-associates.log 2>&1"
special_time: monthly
state: present
when: not devel
- name: probable fixes
cron:
name: "cron for probable fixes for f{{ item }}"
user: faf
job: "faf mark-probably-fixed -o fedora --opsys-release {{ item }} >> /var/log/faf/mark-probably-fixed-f{{ item }}.log 2>&1"
special_time: daily
state: present
loop:
- "29"
- "30"
- name: koops_to_xorg.py
cron:
name: "koops_to_xorg.py"
user: faf
job: "/etc/faf/koops_to_xorg.py >> /var/log/faf/koops-to-xorg.log"
special_time: daily
state: present
when: not devel
- name: remove obsolete probable fixes
cron:
name: "cron for probable fixes for f{{ item }}"
user: faf
job: "faf mark-probably-fixed -o fedora --opsys-release {{ item }} >> /var/log/faf/mark-probably-fixed-f{{ item }}.log 2>&1"
special_time: daily
state: absent
loop:
- "24"
- "25"
- "26"
- "27"
- "28"
- name: probable fixes
cron:
name: "cron for probable fixes for f{{ item }}"
user: faf
job: "faf mark-probably-fixed -o fedora --opsys-release {{ item }} >> /var/log/faf/mark-probably-fixed-f{{ item }}.log 2>&1"
special_time: daily
state: present
when: not devel
with_items:
- "29"
- "30"
- name: update BZ bugs fedora
cron:
name: "cron for update BZ bugs fedora"
user: faf
job: "faf update-bugs -db fedora-bugzilla >> /var/log/faf/update-bugs.log 2>&1"
special_time: daily
state: present
- name: remove obsolete probable fixes
cron:
name: "cron for probable fixes for f{{ item }}"
user: faf
job: "faf mark-probably-fixed -o fedora --opsys-release {{ item }} >> /var/log/faf/mark-probably-fixed-f{{ item }}.log 2>&1"
special_time: daily
state: absent
when: not devel
with_items:
- "24"
- "25"
- "26"
- "27"
- "28"
- name: update BZ bugs centos
cron:
name: "cron for update BZ bugs centos"
user: faf
job: "faf update-bugs -db centos-mantisbt >> /var/log/faf/update-bugs-centos.log 2>&1"
special_time: daily
state: present
- name: update BZ bugs fedora
cron:
name: "cron for update BZ bugs fedora"
user: faf
job: "faf update-bugs -db fedora-bugzilla >> /var/log/faf/update-bugs.log 2>&1"
special_time: daily
state: present
when: not devel
- name: attach BZ bugs centos
cron:
name: "cron for attach BZ bugs centos"
user: faf
job: "faf attach-centos-bugs >> /var/log/faf/attach-centos-bugs.log 2>&1"
special_time: daily
state: present
- name: update BZ bugs centos
cron:
name: "cron for update BZ bugs centos"
user: faf
job: "faf update-bugs -db centos-mantisbt >> /var/log/faf/update-bugs-centos.log 2>&1"
special_time: daily
state: present
when: not devel
- name: attach BZ bugs centos
cron:
name: "cron for attach BZ bugs centos"
user: faf
job: "faf attach-centos-bugs >> /var/log/faf/attach-centos-bugs.log 2>&1"
special_time: daily
state: present
when: not devel
- name: archive reports and attachments
cron:
name: "faf archive reports and attachments"
user: faf
job: "faf archive-reports -d >> /var/log/faf/archive-reports.log 2>&1"
special_time: daily
state: present
when: not devel
- name: archive reports and attachments
cron:
name: "faf archive reports and attachments"
user: faf
job: "faf archive-reports -d >> /var/log/faf/archive-reports.log 2>&1"
special_time: daily
state: present
when: not devel|bool
- name: install cron for deleting old archives
cron: name="rotate_faf_archives" special_time="daily" job="find '/srv/faf/reports/archive/' -type f -name '*.tar.xz' -mtime '{{archive_age}}' -delete" user="faf"
cron:
name: "rotate_faf_archives"
special_time: "daily"
job: "find '/srv/faf/reports/archive/' -type f -name '*.tar.xz' -mtime '{{archive_age}}' -delete"
user: "faf"
- name: install faf cron for deleting old invalid reports
cron: name="delete-old-invalid-reports" special_time="daily" job="find '/srv/faf/reports/deferred/' -type -f -mtime '{{ deferred_age }}' -delete" user="faf" state=absent
cron:
name: "delete-old-invalid-reports"
special_time: "daily"
job: "find '/srv/faf/reports/deferred/' -type -f -mtime '{{ deferred_age }}' -delete"
user: "faf"
state: absent
- name: install faf cron for deleting saved reports
cron: name="delete-old-saved-reports" special_time="daily" job="find '/srv/faf/reports/saved/' -type -f -mtime '{{ deferred_age }}' -delete" user="faf" state=absent
cron:
name: "delete-old-saved-reports"
special_time: "daily"
job: "find '/srv/faf/reports/saved/' -type -f -mtime '{{ deferred_age }}' -delete"
user: "faf"
state: absent