-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathplaybook.yml
31 lines (26 loc) · 1.27 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- hosts: all
sudo: yes
tasks:
- name: install unzip
apt: name=unzip update_cache=yes
- name: install consul
shell: wget https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip
&& unzip 0.4.1_linux_amd64.zip
&& mv consul /usr/local/bin
&& rm 0.4.1_linux_amd64.zip creates=/usr/local/bin/consul
- name: install consul-template
shell: wget https://github.com/hashicorp/consul-template/releases/download/v0.2.0/consul-template_0.2.0_linux_amd64.tar.gz
&& tar xzf consul-template_0.2.0_linux_amd64.tar.gz
&& mv consul-template_0.2.0_linux_amd64/consul-template /usr/local/bin
&& rmdir consul-template_0.2.0_linux_amd64
&& rm consul-template_0.2.0_linux_amd64.tar.gz creates=/usr/local/bin/consul-template
- name: install registretor
shell: wget https://github.com/gliderlabs/registrator/releases/download/v0.4.0/registrator_0.4.0_linux_x86_64.tgz
&& tar xzf registrator_0.4.0_linux_x86_64.tgz
&& mv registrator /usr/local/bin
&& rm registrator_0.4.0_linux_x86_64.tgz creates=/usr/local/bin/registrator
- name: install haproxy
apt: name=haproxy
- name: setup haproxy
command: sed -i -e 's/ENABLED=0/ENABLED=1/' /etc/default/haproxy