Use 'become' for haproxy service state setting
Due to the use of delegation to localhost in this task, we also need to set 'become' otherwise the task does not have access to the socket because it's executed as the user running the playbook (zuul). Change-Id: I3da65d9ecdf0a91104b6253466fae80dda01b25f
This commit is contained in:
parent
ee65c9f381
commit
3e1a35e3ca
@ -26,5 +26,11 @@
|
||||
weight: "{{ haproxy_weight | default(omit) }}"
|
||||
delegate_to: "{{ item }}"
|
||||
with_items: "{{ groups['haproxy'] }}"
|
||||
# Due to the use of delegation to localhost
|
||||
# in this task, we also need to set 'become'
|
||||
# otherwise the task does not have access to
|
||||
# the socket because it's executed as the
|
||||
# user running the playbook (zuul).
|
||||
become: yes
|
||||
tags:
|
||||
- common-haproxy
|
||||
|
Loading…
Reference in New Issue
Block a user