Cleanup HAProxy before re-deploying haproxy
HAProxy should not have an init that loads conf.d files, like it was done on K, and removed in N, during the haproxy installation. Else the installation of the package will fail, because it will load the conf.d files. Change-Id: I345089cc3493b90c1c4fbd2d47c51f83c65c94f4
This commit is contained in:
parent
64d7f6e62a
commit
7547fa4b8f
@ -57,6 +57,7 @@ RUN_TASKS+=("lxc-containers-create.yml")
|
||||
# Setup Infrastructure
|
||||
RUN_TASKS+=("unbound-install.yml")
|
||||
RUN_TASKS+=("repo-install.yml")
|
||||
RUN_TASKS+=("${UPGRADE_UTILS}/haproxy-cleanup.yml")
|
||||
RUN_TASKS+=("haproxy-install.yml")
|
||||
RUN_TASKS+=("memcached-install.yml")
|
||||
RUN_TASKS+=("galera-install.yml")
|
||||
|
BIN
leap-upgrades/upgrade-utilities/haproxy-cleanup.init
Normal file
BIN
leap-upgrades/upgrade-utilities/haproxy-cleanup.init
Normal file
Binary file not shown.
26
leap-upgrades/upgrade-utilities/haproxy-cleanup.yml
Normal file
26
leap-upgrades/upgrade-utilities/haproxy-cleanup.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
- hosts: haproxy
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: Backup haproxy init file
|
||||
fetch:
|
||||
src: /etc/init.d/haproxy
|
||||
dest: "/opt/leap42/haproxy-kilo-{{ ansible_date_time.epoch }}.init"
|
||||
- name: Removing haproxy init
|
||||
file:
|
||||
path: /etc/init.d/haproxy
|
||||
state: absent
|
||||
- name: Override haproxy init with known one
|
||||
unarchive:
|
||||
src: haproxy-cleanup.init
|
||||
dest: /etc/init.d/
|
||||
- name: Ensure permissions for new haproxy init
|
||||
file:
|
||||
path: /etc/init.d/haproxy
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- name: Cleanup haproxy configuration folder
|
||||
file:
|
||||
path: /etc/haproxy/conf.d/
|
||||
state: absent
|
Loading…
x
Reference in New Issue
Block a user