forked from SUSE/habootstrap-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
join.sls
35 lines (31 loc) · 913 Bytes
/
join.sls
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
32
33
34
35
{%- from "cluster/map.jinja" import cluster with context -%}
wait-for-cluster:
http.wait_for_successful_query:
- name: 'https://{{ cluster.init }}:7630/monitor?0'
- request_interval: 5
- status: 200
- verify_ssl: false
- wait_for: {{ cluster.join_timeout }}
wait-for-total-initialization:
cmd.run:
- name: 'sleep {{ cluster.wait_for_initialization }}'
- require:
- wait-for-cluster
join-the-cluster:
crm.cluster_joined:
- name: {{ cluster.init }}
{% if cluster.watchdog is defined %}
{% if cluster.watchdog.device is defined %}
- watchdog: {{ cluster.watchdog.device }}
{% endif %}
{% endif %}
{% if cluster.interface is defined %}
- interface: {{ cluster.interface }}
{% endif %}
- require:
- wait-for-total-initialization
hawk:
service.running:
- enable: True
- require:
- join-the-cluster