updated logic
diff --git a/tasks/main.yml b/tasks/main.yml
index 25ac8a4..1a7245f 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,23 +1,20 @@
---
# tasks file for /usr/local/google/home/friasc/apigee-workspace/apigee-opdk-role-workspace/apigee-server-restart
-- block:
- - name: Restarting node now
- become: yes
- shell: 'reboot now'
- async: 0
- poll: 0
+- name: Restarting node now
+ become: yes
+ shell: 'reboot now'
+ async: 0
+ poll: 0
- - name: Waiting for server to complete restarting
- become: no
- delegate_to: 127.0.0.1
- wait_for:
- host: '{{ ansible_host }}'
- state: started
- delay: "{{ start_check_delay | d(15) }}"
- timeout: '{{ server_restart_timeout | d(45) }}'
+- name: Waiting for server to complete restarting
+ become: no
+ delegate_to: 127.0.0.1
+ wait_for:
+ host: '{{ ansible_host }}'
+ state: started
+ delay: "{{ start_check_delay | d(15) }}"
+ timeout: '{{ server_restart_timeout | d(45) }}'
- - name: Report server started
- debug:
- msg: "Server is now running."
-
- when: not ignore_restart
\ No newline at end of file
+- name: Report server started
+ debug:
+ msg: "Server is now running."