🚨 Fix crashes on latest ansible versions and fixes lint
parent
483b6c78b5
commit
85378ac422
|
@ -7,8 +7,6 @@
|
||||||
when: php_install_fpm
|
when: php_install_fpm
|
||||||
notify: Docker restart php-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'
|
ansible.builtin.command: 'service {{ php_fpm_service }} restart'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
when: ansible_virtualization_type == 'docker'
|
when: ansible_virtualization_type == 'docker'
|
||||||
|
|
|
@ -114,16 +114,12 @@
|
||||||
when: php_install_fpm and ansible_virtualization_type == 'docker'
|
when: php_install_fpm and ansible_virtualization_type == 'docker'
|
||||||
block:
|
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'
|
ansible.builtin.command: 'service {{ php_fpm_service }} status'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
register: dps
|
register: dps
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_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'
|
ansible.builtin.command: 'service {{ php_fpm_service }} start'
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
when: dps.stdout.find('is not running') != -1
|
when: dps.stdout.find('is not running') != -1
|
||||||
|
|
|
@ -80,16 +80,12 @@
|
||||||
|
|
||||||
- name: COMMAND | Docker nginx status
|
- name: COMMAND | Docker nginx status
|
||||||
ansible.builtin.command: service nginx status
|
ansible.builtin.command: service nginx status
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: ngs
|
register: ngs
|
||||||
|
|
||||||
- name: COMMAND | Docker start nginx
|
- name: COMMAND | Docker start nginx
|
||||||
ansible.builtin.command: service nginx start
|
ansible.builtin.command: service nginx start
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
when: ngs.stdout.find('nginx is not running') != -1
|
when: ngs.stdout.find('nginx is not running') != -1
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
|
@ -102,8 +98,6 @@
|
||||||
|
|
||||||
- name: Docker reload nginx
|
- name: Docker reload nginx
|
||||||
ansible.builtin.command: service nginx reload
|
ansible.builtin.command: service nginx reload
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
notify: Docker reload nginx
|
notify: Docker reload nginx
|
||||||
when: ansible_virtualization_type == 'docker'
|
when: ansible_virtualization_type == 'docker'
|
||||||
|
|
||||||
|
@ -147,7 +141,6 @@
|
||||||
- name: SHELL | Check vhost
|
- 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'"
|
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:
|
args:
|
||||||
warn: false
|
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: c
|
register: c
|
||||||
|
@ -155,8 +148,6 @@
|
||||||
|
|
||||||
- name: SHELL | Check custom php value
|
- name: SHELL | Check custom php value
|
||||||
ansible.builtin.shell: "curl -H 'Host: {{ vhost }}' http://127.0.0.1/ini.php 2> /dev/null"
|
ansible.builtin.shell: "curl -H 'Host: {{ vhost }}' http://127.0.0.1/ini.php 2> /dev/null"
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: c
|
register: c
|
||||||
failed_when: 'php_fpm_poold.1.php_admin_value.memory_limit not in c.stdout'
|
failed_when: 'php_fpm_poold.1.php_admin_value.memory_limit not in c.stdout'
|
||||||
|
|
Loading…
Reference in New Issue