Execution
Date 25 Aug 2024 15:27:06 +0100
Duration 00:01:10.13
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
99 Hosts
6 Tasks
589 Results
1 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/is_plesk_db_command_running.yml

---
- name: Playbook to run big commands
  hosts: all
  gather_facts: false
  roles:
    - plesk
  tasks:
    - name: Run a command
      when: "'Plesk' in plsk_out.stdout"
      ansible.builtin.shell: |
        set -o pipefail
        if ps auxww | grep  'mysql --defaults-file'| grep -v   'grep' ;then exit 1 ;fi 
      args:
        executable: /bin/bash