Execution
Date 26 Jun 2024 07:39:01 +0100
Duration None
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
107 Hosts
3 Tasks
296 Results
1 Plays
1 Files
0 Records

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

---
- name: Playbook to upload and run a script
  hosts: all
  gather_facts: false
  vars:
    ara_playbook_name: RM9592.yaml
    ara_playbook_labels:
      - plesk
      - migration
    loc_scr: /home/ssh-gateway/ansible/projects/RM9592/RM9592.sh
    rem_scr: /tmp/RM9592.sh
  tasks:
    - name: Upload the file
      ansible.builtin.copy:
        src: "{{ loc_scr }}"
        dest: "{{ rem_scr }}"
        mode: '0755'
    - name: Execute the script
      ansible.builtin.shell: |
        set -o pipefail
        "{{ rem_scr }}"
      args:
        executable: /bin/bash
      changed_when: false
      register: script_output
    - name: Print the script output
      ansible.legacy.debug:
        var: script_output.stdout