From 85378ac422b3a5c6666e5315204307ed5228c0bd Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Tue, 30 May 2023 10:55:56 +0200 Subject: [PATCH] :rotating_light: Fix crashes on latest ansible versions and fixes lint --- handlers/main.yml | 4 +--- tasks/main.yml | 8 ++------ tests/test.yml | 9 --------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 87cb18f..ba4aec0 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -7,8 +7,6 @@ when: php_install_fpm notify: Docker restart php-fpm -- name: Docker restart php-fpm +- name: Docker restart php-fpm # noqa: command-instead-of-module no-changed-when ansible.builtin.command: 'service {{ php_fpm_service }} restart' - args: - warn: false when: ansible_virtualization_type == 'docker' diff --git a/tasks/main.yml b/tasks/main.yml index 5ca0e3b..452f2d9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -114,16 +114,12 @@ when: php_install_fpm and ansible_virtualization_type == 'docker' block: - - name: COMMAND | Check if PHP-FPM is started (Docker) + - name: COMMAND | Check if PHP-FPM is started (Docker) # noqa: command-instead-of-module ansible.builtin.command: 'service {{ php_fpm_service }} status' - args: - warn: false register: dps changed_when: false failed_when: false - - name: COMMAND | Ensure PHP-FPM is started (Docker) + - name: COMMAND | Ensure PHP-FPM is started (Docker) # noqa: command-instead-of-module no-changed-when ansible.builtin.command: 'service {{ php_fpm_service }} start' - args: - warn: false when: dps.stdout.find('is not running') != -1 diff --git a/tests/test.yml b/tests/test.yml index c87b3cd..0400045 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -80,16 +80,12 @@ - name: COMMAND | Docker nginx status ansible.builtin.command: service nginx status - args: - warn: false changed_when: false failed_when: false register: ngs - name: COMMAND | Docker start nginx ansible.builtin.command: service nginx start - args: - warn: false when: ngs.stdout.find('nginx is not running') != -1 handlers: @@ -102,8 +98,6 @@ - name: Docker reload nginx ansible.builtin.command: service nginx reload - args: - warn: false notify: Docker reload nginx when: ansible_virtualization_type == 'docker' @@ -147,7 +141,6 @@ - name: SHELL | Check vhost ansible.builtin.shell: "set -o pipefail && curl -v -H 'Host: {{ vhost }}' http://127.0.0.1/phpinfo.php 2> /dev/null | grep h1 | grep -o 'PHP Version {{ php_version }}' | sed -r 's/ /dev/null" - args: - warn: false changed_when: false register: c failed_when: 'php_fpm_poold.1.php_admin_value.memory_limit not in c.stdout'