Execution
Date
27 Feb 2026 01:31:20 +0000
Duration
00:07:48.41
Controller
ssh-gw-4.layershift.com
User
root
Versions
Ansible
2.16.13
ara
1.7.4 / 1.7.4
Python
3.10.10
Summary
399
Hosts
10
Tasks
3566
Results
1
Plays
1
Files
0
Records
File: /home/ssh-gateway/ansible/ansible-luca/alt-plesk-php-checker.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | --- - name: RM10252 - PHP EOL Checker hosts: all gather_facts: true tasks: - name: Get Info plesk_info: register: plsk - name: List php handlers IDs ansible.builtin.shell: | set -o pipefail plesk bin php_handler --list | awk '{ print $1 }' args: executable: /bin/bash register: php_handlers changed_when: false failed_when: false when: (plsk.plesk_found) - name: Classify handlers presence ansible.builtin.set_fact: has_altphp84: >- {{ (php_handlers.stdout | default('')) is search('(?m)^alt-php84-fpm$') and (php_handlers.stdout | default('')) is search('(?m)^alt-php84-cgi$') and (php_handlers.stdout | default('')) is search('(?m)^alt-php84-fastcgi$') }} has_altphp85: >- {{ (php_handlers.stdout | default('')) is search('(?m)^alt-php85-fpm$') and (php_handlers.stdout | default('')) is search('(?m)^alt-php85-cgi$') and (php_handlers.stdout | default('')) is search('(?m)^alt-php85-fastcgi$') }} has_plesk84: >- {{ (php_handlers.stdout | default('')) is search('(?m)^plesk-php84-fpm$') and (php_handlers.stdout | default('')) is search('(?m)^plesk-php84-cgi$') and (php_handlers.stdout | default('')) is search('(?m)^plesk-php84-fastcgi$') }} has_plesk85: >- {{ (php_handlers.stdout | default('')) is search('(?m)^plesk-php85-fpm$') and (php_handlers.stdout | default('')) is search('(?m)^plesk-php85-cgi$') and (php_handlers.stdout | default('')) is search('(?m)^plesk-php85-fastcgi$') }} when: php_handlers is defined - name: Ensure output dir exists(localhost ansible.builtin.file: path: RM10252 state: directory mode: "0755" delegate_to: localhost run_once: true - name: Record servers with alt-php84/85 AND plesk-php84/85 ansible.builtin.lineinfile: create: true mode: "0644" path: RM10252/has_alt_and_plesk_84_85 line: "{{ inventory_hostname }}" delegate_to: localhost when: - has_altphp84 and has_altphp85 and has_plesk84 and has_plesk85 - name: Record servers with plesk-php84/85 but with missing alt-php84 ansible.builtin.lineinfile: create: true mode: "0644" path: RM10252/has_plesk8485_altphp85__no_altphp84 line: "{{ inventory_hostname }}" delegate_to: localhost when: - not has_altphp84 and has_altphp85 and has_plesk84 and has_plesk85 - name: Record servers with plesk-php84/85 but with missing alt-php85 ansible.builtin.lineinfile: create: true mode: "0644" path: RM10252/has_plesk8485_altphp84__no_altphp85 line: "{{ inventory_hostname }}" delegate_to: localhost when: - has_altphp84 and not has_altphp85 and has_plesk84 and has_plesk85 - name: Record servers with plesk-php84/85 but missing alt-php84/85 ansible.builtin.lineinfile: create: true mode: "0644" path: RM10252/plesk_only_84_85 line: "{{ inventory_hostname }}" delegate_to: localhost when: - has_plesk84 and has_plesk85 and not has_altphp84 and not has_altphp85 - name: Record servers that don't have both alt and plesk-php84/85 (or no plesk/command) ansible.builtin.lineinfile: create: true mode: "0644" path: RM10252/has_none line: "{{ inventory_hostname }}" delegate_to: localhost when: - not (has_altphp84 and has_altphp85) and not (has_plesk84 and has_plesk85) |