ansible/playbooks/manual/remote_delldrive.yml
Ryan Lerch 3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00

22 lines
711 B
YAML

# Call with, for example: -e 'target=ibiblio04.fedoraproject.org mgmt=ibiblio04-mgmt.fedoraproject.org'
---
- name: Do a remote drive check
hosts: "{{target}}"
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- name: Copy script over to {{target}}
ansible.builtin.copy: src={{private}}/scripts/drivestatus.py dest=/root/drivestatus.py
- name: Run it for {{mgmt}}
ansible.builtin.shell: python /root/drivestatus.py {{mgmt}}
register: out
- name: Remove it
ansible.builtin.file: path=/root/drivestatus.py state=absent
- debug: var=out.stdout_lines