소스 검색

Remove pause after haproxy start

Andrew Butcher 9 년 전
부모
커밋
c468a080c7
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      roles/haproxy/handlers/main.yml
  2. 2 3
      roles/haproxy/tasks/main.yml

+ 1 - 0
roles/haproxy/handlers/main.yml

@@ -3,3 +3,4 @@
   service:
     name: haproxy
     state: restarted
+  when: not (haproxy_start_result_changed | default(false) | bool)

+ 2 - 3
roles/haproxy/tasks/main.yml

@@ -19,6 +19,5 @@
     enabled: yes
   register: start_result
 
-- name: Pause 30 seconds if haproxy was just started
-  pause: seconds=30
-  when: start_result | changed
+- set_fact:
+    haproxy_start_result_changed: "{{ start_result | changed }}"