From 72e25721d215f87d1b62937516eda1a152c279ca Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 9 May 2018 20:13:40 +0000 Subject: [PATCH] try adding a playbook to run the drive check script on remote boxen Signed-off-by: Ricky Elrod --- playbooks/manual/remote_delldrive.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 playbooks/manual/remote_delldrive.yml diff --git a/playbooks/manual/remote_delldrive.yml b/playbooks/manual/remote_delldrive.yml new file mode 100644 index 0000000000..5b04c967c4 --- /dev/null +++ b/playbooks/manual/remote_delldrive.yml @@ -0,0 +1,21 @@ +# 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}} + copy: src={{private}}/scripts/drivestatus.py dest=/root/drivestatus.py + + - name: Run it for {{mgmt}} + shell: python /root/drivestatus.py {{mgmt}} + register: out + + - name: Remove it + file: path=/root/drivestatus.py state=absent + + - debug: var=out.stdout