Jedrzej Nowak 5176f187b0 Riak cluster 3 nodes example
with haproxy on each node
2015-08-17 20:27:05 +02:00

25 lines
677 B
YAML

- hosts: [{{ip}}]
sudo: yes
tasks:
# those below are mostly for tests
- shell: killall -u riak
ignore_errors: yes
# remove above when non tests
- shell: curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | sudo bash
- apt:
name: riak
state: present
- service:
name: riak
state: stopped
- file: path=/etc/riak/riak.conf state=touch
- template:
src: {{ resource_dir }}/templates/riak.conf
dest: /etc/riak/riak.conf
- shell: rm -fr /var/lib/riak/kv_vnode/*
- shell: rm -fr /var/lib/riak/ring/*
- service:
name: riak
state: reloaded