Execution
Date 02 Apr 2024 11:53:35 +0100
Duration None
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.2.dev2
Python 3.10.10
Summary
500 Hosts
3 Tasks
1433 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/RM9513.yaml

---
- name: Playbook to install PHP versions on plesk servers
  hosts: all
  vars:
    ara_playbook_name: RM9513.yaml
    ara_playbook_labels:
      - plesk
      - php
      - RM9513
    folder: /home/ssh-gateway/ansible/playbook_output
  tasks:
    - name: Run plesk command and capture output
      ansible.builtin.shell: |
        set -o pipefail
        /sbin/plesk -v | grep "Product version" | cut -d ":" -f2
      args:
        executable: /bin/bash
      register: plsk_out
      changed_when: false
    - name: Run installer if plesk server
      when: "'Plesk' in plsk_out.stdout"
      ansible.builtin.shell: |
        set -o pipefail
        /sbin/plesk installer add --components php8.1 php8.2 php8.3
      args:
        executable: /bin/bash
      changed_when: false