ceph-ansible/roles/haproxy/tasks/precise.yml

33 lines
579 B
YAML
Raw Normal View History

---
- name: Add repository
2014-09-05 03:14:11 +08:00
apt_repository: >
repo=ppa:vbernat/haproxy-1.5
2014-09-05 03:14:11 +08:00
state=present
- name: Install haproxy
2014-09-05 03:14:11 +08:00
apt: >
name={{ item }}
state=present
with_items:
- haproxy
- socat
- name: Copy default configuration
2014-09-05 03:14:11 +08:00
copy: >
src=precise/haproxy
dest=/etc/default/haproxy
notify: restart haproxy
- name: Create configuration
2014-09-05 03:14:11 +08:00
template: >
src=precise/haproxy.cfg
dest=/etc/haproxy/haproxy.cfg
backup=yes
notify: restart haproxy
- name: Start and enable haproxy
2014-09-05 03:14:11 +08:00
service: >
name=haproxy
state=started
enabled=yes