ansible/roles/haproxy/tasks/package.yml
2021-01-09 20:54:42 +03:00

23 lines
418 B
YAML

---
- 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