diff --git a/ansible/playbooks/tasks/cluster-bootstrap.yaml b/ansible/playbooks/tasks/cluster-bootstrap.yaml index 0996cb28..9cae4eab 100644 --- a/ansible/playbooks/tasks/cluster-bootstrap.yaml +++ b/ansible/playbooks/tasks/cluster-bootstrap.yaml @@ -317,6 +317,21 @@ - op_default_timeout != '600' - is_primary +- name: Configure AWS EC2 STONITH + ansible.builtin.command: > + crm configure primitive rsc_aws_stonith stonith:external/ec2 + op start interval=0 timeout=180 + op stop interval=0 timeout=180 + op monitor interval=120 timeout=60 + meta target-role=Started + params tag={{ aws_stonith_tag}} pcmk_delay_max=15 + when: + - is_primary + - cloud_platform_is_aws + - not (use_sbd | bool) + register: stonith_config_result + failed_when: "'ERROR' in stonith_config_result.stderr" + - name: Configure cluster IP [aws] ansible.builtin.command: cmd: >- @@ -324,7 +339,7 @@ rsc_ip_HDB_{{ sap_hana_install_sid }}{{ sap_hana_install_instance_number }} ocf:suse:aws-vpc-move-ip params ip={{ aws_cluster_ip }} - routing_table={{ aws_route_table }} + routing_table={{ aws_route_table_id }} interface=eth0 profile=default op start interval=0 timeout=180 diff --git a/terraform/aws/inventory.tmpl b/terraform/aws/inventory.tmpl index e79bff76..5d536a73 100644 --- a/terraform/aws/inventory.tmpl +++ b/terraform/aws/inventory.tmpl @@ -1,9 +1,10 @@ all: vars: use_sbd: ${use_sbd} - aws_route_table: ${routetable_id} + aws_route_table_id: ${routetable_id} aws_cluster_ip: ${virtual_ip} aws_stonith_tag: ${stonith_tag} + aws_region: ${region} children: hana: hosts: diff --git a/terraform/aws/outputs.tf b/terraform/aws/outputs.tf index 51310a20..98edc1e7 100644 --- a/terraform/aws/outputs.tf +++ b/terraform/aws/outputs.tf @@ -108,7 +108,8 @@ resource "local_file" "ansible_inventory" { use_sbd = local.use_sbd, routetable_id = aws_route_table.route-table.id, virtual_ip = local.hana_cluster_vip, - stonith_tag = module.hana_node.stonith_tag + stonith_tag = module.hana_node.stonith_tag, + region = var.aws_region }) filename = "inventory.yaml" }