|
5 | 5 | ### Facts already available to Ansible |
6 | 6 | # |
7 | 7 | ### Amazon Web Services EC2 Virtual Server. Not applicable for AWS Classic. |
8 | | -# ansible_chassis_asset_tag: "Amazon EC2" # SMBIOS Chassis Asset Tag |
9 | | -# ansible_board_asset_tag: "i-043d3c1a889ed9016" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
10 | | -# ansible_chassis_vendor: "Amazon EC2" |
11 | | -# ansible_product_name: "r5.8xlarge" # IaaS profile name |
12 | | -# ansible_system_vendor: "Amazon EC2" |
| 8 | +# ansible_facts['chassis_asset_tag']: "Amazon EC2" # SMBIOS Chassis Asset Tag |
| 9 | +# ansible_facts['board_asset_tag']: "i-043d3c1a889ed9016" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
| 10 | +# ansible_facts['chassis_vendor']: "Amazon EC2" |
| 11 | +# ansible_facts['product_name']: "r5.8xlarge" # IaaS profile name |
| 12 | +# ansible_facts['system_vendor']: "Amazon EC2" |
13 | 13 | # |
14 | 14 | ### Google Cloud Compute Engine Virtual Machine. |
15 | | -# ansible_chassis_asset_tag: "NA" # SMBIOS Chassis Asset Tag |
16 | | -# ansible_board_asset_tag: "9EAF3038-7EF5-3F1E-6620-FB3BDA7A3709" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
17 | | -# ansible_chassis_vendor: "Google" |
18 | | -# ansible_product_name: "Google Compute Engine" |
19 | | -# ansible_system_vendor: "Google" |
| 15 | +# ansible_facts['chassis_asset_tag']: "NA" # SMBIOS Chassis Asset Tag |
| 16 | +# ansible_facts['board_asset_tag']: "9EAF3038-7EF5-3F1E-6620-FB3BDA7A3709" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
| 17 | +# ansible_facts['chassis_vendor']: "Google" |
| 18 | +# ansible_facts['product_name']: "Google Compute Engine" |
| 19 | +# ansible_facts['system_vendor']: "Google" |
20 | 20 | # |
21 | 21 | ### IBM Cloud Virtual Server. Not applicable for IBM Cloud Classic Infrastructure. |
22 | | -# ansible_chassis_asset_tag: "ibmcloud" # SMBIOS Chassis Asset Tag |
23 | | -# ansible_board_asset_tag: "0c7d4459-xxxx-yyyy-zzzz-abcdefghijkl" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
24 | | -# ansible_chassis_vendor: "IBM:Cloud Compute Server 1.0:mx2-16x128" # IaaS profile name as suffix (after colon) |
25 | | -# ansible_product_name: "Standard PC (i440FX + PIIX, 1996)" |
26 | | -# ansible_system_vendor: "QEMU" |
| 22 | +# ansible_facts['chassis_asset_tag']: "ibmcloud" # SMBIOS Chassis Asset Tag |
| 23 | +# ansible_facts['board_asset_tag']: "0c7d4459-xxxx-yyyy-zzzz-abcdefghijkl" # SMBIOS Baseboard Asset Tag, ID of virtual machine on platform |
| 24 | +# ansible_facts['chassis_vendor']: "IBM:Cloud Compute Server 1.0:mx2-16x128" # IaaS profile name as suffix (after colon) |
| 25 | +# ansible_facts['product_name']: "Standard PC (i440FX + PIIX, 1996)" |
| 26 | +# ansible_facts['system_vendor']: "QEMU" |
27 | 27 | # |
28 | 28 | ### Microsoft Azure Virtual Machine. Not applicable for MS Azure Classic/ASM. |
29 | | -# ansible_chassis_asset_tag: "7783-xxxx-yyyy-zzzz-aaaa-bbbb-cc" # SMBIOS Chassis Asset Tag |
30 | | -# ansible_board_asset_tag: "None" # SMBIOS Baseboard Asset Tag |
31 | | -# ansible_chassis_vendor: "Microsoft Corporation" |
32 | | -# ansible_product_name: "Virtual Machine" |
33 | | -# ansible_system_vendor: "70f4a858-1eea-4c35-b9e1-e179c32fc6b5" # ID of virtual machine on platform |
| 29 | +# ansible_facts['chassis_asset_tag']: "7783-xxxx-yyyy-zzzz-aaaa-bbbb-cc" # SMBIOS Chassis Asset Tag |
| 30 | +# ansible_facts['board_asset_tag']: "None" # SMBIOS Baseboard Asset Tag |
| 31 | +# ansible_facts['chassis_vendor']: "Microsoft Corporation" |
| 32 | +# ansible_facts['product_name']: "Virtual Machine" |
| 33 | +# ansible_facts['system_vendor']: "70f4a858-1eea-4c35-b9e1-e179c32fc6b5" # ID of virtual machine on platform |
34 | 34 | # |
35 | 35 | ### VMware vSphere |
36 | | -# ansible_product_name: "VMware7,1", |
37 | | -# ansible_system_vendor: "VMware, Inc.", |
38 | | -# ansible_virtualization_type: "VMware" |
| 36 | +# ansible_facts['product_name']: "VMware7,1", |
| 37 | +# ansible_facts['system_vendor']: "VMware, Inc.", |
| 38 | +# ansible_facts['virtualization_type']: "VMware" |
39 | 39 | # |
40 | 40 | ### End of comment |
41 | 41 |
|
|
49 | 49 |
|
50 | 50 | - name: "SAP HA Prepare Pacemaker - Check if platform is Amazon Web Services EC2 Virtual Server" |
51 | 51 | when: |
52 | | - - '"amazon" in ansible_system_vendor | lower |
53 | | - or "amazon" in ansible_product_name | lower |
54 | | - or "amazon" in ansible_product_version | lower' |
| 52 | + - '"amazon" in ansible_facts["system_vendor"] | lower |
| 53 | + or "amazon" in ansible_facts["product_name"] | lower |
| 54 | + or "amazon" in ansible_facts["product_version"] | lower' |
55 | 55 | ansible.builtin.set_fact: |
56 | 56 | __sap_ha_pacemaker_cluster_platform: cloud_aws_ec2_vs |
57 | 57 |
|
58 | 58 | - name: "SAP HA Prepare Pacemaker - Check if platform is Google Cloud Compute Engine Virtual Machine" |
59 | 59 | when: |
60 | | - - ansible_product_name == 'Google Compute Engine' |
| 60 | + - ansible_facts['product_name'] == 'Google Compute Engine' |
61 | 61 | ansible.builtin.set_fact: |
62 | 62 | __sap_ha_pacemaker_cluster_platform: cloud_gcp_ce_vm |
63 | 63 |
|
64 | 64 | - name: "SAP HA Prepare Pacemaker - Check if platform is IBM Cloud Virtual Server" |
65 | 65 | when: |
66 | | - - ansible_chassis_asset_tag == 'ibmcloud' |
| 66 | + - ansible_facts['chassis_asset_tag'] == 'ibmcloud' |
67 | 67 | ansible.builtin.set_fact: |
68 | 68 | __sap_ha_pacemaker_cluster_platform: cloud_ibmcloud_vs |
69 | 69 |
|
70 | 70 | - name: "SAP HA Prepare Pacemaker - Check if platform is Microsoft Azure Virtual Machine" |
71 | 71 | when: |
72 | | - - ansible_product_name == 'Virtual Machine' |
73 | | - - ansible_chassis_vendor == 'Microsoft Corporation' |
| 72 | + - ansible_facts['product_name'] == 'Virtual Machine' |
| 73 | + - ansible_facts['chassis_vendor'] == 'Microsoft Corporation' |
74 | 74 | ansible.builtin.set_fact: |
75 | 75 | __sap_ha_pacemaker_cluster_platform: cloud_msazure_vm |
76 | 76 |
|
|
80 | 80 | register: __sap_ha_pacemaker_cluster_power_rsct_check |
81 | 81 | changed_when: false |
82 | 82 | check_mode: false |
83 | | - when: ansible_architecture == "ppc64le" |
| 83 | + when: ansible_facts['architecture'] == "ppc64le" |
84 | 84 |
|
85 | 85 | - name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - Fail if RSCT binary is missing" |
86 | 86 | ansible.builtin.fail: |
87 | 87 | msg: Please install RSCT from IBM Power Systems service and productivity tools repository |
88 | 88 | when: |
89 | | - - ansible_architecture == "ppc64le" |
| 89 | + - ansible_facts['architecture'] == "ppc64le" |
90 | 90 | - __sap_ha_pacemaker_cluster_power_rsct_check.stdout == "" |
91 | 91 |
|
92 | 92 | - name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - Run 'ctgethscid'" |
|
96 | 96 | changed_when: false |
97 | 97 | check_mode: false |
98 | 98 | when: |
99 | | - - ansible_architecture == "ppc64le" |
| 99 | + - ansible_facts['architecture'] == "ppc64le" |
100 | 100 | - __sap_ha_pacemaker_cluster_power_rsct_check.stdout != "" |
101 | 101 |
|
102 | 102 | - name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power Virtual Server from IBM Cloud" |
103 | 103 | when: |
104 | | - - ansible_architecture == "ppc64le" |
| 104 | + - ansible_facts['architecture'] == "ppc64le" |
105 | 105 | - '"ibmcloud" in __sap_ha_pacemaker_cluster_power_rsct_hscid.stdout' |
106 | 106 | ansible.builtin.set_fact: |
107 | 107 | __sap_ha_pacemaker_cluster_platform: cloud_ibmcloud_powervs |
108 | 108 |
|
109 | 109 | - name: "SAP HA Prepare Pacemaker - Check if platform is IBM PowerVM" |
110 | 110 | when: |
111 | | - - ansible_architecture == "ppc64le" |
| 111 | + - ansible_facts['architecture'] == "ppc64le" |
112 | 112 | - '"ibmcloud" not in __sap_ha_pacemaker_cluster_power_rsct_hscid.stdout' |
113 | 113 | ansible.builtin.set_fact: |
114 | 114 | __sap_ha_pacemaker_cluster_platform: hyp_ibmpower_vm |
115 | 115 |
|
116 | 116 | # - name: "SAP HA Prepare Pacemaker - Check if platform is VMware vSphere" |
117 | 117 | # when: |
118 | | -# - ansible_virtualization_type == 'VMware' |
| 118 | +# - ansible_facts['virtualization_type'] == 'VMware' |
119 | 119 | # ansible.builtin.set_fact: |
120 | 120 | # __sap_ha_pacemaker_cluster_platform: hyp_vmware_vsphere_vm |
121 | 121 |
|
|
0 commit comments