Execution
Date 21 Aug 2024 06:20:35 +0100
Duration 00:02:03.27
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
136 Hosts
8 Tasks
1030 Results
1 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/projects/RM9700/RM9700_change_mariadb_override.yaml

---
- name: Playbook to adjust mariadb override conf
  hosts: all
  gather_facts: false
  roles:
    - plesk
  tasks:
    - name: Upload file and run it
      when: "'Plesk' in plsk_out.stdout"
      block:
        - name: Read the localfile
          ansible.builtin.slurp:
            src: "{{ ans_home }}/projects/RM9700/mariadb_override.sh"
          delegate_to: 127.0.0.1
          register: file_contents
        - name: Execute uploaded script
          ansible.builtin.shell: |
            set -o pipefail
            echo -e "{{ file_contents.content }}" | base64 -d > /tmp/mariadb_override.sh
            chmod 755 /tmp/mariadb_override.sh
            /tmp/mariadb_override.sh
          args:
            executable: /bin/bash
          register: update_out
          changed_when: false
        - name: Show the result
          ansible.builtin.debug:
            var: update_out