solar-resources/resources/riak_node/1.0.0/actions/join.yaml
Jedrzej Nowak 1b28b8f3c4 Change resources structure to match repository one
Change-Id: Ie8d8c092e64890af2f0886303ef3f16752ba5b76
2015-12-18 18:01:20 +01:00

16 lines
621 B
YAML

- hosts: [{{host}}]
sudo: yes
tasks:
- shell: riak-admin cluster join {{join_to}}
ignore_errors: true
register: join_output
# those below are hacky solution for "this node is already member of a cluster
# solar for now lacks logic that would allow to avoid it
- shell: /bin/true
when: join_output|failed and join_output.stdout.find("This node is already a member of a cluster") != -1
- shell: /bin/false
when: join_output|failed and join_output.stdout.find("This node is already a member of a cluster") == -1
- shell: /bin/true
when: join_output|success