File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ - name : Use the cluster role
3+ hosts : hana # ensure only two hosts!
4+ remote_user : cloudadmin
5+ become : true
6+ # become_user: root
7+ any_errors_fatal : true # any_errors_fatal strongly recommended!
8+
9+ pre_tasks :
10+ - name : Load SAP HANA variables
11+ ansible.builtin.include_vars : ./vars/hana_vars.yaml
12+
13+ - name : Ensure ClusterTools2 is installed
14+ community.general.zypper :
15+ name : ClusterTools2
16+ state : present
17+
18+ vars :
19+ platform : ' aws'
20+ stonith : ' native'
21+ primary : " {{ ansible_play_hosts[0] }}"
22+ virtual_ip : " {{ aws_cluster_ip }}" # the Virtual IP address that the cluster will use.
23+ hacluster_password : ' Example_poor_passwo0rd!'
24+ aws_access_key_id : ' {{ lookup("env", "AWS_ACCESS_KEY_ID") }}' # access key id of the account to be used to perform stonith actions
25+ aws_secret_access_key : ' {{ lookup("env", "AWS_SECRET_ACCESS_KEY") }}' # secret access key of the account to be used to perform stonith actions
26+
27+ hana_sid : " {{ sap_hana_install_sid }}"
28+ hana_instance_number : " {{ sap_hana_install_instance_number }}"
29+ # dual_corosync_rings: true
30+ # enable_hawk: true
31+ roles :
32+ - role : cluster
Original file line number Diff line number Diff line change 11all:
22 vars:
33 use_sbd: $ {use_sbd}
4- aws_route_table : $ {routetable_id}
4+ aws_route_table_id : $ {routetable_id}
55 aws_cluster_ip: $ {virtual_ip}
66 aws_stonith_tag: $ {stonith_tag}
7+ aws_region: $ {region}
78 children:
89 hana:
910 hosts:
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ resource "local_file" "ansible_inventory" {
109109 routetable_id = aws_route_table.route- table.id,
110110 virtual_ip = local.hana_cluster_vip,
111111 stonith_tag = module.hana_node.stonith_tag
112+ region = var.aws_region
112113 })
113114 filename = " inventory.yaml"
114115}
You can’t perform that action at this time.
0 commit comments