forked from dxc-technology/ansible-scaleio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site-no_gui.yml
78 lines (66 loc) · 2.74 KB
/
site-no_gui.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# vim:ft=ansible:
---
- hosts: all
name: "set up facts"
tags: always
vars:
MDM_COUNT: "{{ groups['mdm'] | length }}"
TB_COUNT: "{{ groups['tb'] | length }}"
GW_COUNT: "{{ groups['gateway'] | length }}"
tasks:
- set_fact: scaleio_mdm_primary_ip="{{ hostvars[groups['mdm'][0]]['ansible_'+scaleio_interface]['ipv4']['address'] }}"
- set_fact: scaleio_mdm_primary_hostname="{{ hostvars[groups['mdm'][0]]['inventory_hostname'] }}"
- set_fact: scaleio_mdm_secondary_ip="{{ hostvars[groups['mdm'][1]]['ansible_'+scaleio_interface]['ipv4']['address'] }}"
- set_fact: scaleio_mdm_secondary_hostname="{{ hostvars[groups['mdm'][1]]['inventory_hostname'] }}"
- set_fact: scaleio_mdm_tertiary_ip="{{ hostvars[groups['mdm'][2]]['ansible_'+scaleio_interface]['ipv4']['address'] }}"
when: MDM_COUNT | int > 2
- set_fact: scaleio_mdm_tertiary_hostname="{{ hostvars[groups['mdm'][2]]['inventory_hostname'] }}"
when: MDM_COUNT | int > 2
- set_fact: scaleio_tb_primary_ip="{{ hostvars[groups['tb'][0]]['ansible_'+scaleio_interface]['ipv4']['address'] }}"
- set_fact: scaleio_tb_primary_hostname="{{ hostvars[groups['tb'][0]]['inventory_hostname'] }}"
- set_fact: scaleio_tb_secondary_ip="{{ hostvars[groups['tb'][1]]['ansible_'+scaleio_interface]['ipv4']['address'] }}"
when: TB_COUNT | int > 1
- set_fact: scaleio_tb_secondary_hostname="{{ hostvars[groups['tb'][1]]['inventory_hostname'] }}"
when: TB_COUNT | int > 1
- set_fact: scaleio_mdm_ips="{{ scaleio_mdm_secondary_ip }},{{scaleio_mdm_primary_ip}}"
when: MDM_COUNT | int == 2
- set_fact: scaleio_mdm_ips="{{ scaleio_mdm_secondary_ip }},{{scaleio_mdm_primary_ip}},{{scaleio_mdm_tertiary_ip}}"
when: MDM_COUNT | int > 2
- set_fact: scaleio_gateway_primary_ip='{{ hostvars[groups['gateway'][0]]['ansible_'+scaleio_interface]['ipv4']['address'] }}'
- set_fact: scaleio_gateway_secondary_ip='{{ hostvars[groups['gateway'][1]]['ansible_'+scaleio_interface]['ipv4']['address'] }}'
when: GW_COUNT | int > 1
- hosts: all
name: "Install ScaleIO Common"
roles:
- scaleio-common
tags: scaleio-common
- hosts: mdm
name: "Install and configure ScaleIO MDM"
roles:
- scaleio-mdm
tags: scaleio-mdm
- hosts: tb
name: "Install and configure ScaleIO TB"
roles:
- scaleio-tb
tags: scaleio-tb
- hosts: gateway
name: "Install and configure ScaleIO Gateway"
roles:
- scaleio-gateway
tags: scaleio-gateway
- hosts: sds
name: "Install and configure ScaleIO SDS"
roles:
- scaleio-sds
tags: scaleio-sds
- hosts: lia
name: "Install and configure ScaleIO LIA"
roles:
- scaleio-lia
tags: scaleio-lia
- hosts: sdc
name: "Install and configure ScaleIO SDC"
roles:
- scaleio-sdc
tags: scaleio-sdc