added logic around starting up component.
diff --git a/tasks/main.yml b/tasks/main.yml index 68f26b2..29ebf55 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -1,7 +1,27 @@ --- # tasks file for opdk-update-component -- name: Update apigee-setup - shell: '{{ apigee_service }} apigee-setup update' +- block: -- name: Perform component update - {{ apigee_component }} - shell: '{{ apigee_update }} -c {{ apigee_component }} -f {{ opdk_installation_config_file }}' + - name: Update apigee-setup + shell: '{{ apigee_service }} apigee-setup update' + + - name: Perform component update - {{ apigee_component }} + shell: '{{ apigee_update }} -c {{ apigee_component }} -f {{ opdk_installation_config_file }}' + + - name: Validate component status + shell: '{{ apigee_all }} status' + when: opdk_version | version_compare('4.16.01', '>=') + + rescue: + + - name: Validate status failed, trying component start... + shell: '{{ apigee_all }} start' + when: opdk_version | version_compare('4.16.01', '>=') + + - name: Small time delay for component boot, change with -e component_start_delay= + pause: + seconds: '{{ component_start_delay | default(1) }}' + +- name: Validating component status a second time + shell: '{{ apigee_all }} status' + when: opdk_version | version_compare('4.16.01', '>=') \ No newline at end of file