ansible_cache/home_linux/get_status.yml
2024-12-27 12:47:45 +00:00

26 lines
503 B
YAML
Executable File

---
- 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