summaryrefslogtreecommitdiffstats
path: root/xci/infra/bifrost/playbooks/wait-for-baremetal.yml
diff options
context:
space:
mode:
Diffstat (limited to 'xci/infra/bifrost/playbooks/wait-for-baremetal.yml')
-rw-r--r--xci/infra/bifrost/playbooks/wait-for-baremetal.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/xci/infra/bifrost/playbooks/wait-for-baremetal.yml b/xci/infra/bifrost/playbooks/wait-for-baremetal.yml
new file mode 100644
index 00000000..96aab29c
--- /dev/null
+++ b/xci/infra/bifrost/playbooks/wait-for-baremetal.yml
@@ -0,0 +1,17 @@
+# ironic needs to boot the server again to install the OS in the hard drive
+# we are currently modifying opnfv vm networking config while ironic is
+# doing that and it sometimes fail because of networking glitches. We should
+# wait until the OS is installed to do the opnfv config
+
+- hosts: baremetal
+ name: "Wait for baremetal blades to be ready"
+ become: no
+ gather_facts: False
+ tasks:
+ - name: "Wait for nodes to reboot."
+ wait_for: state=stopped port=22 host={{ ipv4_address }} timeout=5000
+ delegate_to: opnfv
+ - name: "Wait for nodes to become available."
+ wait_for: state=started port=22 host={{ ipv4_address }} timeout=5000
+ delegate_to: opnfv
+