From: Alexander Barton Date: Tue, 23 Apr 2019 14:41:22 +0000 (+0200) Subject: apache2-php5, check-mk-agent: Fix warnings of ansible-lint(1) X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=AnsibleRoles.git;a=commitdiff_plain;h=6a985804768b569b80cb3f16709f91301cb5bb5f apache2-php5, check-mk-agent: Fix warnings of ansible-lint(1) - 306: Shells that use pipes should set the pipefail option - 601 Don't compare to literal True/False --- diff --git a/roles/apache2-php5/tasks/main.yml b/roles/apache2-php5/tasks/main.yml index 1fa1048..5946f00 100644 --- a/roles/apache2-php5/tasks/main.yml +++ b/roles/apache2-php5/tasks/main.yml @@ -5,7 +5,11 @@ tags: - apache - packages - shell: apt-cache search php5-apcu | grep "^php5-apcu -" >/dev/null + shell: | + set -o pipefail + apt-cache search php5-apcu | grep "^php5-apcu -" >/dev/null + args: + executable: /bin/bash check_mode: no register: php5_apcu_is_available failed_when: php5_apcu_is_available.rc > 1 diff --git a/roles/check-mk-agent/tasks/main.yml b/roles/check-mk-agent/tasks/main.yml index 0e59f18..65b2a06 100644 --- a/roles/check-mk-agent/tasks/main.yml +++ b/roles/check-mk-agent/tasks/main.yml @@ -45,7 +45,7 @@ mode=0644 owner=root src=check_mk.socket.j2 - when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists == False + when: ansible_distribution_major_version|int >= 8 and not check_mk_socket_unit.stat.exists notify: - reload systemd daemon @@ -60,7 +60,7 @@ mode=0644 owner=root src=check_mk@.service.j2 - when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists == False + when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists notify: - reload systemd daemon