mirror of https://github.com/Aidaho12/haproxy-wi
ansible: fix install tasks for Debian/Ubuntu
parent
d9870d15a0
commit
9896a5ee62
|
@ -3,15 +3,16 @@
|
||||||
yum:
|
yum:
|
||||||
list=haproxy
|
list=haproxy
|
||||||
register: is_installed
|
register: is_installed
|
||||||
|
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS')
|
||||||
|
|
||||||
- name: HAProxy has already installed
|
- name: HAProxy has already installed
|
||||||
debug:
|
debug:
|
||||||
msg: "HAProxy has already installed"
|
msg: "HAProxy has already installed"
|
||||||
when: is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
||||||
|
|
||||||
- name: Exiting
|
- name: Exiting
|
||||||
meta: end_play
|
meta: end_play
|
||||||
when: is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
||||||
|
|
||||||
- name: install HAProxy {{HAPVER}}
|
- name: install HAProxy {{HAPVER}}
|
||||||
yum:
|
yum:
|
||||||
|
@ -107,4 +108,4 @@
|
||||||
- name: Add syn_flood tasks
|
- name: Add syn_flood tasks
|
||||||
include: syn_flood.yml
|
include: syn_flood.yml
|
||||||
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
|
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
yum:
|
yum:
|
||||||
list=keepalived
|
list=keepalived
|
||||||
register: is_installed
|
register: is_installed
|
||||||
|
when: (ansible_facts['os_family'] == "RedHat") or (ansible_facts['os_family'] == 'CentOS')
|
||||||
|
|
||||||
- name: Keepalived has already installed
|
- name: Keepalived has already installed
|
||||||
debug:
|
debug:
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
|
|
||||||
- name: Exiting
|
- name: Exiting
|
||||||
meta: end_play
|
meta: end_play
|
||||||
when: is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
when: (ansible_facts['os_family'] == "RedHat") or (ansible_facts['os_family'] == 'CentOS') and is_installed.results|selectattr("yumstate", "match", "installed")|list|length != 0
|
||||||
|
|
||||||
|
|
||||||
- name: install the latest version of Keepalived
|
- name: install the latest version of Keepalived
|
||||||
|
@ -64,4 +65,4 @@
|
||||||
|
|
||||||
- name: Add syn_flood tasks
|
- name: Add syn_flood tasks
|
||||||
include: ../../haproxy/tasks/syn_flood.yml
|
include: ../../haproxy/tasks/syn_flood.yml
|
||||||
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
|
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
|
||||||
|
|
Loading…
Reference in New Issue