ansible-roles/evocheck/tasks/cron.yml
Jérémy Lecour ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2777|524|2253|2462|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Use FQCN
Fully Qualified Collection Name
2023-03-20 23:33:19 +01:00

21 lines
473 B
YAML

---
- name: Check if cron is installed
ansible.builtin.shell:
cmd: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'"
executable: /bin/bash
failed_when: False
changed_when: False
check_mode: no
register: is_cron_installed
- name: evocheck crontab is updated
ansible.builtin.template:
src: crontab.j2
dest: /etc/cron.d/evocheck
mode: "0644"
owner: root
group: root
force: yes
when: is_cron_installed.rc == 0