forked from mpinizzotto/nsx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_antiaffinity.yml
47 lines (40 loc) · 1.28 KB
/
deploy_antiaffinity.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
---
- name: Creating Anti-affinity rules for "{{ targetClusters.cluster1.clusterName }}" cluster
hosts: localhost
connection: local
gather_facts: False
vars_files:
- answerfile_deploy.yml
tasks:
- name: Creating DRS Anti-Affinity Rule for Edge Services Gateways
vmware_vm_vm_drs_rule:
hostname: "{{ vcHostname }}"
username: "{{ vcUser }}"
password: "{{ vcPassword }}"
cluster_name: "{{ targetClusters.cluster1.clusterName }}"
validate_certs: no
vms:
- "{{ esg1.name }}-0"
- "{{ esg2.name }}-0"
drs_rule_name: anti-affinity-rule-esg
enabled: True
mandatory: True
affinity_rule: False
register: esg_affinity
#- debug: var=esg_affinity
- name: Creating DRS Anti-Affinity Rule for DLR Control VMs
vmware_vm_vm_drs_rule:
hostname: "{{ vcHostname }}"
username: "{{ vcUser }}"
password: "{{ vcPassword }}"
cluster_name: "{{ targetClusters.cluster1.clusterName }}"
validate_certs: no
vms:
- "{{ dlr.name }}-0"
#- "{{ dlr.name }}-1"
drs_rule_name: anti-affinity-rule-dlr
enabled: True
mandatory: True
affinity_rule: False
register: dlr_affinity
#- debug: var=dlr_affinity