From 42e146925ea642ddf9a27340869c19eb4e7be20c Mon Sep 17 00:00:00 2001 From: Zhijiang Hu Date: Fri, 1 Sep 2017 00:51:09 -0400 Subject: [PATCH] Create/delete kolla_keepalived_running only once Currently, kolla_keepalived_running may be created and deleted in parallel which causes prechecks failure. The solution is using run_once = true. Closes-Bug: #1714407 Change-Id: I2ec8fc2e867c87175157af8acc11f57313bfaabe Signed-off-by: Zhijiang Hu --- ansible/roles/haproxy/tasks/precheck.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index bc8840ef76..3e5973205a 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -10,11 +10,13 @@ local_action: file path=/tmp/kolla_keepalived_running state=absent changed_when: False check_mode: no + run_once: true - name: Create empty temp kolla_keepalived_running file local_action: copy content=None dest=/tmp/kolla_keepalived_running mode=0644 changed_when: False check_mode: no + run_once: true - name: Getting hosts who is running keepalived local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_keepalived_running mode=0644 @@ -33,6 +35,7 @@ local_action: file path=/tmp/kolla_keepalived_running state=absent changed_when: False check_mode: no + run_once: true - name: Checking the kolla_external_vip_interface is present fail: "msg='Please check the kolla_external_vip_interface property - interface {{ kolla_external_vip_interface }} not found'"