mirror of https://github.com/Aidaho12/haproxy-wi
parent
f959cc61f2
commit
1212285a20
|
@ -17,6 +17,7 @@
|
|||
yum:
|
||||
name: epel-release
|
||||
state: latest
|
||||
disable_gpg_check: yes
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0
|
||||
ignore_errors: yes
|
||||
environment:
|
||||
|
@ -30,6 +31,7 @@
|
|||
- http://repo.haproxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm
|
||||
- socat
|
||||
state: present
|
||||
disable_gpg_check: yes
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0
|
||||
ignore_errors: yes
|
||||
register: install_result
|
||||
|
|
|
@ -5,7 +5,8 @@ After=network.target
|
|||
[Service]
|
||||
EnvironmentFile=-/etc/default/haproxy
|
||||
EnvironmentFile=-/etc/sysconfig/haproxy
|
||||
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
|
||||
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" {% if ansible_facts['distribution_major_version'] != '8' %}"EXTRAOPTS=-S /run/haproxy-master.sock"{% endif %}
|
||||
|
||||
ExecStartPre=/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS
|
||||
ExecStart=/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
|
||||
ExecReload=/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS
|
||||
|
|
Loading…
Reference in New Issue