CORD-1256 automatically retry TOSCA recipes
Change-Id: I60190ca580bdcbd58fe1d2404f2d9edadf008333
diff --git a/roles/compute-node-enable/tasks/main.yml b/roles/compute-node-enable/tasks/main.yml
index 5862f3e..74b277c 100644
--- a/roles/compute-node-enable/tasks/main.yml
+++ b/roles/compute-node-enable/tasks/main.yml
@@ -24,6 +24,10 @@
xos-password: "{{ head_xos_admin_pass }}"
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
+ register: result
+ until: result | success
+ retries: 40
+ delay: 2
with_items:
- openstack.yaml
- openstack-compute.yaml
@@ -43,6 +47,10 @@
xos-password: "{{ head_xos_admin_pass }}"
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
+ register: result
+ until: result | success
+ retries: 40
+ delay: 2
with_items:
- vtn-service.yaml
- openstack-compute-vtn.yaml
diff --git a/roles/test-exampleservice/tasks/main.yml b/roles/test-exampleservice/tasks/main.yml
index 7028ae0..97969e6 100644
--- a/roles/test-exampleservice/tasks/main.yml
+++ b/roles/test-exampleservice/tasks/main.yml
@@ -27,6 +27,10 @@
xos-password: "{{ head_xos_admin_pass }}"
body: "{{ lookup('file', head_cord_profile_dir + '/test-exampleservice.yaml' ) }}"
status_code: 200
+ register: result
+ until: result | success
+ retries: 40
+ delay: 2
tags:
- skip_ansible_lint # TOSCA loading should be idempotent
diff --git a/roles/test-subscriber-enable/tasks/main.yml b/roles/test-subscriber-enable/tasks/main.yml
index f7c8c67..d3b0d24 100644
--- a/roles/test-subscriber-enable/tasks/main.yml
+++ b/roles/test-subscriber-enable/tasks/main.yml
@@ -26,6 +26,10 @@
xos-password: "{{ head_xos_admin_pass }}"
body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
status_code: 200
+ register: result
+ until: result | success
+ retries: 40
+ delay: 2
with_items:
- "test-subscriber.yaml"
tags: