d330e39ffd
Ansible has a module to control systemd so we might as well use it. Change-Id: Ic9d704c442db0ef49e00e29260157e8b91de5b30 Signed-off-by: Chuck Short <chucks@redhat.com>
33 lines
753 B
YAML
33 lines
753 B
YAML
---
|
|
#
|
|
# Playbook to bump the number of max "defaults" (vs global) connections through haproxy
|
|
#
|
|
# Versions tested: Newton, Ocata
|
|
#
|
|
# Examples:
|
|
#
|
|
# ansible-playbook -i hosts browbeat/adjustment-haproxy.yml -e 'old_maxconn=4096 new_maxconn=8192'
|
|
#
|
|
|
|
- hosts: controller
|
|
remote_user: "{{ host_remote_user }}"
|
|
gather_facts: false
|
|
vars_files:
|
|
- ../install/group_vars/all.yml
|
|
vars:
|
|
old_maxconn: 4096
|
|
new_maxconn: 8192
|
|
tasks:
|
|
- name: Adjusting haproxy maxconn
|
|
become: true
|
|
replace:
|
|
dest: /etc/haproxy/haproxy.cfg
|
|
regexp: " maxconn {{old_maxconn}}"
|
|
replace: " maxconn {{new_maxconn}}"
|
|
backup: true
|
|
|
|
- name: Reload haproxy
|
|
systemd:
|
|
name: haproxy
|
|
state: reloaded
|