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

Remove hardcoded HANA installer parameters #195

Merged
merged 1 commit into from
Jan 10, 2024
Merged
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
17 changes: 14 additions & 3 deletions ansible/playbooks/sap-hana-system-replication-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
vars:
is_primary: "{{ ansible_play_hosts[0] == inventory_hostname }}"
hooks_dir: myHooks
sap_hana_install_sid: HDB
sap_hana_install_instance_number: 00
hana_status: unknown

handlers:
Expand All @@ -28,6 +26,19 @@
when: not is_primary

tasks:

- name: Assert that required variables are defined
ansible.builtin.assert:
that: "{{ item }} is defined"
fail_msg: >-
The required variable '{{ item }}' is not defined. This variable must be
defined when using this role.
success_msg: >-
The variable '{{ item }}' is defined.
loop:
- 'sap_hana_install_sid'
- 'sap_hana_install_instance_number'

- name: Ensure hooks directory exists
ansible.builtin.file:
path: "/hana/shared/{{ hooks_dir }}"
Expand All @@ -53,7 +64,7 @@
block:
- name: Ensure ha_dr_provider_SAPHanaSR section exists in global.ini
community.general.ini_file:
path: /usr/sap/HDB/SYS/global/hdb/custom/config/global.ini
path: /usr/sap/{{ sap_hana_install_sid }}/SYS/global/hdb/custom/config/global.ini
section: "{{ item.section }}"
option: "{{ item.key }}"
value: "{{ item.value }}"
Expand Down
Loading