infrastructure/ansible/roles/gateway/tasks/haproxy.yml
Jake Howard 24d11deeae
Update ansible-lint
Required a lot of renaming :(
2020-09-26 17:53:47 +01:00

27 lines
489 B
YAML

- name: Install Haproxy
package:
name: haproxy
become: true
- name: Haproxy config
template:
src: files/haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
validate: /usr/sbin/haproxy -c -- %s
mode: "0644"
backup: yes
become: true
register: haproxy_config
- name: Enable Haproxy
service:
name: haproxy
enabled: true
become: true
- name: Restart Haproxy
service:
name: haproxy
state: restarted
become: true
when: haproxy_config.changed