From ee978d80c1afda30166fa0fa2bf421687e8b9a7d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 30 May 2016 17:42:01 +0000 Subject: [PATCH] Initial version of a playbook to fix down arm socs. Needs some improvement, but works now. --- playbooks/fix_arm_soc.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 playbooks/fix_arm_soc.yml diff --git a/playbooks/fix_arm_soc.yml b/playbooks/fix_arm_soc.yml new file mode 100644 index 0000000000..4992ab5d80 --- /dev/null +++ b/playbooks/fix_arm_soc.yml @@ -0,0 +1,33 @@ +# +# This playbook power cycles an arm soc, sets time and runs playbook on it. +# +# requires -e "target=arm0N-builderXX.arm.fedoraproject.org" -l arm0N-builderXX.arm.fedoraproject.org + +- name: power cycle instance + hosts: "{{ target }}" + gather_facts: False + user: root + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + + tasks: + - name: power off + delegate_to: noc01.phx2.fedoraproject.org + command: /opt/calxeda/bin/ipmitool -U admin -P "{{ armsocipmipass }}" -H "{{inventory_hostname_short}}-mgmt.arm.fedoraproject.org" power off +# no_log: True + + - name: power on + delegate_to: noc01.phx2.fedoraproject.org + command: /opt/calxeda/bin/ipmitool -U admin -P "{{ armsocipmipass }}" -H "{{inventory_hostname_short}}-mgmt.arm.fedoraproject.org" power on +# no_log: True + + - name: wait for soc ssh to come back up + local_action: wait_for delay=10 host={{ target }} port=22 state=started timeout=1200 + + - name: make sure time is set + delegate_to: "{{target}}" + command: ntpdate -u bastion01.phx2.fedoraproject.org + +- include: groups/buildhw.yml hosts="{{target}}"