mirror of https://github.com/ceph/ceph-ansible.git
33 lines
579 B
YAML
33 lines
579 B
YAML
---
|
|
- name: Add repository
|
|
apt_repository: >
|
|
repo=ppa:vbernat/haproxy-1.5
|
|
state=present
|
|
|
|
- name: Install haproxy
|
|
apt: >
|
|
name={{ item }}
|
|
state=present
|
|
with_items:
|
|
- haproxy
|
|
- socat
|
|
|
|
- name: Copy default configuration
|
|
copy: >
|
|
src=precise/haproxy
|
|
dest=/etc/default/haproxy
|
|
notify: restart haproxy
|
|
|
|
- name: Create configuration
|
|
template: >
|
|
src=precise/haproxy.cfg
|
|
dest=/etc/haproxy/haproxy.cfg
|
|
backup=yes
|
|
notify: restart haproxy
|
|
|
|
- name: Start and enable haproxy
|
|
service: >
|
|
name=haproxy
|
|
state=started
|
|
enabled=yes
|