[Cleanup] squid: Compare with empty string + name tasks

This commit is contained in:
Mathieu Trossevin 2020-06-19 14:14:23 +02:00
parent 2b08a2d81d
commit c51669531b
Signed by: mtrossevin
GPG Key ID: 81987323AE7F3E99
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
---
- fail:
- name: Check for role compatibility
fail:
msg: only compatible with Debian >= 8
when:
- ansible_distribution != "Debian" or ansible_distribution_major_version is version('8', '<')
@ -79,7 +80,7 @@
content: |
# Put customized values here.
force: no
when: squid_localproxy_enable == False and ansible_distribution_major_version is version('9', '>=')
when: not squid_localproxy_enable and ansible_distribution_major_version is version('9', '>=')
- name: "evolinux http_access for local proxy (Debian 9 or later)"
copy:
@ -95,7 +96,7 @@
content: |
# Put customized values here.
force: no
when: squid_localproxy_enable == False and ansible_distribution_major_version is version('9', '>=')
when: not squid_localproxy_enable and ansible_distribution_major_version is version('9', '>=')
- name: "evolinux overrides for local proxy (Debian 9 or later)"
template:
@ -111,7 +112,7 @@
content: |
# Put customized values here.
force: no
when: squid_localproxy_enable == False and ansible_distribution_major_version is version('9', '>=')
when: not squid_localproxy_enable and ansible_distribution_major_version is version('9', '>=')
- name: add some URL in whitelist (Debian 8)
lineinfile:

View File

@ -6,7 +6,7 @@
failed_when: False
check_mode: no
register: _squid_systemd_active
- name: Squid systemd overrides directory exists
file:
dest: /etc/systemd/system/squid.service.d/