forked from IBM/ibm-spectrum-scale-install-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
set_json_variables.yml
43 lines (39 loc) · 1.89 KB
/
set_json_variables.yml
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
36
37
38
39
40
41
42
---
#- name: Create the required groups
- hosts: localhost
connection: local
tasks:
- name: Read all intermediate output from Resource Details
include_vars:
file: vars/scale_clusterdefinition.json
register: scale_json
- name: Check valid json file
assert:
that: scale_json.failed == false
msg: >-
scale_clusterdefinition.json is not present in the
vars directory. Make sure that this file is present
in the vars directory along with all required
Ansible scale inventory.
- name: Pass all inputs related to creating Spectrum Scale cluster to all nodes
add_host:
name: "{{ item.fqdn }}"
groups: scale_node
scale_storage: "{{ scale_storage | default(omit) }}"
scale_cluster_quorum: "{{ item.is_quorum_node | default(false) }}"
scale_cluster_manager: "{{ item.is_manager_node | default(false) }}"
scale_cluster_gui: "{{ item.is_gui_server | default(false) }}"
scale_zimon_collector: "{{ item.is_collector_node | default(false) }}"
state: "{{ item.state | default('present') }}"
is_admin_node: "{{ item.is_admin_node | default('true') }}"
scale_nodeclass: "{{ item.scale_nodeclass | default(omit) }}"
scale_config: "{{ scale_config | default(omit) }}"
ansible_ssh_private_key_file: "{{ item.ansible_ssh_private_key_file | default(omit) }}"
scale_cluster_clustername: "{{ scale_cluster.scale_cluster_name | default('gpfs1.local') }}"
scale_cluster_profile_name: "{{ scale_cluster.scale_cluster_profile_name | default(omit) }}"
scale_cluster_profile_dir_path: "{{ scale_cluster.scale_cluster_profile_dir_path | default(omit) }}"
scale_service_gui_start: "{{ scale_cluster.scale_service_gui_start | default(true) }}"
scale_sync_replication_config: "{{ scale_cluster.scale_sync_replication_config | default(false) }}"
loop: "{{ node_details }}"
tags:
- scale_inventory