Execution
Date 05 Jun 2024 15:04:41 +0100
Duration 00:01:14.03
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
1 Hosts
2 Tasks
2 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/test_kvm/playbook1.yaml

---
- name: Playbook1
  hosts: all
  gather_facts: false
  tasks:
    - name: Upload new file
      ansible.builtin.copy:
        src: script.sh
        dest: /root/kvm_migration/
        mode: '0755'
        owner: root
        group: root
        backup: true
        force: true
    - name: Execute script
      ansible.builtin.shell: |
        set -o pipefail
        cd /root/kvm_migration
        rm -rf json/*
        ./check_systems display_bad | grep -v kvm_migration
      args:
        executable: /bin/bash
      changed_when: false