You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/riak/form_cluster.yml

29 lines
666 B

- hosts: riak_cluster
sudo: True
tasks:
- name: Create a group based on riak node type.
group_by: key={{ node_type }}
- name: collect riak facts
riak: command=ping
register: riak_outputs
- hosts: middle:last
vars:
primary_node: "{{ hostvars[groups['primary'][0]]['riak_outputs']['node_name'] }}"
sudo: True
tasks:
- name: join riak cluster
riak: command=join target_node={{ primary_node }}
- hosts: last
sudo: True
tasks:
- name: plan cluster changes
riak: command=plan
notify:
- commit cluster changes
- wait for handoffs
- wait for ring
handlers:
- include: roles/riak/common/handlers/main.yml