Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aws native fencing playbook using role #202

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions ansible/playbooks/sap-hana-cluster_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
- name: Use the cluster role
hosts: hana # ensure only two hosts!

Check warning on line 3 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

3:15 [comments] too few spaces before comment
remote_user: cloudadmin
become: true
# become_user: root
any_errors_fatal: true # any_errors_fatal strongly recommended!

Check warning on line 7 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

7:26 [comments] too few spaces before comment

pre_tasks:
- name: Load SAP HANA variables
ansible.builtin.include_vars: ./vars/hana_vars.yaml

- name: Ensure ClusterTools2 is installed
community.general.zypper:
name: ClusterTools2
state: present

vars:
platform: 'aws'
stonith: 'native'
primary: "{{ ansible_play_hosts[0] }}"
virtual_ip: "{{ aws_cluster_ip }}" # the Virtual IP address that the cluster will use.

Check warning on line 22 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

22:40 [comments] too few spaces before comment
hacluster_password: 'Example_poor_passwo0rd!'
aws_access_key_id: '{{ lookup("env", "AWS_ACCESS_KEY_ID") }}' # access key id of the account to be used to perform stonith actions

Check warning on line 24 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

24:67 [comments] too few spaces before comment
aws_secret_access_key: '{{ lookup("env", "AWS_SECRET_ACCESS_KEY") }}' # secret access key of the account to be used to perform stonith actions

Check warning on line 25 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

25:75 [comments] too few spaces before comment

hana_sid: "{{ sap_hana_install_sid }}"
hana_instance_number: "{{ sap_hana_install_instance_number }}"
#dual_corosync_rings: true

Check warning on line 29 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

29:6 [comments] missing starting space in comment
#enable_hawk: true

Check warning on line 30 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

30:6 [comments] missing starting space in comment
roles:
- role: cluster

Check failure on line 32 in ansible/playbooks/sap-hana-cluster_role.yaml

View workflow job for this annotation

GitHub Actions / build

ERROR

the role 'cluster' was not found in /home/runner/work/qe-sap-deployment/qe-sap-deployment/ansible/playbooks/roles:/home/runner/work/qe-sap-deployment/qe-sap-deployment/tools/dummy_roles:/home/runner/work/qe-sap-deployment/qe-sap-deployment/ansible/playbooks
3 changes: 2 additions & 1 deletion terraform/aws/inventory.tmpl
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions terraform/aws/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ resource "local_file" "ansible_inventory" {
routetable_id = aws_route_table.route-table.id,
virtual_ip = local.hana_cluster_vip,
stonith_tag = module.hana_node.stonith_tag
region = var.aws_region
})
filename = "inventory.yaml"
}
Expand Down
Loading