ansible/roles/haproxy/tasks/package.yml

23 lines
418 B
YAML
Raw Normal View History

2021-01-09 17:54:42 +00:00
---
- block:
- name: install haproxy
package:
name: haproxy
state: present
- name: add haproxy config
copy:
content: "{{ haproxy_config }}"
dest: "/etc/haproxy/haproxy.cfg"
notify:
- restart haproxy
when: haproxy_config is defined
- name: start haproxy service
systemd:
name: haproxy
state: started
enabled: yes
daemon_reload: yes