Browse Source

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 <hu.zhijiang@zte.com.cn>
(cherry picked from commit 42e146925e)
changes/44/500844/1
Zhijiang Hu 4 years ago
committed by Eduardo Gonzalez
parent
commit
b1b648afe8
  1. 3
      ansible/roles/haproxy/tasks/precheck.yml

3
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'"

Loading…
Cancel
Save