--- - name: Get the status of the RPI servers hosts: all roles: - common become: yes gather_facts: no tasks: - name: Ensure status script is present ansible.builtin.copy: src: ./config_files/status.sh dest: ./status.sh owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: '0755' - name: Get device information command: ./status.sh register: status - name: Print device information debug: var: status.stdout_lines