ansible-roles/squid/tasks/logrotate_jessie.yml
Jérémy Lecour 00fe225a3c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2615|7|2608|177|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/278//ansiblelint">Evolix » ansible-roles » unstable #278</a>
gitea/ansible-roles/pipeline/head This commit looks good
force: [yes,no] → force [true,false]
2023-06-28 13:25:30 +02:00

31 lines
826 B
YAML

---
# md5sum for squid logrotate file :
#
# --check reads stdin for a list of files and md5 sums
# the list contains the checksum for the file provided by Jessie
#
# We don't use --status so we can debug if needed
#
# With that command we can check if the logrotate file for squid
# is the one provided by the package.
- name: check if logrotate file is default
ansible.builtin.shell:
cmd: 'printf "43994674706b672ae5018f592beccf2e /etc/logrotate.d/{{ squid_daemon_name }}" | md5sum --check'
changed_when: False
failed_when: False
check_mode: no
register: squid_logrotate_md5
tags:
- squid
- name: logrotate configuration
ansible.builtin.template:
src: logrotate_jessie.j2
dest: /etc/logrotate.d/{{ squid_daemon_name }}
force: true
when: squid_logrotate_md5.rc == 0
tags:
- squid