Execution
Date 23 Aug 2024 08:44:19 +0100
Duration None
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.0
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
0 Hosts
1 Tasks
0 Results
1 Plays
6 Files
0 Records

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

---
- name: Playbook to install tuxcare-els extension for centos
  hosts: all
  gather_facts: false
  roles:
    - plesk
  tasks:
    - name: Install plesk extension and check
      when: "'Plesk' in plsk_out.stdout"
      block:
        - name: Install plesk ext
          ansible.builtin.shell: |
            set -o pipefail
            plesk bin extension --install tuxcare-els
          args:
            executable: /bin/bash
          changed_when: false

        - name: Check if installed
          ansible.builtin.shell: |
            set -o pipefail
            plesk bin extension --list | grep tuxcare-els
          args:
            executable: /bin/bash
          changed_when: false
          register: tux_out

        - name: Do smth if is or not
          when: "tuxcare not in tux_out.stdout"
          ansible.builtin.debug:
            msg: "Tuxcare ELS is NOT installed"