Add 'become: true' to haproxy validation

The haproxy validation needs to be run as root to get access to the
`/etc/haproxy/haproxy.cfg` file.

Closes-Bug: #1687626
Change-Id: Iad642d1d30811655f6d2f0261b3309250c4f0aea
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud
2017-04-27 16:14:55 +02:00
parent b3a8e20e45
commit fdf3c52d2d

View File

@@ -15,6 +15,7 @@
defaults_timeout_check: '10s'
tasks:
- name: Gather the HAProxy config
become: true
haproxy_conf: path="{{ config_file }}"
- name: Verify global maxconn
fail: msg="The 'global maxconn' value '{{ haproxy_conf.global.maxconn}}' must be greater than {{ global_maxconn_min }}"