k8s-playground/ansible-haproxy.yaml

17 lines
329 B
YAML

---
- hosts: all
tasks:
- name: install haproxy
apt:
name: haproxy
state: present
- name: copy haproxy config
copy:
src: haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
- name: restart haproxy
service:
name: haproxy
state: restarted
enabled: yes