🚨 Fix crashes on latest ansible versions and fixes lint

improvements/misc
Emilien Mantel 2023-05-30 10:55:56 +02:00
parent 483b6c78b5
commit 85378ac422
3 changed files with 3 additions and 18 deletions

View File

@ -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'

View File

@ -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

View File

@ -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/<//g'"
args:
warn: false
executable: /bin/bash
changed_when: false
register: c
@ -155,8 +148,6 @@
- name: SHELL | Check custom php value
ansible.builtin.shell: "curl -H 'Host: {{ vhost }}' http://127.0.0.1/ini.php 2> /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'