Files
solar/resources/riak_node/actions/run.yml
Jedrzej Nowak f18f8d2e02 Idea 1
2015-08-14 15:01:18 +02:00

26 lines
753 B
YAML

- hosts: [{{ip}}]
sudo: yes
tasks:
- shell: curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | sudo bash
- apt:
name: riak
state: present
# - shell: sed -ie "s/127.0.0.1/{{ip}}/g" /etc/riak/riak.conf
- service:
name: riak
state: stopped
- replace:
dest: /etc/riak/riak.conf
regexp: '127.0.0.1'
replace: '0.0.0.0'
- replace:
dest: /etc/riak/riak.conf
regexp: '^nodename = .*\n'
replace: 'nodename = {{riak_name}}\n\n'
# TODO: should use name/hostname instead of ip
- shell: rm -fr /var/lib/riak/kv_vnode/*
- shell: rm -fr /var/lib/riak/ring/*
- service:
name: riak
state: reloaded