From ad436c53a1d6dadae1eaa46700aebc35cdbd0b6c Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 26 Apr 2022 11:13:09 +0200 Subject: [PATCH 001/375] added sap_hana_rhv_guest --- .github/workflows/ansible-lint.yml | 1 + roles/sap_hana_rhv_guest/README.md | 38 +++++++++ roles/sap_hana_rhv_guest/defaults/main.yml | 14 +++ .../tuned/sap-hana-kvm-guest/haltpoll.sh | 7 ++ .../files/tuned/sap-hana-kvm-guest/tuned.conf | 24 ++++++ .../files/tuned/sap-hana/tuned.conf | 24 ++++++ roles/sap_hana_rhv_guest/handlers/main.yml | 53 ++++++++++++ roles/sap_hana_rhv_guest/meta/main.yml | 53 ++++++++++++ .../tasks/assert-configuration.yml | 16 ++++ .../tasks/assert-set-tuned-profile.yml | 14 +++ .../tasks/configuration.yml | 13 +++ roles/sap_hana_rhv_guest/tasks/main.yml | 37 ++++++++ .../tasks/set-tuned-profile.yml | 85 +++++++++++++++++++ roles/sap_hana_rhv_guest/tests/inventory | 2 + roles/sap_hana_rhv_guest/tests/test.yml | 5 ++ roles/sap_hana_rhv_guest/vars/main.yml | 4 + 16 files changed, 390 insertions(+) create mode 100644 roles/sap_hana_rhv_guest/README.md create mode 100644 roles/sap_hana_rhv_guest/defaults/main.yml create mode 100644 roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh create mode 100644 roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf create mode 100644 roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf create mode 100644 roles/sap_hana_rhv_guest/handlers/main.yml create mode 100644 roles/sap_hana_rhv_guest/meta/main.yml create mode 100644 roles/sap_hana_rhv_guest/tasks/assert-configuration.yml create mode 100644 roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml create mode 100644 roles/sap_hana_rhv_guest/tasks/configuration.yml create mode 100644 roles/sap_hana_rhv_guest/tasks/main.yml create mode 100644 roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml create mode 100644 roles/sap_hana_rhv_guest/tests/inventory create mode 100644 roles/sap_hana_rhv_guest/tests/test.yml create mode 100644 roles/sap_hana_rhv_guest/vars/main.yml diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 8e42e939a..e09227657 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -18,6 +18,7 @@ jobs: ./roles/sap_netweaver_preconfigure ./roles/sap_hana_preconfigure ./roles/sap_hana_install + ./roles/sap_hana_rhv_guest override-deps: | ansible-core==2.12.1 ansible-lint==5.3.2 diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_hana_rhv_guest/README.md new file mode 100644 index 000000000..59030925c --- /dev/null +++ b/roles/sap_hana_rhv_guest/README.md @@ -0,0 +1,38 @@ +sap_hana_rhv_guest +================== + +This role will check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. + +Requirements +------------ + +The roles [sap_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_preconfigure) and [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure). + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +Apache-2.0 + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/sap_hana_rhv_guest/defaults/main.yml b/roles/sap_hana_rhv_guest/defaults/main.yml new file mode 100644 index 000000000..7c5f54967 --- /dev/null +++ b/roles/sap_hana_rhv_guest/defaults/main.yml @@ -0,0 +1,14 @@ +--- +# defaults file for sap_hana_rhv_guest + +#sap_hana_rhv_guest_modify_grub_cmdline_linux: yes +sap_hana_rhv_guest_run_grub2_mkconfig: yes + +sap_hana_rhv_guest_rhv_specific_config: yes + +# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hana_rhv_guest_tsx: "on" + +# fail if assertion is invalid +sap_hana_rhv_guest_ignore_failed_assertion: no diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh b/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh new file mode 100644 index 000000000..e2a14ed3a --- /dev/null +++ b/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ "$1" == "start" ]; then + modprobe cpuidle-haltpoll force +fi + +## Question: Does this also need another "if" checking to see if $1 is "stop" to unload the module? diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf b/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf new file mode 100644 index 000000000..82ad6af4c --- /dev/null +++ b/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf @@ -0,0 +1,24 @@ +# +# tuned configuration +# +[main] +summary=Optimize for running SAP HANA on KVM inside a virtual guest +include=sap-hana + +[haltpoll] +type=script +script=${i:PROFILE_DIR}/haltpoll.sh + +[sysfs] +/sys/devices/system/clocksource/clocksource0/current_clocksource=tsc +/sys/module/haltpoll/parameters/guest_halt_poll_ns=2400000 +/sys/module/haltpoll/parameters/guest_halt_poll_grow_start=2400000 + +[sysctl] +kernel.sched_latency_ns=12000000 +kernel.sched_migration_cost_ns=500000 +kernel.sched_min_granularity_ns=12000000 +kernel.sched_wakeup_granularity_ns=15000000 + +[bootloader] +cmdline_saphana=skew_tick=1 diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf b/roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf new file mode 100644 index 000000000..ba688f97a --- /dev/null +++ b/roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf @@ -0,0 +1,24 @@ +# +# tuned configuration +# +[main] +summary=Optimize for SAP HANA + +[cpu] +force_latency=cstate.id:3|70 +governor=performance +energy_perf_bias=performance +min_perf_pct=100 + +[vm] +transparent_hugepages=never + +[sysctl] +kernel.sem = 32000 1024000000 500 32000 +kernel.numa_balancing = 0 +kernel.sched_min_granularity_ns = 3000000 +kernel.sched_wakeup_granularity_ns = 4000000 +vm.dirty_ratio = 40 +vm.dirty_background_ratio = 10 +vm.swappiness = 10 + diff --git a/roles/sap_hana_rhv_guest/handlers/main.yml b/roles/sap_hana_rhv_guest/handlers/main.yml new file mode 100644 index 000000000..cd8ded1a4 --- /dev/null +++ b/roles/sap_hana_rhv_guest/handlers/main.yml @@ -0,0 +1,53 @@ +--- +# handlers file for sap_hana_rhv_guest + +- name: "Check if server is booted in BIOS or UEFI mode" + stat: + path: /sys/firmware/efi + get_checksum: no + register: efi_exists + listen: "Regenerate grub2 conf handler" + when: + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- debug: + var: efi_exists.stat.exists + listen: "Regenerate grub2 conf handler" + when: + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: command_result + listen: "Regenerate grub2 conf handler" + when: + - not efi_exists.stat.exists + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- debug: + var: command_result.stdout_lines, command_result.stderr_lines + listen: "Regenerate grub2 conf handler" + when: + - not efi_exists.stat.exists + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (UEFI mode)" + command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg + register: command_result + listen: "Regenerate grub2 conf handler" + when: + - efi_exists.stat.exists + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- debug: + var: command_result.stdout_lines, command_result.stderr_lines + listen: "Regenerate grub2 conf handler" + when: + - efi_exists.stat.exists + - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) + +- name: "Reboot handler" + fail: + msg: Reboot is required! + when: sap_hana_rhv_guest_fail_if_reboot_required|d(true) + diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_hana_rhv_guest/meta/main.yml new file mode 100644 index 000000000..1e68c3ee4 --- /dev/null +++ b/roles/sap_hana_rhv_guest/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: Nils Koenig + description: Provide the configuration for a SAP HANA guest on RHV + company: Red Hat + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: Apache-2.0 + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + diff --git a/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml b/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml new file mode 100644 index 000000000..f86e33fe7 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml @@ -0,0 +1,16 @@ +--- +# tasks file for sap-hana-rhv-hypervisor + +- name: Get kernel command line + command: cat /proc/cmdline + register: __sap_hana_rhv_guest_register_kernelcmdline_assert + + +- name: Assert - check Kernel command line + block: + - assert: + that: "'tsx=on' in __sap_hana_rhv_guest_register_kernelcmdline_assert.stdout" + fail_msg: "FAIL: tsx=on not on Kernel command line" + success_msg: "PASS: tsx=on on Kernel command line" + ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" + diff --git a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml new file mode 100644 index 000000000..82b1d2f78 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml @@ -0,0 +1,14 @@ +- name: Assert - Check tuned profile + block: + - name: Get tuned profile + command: tuned-adm active + register: __sap_hana_rhv_guest_register_tuned_profile_assert + + - name: Verify tuned profile + assert: + that: "'Current active profile: sap-hana-kvm-host' in __sap_hana_rhv_guest_register_tuned_profile_assert.stdout" + fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" + success_msg: "PASS: tuned profile is sap-hana-kvm-guest" + ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" + + diff --git a/roles/sap_hana_rhv_guest/tasks/configuration.yml b/roles/sap_hana_rhv_guest/tasks/configuration.yml new file mode 100644 index 000000000..05cd3bee3 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tasks/configuration.yml @@ -0,0 +1,13 @@ +- name: Set TSX + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - "tsx={{ sap_hana_rhv_guest_tsx }}" + notify: "Regenerate grub2 conf handler" + tags: grubconfig + diff --git a/roles/sap_hana_rhv_guest/tasks/main.yml b/roles/sap_hana_rhv_guest/tasks/main.yml new file mode 100644 index 000000000..4d7ad8061 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tasks/main.yml @@ -0,0 +1,37 @@ +--- +# tasks file for sap_hana_rhv_guest + +- name: Trigger tuned profile sap-hana-kvm-guest activation + include_tasks: set-tuned-profile.yml + +- name: Set TSX + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - "tsx={{ sap_hana_rhv_guest_tsx }}" + notify: "Regenerate grub2 conf handler" + tags: grubconfig +- name: Display the role path + debug: + var: role_path + +- name: Set filename prefix to empty string if role is run in normal mode + set_fact: + __sap_hana_rhv_guest_fact_assert_prefix: "" + when: not sap_hana_rhv_guest_assert|d(false) + +- name: Prepend filename with assert string if role is run in assert mode + set_fact: + __sap_hana_rhv_guest_fact_assert_prefix: "assert-" + when: sap_hana_rhv_hypervisor_assert|d(false) + +- include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}configuration.yml' + +- include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}set-tuned-profile.yml' + + diff --git a/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml new file mode 100644 index 000000000..2ec77b978 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml @@ -0,0 +1,85 @@ + +- name: Create tuned profile directory /usr/lib/tuned/sap-hana + file: + path: /usr/lib/tuned/sap-hana + state: directory + +- name: Create sap-hana tuned profile + copy: + dest: "/usr/lib/tuned/sap-hana/tuned.conf" + content: | + # + # tuned configuration + # + [main] + summary=Optimize for SAP HANA + + [cpu] + force_latency=cstate.id:3|70 + governor=performance + energy_perf_bias=performance + min_perf_pct=100 + + [vm] + transparent_hugepages=never + + [sysctl] + kernel.sem = 32000 1024000000 500 32000 + kernel.numa_balancing = 0 + kernel.sched_min_granularity_ns = 3000000 + kernel.sched_wakeup_granularity_ns = 4000000 + vm.dirty_ratio = 40 + vm.dirty_background_ratio = 10 + vm.swappiness = 10 + + +- name: Create tuned profile directory /usr/lib/tuned/sap-hana-kvm-guest + file: + path: /usr/lib/tuned/sap-hana-kvm-guest + state: directory + +- name: Add haltpoll.sh for tuned sap-hana-kvm-guest + copy: + dest: "/usr/lib/tuned/sap-hana-kvm-guest/haltpoll.sh" + mode: 0744 + content: | + #!/bin/bash + + if [ "$1" == "start" ]; then + modprobe cpuidle-haltpoll force + fi + + ## Question: Does this also need another "if" checking to see if $1 is "stop" to unload the module? + + +- name: Create sap-hana-kvm-guest tuned profile + copy: + dest: "/usr/lib/tuned/sap-hana-kvm-guest/tuned.conf" + content: | + # + # tuned configuration + # + [main] + summary=Optimize for running SAP HANA on KVM inside a virtual guest + include=sap-hana + + [haltpoll] + type=script + script=${i:PROFILE_DIR}/haltpoll.sh + + [sysfs] + /sys/devices/system/clocksource/clocksource0/current_clocksource=tsc + /sys/module/haltpoll/parameters/guest_halt_poll_ns=2400000 + /sys/module/haltpoll/parameters/guest_halt_poll_grow_start=2400000 + + [sysctl] + kernel.sched_latency_ns=12000000 + kernel.sched_migration_cost_ns=500000 + kernel.sched_min_granularity_ns=12000000 + kernel.sched_wakeup_granularity_ns=15000000 + + [bootloader] + cmdline_saphana=skew_tick=1 + +- name: Activate tuned profile + command: tuned-adm profile sap-hana-kvm-guest diff --git a/roles/sap_hana_rhv_guest/tests/inventory b/roles/sap_hana_rhv_guest/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/roles/sap_hana_rhv_guest/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/sap_hana_rhv_guest/tests/test.yml b/roles/sap_hana_rhv_guest/tests/test.yml new file mode 100644 index 000000000..13a0c039c --- /dev/null +++ b/roles/sap_hana_rhv_guest/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - sap_hana_rhv_guest diff --git a/roles/sap_hana_rhv_guest/vars/main.yml b/roles/sap_hana_rhv_guest/vars/main.yml new file mode 100644 index 000000000..f6e874c03 --- /dev/null +++ b/roles/sap_hana_rhv_guest/vars/main.yml @@ -0,0 +1,4 @@ +--- +# vars file for sap_hana_rhv_guest +# + From 61b3314134ace13f00c5297536b60b046652fc8a Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 26 Apr 2022 11:57:49 +0200 Subject: [PATCH 002/375] test only rhv_guest role --- .github/workflows/ansible-lint.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index e09227657..742fe83cc 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -14,10 +14,10 @@ jobs: uses: ansible/ansible-lint-action@master with: targets: | - ./roles/sap_general_preconfigure - ./roles/sap_netweaver_preconfigure - ./roles/sap_hana_preconfigure - ./roles/sap_hana_install +# ./roles/sap_general_preconfigure +# ./roles/sap_netweaver_preconfigure +# ./roles/sap_hana_preconfigure +# ./roles/sap_hana_install ./roles/sap_hana_rhv_guest override-deps: | ansible-core==2.12.1 From b2545645bee6b83a7a2fbb8d63d8f97df6c45f2c Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 26 Apr 2022 12:02:33 +0200 Subject: [PATCH 003/375] change order of roles for ansible-lint --- .github/workflows/ansible-lint.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index c861abdb2..13412687b 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -14,11 +14,12 @@ jobs: uses: ansible/ansible-lint-action@main with: targets: | -# ./roles/sap_general_preconfigure -# ./roles/sap_netweaver_preconfigure -# ./roles/sap_hana_preconfigure -# ./roles/sap_hana_install ./roles/sap_hana_rhv_guest + ./roles/sap_general_preconfigure + ./roles/sap_netweaver_preconfigure + ./roles/sap_hana_preconfigure + ./roles/sap_hana_install + override-deps: | ansible==5.3.0 ansible-lint==5.3.2 From 4475826b1a422a58eb06f60ade7036a60570aa0d Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 26 Apr 2022 12:10:32 +0200 Subject: [PATCH 004/375] added workflows for rhv_guest role --- .../ansible-lint sap_hana_rhv_guest.yml | 27 ++++++++++++++++ .github/workflows/ansible-lint.yml | 3 +- .../workflows/yamllint-sap_hana_rhv_guest.yml | 32 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ansible-lint sap_hana_rhv_guest.yml create mode 100644 .github/workflows/yamllint-sap_hana_rhv_guest.yml diff --git a/.github/workflows/ansible-lint sap_hana_rhv_guest.yml b/.github/workflows/ansible-lint sap_hana_rhv_guest.yml new file mode 100644 index 000000000..b3cdcde6d --- /dev/null +++ b/.github/workflows/ansible-lint sap_hana_rhv_guest.yml @@ -0,0 +1,27 @@ +name: Ansible Lint for sap_hana_rhv_guest + +on: + push: + paths: + - 'roles/sap_hana_rhv_guest/**' + pull_request: + paths: + - 'roles/sap_hana_rhv_guest/**' +jobs: + ansible-lint: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Lint Ansible Playbook + uses: ansible/ansible-lint-action@main + with: + targets: | + ./roles/sap_hana_rhv_guest + override-deps: | + ansible==5.3.0 + ansible-lint==5.3.2 + +# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 13412687b..9e6784af2 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -14,12 +14,11 @@ jobs: uses: ansible/ansible-lint-action@main with: targets: | - ./roles/sap_hana_rhv_guest ./roles/sap_general_preconfigure ./roles/sap_netweaver_preconfigure ./roles/sap_hana_preconfigure ./roles/sap_hana_install - + ./roles/sap_hana_rhv_guest override-deps: | ansible==5.3.0 ansible-lint==5.3.2 diff --git a/.github/workflows/yamllint-sap_hana_rhv_guest.yml b/.github/workflows/yamllint-sap_hana_rhv_guest.yml new file mode 100644 index 000000000..652ede1ea --- /dev/null +++ b/.github/workflows/yamllint-sap_hana_rhv_guest.yml @@ -0,0 +1,32 @@ +name: yamllint-sap_hana_rhv_guest + +on: + push: + branches: [ main ] + paths: + - 'roles/sap_hana_rhv_guest/**' + pull_request: + branches: [ main ] + paths: + - 'roles/sap_hana_rhv_guest/**' + + workflow_dispatch: + +jobs: + # This workflow contains a single job called "build" + yamllint: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Install dependencies + run: pip install yamllint + + # Runs a set of commands using the runners shell + - name: yamllint + run: yamllint ./roles/sap_hana_rhv_guest From 289f0bdb7af2bb7df97f38fc29b8780b7d044f80 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Mon, 2 May 2022 12:45:13 +0200 Subject: [PATCH 005/375] yamllint changes --- roles/sap_hana_rhv_guest/handlers/main.yml | 2 +- roles/sap_hana_rhv_guest/meta/main.yml | 3 +-- roles/sap_hana_rhv_guest/vars/main.yml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/roles/sap_hana_rhv_guest/handlers/main.yml b/roles/sap_hana_rhv_guest/handlers/main.yml index cd8ded1a4..63d3cdbc7 100644 --- a/roles/sap_hana_rhv_guest/handlers/main.yml +++ b/roles/sap_hana_rhv_guest/handlers/main.yml @@ -50,4 +50,4 @@ fail: msg: Reboot is required! when: sap_hana_rhv_guest_fail_if_reboot_required|d(true) - +... diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_hana_rhv_guest/meta/main.yml index 1e68c3ee4..639def17d 100644 --- a/roles/sap_hana_rhv_guest/meta/main.yml +++ b/roles/sap_hana_rhv_guest/meta/main.yml @@ -49,5 +49,4 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. - + # if you add dependencies to this list. diff --git a/roles/sap_hana_rhv_guest/vars/main.yml b/roles/sap_hana_rhv_guest/vars/main.yml index f6e874c03..85f16f0b9 100644 --- a/roles/sap_hana_rhv_guest/vars/main.yml +++ b/roles/sap_hana_rhv_guest/vars/main.yml @@ -1,4 +1,4 @@ --- # vars file for sap_hana_rhv_guest # - +... From e9d8bfcea28bb796cc2d583c6fc370844e03f503 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Mon, 2 May 2022 12:57:42 +0200 Subject: [PATCH 006/375] more yamllint suggestions --- roles/sap_hana_rhv_guest/meta/main.yml | 2 ++ roles/sap_hana_rhv_guest/tasks/assert-configuration.yml | 3 +-- roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml | 4 ++-- roles/sap_hana_rhv_guest/tasks/configuration.yml | 5 +++-- roles/sap_hana_rhv_guest/tasks/main.yml | 4 ++-- roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml | 5 +++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_hana_rhv_guest/meta/main.yml index 639def17d..6693b0bc7 100644 --- a/roles/sap_hana_rhv_guest/meta/main.yml +++ b/roles/sap_hana_rhv_guest/meta/main.yml @@ -1,3 +1,4 @@ +--- galaxy_info: author: Nils Koenig description: Provide the configuration for a SAP HANA guest on RHV @@ -50,3 +51,4 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, # if you add dependencies to this list. +... diff --git a/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml b/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml index f86e33fe7..43388f09b 100644 --- a/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml +++ b/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml @@ -5,7 +5,6 @@ command: cat /proc/cmdline register: __sap_hana_rhv_guest_register_kernelcmdline_assert - - name: Assert - check Kernel command line block: - assert: @@ -13,4 +12,4 @@ fail_msg: "FAIL: tsx=on not on Kernel command line" success_msg: "PASS: tsx=on on Kernel command line" ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" - +... diff --git a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml index 82b1d2f78..985f856dd 100644 --- a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml @@ -1,3 +1,4 @@ +--- - name: Assert - Check tuned profile block: - name: Get tuned profile @@ -10,5 +11,4 @@ fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" success_msg: "PASS: tuned profile is sap-hana-kvm-guest" ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" - - +... diff --git a/roles/sap_hana_rhv_guest/tasks/configuration.yml b/roles/sap_hana_rhv_guest/tasks/configuration.yml index 05cd3bee3..04f72bd7c 100644 --- a/roles/sap_hana_rhv_guest/tasks/configuration.yml +++ b/roles/sap_hana_rhv_guest/tasks/configuration.yml @@ -1,3 +1,4 @@ +--- - name: Set TSX lineinfile: path: /etc/default/grub @@ -7,7 +8,7 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "tsx={{ sap_hana_rhv_guest_tsx }}" + - "tsx={{ sap_hana_rhv_guest_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig - +... diff --git a/roles/sap_hana_rhv_guest/tasks/main.yml b/roles/sap_hana_rhv_guest/tasks/main.yml index 4d7ad8061..291be2137 100644 --- a/roles/sap_hana_rhv_guest/tasks/main.yml +++ b/roles/sap_hana_rhv_guest/tasks/main.yml @@ -16,6 +16,7 @@ - "tsx={{ sap_hana_rhv_guest_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig + - name: Display the role path debug: var: role_path @@ -33,5 +34,4 @@ - include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}configuration.yml' - include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}set-tuned-profile.yml' - - +... diff --git a/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml index 2ec77b978..dc54bd316 100644 --- a/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml +++ b/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml @@ -1,4 +1,4 @@ - +--- - name: Create tuned profile directory /usr/lib/tuned/sap-hana file: path: /usr/lib/tuned/sap-hana @@ -79,7 +79,8 @@ kernel.sched_wakeup_granularity_ns=15000000 [bootloader] - cmdline_saphana=skew_tick=1 + cmdline_saphana=skew_tick=1 - name: Activate tuned profile command: tuned-adm profile sap-hana-kvm-guest +... From 5548a3661a0f3da7d4758e2de8f910a5725865f7 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 15:24:47 +0200 Subject: [PATCH 007/375] added sap_hana_rhv_hypervisor --- .../ansible-lint sap_hana_rhv_hypervisor.yml | 27 + .../yamllint-sap_hana_rhv_hypervisor.yml | 32 + roles/sap_hana_rhv_hypervisor/README.md | 40 + .../sap_hana_rhv_hypervisor/defaults/main.yml | 26 + roles/sap_hana_rhv_hypervisor/files/50_hana | 65 + .../sap_hana_rhv_hypervisor/files/50_hana_old | 66 + .../files/50_iothread_pinning | 65 + .../files/50_iothread_pinning_old | 65 + .../sap_hana_rhv_hypervisor/handlers/main.yml | 53 + roles/sap_hana_rhv_hypervisor/meta/main.yml | 56 + .../tasks/allocate-hugepages-at-runtime.yml | 68 + .../tasks/assert-configuration.yml | 131 + .../tasks/assert-installation.yml | 14 + .../tasks/assert-rhv-hooks.yml | 35 + .../tasks/assert-set-tuned-profile.yml | 14 + .../tasks/configuration.yml | 130 + .../tasks/installation.yml | 5 + roles/sap_hana_rhv_hypervisor/tasks/main.yml | 26 + .../tasks/rhv-hooks.yml | 11 + .../tasks/set-tuned-profile.yml | 35 + roles/sap_hana_rhv_hypervisor/tests/inventory | 2 + roles/sap_hana_rhv_hypervisor/tests/test.yml | 5 + roles/sap_hana_rhv_hypervisor/tmp | 7045 +++++++++++++++++ roles/sap_hana_rhv_hypervisor/vars/main.yml | 10 + 24 files changed, 8026 insertions(+) create mode 100644 .github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml create mode 100644 .github/workflows/yamllint-sap_hana_rhv_hypervisor.yml create mode 100644 roles/sap_hana_rhv_hypervisor/README.md create mode 100644 roles/sap_hana_rhv_hypervisor/defaults/main.yml create mode 100644 roles/sap_hana_rhv_hypervisor/files/50_hana create mode 100644 roles/sap_hana_rhv_hypervisor/files/50_hana_old create mode 100644 roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning create mode 100644 roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old create mode 100644 roles/sap_hana_rhv_hypervisor/handlers/main.yml create mode 100644 roles/sap_hana_rhv_hypervisor/meta/main.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/configuration.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/installation.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/main.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tests/inventory create mode 100644 roles/sap_hana_rhv_hypervisor/tests/test.yml create mode 100644 roles/sap_hana_rhv_hypervisor/tmp create mode 100644 roles/sap_hana_rhv_hypervisor/vars/main.yml diff --git a/.github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml b/.github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml new file mode 100644 index 000000000..78bb6c3e8 --- /dev/null +++ b/.github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml @@ -0,0 +1,27 @@ +name: Ansible Lint for sap_hana_rhv_hypervisor + +on: + push: + paths: + - 'roles/sap_hana_rhv_hypervisor/**' + pull_request: + paths: + - 'roles/sap_hana_rhv_hypervisor/**' +jobs: + ansible-lint: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Lint Ansible Playbook + uses: ansible/ansible-lint-action@main + with: + targets: | + ./roles/sap_hana_rhv_hypervisor + override-deps: | + ansible==5.3.0 + ansible-lint==5.3.2 + +# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/yamllint-sap_hana_rhv_hypervisor.yml b/.github/workflows/yamllint-sap_hana_rhv_hypervisor.yml new file mode 100644 index 000000000..1d1ee4d86 --- /dev/null +++ b/.github/workflows/yamllint-sap_hana_rhv_hypervisor.yml @@ -0,0 +1,32 @@ +name: yamllint-sap_hana_rhv_hypervisor + +on: + push: + branches: [ main ] + paths: + - 'roles/sap_hana_rhv_hypervisor/**' + pull_request: + branches: [ main ] + paths: + - 'roles/sap_hana_rhv_hypervisor/**' + + workflow_dispatch: + +jobs: + # This workflow contains a single job called "build" + yamllint: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Install dependencies + run: pip install yamllint + + # Runs a set of commands using the runners shell + - name: yamllint + run: yamllint ./roles/sap_hana_rhv_hypervisor diff --git a/roles/sap_hana_rhv_hypervisor/README.md b/roles/sap_hana_rhv_hypervisor/README.md new file mode 100644 index 000000000..23985d949 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/README.md @@ -0,0 +1,40 @@ +sap-hana-rhv-hypervisor +======================= + +TODO + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/defaults/main.yml new file mode 100644 index 000000000..e4d90aeb2 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/defaults/main.yml @@ -0,0 +1,26 @@ +--- +# defaults file for sap_hana_rhv_hypervisor + +#sap_hana_rhv_hypervisor_modify_grub_cmdline_linux: yes +sap_hana_rhv_hypervisor_run_grub2_mkconfig: yes + +#sap_hana_rhv_hypervisor_rhv_specific_config: yes + +# Reserve memory [GB] for hypervisor host +sap_hana_rhv_hypervisor_reserved_ram: 100 + +# allocate hugepages: {static|runtime} +# static: done at kernel command line which is slow, but safe +# runtime: done through tuned-profile +sap_hana_rhv_hypervisor_reserve_hugepages: static + +# kvm.nx_huge_pages: {"auto"|"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hana_rhv_hypervisor_kvm_nx_huge_pages: "auto" + +# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hana_rhv_hypervisor_tsx: "off" + +# fail if assertion is invalid +sap_hana_rhv_hypervisor_ignore_failed_assertion: no diff --git a/roles/sap_hana_rhv_hypervisor/files/50_hana b/roles/sap_hana_rhv_hypervisor/files/50_hana new file mode 100644 index 000000000..23f550efa --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/files/50_hana @@ -0,0 +1,65 @@ +#!/usr/bin/python3 + +import os +import sys +import traceback + +import hooking + +''' +Syntax: +hana=1 (value doesn't matter) + +The VM must be configured as High Performance with 1GB hugepages. +For that the following kernel boot line is required for the hypervisor: + +"default_hugepagesz=1GB hugepagesz=1GB hugepages=[# hugepages needed]" + +In addition the "hugepages" custom property needs to be set to 1048576. +''' + + +if 'hana' in os.environ: + try: + domxml = hooking.read_domxml() + domain = domxml.getElementsByTagName('domain')[0] + if not len(domain.getElementsByTagName('memoryBacking')): + sys.stderr.write('hugepages: VM is no High Performance VM\n') + sys.exit(0) + + if len(domain.getElementsByTagName('cpu')): + cpu = domain.getElementsByTagName('cpu')[0] + feature_tsc = domxml.createElement('feature') + feature_tsc.setAttribute('policy', 'require') + feature_tsc.setAttribute('name', 'invtsc') + feature_rdt = domxml.createElement('feature') + feature_rdt.setAttribute('policy', 'require') + feature_rdt.setAttribute('name', 'rdtscp') + feature_x2apic = domxml.createElement('feature') + feature_x2apic.setAttribute('policy', 'require') + feature_x2apic.setAttribute('name', 'x2apic') + feature_lvl3 = domxml.createElement('cache') + feature_lvl3.setAttribute('level','3') + feature_lvl3.setAttribute('mode','emulate') + cpu.appendChild(feature_tsc) + cpu.appendChild(feature_rdt) + cpu.appendChild(feature_lvl3) + cpu.appendChild(feature_x2apic) + + if len(domain.getElementsByTagName('clock')): + clock = domain.getElementsByTagName('clock')[0] + tscClock = domxml.createElement('clock') + tscClock.setAttribute('offset', 'utc') + timer = domxml.createElement('timer') + timer.setAttribute('name','tsc') + # Uncomment and adjust for live migration (adjust frequency to match the lowest value in your cluster) + #timer.setAttribute('frequency','2494140000') + tscClock.appendChild(timer) + domain.removeChild(clock) + domain.appendChild(tscClock) + + hooking.write_domxml(domxml) + except Exception: + sys.stderr.write('highperf hook: [unexpected error]: %s\n' % + traceback.format_exc()) + sys.exit(2) diff --git a/roles/sap_hana_rhv_hypervisor/files/50_hana_old b/roles/sap_hana_rhv_hypervisor/files/50_hana_old new file mode 100644 index 000000000..bd8a33ccf --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/files/50_hana_old @@ -0,0 +1,66 @@ +#!/usr/bin/python3 + +import os +import sys +import traceback + +import hooking + +''' +Syntax: +hana=1 (value doesn't matter) + +The VM must be configured as High Performance with 1GB hugepages. +For that the following kernel boot line is required for the hypervisor: + +"default_hugepagesz=1GB hugepagesz=1GB hugepages=[# hugepages needed]" + +In addition the "hugepages" custom property needs to be set to 1048576. +''' + + +if 'hana' in os.environ: + try: + domxml = hooking.read_domxml() + domain = domxml.getElementsByTagName('domain')[0] + if not len(domain.getElementsByTagName('memoryBacking')): + sys.stderr.write('hugepages: VM is no High Performance VM\n') + sys.exit(0) + + if len(domain.getElementsByTagName('cpu')): + cpu = domain.getElementsByTagName('cpu')[0] + feature_tsc = domxml.createElement('feature') + feature_tsc.setAttribute('policy', 'require') + feature_tsc.setAttribute('name', 'invtsc') + feature_rdt = domxml.createElement('feature') + feature_rdt.setAttribute('policy', 'require') + feature_rdt.setAttribute('name', 'rdtscp') + feature_x2apic = domxml.createElement('feature') + feature_x2apic.setAttribute('policy', 'require') + feature_x2apic.setAttribute('name', 'x2apic') + feature_lvl3 = domxml.createElement('cache') + feature_lvl3.setAttribute('level','3') + feature_lvl3.setAttribute('mode','emulate') + cpu.appendChild(feature_tsc) + cpu.appendChild(feature_rdt) + cpu.appendChild(feature_lvl3) + cpu.appendChild(feature_x2apic) + + if len(domain.getElementsByTagName('clock')): + clock = domain.getElementsByTagName('clock')[0] + tscClock = domxml.createElement('clock') + tscClock.setAttribute('offset', 'utc') + timer = domxml.createElement('timer') + timer.setAttribute('name','tsc') + # Uncomment and adjust for live migration (adjust frequency to match the lowest value in your cluster) + #timer.setAttribute('frequency','2494140000') + tscClock.appendChild(timer) + domain.removeChild(clock) + domain.appendChild(tscClock) + + hooking.write_domxml(domxml) + except Exception: + sys.stderr.write('highperf hook: [unexpected error]: %s\n' % + traceback.format_exc()) + sys.exit(2) + diff --git a/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning b/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning new file mode 100644 index 000000000..1a7d70d9c --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning @@ -0,0 +1,65 @@ +#!/usr/bin/python3 + +import os +import sys +import traceback + +import hooking + +''' +Syntax: +iothread=, + +This hook will bind the iothread in RHV to the named core(s). +A maximum of 2 Cores is allowed, ideally pinned to the core (plus its hyperthread) that is bound to the Interrupt +Allowed syntax is also a range - as well as a mix. +engine-config -s UserDefinedVMProperties='iothread=^[0-9,-]+$' --cver=4.2 +''' + + +if 'iothread' in os.environ: + try: + iopin = os.environ['iothread']; + domxml = hooking.read_domxml() + domain = domxml.getElementsByTagName('domain')[0] + if len(domain.getElementsByTagName('iothreads')): + if len(domain.getElementsByTagName('iothreadids')): + iothreadids = domain.getElementsByTagName('iothreadids')[0] + else: + iothreadids = domxml.createElement('iothreadids') + domain.appendChild(iothreadids) + + if len(iothreadids.getElementsByTagName('iothread')): + ids = iothreadids.getElementsByTagName('iothread')[0] + else: + ids = domxml.createElement('iothread') + iothreadids.appendChild(ids) + ids.setAttribute('id', '1') + + if len(domain.getElementsByTagName('cputune')): + cputune = domain.getElementsByTagName('cputune')[0] + else: + cputune = domxml.createElement('cputune') + domain.appendChile(cputune) + + if len(cputune.getElementsByTagName('iothreadpin')): + iothreadpin = cputune.getElementsByTagName('iothreadpin')[0] + else: + iothreadpin = domxml.createElement('iothreadpin') + cputune.appendChild(iothreadpin) + iothreadpin.setAttribute('iothread', '1') + iothreadpin.setAttribute('cpuset', iopin) + + if len(cputune.getElementsByTagName('emulatorpin')): + emulatorpin = cputune.getElementsByTagName('emulatorpin')[0] + else: + emulatorpin = domxml.createElement('emulatorpin') + cputune.appendChild(emulatorpin) + emulatorpin.setAttribute('cpuset', iopin) + + hooking.write_domxml(domxml) + except Exception: + sys.stderr.write('iothreads hook: [unexpected error]: %s\n' % + traceback.format_exc()) + sys.exit(2) + diff --git a/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old b/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old new file mode 100644 index 000000000..ed4ff1238 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old @@ -0,0 +1,65 @@ +#!/usr/bin/python2 + +import os +import sys +import traceback + +import hooking + +''' +Syntax: +iothread=, + +This hook will bind the iothread in RHV to the named core(s). +A maximum of 2 Cores is allowed, ideally pinned to the core (plus its hyperthread) that is bound to the Interrupt +Allowed syntax is also a range - as well as a mix. +engine-config -s UserDefinedVMProperties='iothread=^[0-9,-]+$' --cver=4.2 +''' + + +if 'iothread' in os.environ: + try: + iopin = os.environ['iothread']; + domxml = hooking.read_domxml() + domain = domxml.getElementsByTagName('domain')[0] + if len(domain.getElementsByTagName('iothreads')): + if len(domain.getElementsByTagName('iothreadids')): + iothreadids = domain.getElementsByTagName('iothreadids')[0] + else: + iothreadids = domxml.createElement('iothreadids') + domain.appendChild(iothreadids) + + if len(iothreadids.getElementsByTagName('iothread')): + ids = iothreadids.getElementsByTagName('iothread')[0] + else: + ids = domxml.createElement('iothread') + iothreadids.appendChild(ids) + ids.setAttribute('id', '1') + + if len(domain.getElementsByTagName('cputune')): + cputune = domain.getElementsByTagName('cputune')[0] + else: + cputune = domxml.createElement('cputune') + domain.appendChile(cputune) + + if len(cputune.getElementsByTagName('iothreadpin')): + iothreadpin = cputune.getElementsByTagName('iothreadpin')[0] + else: + iothreadpin = domxml.createElement('iothreadpin') + cputune.appendChild(iothreadpin) + iothreadpin.setAttribute('iothread', '1') + iothreadpin.setAttribute('cpuset', iopin) + + if len(cputune.getElementsByTagName('emulatorpin')): + emulatorpin = cputune.getElementsByTagName('emulatorpin')[0] + else: + emulatorpin = domxml.createElement('emulatorpin') + cputune.appendChild(emulatorpin) + emulatorpin.setAttribute('cpuset', iopin) + + hooking.write_domxml(domxml) + except Exception: + sys.stderr.write('iothreads hook: [unexpected error]: %s\n' % + traceback.format_exc()) + sys.exit(2) + diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml new file mode 100644 index 000000000..d4f124697 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/handlers/main.yml @@ -0,0 +1,53 @@ +--- +# handlers file for sap_hana_rhv_hypervisor + +- name: "Check if server is booted in BIOS or UEFI mode" + stat: + path: /sys/firmware/efi + get_checksum: no + register: efi_exists + listen: "Regenerate grub2 conf handler" + when: + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- debug: + var: efi_exists.stat.exists + listen: "Regenerate grub2 conf handler" + when: + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: command_result + listen: "Regenerate grub2 conf handler" + when: + - not efi_exists.stat.exists + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- debug: + var: command_result.stdout_lines, command_result.stderr_lines + listen: "Regenerate grub2 conf handler" + when: + - not efi_exists.stat.exists + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (UEFI mode)" + command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg + register: command_result + listen: "Regenerate grub2 conf handler" + when: + - efi_exists.stat.exists + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- debug: + var: command_result.stdout_lines, command_result.stderr_lines + listen: "Regenerate grub2 conf handler" + when: + - efi_exists.stat.exists + - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + +- name: "Reboot handler" + fail: + msg: Reboot is required! + when: sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) + diff --git a/roles/sap_hana_rhv_hypervisor/meta/main.yml b/roles/sap_hana_rhv_hypervisor/meta/main.yml new file mode 100644 index 000000000..cd6d35b4e --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/meta/main.yml @@ -0,0 +1,56 @@ +galaxy_info: + + role_name: sap_hana_rhv_hypervisor + author: Nils Koenig + description: Provide the configuration for a RHV hypervisor for SAP HANA + company: Red Hat + #namespace: my_galaxy_namespace + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: GPL-2.0-or-later + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml new file mode 100644 index 000000000..c832dcde4 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml @@ -0,0 +1,68 @@ +#libhugetlbfs-utils +#libhugetlbfs +#hugeadm --pool-pages-min 1G:5920 +# +- name: Install libhugetlbfs + yum: + name: libhugetlbfs, libhugetlbfs-utils + state: present + + +#XXX better location than rc.local? +- name: Add hugepage allocation to /etc/rc.local + blockinfile: + path: /etc/rc.local + marker: "" + block: | + hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hana_rhv_hypervisor_reserved_ram }}"}') + +- name: Set default hugepage size + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - default_hugepagesz=1GB + - hugepagesz=1GB + notify: "Regenerate grub2 conf handler" + tags: grubconfig + + +#XXX not working +##- name: Add allocate_hugepages.sh for tuned sap-hana-kvm-host +# copy: +# dest: "/usr/lib/tuned/sap-hana-kvm-host/allocate_hugepages.sh" +# mode: 0744 +# content: | +# #!/bin/bash +# +# if [ "$1" == "start" ]; then +# hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hana_rhv_hypervisor_reserved_ram }}"}') +# fi +# +# if [ "$1" == "stop" ]; then +# hugeadm --pool-pages-min 1G:0 +# fi + + +#- name: Add hugepage allocation to tuned profile sap-hana-kvm-host +# blockinfile: +# path: /usr/lib/tuned/sap-hana-kvm-host/tuned.conf +# marker: "" +# block: | +# [allocate_hugepage] +# type=script +# script=${i:PROFILE_DIR}/allocate_hugepages.sh + +#- name: Customize sap-hana-kvm-host tuned by setting reserved memory +# replace: +# path: /usr/lib/tuned/sap-hana-kvm-host/allocate_hugepages.sh +# regexp: "" +# replace: "{{ sap_hana_rhv_hypervisor_reserved_ram }}" + +#- name: Re-set tuned profile sap-hana-kvm-host +# command: tuned-adm profile sap-hana-kvm-host + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml new file mode 100644 index 000000000..61ade7e5a --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml @@ -0,0 +1,131 @@ +--- +# tasks file for sap_hana_rhv_hypervisor + +- name: Get kernel command line + command: cat /proc/cmdline + register: __sap_hana_rhv_hypervisor_kernelcmdline_assert + +- name: "Assert - Kernel same page merging (KSM): Get status" + shell: systemctl status ksm + register: __sap_hana_rhv_hypervisor_ksmstatus_assert + ignore_errors: yes + +- name: "Assert - Kernel same page merging (KSM): Check if stopped" + assert: + that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmstatus_assert.stdout" + fail_msg: "FAIL: ksm is running" + success_msg: "PASS: ksm not running" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + +- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Get status" + shell: systemctl status ksmtuned + register: __sap_hana_rhv_hypervisor_ksmtunedstatus_assert + ignore_errors: yes + +- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Check if stopped" + assert: + that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmtunedstatus_assert.stdout" + fail_msg: "FAIL: ksmtuned is running" + success_msg: "PASS: ksmtuned not running" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + +- name: Check CPU Stepping + shell: lscpu | awk '/Stepping/{print $2}' + register: __sap_hana_rhv_hypervisor_cpu_stepping_output_assert + +- set_fact: + __sap_hana_rhv_hypervisor_cpu_stepping_assert: "{{ __sap_hana_rhv_hypervisor_cpu_stepping_output_assert.stdout }}" + +- name: Print CPU Stepping + debug: + var: __sap_hana_rhv_hypervisor_cpu_stepping_assert + +# skylake: +- name: Assert - Check Intel Skylake CPU Platform + block: + - name: Get ple_gap + command: grep -E '^options\s+kvm_intel.*?ple_gap\s*=\s*0.*$' /etc/modprobe.d/kvm.conf + register: __sap_hana_rhv_hypervisor_skylake_plegap_assert + ignore_errors: yes + + - name: Assert - Check if ple_gap=0 + assert: + that: "__sap_hana_rhv_hypervisor_skylake_plegap_assert.rc == 0" + fail_msg: "FAIL: ple_gap is not set to 0" + success_msg: "PASS: ple_gap is set to 0" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + - name: Assert - Check for spectre_v2=retpoline + assert: + that: "'spectre_v2=retpoline' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" + fail_msg: "FAIL: spectre_v2=retpoline is not on Kernel command line" + success_msg: "PASS: spectre_v2=retpoline is on Kernel command line" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + when: __sap_hana_rhv_hypervisor_cpu_stepping_assert == "4" + + +- name: Assert - check sap_hana_rhv_hypervisor_nx_huge_pages + block: + - name: "Assert - Check kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" + assert: + that: "'kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_nx_huge_pages }}' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" + fail_msg: "FAIL: kvm.nx_huge_pages is not {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" + success_msg: "PASS: kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + when: sap_hana_rhv_hypervisor_nx_huge_pages is defined + +- name: Assert - check seccomp_sanbox=0 + block: + - command: grep -E '^seccomp_sandbox\s+=\s+0.*$' /etc/libvirt/qemu.conf + register: __sap_hana_rhv_hypervisor_seccomp_assert + ignore_errors: yes + + - name: "Assert - Check seccomp_sanbox=0 is in /etc/libvirt/qemu.conf" + assert: + that: "{{ __sap_hana_rhv_hypervisor_seccomp_assert.rc }} == 0" + fail_msg: "FAIL: seccomp_sandbox != 0" + success_msg: "PASS: seccomp_sanbox == 0" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + +- name: Assert - check amount of 1G hugepages + block: + - name: Get amount of 1G hugepages + shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' + register: __sap_hana_rhv_hypervisor_1Ghugepages_assert + + - name: "Check that at least {{ sap_hana_rhv_hypervisor_reserved_ram }} GB are available for the hypervisor and the rest are 1G hugepages" + assert: + that: "{{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} >= {{ __sap_hana_rhv_hypervisor_1Ghugepages_assert.stdout }}" + fail_msg: "FAIL: Not enough memory reserved for hypervisor" + success_msg: "PASS: Enough memory reserved for hypervisor" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + +- name: Assert - check Kernel command line + block: + - assert: + that: "'intel_iommu=on' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" + fail_msg: "FAIL: intel_iommu=on not on Kernel command line" + success_msg: "PASS: intel_iommu=on on Kernel command line" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + + - assert: + that: "'iommu=pt' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" + fail_msg: "FAIL: iommu=pt not on Kernel command line" + success_msg: "PASS: iommu=pt on Kernel command line" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + - assert: + that: "'tsx=off' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" + fail_msg: "FAIL: tsx=off not on Kernel command line" + success_msg: "PASS: tsx=off on Kernel command line" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + +#- name: Trigger tuned profile sap-hana-kvm activation +# include_tasks: set-tuned-profile.yml +# +##### install hooks: HP, cpufreq diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml new file mode 100644 index 000000000..4d1ba3653 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml @@ -0,0 +1,14 @@ +- name: Gather package facts + package_facts: + + +- name: Assert that all required packages are installed + assert: + that: "'{{ line_item }}' in ansible_facts.packages" + fail_msg: "FAIL: Package '{{ line_item }}' is not installed!" + success_msg: "PASS: Package '{{ line_item }}' is installed." + with_items: + - "{{ sap_hana_rhv_hypervisor_packages }}" + loop_control: + loop_var: line_item + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml new file mode 100644 index 000000000..9f7326fb3 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml @@ -0,0 +1,35 @@ +- name: Check file permissions + command: "stat -c%a /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + register: __sap_hana_rhv_hypervisor_register_file_permissions_assert + +- name: Assert hook file permissions + assert: + that: "__sap_hana_rhv_hypervisor_register_file_permissions_assert.stdout == '755'" + fail_msg: "FAIL: Hook {{ item }} does not have the correct file permissions (!= 755)." + success_msg: "PASS: Hook {{ item }} does have the correct file permissions (755)." + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + +- name: Create tmp dir + file: + path: /tmp/sap_hana_rhv_hypervisor + state: directory + +- name: Copy hook for checking + copy: + dest: "/tmp/sap_hana_rhv_hypervisor/{{ item }}" + src: "{{ item }}" + +- name: Diff hook + command: "diff -uw /tmp/sap_hana_rhv_hypervisor/{{ item }} /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + register: __sap_hana_rhv_hypervisor_register_hook_diff_assert + ignore_errors: yes + +- name: Assert hook content + assert: + that: "__sap_hana_rhv_hypervisor_register_hook_diff_assert.rc == 0" + fail_msg: "FAIL: Hook {{ item }} has been modified, please investigate manually." + success_msg: "PASS: Hook {{ item }} not modified" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml new file mode 100644 index 000000000..e4186b2b9 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml @@ -0,0 +1,14 @@ +- name: Assert - Check tuned profile + block: + - name: Get tuned profile + command: tuned-adm active + register: __sap_hana_rhv_hypervisor_tuned_profile_assert + + - name: Verify tuned profile + assert: + that: "'Current active profile: sap-hana-kvm-host' in __sap_hana_rhv_hypervisor_tuned_profile_assert.stdout" + fail_msg: "FAIL: tuned profile is not sap-hana-kvm-host" + success_msg: "PASS: tuned profile is sap-hana-kvm-host" + ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml new file mode 100644 index 000000000..13c831e70 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -0,0 +1,130 @@ +--- +# tasks file for sap_hana_rhv_hypervisor + +- name: Test if kernel same page merging (KSM) exists + shell: systemctl cat ksm + register: ksm + ignore_errors: yes + +- name: Test if kernel same page merging (KSM) tuning daemon exists + shell: systemctl cat ksmtuned + register: ksmtuned + ignore_errors: yes + +- name: Stop kernel same page merging (KSM) + shell: systemctl stop ksm + when: ksm.rc == 0 + +- name: Disable kernel same page merging (KSM) + shell: systemctl disable ksm + when: ksm.rc == 0 + +- name: Stop Kernel Samepage Merging (KSM) Tuning Daemon + shell: systemctl stop ksmtuned + when: ksmtuned.rc == 0 + +- name: Disable Kernel Samepage Merging (KSM) Tuning Daemon + shell: systemctl disable ksmtuned + when: ksmtuned.rc == 0 + +- name: Check CPU Stepping + shell: lscpu | awk '/Stepping/{print $2}' + register: cpu_stepping_output + +- set_fact: + cpu_stepping: "{{ cpu_stepping_output.stdout }}" + +- name: Print CPU Stepping + shell: echo "{{ cpu_stepping }}" + +# skylake: +- name: Set ple_gap=0 on Intel Skylake CPU Platform + lineinfile: + path: /etc/modprobe.d/kvm.conf + line: options kvm_intel ple_gap=0 + when: cpu_stepping == "4" + +# skylake +- name: Set spectre_v2=retpoline on Intel Skylake CPU Platform + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - "spectre_v2=retpoline" + notify: "Regenerate grub2 conf handler" + tags: grubconfig + when: cpu_stepping == "4" + +- name: "Set kvm.nx_huge_pages to {{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - "kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" + notify: "Regenerate grub2 conf handler" + tags: grubconfig + when: sap_hana_rhv_hypervisor_kvm_nx_huge_pages is defined + +- name: Set seccomp_sanbox=0 + lineinfile: + path: /etc/libvirt/qemu.conf + backup: yes + backrefs: yes + state: present + regexp: 'seccomp_sandbox' + line: "seccomp_sandbox = 0" + +- name: Trigger tuned profile sap-hana-kvm activation + include_tasks: allocate-hugepages-at-runtime.yml + when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" + +- name: Reserve Hugepages statically + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - default_hugepagesz=1GB + - hugepagesz=1GB + - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} + notify: "Regenerate grub2 conf handler" + tags: grubconfig + when: sap_hana_rhv_hypervisor_reserve_hugepages == "static" + +- name: Enable IOMMU PT + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - intel_iommu=on + - iommu=pt + notify: "Regenerate grub2 conf handler" + tags: grubconfig + +- name: Enable TSX + lineinfile: + path: /etc/default/grub + backup: yes + backrefs: yes + state: present + regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' + line: "\\1 {{ item }}\"" + with_items: + - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" + notify: "Regenerate grub2 conf handler" + tags: grubconfig diff --git a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml new file mode 100644 index 000000000..ede99f18b --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml @@ -0,0 +1,5 @@ +- name: Ensure required packages are installed + package: + state: present + name: "{{ sap_hana_rhv_hypervisor_packages }}" + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/main.yml b/roles/sap_hana_rhv_hypervisor/tasks/main.yml new file mode 100644 index 000000000..316ef49ff --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/main.yml @@ -0,0 +1,26 @@ +- name: Display the role path + debug: + var: role_path + +- name: Set filename prefix to empty string if role is run in normal mode + set_fact: + assert_prefix: "" + when: not sap_hana_rhv_hypervisor_assert|d(false) + +- name: Prepend filename with assert string if role is run in assert mode + set_fact: + assert_prefix: "assert-" + when: sap_hana_rhv_hypervisor_assert|d(false) + +- include_tasks: '{{ assert_prefix }}installation.yml' + +- include_tasks: '{{ assert_prefix }}configuration.yml' + +- include_tasks: '{{ assert_prefix }}set-tuned-profile.yml' + +- include_tasks: "{{ assert_prefix }}rhv-hooks.yml" + loop: + - 50_hana + - 50_iothread_pinning + + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml new file mode 100644 index 000000000..5cb55f127 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml @@ -0,0 +1,11 @@ +- name: Create hook dir + file: + path: /usr/libexec/vdsm/hooks/before_vm_start + state: directory + +- name: Copy hook + copy: + dest: "/usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + src: "{{ item }}" + mode: '0755' + diff --git a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml new file mode 100644 index 000000000..dc1fcf823 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml @@ -0,0 +1,35 @@ +- name: Create tuned profile directory /usr/lib/tuned/sap-hana-kvm-host + file: + path: /usr/lib/tuned/sap-hana-kvm-host + state: directory + +- name: Create sap-hana-kvm-host tuned profile + copy: + dest: "/usr/lib/tuned/sap-hana-kvm-host/tuned.conf" + content: | + # + # tuned configuration + # + [main] + summary=Optimize for running as KVM host for SAP HANA as virtual guest + include=throughput-performance + + [sysctl] + # Start background writeback (via writeback threads) at this percentage (system + # default is 10%) + vm.dirty_background_ratio = 5 + + # The total time the scheduler will consider a migrated process + # "cache hot" and thus less likely to be re-migrated + # (system default is 500000, i.e. 0.5 ms) + kernel.sched_migration_cost_ns = 5000000 + + [cpu] + # Setting C3 state sleep mode/power savings on X86 + # and force_latency=70 on Power + force_latency=cstate.id:3|70 + + + +- name: Activate tuned profile + command: tuned-adm profile sap-hana-kvm-host diff --git a/roles/sap_hana_rhv_hypervisor/tests/inventory b/roles/sap_hana_rhv_hypervisor/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/sap_hana_rhv_hypervisor/tests/test.yml b/roles/sap_hana_rhv_hypervisor/tests/test.yml new file mode 100644 index 000000000..4d2890efb --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - sap-hana-rhv-hypervisor \ No newline at end of file diff --git a/roles/sap_hana_rhv_hypervisor/tmp b/roles/sap_hana_rhv_hypervisor/tmp new file mode 100644 index 000000000..9daff9871 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/tmp @@ -0,0 +1,7045 @@ +root@lu0553 | SUCCESS => { + "ansible_facts": { + "ansible_;vdsmdummy;": { + "active": false, + "device": ";vdsmdummy;", + "features": { + "esp_hw_offload": "off [fixed]", + "esp_tx_csum_hw_offload": "off [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "on [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "off [fixed]", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "off [fixed]", + "rx_vlan_offload": "off [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "off [fixed]", + "tx_checksumming": "on", + "tx_esp_segmentation": "on", + "tx_fcoe_segmentation": "on", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "on", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "on [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "on", + "tx_sctp_segmentation": "on", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "on", + "tx_tcp_mangleid_segmentation": "on", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "on", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "on", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "id": "8000.000000000000", + "interfaces": [], + "macaddress": "52:b5:23:fe:5a:24", + "mtu": 1500, + "promisc": false, + "stp": false, + "timestamping": [ + "rx_software", + "software" + ], + "type": "bridge" + }, + "ansible_all_ipv4_addresses": [ + "10.76.34.58", + "192.168.1.53" + ], + "ansible_all_ipv6_addresses": [ + "fe80::e643:4bff:fe77:f6aa" + ], + "ansible_apparmor": { + "status": "disabled" + }, + "ansible_architecture": "x86_64", + "ansible_bios_date": "11/26/2019", + "ansible_bios_version": "2.4.8", + "ansible_cmdline": { + "BOOT_IMAGE": "(hd0,msdos1)/vmlinuz-4.18.0-193.el8.x86_64", + "crashkernel": "auto", + "null": true, + "quiet": true, + "resume": "UUID=3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711", + "rhgb": true, + "ro": true, + "root": "UUID=952091b8-47df-4344-b5be-a6936e202686" + }, + "ansible_date_time": { + "date": "2020-12-21", + "day": "21", + "epoch": "1608552935", + "hour": "07", + "iso8601": "2020-12-21T12:15:35Z", + "iso8601_basic": "20201221T071535714964", + "iso8601_basic_short": "20201221T071535", + "iso8601_micro": "2020-12-21T12:15:35.714964Z", + "minute": "15", + "month": "12", + "second": "35", + "time": "07:15:35", + "tz": "EST", + "tz_offset": "-0500", + "weekday": "Monday", + "weekday_number": "1", + "weeknumber": "51", + "year": "2020" + }, + "ansible_default_ipv4": { + "address": "10.76.34.58", + "alias": "ovirtmgmt", + "broadcast": "10.76.35.255", + "gateway": "10.76.34.1", + "interface": "ovirtmgmt", + "macaddress": "e4:43:4b:77:f6:aa", + "mtu": 1500, + "netmask": "255.255.254.0", + "network": "10.76.34.0", + "type": "bridge" + }, + "ansible_default_ipv6": {}, + "ansible_device_links": { + "ids": { + "dm-0": [ + "dm-name-36000d31005771c00000000000000004d", + "dm-uuid-mpath-36000d31005771c00000000000000004d", + "scsi-36000d31005771c00000000000000004d", + "wwn-0x6000d31005771c00000000000000004d" + ], + "dm-1": [ + "dm-name-36000d31005771c00000000000000004f", + "dm-uuid-mpath-36000d31005771c00000000000000004f", + "scsi-36000d31005771c00000000000000004f", + "wwn-0x6000d31005771c00000000000000004f" + ], + "dm-10": [ + "dm-name-36000d31005771c000000000000000052", + "dm-uuid-mpath-36000d31005771c000000000000000052", + "scsi-36000d31005771c000000000000000052", + "wwn-0x6000d31005771c000000000000000052" + ], + "dm-11": [ + "dm-name-36000d31005771c000000000000000054", + "dm-uuid-mpath-36000d31005771c000000000000000054", + "scsi-36000d31005771c000000000000000054", + "wwn-0x6000d31005771c000000000000000054" + ], + "dm-12": [ + "dm-name-rhel-root", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXo8Ajg3EHNKvSQHjXhWx6XDIBkvg6Ean" + ], + "dm-13": [ + "dm-name-rhel-home", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkT9IAQknV1nyVlqAZcfx42011xl62XqsrB" + ], + "dm-14": [ + "dm-name-rhel-swap", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXvps4lNUwZ2iUG8Vh7cEYncubi2mGRzz" + ], + "dm-2": [ + "dm-name-36000d31005771c000000000000000051", + "dm-uuid-mpath-36000d31005771c000000000000000051", + "scsi-36000d31005771c000000000000000051", + "wwn-0x6000d31005771c000000000000000051" + ], + "dm-3": [ + "dm-name-36000d31005771c00000000000000004d1", + "dm-uuid-part1-mpath-36000d31005771c00000000000000004d", + "scsi-36000d31005771c00000000000000004d-part1", + "wwn-0x6000d31005771c00000000000000004d-part1" + ], + "dm-4": [ + "dm-name-36000d31005771c000000000000000053", + "dm-uuid-mpath-36000d31005771c000000000000000053", + "scsi-36000d31005771c000000000000000053", + "wwn-0x6000d31005771c000000000000000053" + ], + "dm-5": [ + "dm-name-36000d31005771c000000000000000055", + "dm-uuid-mpath-36000d31005771c000000000000000055", + "scsi-36000d31005771c000000000000000055", + "wwn-0x6000d31005771c000000000000000055" + ], + "dm-6": [ + "dm-name-36000d31005771c000000000000000035", + "dm-uuid-mpath-36000d31005771c000000000000000035", + "scsi-36000d31005771c000000000000000035", + "wwn-0x6000d31005771c000000000000000035" + ], + "dm-7": [ + "dm-name-36000d31005771c000000000000000037", + "dm-uuid-mpath-36000d31005771c000000000000000037", + "scsi-36000d31005771c000000000000000037", + "wwn-0x6000d31005771c000000000000000037" + ], + "dm-8": [ + "dm-name-36000d31005771c000000000000000050", + "dm-uuid-mpath-36000d31005771c000000000000000050", + "scsi-36000d31005771c000000000000000050", + "wwn-0x6000d31005771c000000000000000050" + ], + "dm-9": [ + "dm-name-36000d31005771c000000000000000037p1", + "dm-uuid-part1-mpath-36000d31005771c000000000000000037", + "scsi-36000d31005771c000000000000000037-part1", + "wwn-0x6000d31005771c000000000000000037-part1" + ], + "nvme0n1": [ + "nvme-INTEL_SSDPEDMD020T4D_HHHL_NVMe_2000GB_CVFT619600E82P0EGN", + "nvme-nvme.8086-43564654363139363030453832503045474e-494e54454c205353445045444d44303230543444204848484c204e564d6520323030304742-00000001" + ], + "sda": [ + "ata-MTFDDAV240TCB_1850217D184A", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A", + "scsi-3500a0751217d184a", + "scsi-SATA_MTFDDAV240TCB_1850217D184A", + "wwn-0x500a0751217d184a" + ], + "sda1": [ + "ata-MTFDDAV240TCB_1850217D184A-part1", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part1", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part1", + "scsi-3500a0751217d184a-part1", + "scsi-SATA_MTFDDAV240TCB_1850217D184A-part1", + "wwn-0x500a0751217d184a-part1" + ], + "sda2": [ + "ata-MTFDDAV240TCB_1850217D184A-part2", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part2", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part2", + "scsi-3500a0751217d184a-part2", + "scsi-SATA_MTFDDAV240TCB_1850217D184A-part2", + "wwn-0x500a0751217d184a-part2" + ], + "sdb": [ + "ata-MTFDDAV240TCB_1850217D1801", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801", + "scsi-3500a0751217d1801", + "scsi-SATA_MTFDDAV240TCB_1850217D1801", + "wwn-0x500a0751217d1801" + ], + "sdb1": [ + "ata-MTFDDAV240TCB_1850217D1801-part1", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part1", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part1", + "scsi-3500a0751217d1801-part1", + "scsi-SATA_MTFDDAV240TCB_1850217D1801-part1", + "wwn-0x500a0751217d1801-part1" + ], + "sdb2": [ + "ata-MTFDDAV240TCB_1850217D1801-part2", + "lvm-pv-uuid-ZXaYjf-CCgI-5UmT-KZDs-2ASN-8IF2-10YUO2", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part2", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part2", + "scsi-3500a0751217d1801-part2", + "scsi-SATA_MTFDDAV240TCB_1850217D1801-part2", + "wwn-0x500a0751217d1801-part2" + ] + }, + "labels": {}, + "masters": { + "dm-0": [ + "dm-3" + ], + "dm-7": [ + "dm-9" + ], + "sdaa": [ + "dm-11" + ], + "sdab": [ + "dm-8" + ], + "sdac": [ + "dm-7" + ], + "sdad": [ + "dm-10" + ], + "sdae": [ + "dm-8" + ], + "sdaf": [ + "dm-11" + ], + "sdag": [ + "dm-10" + ], + "sdah": [ + "dm-11" + ], + "sdai": [ + "dm-7" + ], + "sdaj": [ + "dm-8" + ], + "sdak": [ + "dm-10" + ], + "sdal": [ + "dm-11" + ], + "sdam": [ + "dm-0" + ], + "sdan": [ + "dm-1" + ], + "sdao": [ + "dm-2" + ], + "sdap": [ + "dm-4" + ], + "sdaq": [ + "dm-5" + ], + "sdar": [ + "dm-6" + ], + "sdas": [ + "dm-0" + ], + "sdat": [ + "dm-0" + ], + "sdau": [ + "dm-0" + ], + "sdav": [ + "dm-1" + ], + "sdaw": [ + "dm-1" + ], + "sdax": [ + "dm-1" + ], + "sday": [ + "dm-0" + ], + "sdaz": [ + "dm-1" + ], + "sdb2": [ + "dm-12", + "dm-13", + "dm-14" + ], + "sdba": [ + "dm-2" + ], + "sdbb": [ + "dm-4" + ], + "sdbc": [ + "dm-5" + ], + "sdbd": [ + "dm-6" + ], + "sdbe": [ + "dm-7" + ], + "sdbf": [ + "dm-8" + ], + "sdbg": [ + "dm-10" + ], + "sdbh": [ + "dm-11" + ], + "sdbi": [ + "dm-2" + ], + "sdbj": [ + "dm-2" + ], + "sdbk": [ + "dm-2" + ], + "sdbl": [ + "dm-4" + ], + "sdbm": [ + "dm-4" + ], + "sdbn": [ + "dm-4" + ], + "sdbo": [ + "dm-5" + ], + "sdbp": [ + "dm-5" + ], + "sdbq": [ + "dm-5" + ], + "sdbr": [ + "dm-6" + ], + "sdbs": [ + "dm-6" + ], + "sdbt": [ + "dm-6" + ], + "sdc": [ + "dm-0" + ], + "sdd": [ + "dm-1" + ], + "sde": [ + "dm-2" + ], + "sdf": [ + "dm-4" + ], + "sdg": [ + "dm-5" + ], + "sdh": [ + "dm-6" + ], + "sdi": [ + "dm-7" + ], + "sdj": [ + "dm-8" + ], + "sdk": [ + "dm-10" + ], + "sdl": [ + "dm-11" + ], + "sdm": [ + "dm-7" + ], + "sdn": [ + "dm-8" + ], + "sdo": [ + "dm-10" + ], + "sdp": [ + "dm-11" + ], + "sdq": [ + "dm-7" + ], + "sdr": [ + "dm-8" + ], + "sds": [ + "dm-0" + ], + "sdt": [ + "dm-1" + ], + "sdu": [ + "dm-2" + ], + "sdv": [ + "dm-4" + ], + "sdw": [ + "dm-5" + ], + "sdx": [ + "dm-6" + ], + "sdy": [ + "dm-10" + ], + "sdz": [ + "dm-7" + ] + }, + "uuids": { + "dm-12": [ + "0bf93490-3219-48a8-992a-b47b7284dc17" + ], + "dm-13": [ + "7aff2114-e7ac-4d95-8231-06797baf7e43" + ], + "dm-14": [ + "650d95c9-89de-4d38-bd10-5d08fdad3a9d" + ], + "dm-3": [ + "3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711" + ], + "dm-9": [ + "7b87aa88-713f-44c2-afaf-697480c04298" + ], + "sda1": [ + "96dd8b2b-f855-48c5-8467-1635a6ada2c9" + ], + "sda2": [ + "952091b8-47df-4344-b5be-a6936e202686" + ], + "sdb1": [ + "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" + ] + } + }, + "ansible_devices": { + "dm-0": { + "holders": [ + "36000d31005771c00000000000000004d1" + ], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c00000000000000004d", + "dm-uuid-mpath-36000d31005771c00000000000000004d", + "scsi-36000d31005771c00000000000000004d", + "wwn-0x6000d31005771c00000000000000004d" + ], + "labels": [], + "masters": [ + "dm-3" + ], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c00000000000000004d" + }, + "dm-1": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c00000000000000004f", + "dm-uuid-mpath-36000d31005771c00000000000000004f", + "scsi-36000d31005771c00000000000000004f", + "wwn-0x6000d31005771c00000000000000004f" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c00000000000000004f" + }, + "dm-10": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000052", + "dm-uuid-mpath-36000d31005771c000000000000000052", + "scsi-36000d31005771c000000000000000052", + "wwn-0x6000d31005771c000000000000000052" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000052" + }, + "dm-11": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000054", + "dm-uuid-mpath-36000d31005771c000000000000000054", + "scsi-36000d31005771c000000000000000054", + "wwn-0x6000d31005771c000000000000000054" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000054" + }, + "dm-12": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-rhel-root", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXo8Ajg3EHNKvSQHjXhWx6XDIBkvg6Ean" + ], + "labels": [], + "masters": [], + "uuids": [ + "0bf93490-3219-48a8-992a-b47b7284dc17" + ] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "", + "sectors": "437395456", + "sectorsize": "512", + "serial": "1850217D1801", + "size": "208.57 GB", + "support_discard": "4096", + "vendor": null, + "virtual": 1 + }, + "dm-13": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-rhel-home", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkT9IAQknV1nyVlqAZcfx42011xl62XqsrB" + ], + "labels": [], + "masters": [], + "uuids": [ + "7aff2114-e7ac-4d95-8231-06797baf7e43" + ] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "", + "sectors": "20971520", + "sectorsize": "512", + "serial": "1850217D1801", + "size": "10.00 GB", + "support_discard": "4096", + "vendor": null, + "virtual": 1 + }, + "dm-14": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-rhel-swap", + "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXvps4lNUwZ2iUG8Vh7cEYncubi2mGRzz" + ], + "labels": [], + "masters": [], + "uuids": [ + "650d95c9-89de-4d38-bd10-5d08fdad3a9d" + ] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "", + "sectors": "8388608", + "sectorsize": "512", + "serial": "1850217D1801", + "size": "4.00 GB", + "support_discard": "4096", + "vendor": null, + "virtual": 1 + }, + "dm-2": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000051", + "dm-uuid-mpath-36000d31005771c000000000000000051", + "scsi-36000d31005771c000000000000000051", + "wwn-0x6000d31005771c000000000000000051" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000051" + }, + "dm-3": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c00000000000000004d1", + "dm-uuid-part1-mpath-36000d31005771c00000000000000004d", + "scsi-36000d31005771c00000000000000004d-part1", + "wwn-0x6000d31005771c00000000000000004d-part1" + ], + "labels": [], + "masters": [], + "uuids": [ + "3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711" + ] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "", + "sectors": "8388608", + "sectorsize": "512", + "serial": "0005771c", + "size": "4.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c00000000000000004d-part1" + }, + "dm-4": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000053", + "dm-uuid-mpath-36000d31005771c000000000000000053", + "scsi-36000d31005771c000000000000000053", + "wwn-0x6000d31005771c000000000000000053" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000053" + }, + "dm-5": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000055", + "dm-uuid-mpath-36000d31005771c000000000000000055", + "scsi-36000d31005771c000000000000000055", + "wwn-0x6000d31005771c000000000000000055" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000055" + }, + "dm-6": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000035", + "dm-uuid-mpath-36000d31005771c000000000000000035", + "scsi-36000d31005771c000000000000000035", + "wwn-0x6000d31005771c000000000000000035" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000035" + }, + "dm-7": { + "holders": [ + "36000d31005771c000000000000000037p1" + ], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000037", + "dm-uuid-mpath-36000d31005771c000000000000000037", + "scsi-36000d31005771c000000000000000037", + "wwn-0x6000d31005771c000000000000000037" + ], + "labels": [], + "masters": [ + "dm-9" + ], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000037" + }, + "dm-8": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000050", + "dm-uuid-mpath-36000d31005771c000000000000000050", + "scsi-36000d31005771c000000000000000050", + "wwn-0x6000d31005771c000000000000000050" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000050" + }, + "dm-9": { + "holders": [], + "host": "", + "links": { + "ids": [ + "dm-name-36000d31005771c000000000000000037p1", + "dm-uuid-part1-mpath-36000d31005771c000000000000000037", + "scsi-36000d31005771c000000000000000037-part1", + "wwn-0x6000d31005771c000000000000000037-part1" + ], + "labels": [], + "masters": [], + "uuids": [ + "7b87aa88-713f-44c2-afaf-697480c04298" + ] + }, + "model": null, + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "", + "sectors": "21474832384", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": null, + "virtual": 1, + "wwn": "0x6000d31005771c000000000000000037-part1" + }, + "nvme0n1": { + "holders": [], + "host": "Non-Volatile memory controller: Intel Corporation PCIe Data Center SSD (rev 01)", + "links": { + "ids": [ + "nvme-INTEL_SSDPEDMD020T4D_HHHL_NVMe_2000GB_CVFT619600E82P0EGN", + "nvme-nvme.8086-43564654363139363030453832503045474e-494e54454c205353445045444d44303230543444204848484c204e564d6520323030304742-00000001" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": "INTEL SSDPEDMD020T4D HHHL NVMe 2000GB", + "partitions": {}, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "3907029168", + "sectorsize": "512", + "size": "1.82 TB", + "support_discard": "512", + "vendor": null, + "virtual": 1 + }, + "sda": { + "holders": [], + "host": "SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)", + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D184A", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A", + "scsi-3500a0751217d184a", + "scsi-SATA_MTFDDAV240TCB_1850217D184A", + "wwn-0x500a0751217d184a" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": "MTFDDAV240TCB", + "partitions": { + "sda1": { + "holders": [], + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D184A-part1", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part1", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part1", + "scsi-3500a0751217d184a-part1", + "scsi-SATA_MTFDDAV240TCB_1850217D184A-part1", + "wwn-0x500a0751217d184a-part1" + ], + "labels": [], + "masters": [], + "uuids": [ + "96dd8b2b-f855-48c5-8467-1635a6ada2c9" + ] + }, + "sectors": "2097152", + "sectorsize": 512, + "size": "1.00 GB", + "start": "2048", + "uuid": "96dd8b2b-f855-48c5-8467-1635a6ada2c9" + }, + "sda2": { + "holders": [], + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D184A-part2", + "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part2", + "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part2", + "scsi-3500a0751217d184a-part2", + "scsi-SATA_MTFDDAV240TCB_1850217D184A-part2", + "wwn-0x500a0751217d184a-part2" + ], + "labels": [], + "masters": [], + "uuids": [ + "952091b8-47df-4344-b5be-a6936e202686" + ] + }, + "sectors": "104857600", + "sectorsize": 512, + "size": "50.00 GB", + "start": "2099200", + "uuid": "952091b8-47df-4344-b5be-a6936e202686" + } + }, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "468862128", + "sectorsize": "512", + "serial": "1850217D184A", + "size": "223.57 GB", + "support_discard": "4096", + "vendor": "ATA", + "virtual": 1, + "wwn": "0x500a0751217d184a" + }, + "sdaa": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdab": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdac": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdad": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdae": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdaf": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdag": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdah": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdai": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdaj": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdak": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdal": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdam": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdan": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdao": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdap": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdaq": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdar": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdas": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdat": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdau": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdav": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdaw": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdax": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sday": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdaz": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdb": { + "holders": [], + "host": "SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)", + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D1801", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801", + "scsi-3500a0751217d1801", + "scsi-SATA_MTFDDAV240TCB_1850217D1801", + "wwn-0x500a0751217d1801" + ], + "labels": [], + "masters": [], + "uuids": [] + }, + "model": "MTFDDAV240TCB", + "partitions": { + "sdb1": { + "holders": [], + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D1801-part1", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part1", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part1", + "scsi-3500a0751217d1801-part1", + "scsi-SATA_MTFDDAV240TCB_1850217D1801-part1", + "wwn-0x500a0751217d1801-part1" + ], + "labels": [], + "masters": [], + "uuids": [ + "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" + ] + }, + "sectors": "2097152", + "sectorsize": 512, + "size": "1.00 GB", + "start": "2048", + "uuid": "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" + }, + "sdb2": { + "holders": [ + "rhel-home", + "rhel-swap", + "rhel-root" + ], + "links": { + "ids": [ + "ata-MTFDDAV240TCB_1850217D1801-part2", + "lvm-pv-uuid-ZXaYjf-CCgI-5UmT-KZDs-2ASN-8IF2-10YUO2", + "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part2", + "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part2", + "scsi-3500a0751217d1801-part2", + "scsi-SATA_MTFDDAV240TCB_1850217D1801-part2", + "wwn-0x500a0751217d1801-part2" + ], + "labels": [], + "masters": [ + "dm-12", + "dm-13", + "dm-14" + ], + "uuids": [] + }, + "sectors": "466761728", + "sectorsize": 512, + "size": "222.57 GB", + "start": "2099200", + "uuid": null + } + }, + "removable": "0", + "rotational": "0", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "mq-deadline", + "sectors": "468862128", + "sectorsize": "512", + "serial": "1850217D1801", + "size": "223.57 GB", + "support_discard": "4096", + "vendor": "ATA", + "virtual": 1, + "wwn": "0x500a0751217d1801" + }, + "sdba": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbb": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbc": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbd": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbe": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbf": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbg": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbh": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbi": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbj": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbk": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbl": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbm": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbn": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbo": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbp": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbq": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbr": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbs": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdbt": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdc": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdd": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sde": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdf": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdg": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdh": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdi": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdj": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdk": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdl": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdm": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdn": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdo": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdp": { + "holders": [ + "36000d31005771c000000000000000054" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-11" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdq": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdr": { + "holders": [ + "36000d31005771c000000000000000050" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-8" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sds": { + "holders": [ + "36000d31005771c00000000000000004d" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-0" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "104857600", + "sectorsize": "512", + "serial": "0005771c", + "size": "50.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdt": { + "holders": [ + "36000d31005771c00000000000000004f" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-1" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "6442450944", + "sectorsize": "512", + "serial": "0005771c", + "size": "3.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdu": { + "holders": [ + "36000d31005771c000000000000000051" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-2" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdv": { + "holders": [ + "36000d31005771c000000000000000053" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-4" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "314572800", + "sectorsize": "512", + "serial": "0005771c", + "size": "150.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdw": { + "holders": [ + "36000d31005771c000000000000000055" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-5" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "167772160", + "sectorsize": "512", + "serial": "0005771c", + "size": "80.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdx": { + "holders": [ + "36000d31005771c000000000000000035" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-6" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "19327352832", + "sectorsize": "512", + "serial": "0005771c", + "size": "9.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdy": { + "holders": [ + "36000d31005771c000000000000000052" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-10" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "1048576000", + "sectorsize": "512", + "serial": "0005771c", + "size": "500.00 GB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + }, + "sdz": { + "holders": [ + "36000d31005771c000000000000000037" + ], + "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", + "links": { + "ids": [], + "labels": [], + "masters": [ + "dm-7" + ], + "uuids": [] + }, + "model": "Compellent Vol", + "partitions": {}, + "removable": "0", + "rotational": "1", + "sas_address": null, + "sas_device_handle": null, + "scheduler_mode": "none", + "sectors": "21474836480", + "sectorsize": "512", + "serial": "0005771c", + "size": "10.00 TB", + "support_discard": "524288", + "vendor": "COMPELNT", + "virtual": 1 + } + }, + "ansible_distribution": "RedHat", + "ansible_distribution_file_parsed": true, + "ansible_distribution_file_path": "/etc/redhat-release", + "ansible_distribution_file_search_string": "Red Hat", + "ansible_distribution_file_variety": "RedHat", + "ansible_distribution_major_version": "8", + "ansible_distribution_release": "Ootpa", + "ansible_distribution_version": "8.2", + "ansible_dns": { + "nameservers": [ + "10.17.122.10" + ], + "search": [ + "wdf.sap.corp" + ] + }, + "ansible_domain": "wdf.sap.corp", + "ansible_effective_group_id": 0, + "ansible_effective_user_id": 0, + "ansible_eno1": { + "active": true, + "device": "eno1", + "features": { + "esp_hw_offload": "on", + "esp_tx_csum_hw_offload": "on", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off", + "l2_fwd_offload": "off", + "large_receive_offload": "off", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off", + "receive_hashing": "on", + "rx_all": "off", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "on", + "rx_vlan_filter": "on", + "rx_vlan_offload": "on", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [ + "none", + "all" + ], + "ipv4": { + "address": "192.168.1.53", + "broadcast": "192.168.1.255", + "netmask": "255.255.255.0", + "network": "192.168.1.0" + }, + "macaddress": "e4:43:4b:77:f6:a8", + "module": "ixgbe", + "mtu": 9000, + "pciid": "0000:17:00.0", + "phc_index": 2, + "promisc": false, + "speed": 10000, + "timestamping": [ + "tx_hardware", + "tx_software", + "rx_hardware", + "rx_software", + "software", + "raw_hardware" + ], + "type": "ether" + }, + "ansible_eno145": { + "active": true, + "device": "eno145", + "features": { + "esp_hw_offload": "off [fixed]", + "esp_tx_csum_hw_offload": "off [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "on", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off", + "receive_hashing": "on", + "rx_all": "off", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "off [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [ + "none", + "all" + ], + "macaddress": "e4:43:4b:77:f6:aa", + "module": "igb", + "mtu": 1500, + "pciid": "0000:19:00.0", + "phc_index": 0, + "promisc": true, + "speed": 1000, + "timestamping": [ + "tx_hardware", + "tx_software", + "rx_hardware", + "rx_software", + "software", + "raw_hardware" + ], + "type": "ether" + }, + "ansible_eno146": { + "active": true, + "device": "eno146", + "features": { + "esp_hw_offload": "off [fixed]", + "esp_tx_csum_hw_offload": "off [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "on", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off", + "receive_hashing": "on", + "rx_all": "off", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "off [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [ + "none", + "all" + ], + "macaddress": "e4:43:4b:77:f6:ab", + "module": "igb", + "mtu": 1500, + "pciid": "0000:19:00.1", + "phc_index": 1, + "promisc": false, + "speed": 1000, + "timestamping": [ + "tx_hardware", + "tx_software", + "rx_hardware", + "rx_software", + "software", + "raw_hardware" + ], + "type": "ether" + }, + "ansible_eno1v0": { + "active": true, + "device": "eno1v0", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "4e:e0:4e:de:6b:2a", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.0", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v1": { + "active": true, + "device": "eno1v1", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "fa:81:dc:b1:f9:a0", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.2", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v10": { + "active": true, + "device": "eno1v10", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "1a:64:23:7b:04:0f", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.4", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v11": { + "active": true, + "device": "eno1v11", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "e6:fc:59:b2:85:3d", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.6", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v12": { + "active": true, + "device": "eno1v12", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "46:9c:6f:0d:b7:fc", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.0", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v13": { + "active": true, + "device": "eno1v13", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "8a:6d:60:1f:82:7c", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.2", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v14": { + "active": true, + "device": "eno1v14", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "9a:63:20:1b:c4:7f", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.4", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v15": { + "active": true, + "device": "eno1v15", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "fe:7e:85:22:f0:8d", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.6", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v2": { + "active": true, + "device": "eno1v2", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "2e:a1:ec:aa:9d:1a", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.4", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v3": { + "active": true, + "device": "eno1v3", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "3a:78:ea:42:e6:96", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.6", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v4": { + "active": true, + "device": "eno1v4", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "fe:94:ee:e0:13:18", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.0", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v5": { + "active": true, + "device": "eno1v5", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "2e:e3:35:86:bc:ed", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.2", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v6": { + "active": true, + "device": "eno1v6", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "ba:74:c5:4a:4e:7f", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.4", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v7": { + "active": true, + "device": "eno1v7", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "3e:78:6b:ec:35:81", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.6", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v8": { + "active": true, + "device": "eno1v8", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "da:9c:20:91:54:df", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.0", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno1v9": { + "active": true, + "device": "eno1v9", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "e6:fa:41:f5:a9:69", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.2", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2": { + "active": true, + "device": "eno2", + "features": { + "esp_hw_offload": "on", + "esp_tx_csum_hw_offload": "on", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off", + "l2_fwd_offload": "off", + "large_receive_offload": "off", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off", + "receive_hashing": "on", + "rx_all": "off", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "on", + "rx_vlan_filter": "on", + "rx_vlan_offload": "on", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [ + "none", + "all" + ], + "macaddress": "e4:43:4b:77:f6:a9", + "module": "ixgbe", + "mtu": 1500, + "pciid": "0000:17:00.1", + "phc_index": 3, + "promisc": false, + "speed": 10000, + "timestamping": [ + "tx_hardware", + "tx_software", + "rx_hardware", + "rx_software", + "software", + "raw_hardware" + ], + "type": "ether" + }, + "ansible_eno2v0": { + "active": true, + "device": "eno2v0", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "fa:8e:29:da:a8:1f", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.1", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v1": { + "active": true, + "device": "eno2v1", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "4e:c7:e8:b4:d4:95", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.3", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v10": { + "active": true, + "device": "eno2v10", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "3a:66:bc:9e:25:be", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.5", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v11": { + "active": true, + "device": "eno2v11", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "6a:39:01:4b:2b:00", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.7", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v12": { + "active": true, + "device": "eno2v12", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "a6:12:51:c1:22:1a", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.1", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v13": { + "active": true, + "device": "eno2v13", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "2e:15:2b:87:0c:7d", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.3", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v14": { + "active": true, + "device": "eno2v14", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "ea:66:f6:1b:de:15", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.5", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v15": { + "active": true, + "device": "eno2v15", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "b6:e1:dd:b2:04:38", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:13.7", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v2": { + "active": true, + "device": "eno2v2", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "6a:7e:d0:17:84:ea", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.5", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v3": { + "active": true, + "device": "eno2v3", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "b6:c1:3a:37:ac:a4", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:10.7", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v4": { + "active": true, + "device": "eno2v4", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "06:c0:cc:02:59:6a", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.1", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v5": { + "active": true, + "device": "eno2v5", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "ea:df:79:83:a6:e2", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.3", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v6": { + "active": true, + "device": "eno2v6", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "0a:b9:ba:a4:df:90", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.5", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v7": { + "active": true, + "device": "eno2v7", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "e2:c7:ac:90:e8:0f", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:11.7", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v8": { + "active": true, + "device": "eno2v8", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "6a:76:2f:3d:ea:3c", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.1", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_eno2v9": { + "active": true, + "device": "eno2v9", + "features": { + "esp_hw_offload": "on [fixed]", + "esp_tx_csum_hw_offload": "on [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "off [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "on [fixed]", + "rx_vlan_offload": "on [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on", + "tx_checksumming": "on", + "tx_esp_segmentation": "on [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "off [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [fixed]", + "tx_sctp_segmentation": "off [fixed]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "off [fixed]", + "tx_tcp_mangleid_segmentation": "off", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "macaddress": "66:c2:e1:ee:a5:e6", + "module": "ixgbevf", + "mtu": 1500, + "pciid": "0000:17:12.3", + "promisc": false, + "speed": 10000, + "timestamping": [ + "rx_software", + "software" + ], + "type": "ether" + }, + "ansible_env": { + "BEAKER": "http://lu0557.wdf.sap.corp/bkr/", + "BEAKER_HUB_URL": "http://lu0557.wdf.sap.corp/bkr/", + "BEAKER_JOB_WHITEBOARD": "This job was scheduled from the dci-rhel-agent using XML template.", + "BEAKER_LAB_CONTROLLER": "lu0557.wdf.sap.corp", + "BEAKER_LAB_CONTROLLER_URL": "http://lu0557.wdf.sap.corp:8000/", + "BEAKER_RECIPE_ID": "271", + "BEAKER_RECIPE_WHITEBOARD": "", + "BUILDURL": "", + "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/0/bus", + "DUMPSERVER": "", + "GUESTFISH_INIT": "\\e[1;34m", + "GUESTFISH_OUTPUT": "\\e[0m", + "GUESTFISH_PS1": "\\[\\e[1;32m\\]>\\[\\e[0;31m\\] ", + "GUESTFISH_RESTORE": "\\e[0m", + "HOME": "/root", + "LAB_CONTROLLER": "lu0557.wdf.sap.corp", + "LANG": "en_US.UTF-8", + "LESSOPEN": "||/usr/bin/lesspipe.sh %s", + "LOGNAME": "root", + "LOOKASIDE": "", + "LS_COLORS": "rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:", + "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", + "PWD": "/root", + "RHTS_OPTION_COMPATIBLE": "", + "RHTS_OPTION_COMPAT_SERVICE": "", + "SELINUX_LEVEL_REQUESTED": "", + "SELINUX_ROLE_REQUESTED": "", + "SELINUX_USE_CURRENT_RANGE": "", + "SHELL": "/bin/bash", + "SHLVL": "2", + "SSH_CLIENT": "10.76.34.62 56042 22", + "SSH_CONNECTION": "10.76.34.62 56042 10.76.34.58 22", + "SSH_TTY": "/dev/pts/1", + "S_COLORS": "auto", + "TERM": "xterm-256color", + "USER": "root", + "XDG_RUNTIME_DIR": "/run/user/0", + "XDG_SESSION_ID": "70", + "_": "/usr/libexec/platform-python" + }, + "ansible_fibre_channel_wwn": [ + "2100f4e9d453f78e", + "2100f4e9d453f798", + "2100f4e9d4597b59", + "2100f4e9d453f78d", + "2100f4e9d453f78f", + "2100f4e9d453f799", + "2100f4e9d4597b58", + "210034800d6da83b", + "210034800d6da83a", + "2100f4e9d453f78c" + ], + "ansible_fips": false, + "ansible_form_factor": "Rack Mount Chassis", + "ansible_fqdn": "lu0553.wdf.sap.corp", + "ansible_hostname": "lu0553", + "ansible_hostnqn": "", + "ansible_interfaces": [ + "eno1v14", + "eno2v0", + "eno1v15", + "eno2v12", + "eno2v5", + "eno1v13", + "eno2v7", + "eno1v10", + "eno1v3", + "eno1v9", + "eno2v3", + "ovirtmgmt", + "eno2v14", + "eno146", + "eno1", + "eno2", + "eno2v8", + "eno145", + "eno2v15", + "eno1v11", + "eno1v5", + "eno1v12", + ";vdsmdummy;", + "eno2v6", + "eno1v2", + "lo", + "eno2v1", + "eno2v13", + "eno1v7", + "eno1v1", + "eno2v2", + "eno1v4", + "eno1v8", + "eno2v4", + "eno1v0", + "eno2v10", + "eno2v11", + "eno2v9", + "eno1v6" + ], + "ansible_is_chroot": false, + "ansible_iscsi_iqn": "iqn.1994-05.com.redhat:9b77ced16dc6", + "ansible_kernel": "4.18.0-193.el8.x86_64", + "ansible_kernel_version": "#1 SMP Fri Mar 27 14:35:58 UTC 2020", + "ansible_lo": { + "active": true, + "device": "lo", + "features": { + "esp_hw_offload": "off [fixed]", + "esp_tx_csum_hw_offload": "off [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on [fixed]", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "on [fixed]", + "netns_local": "on [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "on [fixed]", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "off [fixed]", + "rx_vlan_offload": "off [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on [fixed]", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "on [fixed]", + "tx_checksumming": "on", + "tx_esp_segmentation": "off [fixed]", + "tx_fcoe_segmentation": "off [fixed]", + "tx_gre_csum_segmentation": "off [fixed]", + "tx_gre_segmentation": "off [fixed]", + "tx_gso_partial": "off [fixed]", + "tx_gso_robust": "off [fixed]", + "tx_ipxip4_segmentation": "off [fixed]", + "tx_ipxip6_segmentation": "off [fixed]", + "tx_lockless": "on [fixed]", + "tx_nocache_copy": "off [fixed]", + "tx_scatter_gather": "on [fixed]", + "tx_scatter_gather_fraglist": "on [fixed]", + "tx_sctp_segmentation": "on", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "on", + "tx_tcp_mangleid_segmentation": "on", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "off [fixed]", + "tx_udp_tnl_csum_segmentation": "off [fixed]", + "tx_udp_tnl_segmentation": "off [fixed]", + "tx_vlan_offload": "off [fixed]", + "tx_vlan_stag_hw_insert": "off [fixed]", + "vlan_challenged": "on [fixed]" + }, + "hw_timestamp_filters": [], + "ipv4": { + "address": "127.0.0.1", + "broadcast": "", + "netmask": "255.0.0.0", + "network": "127.0.0.0" + }, + "ipv6": [ + { + "address": "::1", + "prefix": "128", + "scope": "host" + } + ], + "mtu": 65536, + "promisc": false, + "timestamping": [ + "tx_software", + "rx_software", + "software" + ], + "type": "loopback" + }, + "ansible_local": {}, + "ansible_lsb": {}, + "ansible_lvm": { + "lvs": { + "home": { + "size_g": "10.00", + "vg": "rhel" + }, + "root": { + "size_g": "208.57", + "vg": "rhel" + }, + "swap": { + "size_g": "4.00", + "vg": "rhel" + } + }, + "pvs": { + "/dev/sdb2": { + "free_g": "0", + "size_g": "222.57", + "vg": "rhel" + } + }, + "vgs": { + "rhel": { + "free_g": "0", + "num_lvs": "3", + "num_pvs": "1", + "size_g": "222.57" + } + } + }, + "ansible_machine": "x86_64", + "ansible_machine_id": "bc7d714b2ec8455ab13ef5390ad10c49", + "ansible_memfree_mb": 123688, + "ansible_memory_mb": { + "nocache": { + "free": 124398, + "used": 6066553 + }, + "real": { + "free": 123688, + "total": 6190951, + "used": 6067263 + }, + "swap": { + "cached": 0, + "free": 4095, + "total": 4095, + "used": 0 + } + }, + "ansible_memtotal_mb": 6190951, + "ansible_mounts": [ + { + "block_available": 12269493, + "block_size": 4096, + "block_total": 13100800, + "block_used": 831307, + "device": "/dev/sda2", + "fstype": "xfs", + "inode_available": 26140793, + "inode_total": 26214400, + "inode_used": 73607, + "mount": "/", + "options": "rw,seclabel,relatime,attr2,inode64,noquota", + "size_available": 50255843328, + "size_total": 53660876800, + "uuid": "952091b8-47df-4344-b5be-a6936e202686" + }, + { + "block_available": 213977, + "block_size": 4096, + "block_total": 259584, + "block_used": 45607, + "device": "/dev/sda1", + "fstype": "xfs", + "inode_available": 523925, + "inode_total": 524288, + "inode_used": 363, + "mount": "/boot", + "options": "rw,seclabel,relatime,attr2,inode64,noquota", + "size_available": 876449792, + "size_total": 1063256064, + "uuid": "96dd8b2b-f855-48c5-8467-1635a6ada2c9" + }, + { + "block_available": 79836, + "block_size": 1048576, + "block_total": 1228197, + "block_used": 1148361, + "device": "lu0544.wdf.sap.corp:/archive", + "fstype": "nfs4", + "inode_available": 124026164, + "inode_total": 125828672, + "inode_used": 1802508, + "mount": "/archive", + "options": "rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.76.34.58,local_lock=none,addr=10.76.34.39", + "size_available": 83714113536, + "size_total": 1287857897472, + "uuid": "N/A" + }, + { + "block_available": 944681, + "block_size": 1048576, + "block_total": 996148, + "block_used": 51467, + "device": "192.168.1.100:/lu0553_rhv_os_disks/images", + "fstype": "nfs", + "inode_available": 21251005, + "inode_total": 21251126, + "inode_used": 121, + "mount": "/rhev/data-center/mnt/192.168.1.100:_lu0553__rhv__os__disks_images", + "options": "rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,soft,nolock,nosharecache,proto=tcp,timeo=100,retrans=3,sec=sys,mountaddr=192.168.1.100,mountvers=3,mountport=635,mountproto=udp,local_lock=all,addr=192.168.1.100", + "size_available": 990569824256, + "size_total": 1044536885248, + "uuid": "N/A" + } + ], + "ansible_nodename": "lu0553.wdf.sap.corp", + "ansible_os_family": "RedHat", + "ansible_ovirtmgmt": { + "active": true, + "device": "ovirtmgmt", + "features": { + "esp_hw_offload": "off [fixed]", + "esp_tx_csum_hw_offload": "off [fixed]", + "fcoe_mtu": "off [fixed]", + "generic_receive_offload": "on", + "generic_segmentation_offload": "on", + "highdma": "on", + "hw_tc_offload": "off [fixed]", + "l2_fwd_offload": "off [fixed]", + "large_receive_offload": "off [fixed]", + "loopback": "off [fixed]", + "netns_local": "on [fixed]", + "ntuple_filters": "off [fixed]", + "receive_hashing": "off [fixed]", + "rx_all": "off [fixed]", + "rx_checksumming": "off [fixed]", + "rx_fcs": "off [fixed]", + "rx_gro_hw": "off [fixed]", + "rx_udp_tunnel_port_offload": "off [fixed]", + "rx_vlan_filter": "off [fixed]", + "rx_vlan_offload": "off [fixed]", + "rx_vlan_stag_filter": "off [fixed]", + "rx_vlan_stag_hw_parse": "off [fixed]", + "scatter_gather": "on", + "tcp_segmentation_offload": "on", + "tls_hw_record": "off [fixed]", + "tls_hw_rx_offload": "off [fixed]", + "tls_hw_tx_offload": "off [fixed]", + "tx_checksum_fcoe_crc": "off [fixed]", + "tx_checksum_ip_generic": "on", + "tx_checksum_ipv4": "off [fixed]", + "tx_checksum_ipv6": "off [fixed]", + "tx_checksum_sctp": "off [fixed]", + "tx_checksumming": "on", + "tx_esp_segmentation": "on", + "tx_fcoe_segmentation": "off [requested on]", + "tx_gre_csum_segmentation": "on", + "tx_gre_segmentation": "on", + "tx_gso_partial": "on", + "tx_gso_robust": "off [requested on]", + "tx_ipxip4_segmentation": "on", + "tx_ipxip6_segmentation": "on", + "tx_lockless": "on [fixed]", + "tx_nocache_copy": "off", + "tx_scatter_gather": "on", + "tx_scatter_gather_fraglist": "off [requested on]", + "tx_sctp_segmentation": "off [requested on]", + "tx_tcp6_segmentation": "on", + "tx_tcp_ecn_segmentation": "on", + "tx_tcp_mangleid_segmentation": "on", + "tx_tcp_segmentation": "on", + "tx_udp_segmentation": "on", + "tx_udp_tnl_csum_segmentation": "on", + "tx_udp_tnl_segmentation": "on", + "tx_vlan_offload": "on", + "tx_vlan_stag_hw_insert": "on", + "vlan_challenged": "off [fixed]" + }, + "hw_timestamp_filters": [], + "id": "8000.e4434b77f6aa", + "interfaces": [ + "eno145" + ], + "ipv4": { + "address": "10.76.34.58", + "broadcast": "10.76.35.255", + "netmask": "255.255.254.0", + "network": "10.76.34.0" + }, + "ipv6": [ + { + "address": "fe80::e643:4bff:fe77:f6aa", + "prefix": "64", + "scope": "link" + } + ], + "macaddress": "e4:43:4b:77:f6:aa", + "mtu": 1500, + "promisc": false, + "stp": false, + "timestamping": [ + "rx_software", + "software" + ], + "type": "bridge" + }, + "ansible_pkg_mgr": "dnf", + "ansible_proc_cmdline": { + "BOOT_IMAGE": "(hd0,msdos1)/vmlinuz-4.18.0-193.el8.x86_64", + "crashkernel": "auto", + "null": true, + "quiet": true, + "resume": "UUID=3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711", + "rhgb": true, + "ro": true, + "root": "UUID=952091b8-47df-4344-b5be-a6936e202686" + }, + "ansible_processor": [ + "0", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "1", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "2", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "3", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "4", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "5", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "6", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "7", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "8", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "9", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "10", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "11", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "12", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "13", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "14", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "15", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "16", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "17", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "18", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "19", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "20", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "21", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "22", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "23", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "24", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "25", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "26", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "27", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "28", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "29", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "30", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "31", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "32", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "33", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "34", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "35", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "36", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "37", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "38", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "39", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "40", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "41", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "42", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "43", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "44", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "45", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "46", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "47", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "48", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "49", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "50", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "51", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "52", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "53", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "54", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "55", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "56", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "57", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "58", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "59", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "60", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "61", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "62", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "63", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "64", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "65", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "66", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "67", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "68", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "69", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "70", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "71", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "72", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "73", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "74", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "75", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "76", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "77", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "78", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "79", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "80", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "81", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "82", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "83", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "84", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "85", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "86", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "87", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "88", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "89", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "90", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "91", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "92", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "93", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "94", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "95", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "96", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "97", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "98", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "99", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "100", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "101", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "102", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "103", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "104", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "105", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "106", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "107", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "108", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "109", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "110", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "111", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "112", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "113", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "114", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "115", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "116", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "117", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "118", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "119", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "120", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "121", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "122", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "123", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "124", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "125", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "126", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "127", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "128", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "129", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "130", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "131", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "132", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "133", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "134", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "135", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "136", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "137", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "138", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "139", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "140", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "141", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "142", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "143", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "144", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "145", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "146", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "147", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "148", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "149", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "150", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "151", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "152", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "153", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "154", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "155", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "156", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "157", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "158", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "159", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "160", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "161", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "162", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "163", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "164", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "165", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "166", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "167", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "168", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "169", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "170", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "171", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "172", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "173", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "174", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "175", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "176", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "177", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "178", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "179", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "180", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "181", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "182", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "183", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "184", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "185", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "186", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "187", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "188", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "189", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "190", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "191", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "192", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "193", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "194", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "195", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "196", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "197", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "198", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "199", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "200", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "201", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "202", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "203", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "204", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "205", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "206", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "207", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "208", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "209", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "210", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "211", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "212", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "213", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "214", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "215", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "216", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "217", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "218", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "219", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "220", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "221", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "222", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", + "223", + "GenuineIntel", + "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz" + ], + "ansible_processor_cores": 28, + "ansible_processor_count": 4, + "ansible_processor_threads_per_core": 2, + "ansible_processor_vcpus": 224, + "ansible_product_name": "PowerEdge R940", + "ansible_product_serial": "C8PJVY2", + "ansible_product_uuid": "4c4c4544-0038-5010-804a-c3c04f565932", + "ansible_product_version": "NA", + "ansible_python": { + "executable": "/usr/libexec/platform-python", + "has_sslcontext": true, + "type": "cpython", + "version": { + "major": 3, + "micro": 8, + "minor": 6, + "releaselevel": "final", + "serial": 0 + }, + "version_info": [ + 3, + 6, + 8, + "final", + 0 + ] + }, + "ansible_python_version": "3.6.8", + "ansible_real_group_id": 0, + "ansible_real_user_id": 0, + "ansible_selinux": { + "config_mode": "permissive", + "mode": "permissive", + "policyvers": 31, + "status": "enabled", + "type": "targeted" + }, + "ansible_selinux_python_present": true, + "ansible_service_mgr": "systemd", + "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM4WqXsVwwzN6qMvnVgeitQSMTyjWQjbxXaSxc4/Iwouo2V4ewSMhC2kBtqGLTu5e6vWJ9SZ2WOuwARDYPbLWvA=", + "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIMGjaZpMDLfOyJM8FtRcvPpPExRtIkDECOa+g8DfnRwv", + "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDbV1CPZG/jRoo7nGbUSS4JAX4wx+Uy2iNH2gQOptyy0A9AsC/aYHwHHnTnn6GYToi1oEcsrbknlRUzMTPnrS6U4h96EGlECIgdzjYAya4TuusWaFFXFiJQ99z59HwV48ffWKoEBxC5sMuCz7vkgdMhe3+Bb8t1eKSxRi6ENohLK1br1/zQ2pJnphyjmO7541sPkpTPt3YCUYBjqhlPD8g81KgKg0jU5F0fY/lDtWEeBszN6EPkcjxdU6tbCOmKlkguWmhO+JJHYCPZ86W8wi1//+mhI+mOc9b04luGmhzEMbsgH49lk1356D56Yh7Tt4cwtCJWTQJ39UhtjEYMBw5cjzR01QkrtyiCMtJnHLbDBob6JzUUbBqLUo05+U1TkyuOinhI7bFMokvvkGe4qhEXBjEzSGRM03pmZusyh1Fl7Ttwl/wnSVo3oTHbKRiMuN4MTm7c7nGDWqhmF2TH+850I+Pb8vFJrDo9NLZpytbozAn9La2g5PTG6Wb8PIDP8mc=", + "ansible_swapfree_mb": 4095, + "ansible_swaptotal_mb": 4095, + "ansible_system": "Linux", + "ansible_system_capabilities": [ + "cap_chown", + "cap_dac_override", + "cap_dac_read_search", + "cap_fowner", + "cap_fsetid", + "cap_kill", + "cap_setgid", + "cap_setuid", + "cap_setpcap", + "cap_linux_immutable", + "cap_net_bind_service", + "cap_net_broadcast", + "cap_net_admin", + "cap_net_raw", + "cap_ipc_lock", + "cap_ipc_owner", + "cap_sys_module", + "cap_sys_rawio", + "cap_sys_chroot", + "cap_sys_ptrace", + "cap_sys_pacct", + "cap_sys_admin", + "cap_sys_boot", + "cap_sys_nice", + "cap_sys_resource", + "cap_sys_time", + "cap_sys_tty_config", + "cap_mknod", + "cap_lease", + "cap_audit_write", + "cap_audit_control", + "cap_setfcap", + "cap_mac_override", + "cap_mac_admin", + "cap_syslog", + "cap_wake_alarm", + "cap_block_suspend", + "cap_audit_read+ep" + ], + "ansible_system_capabilities_enforced": "True", + "ansible_system_vendor": "Dell Inc.", + "ansible_uptime_seconds": 584642, + "ansible_user_dir": "/root", + "ansible_user_gecos": "root", + "ansible_user_gid": 0, + "ansible_user_id": "root", + "ansible_user_shell": "/bin/bash", + "ansible_user_uid": 0, + "ansible_userspace_architecture": "x86_64", + "ansible_userspace_bits": "64", + "ansible_virtualization_role": "host", + "ansible_virtualization_type": "kvm", + "discovered_interpreter_python": "/usr/libexec/platform-python", + "gather_subset": [ + "all" + ], + "module_setup": true + }, + "changed": false +} diff --git a/roles/sap_hana_rhv_hypervisor/vars/main.yml b/roles/sap_hana_rhv_hypervisor/vars/main.yml new file mode 100644 index 000000000..e46c6f3c5 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/vars/main.yml @@ -0,0 +1,10 @@ +--- +# vars file for sap_hana_rhv_hypervisor +# + +# allocate hugepages {static|runtime} +# static: done at kernel command line which is slow, but consistent +# runtime: done through tuned-profile +#sap_hana_rhv_hypervisor_reserve_hugepages: runtime +sap_hana_rhv_hypervisor_packages: + - libhugetlbfs-utils From 3feb32cab64a517e1167d49064312604aaca2888 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 15:54:46 +0200 Subject: [PATCH 008/375] yamllint fixes --- .../sap_hana_rhv_hypervisor/defaults/main.yml | 3 +- .../sap_hana_rhv_hypervisor/files/50_hana_old | 66 ------------------- .../files/50_iothread_pinning_old | 65 ------------------ .../tasks/allocate-hugepages-at-runtime.yml | 44 +------------ .../tasks/assert-installation.yml | 3 +- .../tasks/assert-rhv-hooks.yml | 5 +- .../tasks/assert-set-tuned-profile.yml | 4 +- .../tasks/installation.yml | 3 +- roles/sap_hana_rhv_hypervisor/tasks/main.yml | 4 +- .../tasks/rhv-hooks.yml | 3 +- .../tasks/set-tuned-profile.yml | 4 +- 11 files changed, 17 insertions(+), 187 deletions(-) delete mode 100644 roles/sap_hana_rhv_hypervisor/files/50_hana_old delete mode 100644 roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/defaults/main.yml index e4d90aeb2..5e89996f9 100644 --- a/roles/sap_hana_rhv_hypervisor/defaults/main.yml +++ b/roles/sap_hana_rhv_hypervisor/defaults/main.yml @@ -4,8 +4,6 @@ #sap_hana_rhv_hypervisor_modify_grub_cmdline_linux: yes sap_hana_rhv_hypervisor_run_grub2_mkconfig: yes -#sap_hana_rhv_hypervisor_rhv_specific_config: yes - # Reserve memory [GB] for hypervisor host sap_hana_rhv_hypervisor_reserved_ram: 100 @@ -24,3 +22,4 @@ sap_hana_rhv_hypervisor_tsx: "off" # fail if assertion is invalid sap_hana_rhv_hypervisor_ignore_failed_assertion: no +... diff --git a/roles/sap_hana_rhv_hypervisor/files/50_hana_old b/roles/sap_hana_rhv_hypervisor/files/50_hana_old deleted file mode 100644 index bd8a33ccf..000000000 --- a/roles/sap_hana_rhv_hypervisor/files/50_hana_old +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/python3 - -import os -import sys -import traceback - -import hooking - -''' -Syntax: -hana=1 (value doesn't matter) - -The VM must be configured as High Performance with 1GB hugepages. -For that the following kernel boot line is required for the hypervisor: - -"default_hugepagesz=1GB hugepagesz=1GB hugepages=[# hugepages needed]" - -In addition the "hugepages" custom property needs to be set to 1048576. -''' - - -if 'hana' in os.environ: - try: - domxml = hooking.read_domxml() - domain = domxml.getElementsByTagName('domain')[0] - if not len(domain.getElementsByTagName('memoryBacking')): - sys.stderr.write('hugepages: VM is no High Performance VM\n') - sys.exit(0) - - if len(domain.getElementsByTagName('cpu')): - cpu = domain.getElementsByTagName('cpu')[0] - feature_tsc = domxml.createElement('feature') - feature_tsc.setAttribute('policy', 'require') - feature_tsc.setAttribute('name', 'invtsc') - feature_rdt = domxml.createElement('feature') - feature_rdt.setAttribute('policy', 'require') - feature_rdt.setAttribute('name', 'rdtscp') - feature_x2apic = domxml.createElement('feature') - feature_x2apic.setAttribute('policy', 'require') - feature_x2apic.setAttribute('name', 'x2apic') - feature_lvl3 = domxml.createElement('cache') - feature_lvl3.setAttribute('level','3') - feature_lvl3.setAttribute('mode','emulate') - cpu.appendChild(feature_tsc) - cpu.appendChild(feature_rdt) - cpu.appendChild(feature_lvl3) - cpu.appendChild(feature_x2apic) - - if len(domain.getElementsByTagName('clock')): - clock = domain.getElementsByTagName('clock')[0] - tscClock = domxml.createElement('clock') - tscClock.setAttribute('offset', 'utc') - timer = domxml.createElement('timer') - timer.setAttribute('name','tsc') - # Uncomment and adjust for live migration (adjust frequency to match the lowest value in your cluster) - #timer.setAttribute('frequency','2494140000') - tscClock.appendChild(timer) - domain.removeChild(clock) - domain.appendChild(tscClock) - - hooking.write_domxml(domxml) - except Exception: - sys.stderr.write('highperf hook: [unexpected error]: %s\n' % - traceback.format_exc()) - sys.exit(2) - diff --git a/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old b/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old deleted file mode 100644 index ed4ff1238..000000000 --- a/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning_old +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python2 - -import os -import sys -import traceback - -import hooking - -''' -Syntax: -iothread=, - -This hook will bind the iothread in RHV to the named core(s). -A maximum of 2 Cores is allowed, ideally pinned to the core (plus its hyperthread) that is bound to the Interrupt -Allowed syntax is also a range - as well as a mix. -engine-config -s UserDefinedVMProperties='iothread=^[0-9,-]+$' --cver=4.2 -''' - - -if 'iothread' in os.environ: - try: - iopin = os.environ['iothread']; - domxml = hooking.read_domxml() - domain = domxml.getElementsByTagName('domain')[0] - if len(domain.getElementsByTagName('iothreads')): - if len(domain.getElementsByTagName('iothreadids')): - iothreadids = domain.getElementsByTagName('iothreadids')[0] - else: - iothreadids = domxml.createElement('iothreadids') - domain.appendChild(iothreadids) - - if len(iothreadids.getElementsByTagName('iothread')): - ids = iothreadids.getElementsByTagName('iothread')[0] - else: - ids = domxml.createElement('iothread') - iothreadids.appendChild(ids) - ids.setAttribute('id', '1') - - if len(domain.getElementsByTagName('cputune')): - cputune = domain.getElementsByTagName('cputune')[0] - else: - cputune = domxml.createElement('cputune') - domain.appendChile(cputune) - - if len(cputune.getElementsByTagName('iothreadpin')): - iothreadpin = cputune.getElementsByTagName('iothreadpin')[0] - else: - iothreadpin = domxml.createElement('iothreadpin') - cputune.appendChild(iothreadpin) - iothreadpin.setAttribute('iothread', '1') - iothreadpin.setAttribute('cpuset', iopin) - - if len(cputune.getElementsByTagName('emulatorpin')): - emulatorpin = cputune.getElementsByTagName('emulatorpin')[0] - else: - emulatorpin = domxml.createElement('emulatorpin') - cputune.appendChild(emulatorpin) - emulatorpin.setAttribute('cpuset', iopin) - - hooking.write_domxml(domxml) - except Exception: - sys.stderr.write('iothreads hook: [unexpected error]: %s\n' % - traceback.format_exc()) - sys.exit(2) - diff --git a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml index c832dcde4..a5fded3e4 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml @@ -1,13 +1,9 @@ -#libhugetlbfs-utils -#libhugetlbfs -#hugeadm --pool-pages-min 1G:5920 -# +--- - name: Install libhugetlbfs yum: name: libhugetlbfs, libhugetlbfs-utils state: present - #XXX better location than rc.local? - name: Add hugepage allocation to /etc/rc.local blockinfile: @@ -29,40 +25,4 @@ - hugepagesz=1GB notify: "Regenerate grub2 conf handler" tags: grubconfig - - -#XXX not working -##- name: Add allocate_hugepages.sh for tuned sap-hana-kvm-host -# copy: -# dest: "/usr/lib/tuned/sap-hana-kvm-host/allocate_hugepages.sh" -# mode: 0744 -# content: | -# #!/bin/bash -# -# if [ "$1" == "start" ]; then -# hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hana_rhv_hypervisor_reserved_ram }}"}') -# fi -# -# if [ "$1" == "stop" ]; then -# hugeadm --pool-pages-min 1G:0 -# fi - - -#- name: Add hugepage allocation to tuned profile sap-hana-kvm-host -# blockinfile: -# path: /usr/lib/tuned/sap-hana-kvm-host/tuned.conf -# marker: "" -# block: | -# [allocate_hugepage] -# type=script -# script=${i:PROFILE_DIR}/allocate_hugepages.sh - -#- name: Customize sap-hana-kvm-host tuned by setting reserved memory -# replace: -# path: /usr/lib/tuned/sap-hana-kvm-host/allocate_hugepages.sh -# regexp: "" -# replace: "{{ sap_hana_rhv_hypervisor_reserved_ram }}" - -#- name: Re-set tuned profile sap-hana-kvm-host -# command: tuned-adm profile sap-hana-kvm-host - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml index 4d1ba3653..953bdf387 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml @@ -1,7 +1,7 @@ +--- - name: Gather package facts package_facts: - - name: Assert that all required packages are installed assert: that: "'{{ line_item }}' in ansible_facts.packages" @@ -12,3 +12,4 @@ loop_control: loop_var: line_item ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml index 9f7326fb3..9c9c94ee9 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml @@ -1,3 +1,4 @@ +--- - name: Check file permissions command: "stat -c%a /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" register: __sap_hana_rhv_hypervisor_register_file_permissions_assert @@ -30,6 +31,4 @@ fail_msg: "FAIL: Hook {{ item }} has been modified, please investigate manually." success_msg: "PASS: Hook {{ item }} not modified" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml index e4186b2b9..f86f3de35 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml @@ -1,3 +1,4 @@ +--- - name: Assert - Check tuned profile block: - name: Get tuned profile @@ -10,5 +11,4 @@ fail_msg: "FAIL: tuned profile is not sap-hana-kvm-host" success_msg: "PASS: tuned profile is sap-hana-kvm-host" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml index ede99f18b..a362c84fd 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml @@ -1,5 +1,6 @@ +--- - name: Ensure required packages are installed package: state: present name: "{{ sap_hana_rhv_hypervisor_packages }}" - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/main.yml b/roles/sap_hana_rhv_hypervisor/tasks/main.yml index 316ef49ff..655e2c3f3 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/main.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Display the role path debug: var: role_path @@ -22,5 +23,4 @@ loop: - 50_hana - 50_iothread_pinning - - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml index 5cb55f127..a99082660 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml @@ -1,3 +1,4 @@ +--- - name: Create hook dir file: path: /usr/libexec/vdsm/hooks/before_vm_start @@ -8,4 +9,4 @@ dest: "/usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" src: "{{ item }}" mode: '0755' - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml index dc1fcf823..b2a347e4a 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml @@ -1,3 +1,4 @@ +--- - name: Create tuned profile directory /usr/lib/tuned/sap-hana-kvm-host file: path: /usr/lib/tuned/sap-hana-kvm-host @@ -29,7 +30,6 @@ # and force_latency=70 on Power force_latency=cstate.id:3|70 - - - name: Activate tuned profile command: tuned-adm profile sap-hana-kvm-host +... From 8fb1bfbca3099eeaae7b17fe09ce38ee6577dbd9 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:09:25 +0200 Subject: [PATCH 009/375] more cosmetic fixes --- roles/sap_hana_rhv_hypervisor/defaults/main.yml | 4 ++-- roles/sap_hana_rhv_hypervisor/meta/main.yml | 3 ++- .../tasks/allocate-hugepages-at-runtime.yml | 4 ++-- roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml | 2 +- roles/sap_hana_rhv_hypervisor/tasks/configuration.yml | 5 +++-- roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml | 2 +- roles/sap_hana_rhv_hypervisor/vars/main.yml | 8 +++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/defaults/main.yml index 5e89996f9..f7a1672a3 100644 --- a/roles/sap_hana_rhv_hypervisor/defaults/main.yml +++ b/roles/sap_hana_rhv_hypervisor/defaults/main.yml @@ -7,9 +7,9 @@ sap_hana_rhv_hypervisor_run_grub2_mkconfig: yes # Reserve memory [GB] for hypervisor host sap_hana_rhv_hypervisor_reserved_ram: 100 -# allocate hugepages: {static|runtime} +# allocate hugepages: {static|runtime} # static: done at kernel command line which is slow, but safe -# runtime: done through tuned-profile +# runtime: done through tuned-profile sap_hana_rhv_hypervisor_reserve_hugepages: static # kvm.nx_huge_pages: {"auto"|"on"|"off"} diff --git a/roles/sap_hana_rhv_hypervisor/meta/main.yml b/roles/sap_hana_rhv_hypervisor/meta/main.yml index cd6d35b4e..1b86abb7e 100644 --- a/roles/sap_hana_rhv_hypervisor/meta/main.yml +++ b/roles/sap_hana_rhv_hypervisor/meta/main.yml @@ -1,3 +1,4 @@ +--- galaxy_info: role_name: sap_hana_rhv_hypervisor @@ -53,4 +54,4 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, # if you add dependencies to this list. - +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml index a5fded3e4..a002026db 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml @@ -21,8 +21,8 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - default_hugepagesz=1GB - - hugepagesz=1GB + - default_hugepagesz=1GB + - hugepagesz=1GB notify: "Regenerate grub2 conf handler" tags: grubconfig ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml index 9c9c94ee9..d9fb6d820 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml @@ -9,7 +9,7 @@ fail_msg: "FAIL: Hook {{ item }} does not have the correct file permissions (!= 755)." success_msg: "PASS: Hook {{ item }} does have the correct file permissions (755)." ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - + - name: Create tmp dir file: path: /tmp/sap_hana_rhv_hypervisor diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index 13c831e70..3e4096230 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -36,7 +36,7 @@ - name: Print CPU Stepping shell: echo "{{ cpu_stepping }}" - + # skylake: - name: Set ple_gap=0 on Intel Skylake CPU Platform lineinfile: @@ -54,7 +54,7 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "spectre_v2=retpoline" + - "spectre_v2=retpoline" notify: "Regenerate grub2 conf handler" tags: grubconfig when: cpu_stepping == "4" @@ -128,3 +128,4 @@ - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig +... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml index a99082660..1e5801479 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml @@ -1,7 +1,7 @@ --- - name: Create hook dir file: - path: /usr/libexec/vdsm/hooks/before_vm_start + path: /usr/libexec/vdsm/hooks/before_vm_start state: directory - name: Copy hook diff --git a/roles/sap_hana_rhv_hypervisor/vars/main.yml b/roles/sap_hana_rhv_hypervisor/vars/main.yml index e46c6f3c5..90adf4888 100644 --- a/roles/sap_hana_rhv_hypervisor/vars/main.yml +++ b/roles/sap_hana_rhv_hypervisor/vars/main.yml @@ -2,9 +2,7 @@ # vars file for sap_hana_rhv_hypervisor # -# allocate hugepages {static|runtime} -# static: done at kernel command line which is slow, but consistent -# runtime: done through tuned-profile -#sap_hana_rhv_hypervisor_reserve_hugepages: runtime +# packages to install sap_hana_rhv_hypervisor_packages: - - libhugetlbfs-utils + - libhugetlbfs-utils +... From e3778ce805f8e8130f5ca9f219448aa14badfe8e Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:13:11 +0200 Subject: [PATCH 010/375] even more cosmetic fixes --- .../tasks/assert-rhv-hooks.yml | 2 +- .../tasks/configuration.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml index d9fb6d820..09e24c536 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml @@ -9,7 +9,7 @@ fail_msg: "FAIL: Hook {{ item }} does not have the correct file permissions (!= 755)." success_msg: "PASS: Hook {{ item }} does have the correct file permissions (755)." ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - + - name: Create tmp dir file: path: /tmp/sap_hana_rhv_hypervisor diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index 3e4096230..594270ae2 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -68,7 +68,7 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" + - "kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" notify: "Regenerate grub2 conf handler" tags: grubconfig when: sap_hana_rhv_hypervisor_kvm_nx_huge_pages is defined @@ -84,9 +84,9 @@ - name: Trigger tuned profile sap-hana-kvm activation include_tasks: allocate-hugepages-at-runtime.yml - when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" + when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" -- name: Reserve Hugepages statically +- name: Reserve Hugepages statically lineinfile: path: /etc/default/grub backup: yes @@ -95,14 +95,14 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - default_hugepagesz=1GB - - hugepagesz=1GB - - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} + - default_hugepagesz=1GB + - hugepagesz=1GB + - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} notify: "Regenerate grub2 conf handler" tags: grubconfig when: sap_hana_rhv_hypervisor_reserve_hugepages == "static" -- name: Enable IOMMU PT +- name: Enable IOMMU PT lineinfile: path: /etc/default/grub backup: yes @@ -111,8 +111,8 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - intel_iommu=on - - iommu=pt + - intel_iommu=on + - iommu=pt notify: "Regenerate grub2 conf handler" tags: grubconfig From efdf27ae1f17fc3c46d58fae9b62ecfd958d3bd5 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:15:28 +0200 Subject: [PATCH 011/375] cosmetic fixes for guest role --- roles/sap_hana_rhv_guest/meta/main.yml | 3 ++- roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml | 2 +- roles/sap_hana_rhv_guest/tasks/main.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_hana_rhv_guest/meta/main.yml index 6693b0bc7..6d5b7456b 100644 --- a/roles/sap_hana_rhv_guest/meta/main.yml +++ b/roles/sap_hana_rhv_guest/meta/main.yml @@ -50,5 +50,6 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. + # if you add dependencies to this list. +... ... diff --git a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml index 985f856dd..ac99135da 100644 --- a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml @@ -11,4 +11,4 @@ fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" success_msg: "PASS: tuned profile is sap-hana-kvm-guest" ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" -... +... diff --git a/roles/sap_hana_rhv_guest/tasks/main.yml b/roles/sap_hana_rhv_guest/tasks/main.yml index 291be2137..8b36e4be8 100644 --- a/roles/sap_hana_rhv_guest/tasks/main.yml +++ b/roles/sap_hana_rhv_guest/tasks/main.yml @@ -13,7 +13,7 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "tsx={{ sap_hana_rhv_guest_tsx }}" + - "tsx={{ sap_hana_rhv_guest_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig From 1d66dd32c779378f0f124b4855af51e189cdafa8 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:19:07 +0200 Subject: [PATCH 012/375] fixes for hypervisor role --- .../tasks/assert-configuration.yml | 14 +++++--------- .../tasks/configuration.yml | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml index 61ade7e5a..8b5ad235b 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml @@ -37,9 +37,9 @@ __sap_hana_rhv_hypervisor_cpu_stepping_assert: "{{ __sap_hana_rhv_hypervisor_cpu_stepping_output_assert.stdout }}" - name: Print CPU Stepping - debug: + debug: var: __sap_hana_rhv_hypervisor_cpu_stepping_assert - + # skylake: - name: Assert - Check Intel Skylake CPU Platform block: @@ -50,21 +50,19 @@ - name: Assert - Check if ple_gap=0 assert: - that: "__sap_hana_rhv_hypervisor_skylake_plegap_assert.rc == 0" + that: "__sap_hana_rhv_hypervisor_skylake_plegap_assert.rc == 0" fail_msg: "FAIL: ple_gap is not set to 0" success_msg: "PASS: ple_gap is set to 0" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - name: Assert - Check for spectre_v2=retpoline + - name: Assert - Check for spectre_v2=retpoline assert: that: "'spectre_v2=retpoline' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" fail_msg: "FAIL: spectre_v2=retpoline is not on Kernel command line" success_msg: "PASS: spectre_v2=retpoline is on Kernel command line" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - when: __sap_hana_rhv_hypervisor_cpu_stepping_assert == "4" - - + - name: Assert - check sap_hana_rhv_hypervisor_nx_huge_pages block: - name: "Assert - Check kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" @@ -101,7 +99,6 @@ fail_msg: "FAIL: Not enough memory reserved for hypervisor" success_msg: "PASS: Enough memory reserved for hypervisor" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - name: Assert - check Kernel command line block: @@ -111,7 +108,6 @@ success_msg: "PASS: intel_iommu=on on Kernel command line" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - assert: that: "'iommu=pt' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" fail_msg: "FAIL: iommu=pt not on Kernel command line" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index 594270ae2..c4ebc22ec 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -84,7 +84,7 @@ - name: Trigger tuned profile sap-hana-kvm activation include_tasks: allocate-hugepages-at-runtime.yml - when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" + when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" - name: Reserve Hugepages statically lineinfile: @@ -125,7 +125,7 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" + - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig ... From 556a9b4fe3e472f7b3c93695c6b1e79362f537ce Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:24:41 +0200 Subject: [PATCH 013/375] ... --- roles/sap_hana_rhv_hypervisor/handlers/main.yml | 2 +- roles/sap_hana_rhv_hypervisor/meta/main.yml | 1 - .../sap_hana_rhv_hypervisor/tasks/assert-configuration.yml | 6 +++--- roles/sap_hana_rhv_hypervisor/tests/test.yml | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml index d4f124697..3e084eee6 100644 --- a/roles/sap_hana_rhv_hypervisor/handlers/main.yml +++ b/roles/sap_hana_rhv_hypervisor/handlers/main.yml @@ -50,4 +50,4 @@ fail: msg: Reboot is required! when: sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) - +... diff --git a/roles/sap_hana_rhv_hypervisor/meta/main.yml b/roles/sap_hana_rhv_hypervisor/meta/main.yml index 1b86abb7e..9139271b8 100644 --- a/roles/sap_hana_rhv_hypervisor/meta/main.yml +++ b/roles/sap_hana_rhv_hypervisor/meta/main.yml @@ -5,7 +5,6 @@ galaxy_info: author: Nils Koenig description: Provide the configuration for a RHV hypervisor for SAP HANA company: Red Hat - #namespace: my_galaxy_namespace # If the issue tracker for your role is not on github, uncomment the # next line and provide a value diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml index 8b5ad235b..fc7df26b1 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml @@ -91,15 +91,15 @@ block: - name: Get amount of 1G hugepages shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' - register: __sap_hana_rhv_hypervisor_1Ghugepages_assert + register: __sap_hana_rhv_hypervisor_1Ghugepages_assert - name: "Check that at least {{ sap_hana_rhv_hypervisor_reserved_ram }} GB are available for the hypervisor and the rest are 1G hugepages" assert: that: "{{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} >= {{ __sap_hana_rhv_hypervisor_1Ghugepages_assert.stdout }}" fail_msg: "FAIL: Not enough memory reserved for hypervisor" - success_msg: "PASS: Enough memory reserved for hypervisor" + success_msg: "PASS: Enough memory reserved for hypervisor" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - + - name: Assert - check Kernel command line block: - assert: diff --git a/roles/sap_hana_rhv_hypervisor/tests/test.yml b/roles/sap_hana_rhv_hypervisor/tests/test.yml index 4d2890efb..8b44f052f 100644 --- a/roles/sap_hana_rhv_hypervisor/tests/test.yml +++ b/roles/sap_hana_rhv_hypervisor/tests/test.yml @@ -2,4 +2,5 @@ - hosts: localhost remote_user: root roles: - - sap-hana-rhv-hypervisor \ No newline at end of file + - sap-hana-rhv-hypervisor +... From 60eab83132fd8ab21ae22abb5e1752c91bb1327d Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 3 May 2022 16:31:43 +0200 Subject: [PATCH 014/375] ... --- roles/sap_hana_rhv_guest/meta/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_hana_rhv_guest/meta/main.yml index 6d5b7456b..2544d8b09 100644 --- a/roles/sap_hana_rhv_guest/meta/main.yml +++ b/roles/sap_hana_rhv_guest/meta/main.yml @@ -52,4 +52,3 @@ dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, # if you add dependencies to this list. ... -... From a12fb1a80ba34c260cf476ed168b9a14bbfbae1c Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Wed, 4 May 2022 09:11:55 +0200 Subject: [PATCH 015/375] included sap_hana_rhv_* roles in toplevel documentation --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 03acc5b2d..69981cd10 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An | [sap_ha_set_netweaver](/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | | [sap_hostagent](/roles/sap_hostagent) | install SAP Host Agent | | [sap_storage](/roles/sap_storage) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | +| [sap_hana_rhv_guest](/roles/sap_hana_rhv_guest) | configure guest specific settings for a RHV based SAP HANA guest VM | +| [sap_hana_rhv_hypervisor](/roles/sap_hana_rhv_hypervisor) | configure hypervisor specific settings for a SAP HANA guest VM | #### Ansible Roles Lint Status | Role Name | Ansible Lint Status| @@ -60,6 +62,8 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An | [sap_netweaver_preconfigure](/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_netweaver_preconfigure.yml) | | [sap_hana_preconfigure](/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_preconfigure.yml) | | [sap_hana_install](/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_install.yml) | +| [sap_hana_rhv_guest](/roles/sap_hana_rhv_guest) | [![Ansible Lint for sap_hana_rhv_guest](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_rhv_guest.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_rhv_guest.yml) | +| [sap_hana_rhv_hypervisor](/roles/sap_hana_rhv_hypervisor) | [![Ansible Lint for sap_hana_rhv_hypervisor](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_rhv_hypervisor.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_rhv_hypervisor.yml) | ***Notes:*** - Ansible Playbook localhost executions may have limitations on SAP Software installations From b022b6fe330069b66ad862907d0eeb8b92738e10 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Thu, 5 May 2022 14:19:49 +0200 Subject: [PATCH 016/375] guest role docu update --- roles/sap_hana_rhv_guest/README.md | 42 +++++++++++++++++----- roles/sap_hana_rhv_guest/defaults/main.yml | 6 ++-- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_hana_rhv_guest/README.md index 59030925c..8a8d14dbd 100644 --- a/roles/sap_hana_rhv_guest/README.md +++ b/roles/sap_hana_rhv_guest/README.md @@ -6,26 +6,52 @@ This role will check the required settings and parameters for a guest (VM) runni Requirements ------------ -The roles [sap_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_preconfigure) and [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure). +VM with at least RHEL 8.2 installed. +The roles sap_preconfigure and sap_hana_preconfigure have been run on that system. + Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +sap_hana_rhv_guest_run_grub2_mkconfig: yes + +# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hana_rhv_guest_tsx: "on" + +# run role in assert mode? +sap_hana_rhv_guest_assert: false + +# fail if assertion is invalid +sap_hana_rhv_guest_ignore_failed_assertion: no + + Dependencies ------------ -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. +The roles [sap_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_preconfigure) and [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure). + Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: +Simple example that just sets the parameters. + + +- hosts: all + roles: + - sap_hana_rhv_guest + + +Run in assert mode to verify that parameters have been set. + +- hosts: all + roles: + - sap_hana_rhv_guest + vars: + - sap_hana_rhv_guest_assert: yes - - hosts: servers - roles: - - { role: username.rolename, x: 42 } License ------- @@ -35,4 +61,4 @@ Apache-2.0 Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +Nils Koenig (nkoenig@redhat.com) diff --git a/roles/sap_hana_rhv_guest/defaults/main.yml b/roles/sap_hana_rhv_guest/defaults/main.yml index 7c5f54967..d8faa4f71 100644 --- a/roles/sap_hana_rhv_guest/defaults/main.yml +++ b/roles/sap_hana_rhv_guest/defaults/main.yml @@ -1,14 +1,14 @@ --- # defaults file for sap_hana_rhv_guest -#sap_hana_rhv_guest_modify_grub_cmdline_linux: yes sap_hana_rhv_guest_run_grub2_mkconfig: yes -sap_hana_rhv_guest_rhv_specific_config: yes - # Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} # Note the importance of the quotes, otherwise off will be mapped to false sap_hana_rhv_guest_tsx: "on" +# run role in assert mode? +sap_hana_rhv_guest_assert: false + # fail if assertion is invalid sap_hana_rhv_guest_ignore_failed_assertion: no From 47a96c7c9a2a27733689542f21a3a94330044193 Mon Sep 17 00:00:00 2001 From: newkit Date: Thu, 5 May 2022 14:30:37 +0200 Subject: [PATCH 017/375] Update README.md --- roles/sap_hana_rhv_guest/README.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_hana_rhv_guest/README.md index 8a8d14dbd..b2be48a47 100644 --- a/roles/sap_hana_rhv_guest/README.md +++ b/roles/sap_hana_rhv_guest/README.md @@ -13,18 +13,20 @@ The roles sap_preconfigure and sap_hana_preconfigure have been run on that syste Role Variables -------------- +``` sap_hana_rhv_guest_run_grub2_mkconfig: yes +``` +Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} +Note the importance of the quotes, otherwise off will be mapped to false +```sap_hana_rhv_guest_tsx: "on"``` -# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} -# Note the importance of the quotes, otherwise off will be mapped to false -sap_hana_rhv_guest_tsx: "on" +run role in assert mode? +```sap_hana_rhv_guest_assert: false``` -# run role in assert mode? -sap_hana_rhv_guest_assert: false - -# fail if assertion is invalid +fail if assertion is invalid +``` sap_hana_rhv_guest_ignore_failed_assertion: no - +``` Dependencies @@ -37,21 +39,20 @@ Example Playbook ---------------- Simple example that just sets the parameters. - - +``` - hosts: all roles: - sap_hana_rhv_guest - +``` Run in assert mode to verify that parameters have been set. - +``` - hosts: all roles: - sap_hana_rhv_guest vars: - sap_hana_rhv_guest_assert: yes - +``` License ------- From 636ca40c456e09e884a0a09a96567f60bab23822 Mon Sep 17 00:00:00 2001 From: newkit Date: Thu, 5 May 2022 16:28:10 +0200 Subject: [PATCH 018/375] Update README.md --- roles/sap_hana_rhv_guest/README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_hana_rhv_guest/README.md index b2be48a47..c724e1a83 100644 --- a/roles/sap_hana_rhv_guest/README.md +++ b/roles/sap_hana_rhv_guest/README.md @@ -3,6 +3,7 @@ sap_hana_rhv_guest This role will check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. + Requirements ------------ @@ -13,20 +14,14 @@ The roles sap_preconfigure and sap_hana_preconfigure have been run on that syste Role Variables -------------- -``` -sap_hana_rhv_guest_run_grub2_mkconfig: yes -``` -Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} -Note the importance of the quotes, otherwise off will be mapped to false -```sap_hana_rhv_guest_tsx: "on"``` +`sap_hana_rhv_guest_tsx (default: "on")` Intel Transactional Synchronization Extensions (TSX): {"on"|"off"}. +Note the importance of the quotes, otherwise off will be mapped to false. -run role in assert mode? -```sap_hana_rhv_guest_assert: false``` +`sap_hana_rhv_guest_assert (default: false)` In assert mode, the parameters on the system are checked if the confirm with what this role would set. -fail if assertion is invalid -``` -sap_hana_rhv_guest_ignore_failed_assertion: no -``` +`sap_hana_rhv_guest_ignore_failed_assertion (default: no)` Fail if assertion is invalid. + +`sap_hana_rhv_guest_run_grub2_mkconfig (default: yes)` Update the grub2 config. Dependencies From e587c8bbd83a5c225c9812b1262f6101411f07a9 Mon Sep 17 00:00:00 2001 From: newkit Date: Thu, 5 May 2022 16:55:51 +0200 Subject: [PATCH 019/375] Update README.md --- roles/sap_hana_rhv_hypervisor/README.md | 64 ++++++++++++++++++------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/README.md b/roles/sap_hana_rhv_hypervisor/README.md index 23985d949..cc51db647 100644 --- a/roles/sap_hana_rhv_hypervisor/README.md +++ b/roles/sap_hana_rhv_hypervisor/README.md @@ -1,40 +1,70 @@ -sap-hana-rhv-hypervisor +sap_hana_rhv_hypervisor ======================= -TODO - -A brief description of the role goes here. +This role will set and check the required settings and parameters for a hypervisor running VMs for SAP HANA. Requirements ------------ - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +A RHV hypervisor. Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +`sap_hana_rhv_hypervisor_reserved_ram (default: 100)` Reserve memory [GB] for hypervisor host. Depending in the use case should be at least 50-100GB. -Dependencies ------------- +`sap_hana_rhv_hypervisor_reserve_hugepages (default: static)` Hugepage allocation method: {static|runtime}. +static: done at kernel command line which is slow, but safe +runtime: done with hugeadm which is faster, but can in some cases not ensure all HPs are allocated. + +`sap_hana_rhv_hypervisor_kvm_nx_huge_pages (default: "auto")` Setting for the huge page shattering kvm.nx_huge_pages: {"auto"|"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. See https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html for additional information: +``` + kvm.nx_huge_pages= + [KVM] Controls the software workaround for the + X86_BUG_ITLB_MULTIHIT bug. + force : Always deploy workaround. + off : Never deploy workaround. + auto : Deploy workaround based on the presence of + X86_BUG_ITLB_MULTIHIT. + + Default is 'auto'. + + If the software workaround is enabled for the host, + guests do need not to enable it for nested guests. +``` + +`sap_hana_rhv_hypervisor_tsx (default: "off")` Intel Transactional Synchronization Extensions (TSX): {"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. + +`sap_hana_rhv_hypervisor_assert (default: false)` In assert mode, the parameters on the system are checked if the confirm with what this role would set. + +`sap_hana_rhv_hypervisor_ignore_failed_assertion (default: no)` Fail if assertion is invalid. + +`sap_hana_rhv_hypervisor_run_grub2_mkconfig (default: yes)` Update the grub2 config. -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } +Simple example that just sets the parameters. +``` +- hosts: all + roles: + - sap_hana_rhv_hypervisor +``` +Run in assert mode to verify that parameters have been set. +``` +- hosts: all + roles: + - sap_hana_rhv_hypervisor + vars: + - sap_hana_rhv_hypervisor_assert: yes +``` License ------- -BSD +Apache 2.0 Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +Nils Koenig (nkoenig@redhat.com) From cf566dfb68c626c0199edd150ba64330f406d002 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Thu, 5 May 2022 17:00:45 +0200 Subject: [PATCH 020/375] removed tmp, added assert mode default for sap_hana_rhv_hypervisor --- .../sap_hana_rhv_hypervisor/defaults/main.yml | 3 + roles/sap_hana_rhv_hypervisor/tmp | 7045 ----------------- 2 files changed, 3 insertions(+), 7045 deletions(-) delete mode 100644 roles/sap_hana_rhv_hypervisor/tmp diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/defaults/main.yml index f7a1672a3..81806aba8 100644 --- a/roles/sap_hana_rhv_hypervisor/defaults/main.yml +++ b/roles/sap_hana_rhv_hypervisor/defaults/main.yml @@ -20,6 +20,9 @@ sap_hana_rhv_hypervisor_kvm_nx_huge_pages: "auto" # Note the importance of the quotes, otherwise off will be mapped to false sap_hana_rhv_hypervisor_tsx: "off" +# run role in assert mode? +sap_hana_rhv_hypervisor_assert: false + # fail if assertion is invalid sap_hana_rhv_hypervisor_ignore_failed_assertion: no ... diff --git a/roles/sap_hana_rhv_hypervisor/tmp b/roles/sap_hana_rhv_hypervisor/tmp deleted file mode 100644 index 9daff9871..000000000 --- a/roles/sap_hana_rhv_hypervisor/tmp +++ /dev/null @@ -1,7045 +0,0 @@ -root@lu0553 | SUCCESS => { - "ansible_facts": { - "ansible_;vdsmdummy;": { - "active": false, - "device": ";vdsmdummy;", - "features": { - "esp_hw_offload": "off [fixed]", - "esp_tx_csum_hw_offload": "off [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "on [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "off [fixed]", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "off [fixed]", - "rx_vlan_offload": "off [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "off [fixed]", - "tx_checksumming": "on", - "tx_esp_segmentation": "on", - "tx_fcoe_segmentation": "on", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "on", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "on [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "on", - "tx_sctp_segmentation": "on", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "on", - "tx_tcp_mangleid_segmentation": "on", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "on", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "on", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "id": "8000.000000000000", - "interfaces": [], - "macaddress": "52:b5:23:fe:5a:24", - "mtu": 1500, - "promisc": false, - "stp": false, - "timestamping": [ - "rx_software", - "software" - ], - "type": "bridge" - }, - "ansible_all_ipv4_addresses": [ - "10.76.34.58", - "192.168.1.53" - ], - "ansible_all_ipv6_addresses": [ - "fe80::e643:4bff:fe77:f6aa" - ], - "ansible_apparmor": { - "status": "disabled" - }, - "ansible_architecture": "x86_64", - "ansible_bios_date": "11/26/2019", - "ansible_bios_version": "2.4.8", - "ansible_cmdline": { - "BOOT_IMAGE": "(hd0,msdos1)/vmlinuz-4.18.0-193.el8.x86_64", - "crashkernel": "auto", - "null": true, - "quiet": true, - "resume": "UUID=3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711", - "rhgb": true, - "ro": true, - "root": "UUID=952091b8-47df-4344-b5be-a6936e202686" - }, - "ansible_date_time": { - "date": "2020-12-21", - "day": "21", - "epoch": "1608552935", - "hour": "07", - "iso8601": "2020-12-21T12:15:35Z", - "iso8601_basic": "20201221T071535714964", - "iso8601_basic_short": "20201221T071535", - "iso8601_micro": "2020-12-21T12:15:35.714964Z", - "minute": "15", - "month": "12", - "second": "35", - "time": "07:15:35", - "tz": "EST", - "tz_offset": "-0500", - "weekday": "Monday", - "weekday_number": "1", - "weeknumber": "51", - "year": "2020" - }, - "ansible_default_ipv4": { - "address": "10.76.34.58", - "alias": "ovirtmgmt", - "broadcast": "10.76.35.255", - "gateway": "10.76.34.1", - "interface": "ovirtmgmt", - "macaddress": "e4:43:4b:77:f6:aa", - "mtu": 1500, - "netmask": "255.255.254.0", - "network": "10.76.34.0", - "type": "bridge" - }, - "ansible_default_ipv6": {}, - "ansible_device_links": { - "ids": { - "dm-0": [ - "dm-name-36000d31005771c00000000000000004d", - "dm-uuid-mpath-36000d31005771c00000000000000004d", - "scsi-36000d31005771c00000000000000004d", - "wwn-0x6000d31005771c00000000000000004d" - ], - "dm-1": [ - "dm-name-36000d31005771c00000000000000004f", - "dm-uuid-mpath-36000d31005771c00000000000000004f", - "scsi-36000d31005771c00000000000000004f", - "wwn-0x6000d31005771c00000000000000004f" - ], - "dm-10": [ - "dm-name-36000d31005771c000000000000000052", - "dm-uuid-mpath-36000d31005771c000000000000000052", - "scsi-36000d31005771c000000000000000052", - "wwn-0x6000d31005771c000000000000000052" - ], - "dm-11": [ - "dm-name-36000d31005771c000000000000000054", - "dm-uuid-mpath-36000d31005771c000000000000000054", - "scsi-36000d31005771c000000000000000054", - "wwn-0x6000d31005771c000000000000000054" - ], - "dm-12": [ - "dm-name-rhel-root", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXo8Ajg3EHNKvSQHjXhWx6XDIBkvg6Ean" - ], - "dm-13": [ - "dm-name-rhel-home", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkT9IAQknV1nyVlqAZcfx42011xl62XqsrB" - ], - "dm-14": [ - "dm-name-rhel-swap", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXvps4lNUwZ2iUG8Vh7cEYncubi2mGRzz" - ], - "dm-2": [ - "dm-name-36000d31005771c000000000000000051", - "dm-uuid-mpath-36000d31005771c000000000000000051", - "scsi-36000d31005771c000000000000000051", - "wwn-0x6000d31005771c000000000000000051" - ], - "dm-3": [ - "dm-name-36000d31005771c00000000000000004d1", - "dm-uuid-part1-mpath-36000d31005771c00000000000000004d", - "scsi-36000d31005771c00000000000000004d-part1", - "wwn-0x6000d31005771c00000000000000004d-part1" - ], - "dm-4": [ - "dm-name-36000d31005771c000000000000000053", - "dm-uuid-mpath-36000d31005771c000000000000000053", - "scsi-36000d31005771c000000000000000053", - "wwn-0x6000d31005771c000000000000000053" - ], - "dm-5": [ - "dm-name-36000d31005771c000000000000000055", - "dm-uuid-mpath-36000d31005771c000000000000000055", - "scsi-36000d31005771c000000000000000055", - "wwn-0x6000d31005771c000000000000000055" - ], - "dm-6": [ - "dm-name-36000d31005771c000000000000000035", - "dm-uuid-mpath-36000d31005771c000000000000000035", - "scsi-36000d31005771c000000000000000035", - "wwn-0x6000d31005771c000000000000000035" - ], - "dm-7": [ - "dm-name-36000d31005771c000000000000000037", - "dm-uuid-mpath-36000d31005771c000000000000000037", - "scsi-36000d31005771c000000000000000037", - "wwn-0x6000d31005771c000000000000000037" - ], - "dm-8": [ - "dm-name-36000d31005771c000000000000000050", - "dm-uuid-mpath-36000d31005771c000000000000000050", - "scsi-36000d31005771c000000000000000050", - "wwn-0x6000d31005771c000000000000000050" - ], - "dm-9": [ - "dm-name-36000d31005771c000000000000000037p1", - "dm-uuid-part1-mpath-36000d31005771c000000000000000037", - "scsi-36000d31005771c000000000000000037-part1", - "wwn-0x6000d31005771c000000000000000037-part1" - ], - "nvme0n1": [ - "nvme-INTEL_SSDPEDMD020T4D_HHHL_NVMe_2000GB_CVFT619600E82P0EGN", - "nvme-nvme.8086-43564654363139363030453832503045474e-494e54454c205353445045444d44303230543444204848484c204e564d6520323030304742-00000001" - ], - "sda": [ - "ata-MTFDDAV240TCB_1850217D184A", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A", - "scsi-3500a0751217d184a", - "scsi-SATA_MTFDDAV240TCB_1850217D184A", - "wwn-0x500a0751217d184a" - ], - "sda1": [ - "ata-MTFDDAV240TCB_1850217D184A-part1", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part1", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part1", - "scsi-3500a0751217d184a-part1", - "scsi-SATA_MTFDDAV240TCB_1850217D184A-part1", - "wwn-0x500a0751217d184a-part1" - ], - "sda2": [ - "ata-MTFDDAV240TCB_1850217D184A-part2", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part2", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part2", - "scsi-3500a0751217d184a-part2", - "scsi-SATA_MTFDDAV240TCB_1850217D184A-part2", - "wwn-0x500a0751217d184a-part2" - ], - "sdb": [ - "ata-MTFDDAV240TCB_1850217D1801", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801", - "scsi-3500a0751217d1801", - "scsi-SATA_MTFDDAV240TCB_1850217D1801", - "wwn-0x500a0751217d1801" - ], - "sdb1": [ - "ata-MTFDDAV240TCB_1850217D1801-part1", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part1", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part1", - "scsi-3500a0751217d1801-part1", - "scsi-SATA_MTFDDAV240TCB_1850217D1801-part1", - "wwn-0x500a0751217d1801-part1" - ], - "sdb2": [ - "ata-MTFDDAV240TCB_1850217D1801-part2", - "lvm-pv-uuid-ZXaYjf-CCgI-5UmT-KZDs-2ASN-8IF2-10YUO2", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part2", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part2", - "scsi-3500a0751217d1801-part2", - "scsi-SATA_MTFDDAV240TCB_1850217D1801-part2", - "wwn-0x500a0751217d1801-part2" - ] - }, - "labels": {}, - "masters": { - "dm-0": [ - "dm-3" - ], - "dm-7": [ - "dm-9" - ], - "sdaa": [ - "dm-11" - ], - "sdab": [ - "dm-8" - ], - "sdac": [ - "dm-7" - ], - "sdad": [ - "dm-10" - ], - "sdae": [ - "dm-8" - ], - "sdaf": [ - "dm-11" - ], - "sdag": [ - "dm-10" - ], - "sdah": [ - "dm-11" - ], - "sdai": [ - "dm-7" - ], - "sdaj": [ - "dm-8" - ], - "sdak": [ - "dm-10" - ], - "sdal": [ - "dm-11" - ], - "sdam": [ - "dm-0" - ], - "sdan": [ - "dm-1" - ], - "sdao": [ - "dm-2" - ], - "sdap": [ - "dm-4" - ], - "sdaq": [ - "dm-5" - ], - "sdar": [ - "dm-6" - ], - "sdas": [ - "dm-0" - ], - "sdat": [ - "dm-0" - ], - "sdau": [ - "dm-0" - ], - "sdav": [ - "dm-1" - ], - "sdaw": [ - "dm-1" - ], - "sdax": [ - "dm-1" - ], - "sday": [ - "dm-0" - ], - "sdaz": [ - "dm-1" - ], - "sdb2": [ - "dm-12", - "dm-13", - "dm-14" - ], - "sdba": [ - "dm-2" - ], - "sdbb": [ - "dm-4" - ], - "sdbc": [ - "dm-5" - ], - "sdbd": [ - "dm-6" - ], - "sdbe": [ - "dm-7" - ], - "sdbf": [ - "dm-8" - ], - "sdbg": [ - "dm-10" - ], - "sdbh": [ - "dm-11" - ], - "sdbi": [ - "dm-2" - ], - "sdbj": [ - "dm-2" - ], - "sdbk": [ - "dm-2" - ], - "sdbl": [ - "dm-4" - ], - "sdbm": [ - "dm-4" - ], - "sdbn": [ - "dm-4" - ], - "sdbo": [ - "dm-5" - ], - "sdbp": [ - "dm-5" - ], - "sdbq": [ - "dm-5" - ], - "sdbr": [ - "dm-6" - ], - "sdbs": [ - "dm-6" - ], - "sdbt": [ - "dm-6" - ], - "sdc": [ - "dm-0" - ], - "sdd": [ - "dm-1" - ], - "sde": [ - "dm-2" - ], - "sdf": [ - "dm-4" - ], - "sdg": [ - "dm-5" - ], - "sdh": [ - "dm-6" - ], - "sdi": [ - "dm-7" - ], - "sdj": [ - "dm-8" - ], - "sdk": [ - "dm-10" - ], - "sdl": [ - "dm-11" - ], - "sdm": [ - "dm-7" - ], - "sdn": [ - "dm-8" - ], - "sdo": [ - "dm-10" - ], - "sdp": [ - "dm-11" - ], - "sdq": [ - "dm-7" - ], - "sdr": [ - "dm-8" - ], - "sds": [ - "dm-0" - ], - "sdt": [ - "dm-1" - ], - "sdu": [ - "dm-2" - ], - "sdv": [ - "dm-4" - ], - "sdw": [ - "dm-5" - ], - "sdx": [ - "dm-6" - ], - "sdy": [ - "dm-10" - ], - "sdz": [ - "dm-7" - ] - }, - "uuids": { - "dm-12": [ - "0bf93490-3219-48a8-992a-b47b7284dc17" - ], - "dm-13": [ - "7aff2114-e7ac-4d95-8231-06797baf7e43" - ], - "dm-14": [ - "650d95c9-89de-4d38-bd10-5d08fdad3a9d" - ], - "dm-3": [ - "3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711" - ], - "dm-9": [ - "7b87aa88-713f-44c2-afaf-697480c04298" - ], - "sda1": [ - "96dd8b2b-f855-48c5-8467-1635a6ada2c9" - ], - "sda2": [ - "952091b8-47df-4344-b5be-a6936e202686" - ], - "sdb1": [ - "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" - ] - } - }, - "ansible_devices": { - "dm-0": { - "holders": [ - "36000d31005771c00000000000000004d1" - ], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c00000000000000004d", - "dm-uuid-mpath-36000d31005771c00000000000000004d", - "scsi-36000d31005771c00000000000000004d", - "wwn-0x6000d31005771c00000000000000004d" - ], - "labels": [], - "masters": [ - "dm-3" - ], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c00000000000000004d" - }, - "dm-1": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c00000000000000004f", - "dm-uuid-mpath-36000d31005771c00000000000000004f", - "scsi-36000d31005771c00000000000000004f", - "wwn-0x6000d31005771c00000000000000004f" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c00000000000000004f" - }, - "dm-10": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000052", - "dm-uuid-mpath-36000d31005771c000000000000000052", - "scsi-36000d31005771c000000000000000052", - "wwn-0x6000d31005771c000000000000000052" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000052" - }, - "dm-11": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000054", - "dm-uuid-mpath-36000d31005771c000000000000000054", - "scsi-36000d31005771c000000000000000054", - "wwn-0x6000d31005771c000000000000000054" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000054" - }, - "dm-12": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-rhel-root", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXo8Ajg3EHNKvSQHjXhWx6XDIBkvg6Ean" - ], - "labels": [], - "masters": [], - "uuids": [ - "0bf93490-3219-48a8-992a-b47b7284dc17" - ] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "", - "sectors": "437395456", - "sectorsize": "512", - "serial": "1850217D1801", - "size": "208.57 GB", - "support_discard": "4096", - "vendor": null, - "virtual": 1 - }, - "dm-13": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-rhel-home", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkT9IAQknV1nyVlqAZcfx42011xl62XqsrB" - ], - "labels": [], - "masters": [], - "uuids": [ - "7aff2114-e7ac-4d95-8231-06797baf7e43" - ] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "", - "sectors": "20971520", - "sectorsize": "512", - "serial": "1850217D1801", - "size": "10.00 GB", - "support_discard": "4096", - "vendor": null, - "virtual": 1 - }, - "dm-14": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-rhel-swap", - "dm-uuid-LVM-yoQIkreYScBVyYDtqO31TfCHXHE5gFkTXvps4lNUwZ2iUG8Vh7cEYncubi2mGRzz" - ], - "labels": [], - "masters": [], - "uuids": [ - "650d95c9-89de-4d38-bd10-5d08fdad3a9d" - ] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "", - "sectors": "8388608", - "sectorsize": "512", - "serial": "1850217D1801", - "size": "4.00 GB", - "support_discard": "4096", - "vendor": null, - "virtual": 1 - }, - "dm-2": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000051", - "dm-uuid-mpath-36000d31005771c000000000000000051", - "scsi-36000d31005771c000000000000000051", - "wwn-0x6000d31005771c000000000000000051" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000051" - }, - "dm-3": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c00000000000000004d1", - "dm-uuid-part1-mpath-36000d31005771c00000000000000004d", - "scsi-36000d31005771c00000000000000004d-part1", - "wwn-0x6000d31005771c00000000000000004d-part1" - ], - "labels": [], - "masters": [], - "uuids": [ - "3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711" - ] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "", - "sectors": "8388608", - "sectorsize": "512", - "serial": "0005771c", - "size": "4.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c00000000000000004d-part1" - }, - "dm-4": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000053", - "dm-uuid-mpath-36000d31005771c000000000000000053", - "scsi-36000d31005771c000000000000000053", - "wwn-0x6000d31005771c000000000000000053" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000053" - }, - "dm-5": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000055", - "dm-uuid-mpath-36000d31005771c000000000000000055", - "scsi-36000d31005771c000000000000000055", - "wwn-0x6000d31005771c000000000000000055" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000055" - }, - "dm-6": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000035", - "dm-uuid-mpath-36000d31005771c000000000000000035", - "scsi-36000d31005771c000000000000000035", - "wwn-0x6000d31005771c000000000000000035" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000035" - }, - "dm-7": { - "holders": [ - "36000d31005771c000000000000000037p1" - ], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000037", - "dm-uuid-mpath-36000d31005771c000000000000000037", - "scsi-36000d31005771c000000000000000037", - "wwn-0x6000d31005771c000000000000000037" - ], - "labels": [], - "masters": [ - "dm-9" - ], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000037" - }, - "dm-8": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000050", - "dm-uuid-mpath-36000d31005771c000000000000000050", - "scsi-36000d31005771c000000000000000050", - "wwn-0x6000d31005771c000000000000000050" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000050" - }, - "dm-9": { - "holders": [], - "host": "", - "links": { - "ids": [ - "dm-name-36000d31005771c000000000000000037p1", - "dm-uuid-part1-mpath-36000d31005771c000000000000000037", - "scsi-36000d31005771c000000000000000037-part1", - "wwn-0x6000d31005771c000000000000000037-part1" - ], - "labels": [], - "masters": [], - "uuids": [ - "7b87aa88-713f-44c2-afaf-697480c04298" - ] - }, - "model": null, - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "", - "sectors": "21474832384", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": null, - "virtual": 1, - "wwn": "0x6000d31005771c000000000000000037-part1" - }, - "nvme0n1": { - "holders": [], - "host": "Non-Volatile memory controller: Intel Corporation PCIe Data Center SSD (rev 01)", - "links": { - "ids": [ - "nvme-INTEL_SSDPEDMD020T4D_HHHL_NVMe_2000GB_CVFT619600E82P0EGN", - "nvme-nvme.8086-43564654363139363030453832503045474e-494e54454c205353445045444d44303230543444204848484c204e564d6520323030304742-00000001" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": "INTEL SSDPEDMD020T4D HHHL NVMe 2000GB", - "partitions": {}, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "3907029168", - "sectorsize": "512", - "size": "1.82 TB", - "support_discard": "512", - "vendor": null, - "virtual": 1 - }, - "sda": { - "holders": [], - "host": "SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)", - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D184A", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A", - "scsi-3500a0751217d184a", - "scsi-SATA_MTFDDAV240TCB_1850217D184A", - "wwn-0x500a0751217d184a" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": "MTFDDAV240TCB", - "partitions": { - "sda1": { - "holders": [], - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D184A-part1", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part1", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part1", - "scsi-3500a0751217d184a-part1", - "scsi-SATA_MTFDDAV240TCB_1850217D184A-part1", - "wwn-0x500a0751217d184a-part1" - ], - "labels": [], - "masters": [], - "uuids": [ - "96dd8b2b-f855-48c5-8467-1635a6ada2c9" - ] - }, - "sectors": "2097152", - "sectorsize": 512, - "size": "1.00 GB", - "start": "2048", - "uuid": "96dd8b2b-f855-48c5-8467-1635a6ada2c9" - }, - "sda2": { - "holders": [], - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D184A-part2", - "scsi-0ATA_MTFDDAV240TCB_1850217D184A-part2", - "scsi-1ATA_MTFDDAV240TCB_1850217D184A-part2", - "scsi-3500a0751217d184a-part2", - "scsi-SATA_MTFDDAV240TCB_1850217D184A-part2", - "wwn-0x500a0751217d184a-part2" - ], - "labels": [], - "masters": [], - "uuids": [ - "952091b8-47df-4344-b5be-a6936e202686" - ] - }, - "sectors": "104857600", - "sectorsize": 512, - "size": "50.00 GB", - "start": "2099200", - "uuid": "952091b8-47df-4344-b5be-a6936e202686" - } - }, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "468862128", - "sectorsize": "512", - "serial": "1850217D184A", - "size": "223.57 GB", - "support_discard": "4096", - "vendor": "ATA", - "virtual": 1, - "wwn": "0x500a0751217d184a" - }, - "sdaa": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdab": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdac": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdad": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdae": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdaf": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdag": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdah": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdai": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdaj": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdak": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdal": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdam": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdan": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdao": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdap": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdaq": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdar": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdas": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdat": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdau": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdav": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdaw": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdax": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sday": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdaz": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdb": { - "holders": [], - "host": "SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)", - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D1801", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801", - "scsi-3500a0751217d1801", - "scsi-SATA_MTFDDAV240TCB_1850217D1801", - "wwn-0x500a0751217d1801" - ], - "labels": [], - "masters": [], - "uuids": [] - }, - "model": "MTFDDAV240TCB", - "partitions": { - "sdb1": { - "holders": [], - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D1801-part1", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part1", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part1", - "scsi-3500a0751217d1801-part1", - "scsi-SATA_MTFDDAV240TCB_1850217D1801-part1", - "wwn-0x500a0751217d1801-part1" - ], - "labels": [], - "masters": [], - "uuids": [ - "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" - ] - }, - "sectors": "2097152", - "sectorsize": 512, - "size": "1.00 GB", - "start": "2048", - "uuid": "e14c07b0-2d0a-4cf6-b92a-2a3177a31827" - }, - "sdb2": { - "holders": [ - "rhel-home", - "rhel-swap", - "rhel-root" - ], - "links": { - "ids": [ - "ata-MTFDDAV240TCB_1850217D1801-part2", - "lvm-pv-uuid-ZXaYjf-CCgI-5UmT-KZDs-2ASN-8IF2-10YUO2", - "scsi-0ATA_MTFDDAV240TCB_1850217D1801-part2", - "scsi-1ATA_MTFDDAV240TCB_1850217D1801-part2", - "scsi-3500a0751217d1801-part2", - "scsi-SATA_MTFDDAV240TCB_1850217D1801-part2", - "wwn-0x500a0751217d1801-part2" - ], - "labels": [], - "masters": [ - "dm-12", - "dm-13", - "dm-14" - ], - "uuids": [] - }, - "sectors": "466761728", - "sectorsize": 512, - "size": "222.57 GB", - "start": "2099200", - "uuid": null - } - }, - "removable": "0", - "rotational": "0", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "mq-deadline", - "sectors": "468862128", - "sectorsize": "512", - "serial": "1850217D1801", - "size": "223.57 GB", - "support_discard": "4096", - "vendor": "ATA", - "virtual": 1, - "wwn": "0x500a0751217d1801" - }, - "sdba": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbb": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbc": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbd": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbe": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbf": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbg": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbh": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbi": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbj": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbk": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbl": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbm": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbn": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbo": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbp": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbq": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbr": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbs": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdbt": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdc": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdd": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sde": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdf": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdg": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdh": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdi": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdj": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdk": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdl": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdm": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdn": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdo": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdp": { - "holders": [ - "36000d31005771c000000000000000054" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-11" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdq": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdr": { - "holders": [ - "36000d31005771c000000000000000050" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-8" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sds": { - "holders": [ - "36000d31005771c00000000000000004d" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-0" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "104857600", - "sectorsize": "512", - "serial": "0005771c", - "size": "50.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdt": { - "holders": [ - "36000d31005771c00000000000000004f" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-1" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "6442450944", - "sectorsize": "512", - "serial": "0005771c", - "size": "3.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdu": { - "holders": [ - "36000d31005771c000000000000000051" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-2" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdv": { - "holders": [ - "36000d31005771c000000000000000053" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-4" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "314572800", - "sectorsize": "512", - "serial": "0005771c", - "size": "150.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdw": { - "holders": [ - "36000d31005771c000000000000000055" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-5" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "167772160", - "sectorsize": "512", - "serial": "0005771c", - "size": "80.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdx": { - "holders": [ - "36000d31005771c000000000000000035" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-6" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "19327352832", - "sectorsize": "512", - "serial": "0005771c", - "size": "9.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdy": { - "holders": [ - "36000d31005771c000000000000000052" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-10" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "1048576000", - "sectorsize": "512", - "serial": "0005771c", - "size": "500.00 GB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - }, - "sdz": { - "holders": [ - "36000d31005771c000000000000000037" - ], - "host": "Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01)", - "links": { - "ids": [], - "labels": [], - "masters": [ - "dm-7" - ], - "uuids": [] - }, - "model": "Compellent Vol", - "partitions": {}, - "removable": "0", - "rotational": "1", - "sas_address": null, - "sas_device_handle": null, - "scheduler_mode": "none", - "sectors": "21474836480", - "sectorsize": "512", - "serial": "0005771c", - "size": "10.00 TB", - "support_discard": "524288", - "vendor": "COMPELNT", - "virtual": 1 - } - }, - "ansible_distribution": "RedHat", - "ansible_distribution_file_parsed": true, - "ansible_distribution_file_path": "/etc/redhat-release", - "ansible_distribution_file_search_string": "Red Hat", - "ansible_distribution_file_variety": "RedHat", - "ansible_distribution_major_version": "8", - "ansible_distribution_release": "Ootpa", - "ansible_distribution_version": "8.2", - "ansible_dns": { - "nameservers": [ - "10.17.122.10" - ], - "search": [ - "wdf.sap.corp" - ] - }, - "ansible_domain": "wdf.sap.corp", - "ansible_effective_group_id": 0, - "ansible_effective_user_id": 0, - "ansible_eno1": { - "active": true, - "device": "eno1", - "features": { - "esp_hw_offload": "on", - "esp_tx_csum_hw_offload": "on", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off", - "l2_fwd_offload": "off", - "large_receive_offload": "off", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off", - "receive_hashing": "on", - "rx_all": "off", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "on", - "rx_vlan_filter": "on", - "rx_vlan_offload": "on", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [ - "none", - "all" - ], - "ipv4": { - "address": "192.168.1.53", - "broadcast": "192.168.1.255", - "netmask": "255.255.255.0", - "network": "192.168.1.0" - }, - "macaddress": "e4:43:4b:77:f6:a8", - "module": "ixgbe", - "mtu": 9000, - "pciid": "0000:17:00.0", - "phc_index": 2, - "promisc": false, - "speed": 10000, - "timestamping": [ - "tx_hardware", - "tx_software", - "rx_hardware", - "rx_software", - "software", - "raw_hardware" - ], - "type": "ether" - }, - "ansible_eno145": { - "active": true, - "device": "eno145", - "features": { - "esp_hw_offload": "off [fixed]", - "esp_tx_csum_hw_offload": "off [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "on", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off", - "receive_hashing": "on", - "rx_all": "off", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "off [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [ - "none", - "all" - ], - "macaddress": "e4:43:4b:77:f6:aa", - "module": "igb", - "mtu": 1500, - "pciid": "0000:19:00.0", - "phc_index": 0, - "promisc": true, - "speed": 1000, - "timestamping": [ - "tx_hardware", - "tx_software", - "rx_hardware", - "rx_software", - "software", - "raw_hardware" - ], - "type": "ether" - }, - "ansible_eno146": { - "active": true, - "device": "eno146", - "features": { - "esp_hw_offload": "off [fixed]", - "esp_tx_csum_hw_offload": "off [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "on", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off", - "receive_hashing": "on", - "rx_all": "off", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "off [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [ - "none", - "all" - ], - "macaddress": "e4:43:4b:77:f6:ab", - "module": "igb", - "mtu": 1500, - "pciid": "0000:19:00.1", - "phc_index": 1, - "promisc": false, - "speed": 1000, - "timestamping": [ - "tx_hardware", - "tx_software", - "rx_hardware", - "rx_software", - "software", - "raw_hardware" - ], - "type": "ether" - }, - "ansible_eno1v0": { - "active": true, - "device": "eno1v0", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "4e:e0:4e:de:6b:2a", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.0", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v1": { - "active": true, - "device": "eno1v1", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "fa:81:dc:b1:f9:a0", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.2", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v10": { - "active": true, - "device": "eno1v10", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "1a:64:23:7b:04:0f", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.4", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v11": { - "active": true, - "device": "eno1v11", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "e6:fc:59:b2:85:3d", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.6", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v12": { - "active": true, - "device": "eno1v12", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "46:9c:6f:0d:b7:fc", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.0", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v13": { - "active": true, - "device": "eno1v13", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "8a:6d:60:1f:82:7c", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.2", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v14": { - "active": true, - "device": "eno1v14", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "9a:63:20:1b:c4:7f", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.4", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v15": { - "active": true, - "device": "eno1v15", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "fe:7e:85:22:f0:8d", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.6", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v2": { - "active": true, - "device": "eno1v2", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "2e:a1:ec:aa:9d:1a", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.4", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v3": { - "active": true, - "device": "eno1v3", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "3a:78:ea:42:e6:96", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.6", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v4": { - "active": true, - "device": "eno1v4", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "fe:94:ee:e0:13:18", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.0", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v5": { - "active": true, - "device": "eno1v5", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "2e:e3:35:86:bc:ed", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.2", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v6": { - "active": true, - "device": "eno1v6", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "ba:74:c5:4a:4e:7f", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.4", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v7": { - "active": true, - "device": "eno1v7", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "3e:78:6b:ec:35:81", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.6", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v8": { - "active": true, - "device": "eno1v8", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "da:9c:20:91:54:df", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.0", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno1v9": { - "active": true, - "device": "eno1v9", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "e6:fa:41:f5:a9:69", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.2", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2": { - "active": true, - "device": "eno2", - "features": { - "esp_hw_offload": "on", - "esp_tx_csum_hw_offload": "on", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off", - "l2_fwd_offload": "off", - "large_receive_offload": "off", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off", - "receive_hashing": "on", - "rx_all": "off", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "on", - "rx_vlan_filter": "on", - "rx_vlan_offload": "on", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [ - "none", - "all" - ], - "macaddress": "e4:43:4b:77:f6:a9", - "module": "ixgbe", - "mtu": 1500, - "pciid": "0000:17:00.1", - "phc_index": 3, - "promisc": false, - "speed": 10000, - "timestamping": [ - "tx_hardware", - "tx_software", - "rx_hardware", - "rx_software", - "software", - "raw_hardware" - ], - "type": "ether" - }, - "ansible_eno2v0": { - "active": true, - "device": "eno2v0", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "fa:8e:29:da:a8:1f", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.1", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v1": { - "active": true, - "device": "eno2v1", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "4e:c7:e8:b4:d4:95", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.3", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v10": { - "active": true, - "device": "eno2v10", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "3a:66:bc:9e:25:be", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.5", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v11": { - "active": true, - "device": "eno2v11", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "6a:39:01:4b:2b:00", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.7", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v12": { - "active": true, - "device": "eno2v12", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "a6:12:51:c1:22:1a", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.1", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v13": { - "active": true, - "device": "eno2v13", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "2e:15:2b:87:0c:7d", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.3", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v14": { - "active": true, - "device": "eno2v14", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "ea:66:f6:1b:de:15", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.5", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v15": { - "active": true, - "device": "eno2v15", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "b6:e1:dd:b2:04:38", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:13.7", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v2": { - "active": true, - "device": "eno2v2", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "6a:7e:d0:17:84:ea", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.5", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v3": { - "active": true, - "device": "eno2v3", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "b6:c1:3a:37:ac:a4", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:10.7", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v4": { - "active": true, - "device": "eno2v4", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "06:c0:cc:02:59:6a", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.1", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v5": { - "active": true, - "device": "eno2v5", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "ea:df:79:83:a6:e2", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.3", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v6": { - "active": true, - "device": "eno2v6", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "0a:b9:ba:a4:df:90", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.5", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v7": { - "active": true, - "device": "eno2v7", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "e2:c7:ac:90:e8:0f", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:11.7", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v8": { - "active": true, - "device": "eno2v8", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "6a:76:2f:3d:ea:3c", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.1", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_eno2v9": { - "active": true, - "device": "eno2v9", - "features": { - "esp_hw_offload": "on [fixed]", - "esp_tx_csum_hw_offload": "on [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "off [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "on [fixed]", - "rx_vlan_offload": "on [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on", - "tx_checksumming": "on", - "tx_esp_segmentation": "on [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "off [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [fixed]", - "tx_sctp_segmentation": "off [fixed]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "off [fixed]", - "tx_tcp_mangleid_segmentation": "off", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "macaddress": "66:c2:e1:ee:a5:e6", - "module": "ixgbevf", - "mtu": 1500, - "pciid": "0000:17:12.3", - "promisc": false, - "speed": 10000, - "timestamping": [ - "rx_software", - "software" - ], - "type": "ether" - }, - "ansible_env": { - "BEAKER": "http://lu0557.wdf.sap.corp/bkr/", - "BEAKER_HUB_URL": "http://lu0557.wdf.sap.corp/bkr/", - "BEAKER_JOB_WHITEBOARD": "This job was scheduled from the dci-rhel-agent using XML template.", - "BEAKER_LAB_CONTROLLER": "lu0557.wdf.sap.corp", - "BEAKER_LAB_CONTROLLER_URL": "http://lu0557.wdf.sap.corp:8000/", - "BEAKER_RECIPE_ID": "271", - "BEAKER_RECIPE_WHITEBOARD": "", - "BUILDURL": "", - "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/0/bus", - "DUMPSERVER": "", - "GUESTFISH_INIT": "\\e[1;34m", - "GUESTFISH_OUTPUT": "\\e[0m", - "GUESTFISH_PS1": "\\[\\e[1;32m\\]>\\[\\e[0;31m\\] ", - "GUESTFISH_RESTORE": "\\e[0m", - "HOME": "/root", - "LAB_CONTROLLER": "lu0557.wdf.sap.corp", - "LANG": "en_US.UTF-8", - "LESSOPEN": "||/usr/bin/lesspipe.sh %s", - "LOGNAME": "root", - "LOOKASIDE": "", - "LS_COLORS": "rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:", - "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", - "PWD": "/root", - "RHTS_OPTION_COMPATIBLE": "", - "RHTS_OPTION_COMPAT_SERVICE": "", - "SELINUX_LEVEL_REQUESTED": "", - "SELINUX_ROLE_REQUESTED": "", - "SELINUX_USE_CURRENT_RANGE": "", - "SHELL": "/bin/bash", - "SHLVL": "2", - "SSH_CLIENT": "10.76.34.62 56042 22", - "SSH_CONNECTION": "10.76.34.62 56042 10.76.34.58 22", - "SSH_TTY": "/dev/pts/1", - "S_COLORS": "auto", - "TERM": "xterm-256color", - "USER": "root", - "XDG_RUNTIME_DIR": "/run/user/0", - "XDG_SESSION_ID": "70", - "_": "/usr/libexec/platform-python" - }, - "ansible_fibre_channel_wwn": [ - "2100f4e9d453f78e", - "2100f4e9d453f798", - "2100f4e9d4597b59", - "2100f4e9d453f78d", - "2100f4e9d453f78f", - "2100f4e9d453f799", - "2100f4e9d4597b58", - "210034800d6da83b", - "210034800d6da83a", - "2100f4e9d453f78c" - ], - "ansible_fips": false, - "ansible_form_factor": "Rack Mount Chassis", - "ansible_fqdn": "lu0553.wdf.sap.corp", - "ansible_hostname": "lu0553", - "ansible_hostnqn": "", - "ansible_interfaces": [ - "eno1v14", - "eno2v0", - "eno1v15", - "eno2v12", - "eno2v5", - "eno1v13", - "eno2v7", - "eno1v10", - "eno1v3", - "eno1v9", - "eno2v3", - "ovirtmgmt", - "eno2v14", - "eno146", - "eno1", - "eno2", - "eno2v8", - "eno145", - "eno2v15", - "eno1v11", - "eno1v5", - "eno1v12", - ";vdsmdummy;", - "eno2v6", - "eno1v2", - "lo", - "eno2v1", - "eno2v13", - "eno1v7", - "eno1v1", - "eno2v2", - "eno1v4", - "eno1v8", - "eno2v4", - "eno1v0", - "eno2v10", - "eno2v11", - "eno2v9", - "eno1v6" - ], - "ansible_is_chroot": false, - "ansible_iscsi_iqn": "iqn.1994-05.com.redhat:9b77ced16dc6", - "ansible_kernel": "4.18.0-193.el8.x86_64", - "ansible_kernel_version": "#1 SMP Fri Mar 27 14:35:58 UTC 2020", - "ansible_lo": { - "active": true, - "device": "lo", - "features": { - "esp_hw_offload": "off [fixed]", - "esp_tx_csum_hw_offload": "off [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on [fixed]", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "on [fixed]", - "netns_local": "on [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "on [fixed]", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "off [fixed]", - "rx_vlan_offload": "off [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on [fixed]", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "on [fixed]", - "tx_checksumming": "on", - "tx_esp_segmentation": "off [fixed]", - "tx_fcoe_segmentation": "off [fixed]", - "tx_gre_csum_segmentation": "off [fixed]", - "tx_gre_segmentation": "off [fixed]", - "tx_gso_partial": "off [fixed]", - "tx_gso_robust": "off [fixed]", - "tx_ipxip4_segmentation": "off [fixed]", - "tx_ipxip6_segmentation": "off [fixed]", - "tx_lockless": "on [fixed]", - "tx_nocache_copy": "off [fixed]", - "tx_scatter_gather": "on [fixed]", - "tx_scatter_gather_fraglist": "on [fixed]", - "tx_sctp_segmentation": "on", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "on", - "tx_tcp_mangleid_segmentation": "on", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "off [fixed]", - "tx_udp_tnl_csum_segmentation": "off [fixed]", - "tx_udp_tnl_segmentation": "off [fixed]", - "tx_vlan_offload": "off [fixed]", - "tx_vlan_stag_hw_insert": "off [fixed]", - "vlan_challenged": "on [fixed]" - }, - "hw_timestamp_filters": [], - "ipv4": { - "address": "127.0.0.1", - "broadcast": "", - "netmask": "255.0.0.0", - "network": "127.0.0.0" - }, - "ipv6": [ - { - "address": "::1", - "prefix": "128", - "scope": "host" - } - ], - "mtu": 65536, - "promisc": false, - "timestamping": [ - "tx_software", - "rx_software", - "software" - ], - "type": "loopback" - }, - "ansible_local": {}, - "ansible_lsb": {}, - "ansible_lvm": { - "lvs": { - "home": { - "size_g": "10.00", - "vg": "rhel" - }, - "root": { - "size_g": "208.57", - "vg": "rhel" - }, - "swap": { - "size_g": "4.00", - "vg": "rhel" - } - }, - "pvs": { - "/dev/sdb2": { - "free_g": "0", - "size_g": "222.57", - "vg": "rhel" - } - }, - "vgs": { - "rhel": { - "free_g": "0", - "num_lvs": "3", - "num_pvs": "1", - "size_g": "222.57" - } - } - }, - "ansible_machine": "x86_64", - "ansible_machine_id": "bc7d714b2ec8455ab13ef5390ad10c49", - "ansible_memfree_mb": 123688, - "ansible_memory_mb": { - "nocache": { - "free": 124398, - "used": 6066553 - }, - "real": { - "free": 123688, - "total": 6190951, - "used": 6067263 - }, - "swap": { - "cached": 0, - "free": 4095, - "total": 4095, - "used": 0 - } - }, - "ansible_memtotal_mb": 6190951, - "ansible_mounts": [ - { - "block_available": 12269493, - "block_size": 4096, - "block_total": 13100800, - "block_used": 831307, - "device": "/dev/sda2", - "fstype": "xfs", - "inode_available": 26140793, - "inode_total": 26214400, - "inode_used": 73607, - "mount": "/", - "options": "rw,seclabel,relatime,attr2,inode64,noquota", - "size_available": 50255843328, - "size_total": 53660876800, - "uuid": "952091b8-47df-4344-b5be-a6936e202686" - }, - { - "block_available": 213977, - "block_size": 4096, - "block_total": 259584, - "block_used": 45607, - "device": "/dev/sda1", - "fstype": "xfs", - "inode_available": 523925, - "inode_total": 524288, - "inode_used": 363, - "mount": "/boot", - "options": "rw,seclabel,relatime,attr2,inode64,noquota", - "size_available": 876449792, - "size_total": 1063256064, - "uuid": "96dd8b2b-f855-48c5-8467-1635a6ada2c9" - }, - { - "block_available": 79836, - "block_size": 1048576, - "block_total": 1228197, - "block_used": 1148361, - "device": "lu0544.wdf.sap.corp:/archive", - "fstype": "nfs4", - "inode_available": 124026164, - "inode_total": 125828672, - "inode_used": 1802508, - "mount": "/archive", - "options": "rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.76.34.58,local_lock=none,addr=10.76.34.39", - "size_available": 83714113536, - "size_total": 1287857897472, - "uuid": "N/A" - }, - { - "block_available": 944681, - "block_size": 1048576, - "block_total": 996148, - "block_used": 51467, - "device": "192.168.1.100:/lu0553_rhv_os_disks/images", - "fstype": "nfs", - "inode_available": 21251005, - "inode_total": 21251126, - "inode_used": 121, - "mount": "/rhev/data-center/mnt/192.168.1.100:_lu0553__rhv__os__disks_images", - "options": "rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,soft,nolock,nosharecache,proto=tcp,timeo=100,retrans=3,sec=sys,mountaddr=192.168.1.100,mountvers=3,mountport=635,mountproto=udp,local_lock=all,addr=192.168.1.100", - "size_available": 990569824256, - "size_total": 1044536885248, - "uuid": "N/A" - } - ], - "ansible_nodename": "lu0553.wdf.sap.corp", - "ansible_os_family": "RedHat", - "ansible_ovirtmgmt": { - "active": true, - "device": "ovirtmgmt", - "features": { - "esp_hw_offload": "off [fixed]", - "esp_tx_csum_hw_offload": "off [fixed]", - "fcoe_mtu": "off [fixed]", - "generic_receive_offload": "on", - "generic_segmentation_offload": "on", - "highdma": "on", - "hw_tc_offload": "off [fixed]", - "l2_fwd_offload": "off [fixed]", - "large_receive_offload": "off [fixed]", - "loopback": "off [fixed]", - "netns_local": "on [fixed]", - "ntuple_filters": "off [fixed]", - "receive_hashing": "off [fixed]", - "rx_all": "off [fixed]", - "rx_checksumming": "off [fixed]", - "rx_fcs": "off [fixed]", - "rx_gro_hw": "off [fixed]", - "rx_udp_tunnel_port_offload": "off [fixed]", - "rx_vlan_filter": "off [fixed]", - "rx_vlan_offload": "off [fixed]", - "rx_vlan_stag_filter": "off [fixed]", - "rx_vlan_stag_hw_parse": "off [fixed]", - "scatter_gather": "on", - "tcp_segmentation_offload": "on", - "tls_hw_record": "off [fixed]", - "tls_hw_rx_offload": "off [fixed]", - "tls_hw_tx_offload": "off [fixed]", - "tx_checksum_fcoe_crc": "off [fixed]", - "tx_checksum_ip_generic": "on", - "tx_checksum_ipv4": "off [fixed]", - "tx_checksum_ipv6": "off [fixed]", - "tx_checksum_sctp": "off [fixed]", - "tx_checksumming": "on", - "tx_esp_segmentation": "on", - "tx_fcoe_segmentation": "off [requested on]", - "tx_gre_csum_segmentation": "on", - "tx_gre_segmentation": "on", - "tx_gso_partial": "on", - "tx_gso_robust": "off [requested on]", - "tx_ipxip4_segmentation": "on", - "tx_ipxip6_segmentation": "on", - "tx_lockless": "on [fixed]", - "tx_nocache_copy": "off", - "tx_scatter_gather": "on", - "tx_scatter_gather_fraglist": "off [requested on]", - "tx_sctp_segmentation": "off [requested on]", - "tx_tcp6_segmentation": "on", - "tx_tcp_ecn_segmentation": "on", - "tx_tcp_mangleid_segmentation": "on", - "tx_tcp_segmentation": "on", - "tx_udp_segmentation": "on", - "tx_udp_tnl_csum_segmentation": "on", - "tx_udp_tnl_segmentation": "on", - "tx_vlan_offload": "on", - "tx_vlan_stag_hw_insert": "on", - "vlan_challenged": "off [fixed]" - }, - "hw_timestamp_filters": [], - "id": "8000.e4434b77f6aa", - "interfaces": [ - "eno145" - ], - "ipv4": { - "address": "10.76.34.58", - "broadcast": "10.76.35.255", - "netmask": "255.255.254.0", - "network": "10.76.34.0" - }, - "ipv6": [ - { - "address": "fe80::e643:4bff:fe77:f6aa", - "prefix": "64", - "scope": "link" - } - ], - "macaddress": "e4:43:4b:77:f6:aa", - "mtu": 1500, - "promisc": false, - "stp": false, - "timestamping": [ - "rx_software", - "software" - ], - "type": "bridge" - }, - "ansible_pkg_mgr": "dnf", - "ansible_proc_cmdline": { - "BOOT_IMAGE": "(hd0,msdos1)/vmlinuz-4.18.0-193.el8.x86_64", - "crashkernel": "auto", - "null": true, - "quiet": true, - "resume": "UUID=3ff395c5-f4c2-4e0c-8d81-cf8fd1e4c711", - "rhgb": true, - "ro": true, - "root": "UUID=952091b8-47df-4344-b5be-a6936e202686" - }, - "ansible_processor": [ - "0", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "1", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "2", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "3", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "4", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "5", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "6", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "7", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "8", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "9", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "10", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "11", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "12", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "13", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "14", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "15", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "16", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "17", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "18", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "19", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "20", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "21", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "22", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "23", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "24", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "25", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "26", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "27", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "28", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "29", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "30", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "31", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "32", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "33", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "34", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "35", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "36", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "37", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "38", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "39", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "40", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "41", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "42", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "43", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "44", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "45", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "46", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "47", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "48", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "49", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "50", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "51", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "52", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "53", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "54", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "55", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "56", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "57", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "58", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "59", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "60", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "61", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "62", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "63", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "64", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "65", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "66", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "67", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "68", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "69", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "70", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "71", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "72", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "73", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "74", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "75", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "76", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "77", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "78", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "79", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "80", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "81", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "82", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "83", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "84", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "85", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "86", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "87", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "88", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "89", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "90", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "91", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "92", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "93", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "94", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "95", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "96", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "97", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "98", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "99", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "100", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "101", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "102", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "103", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "104", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "105", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "106", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "107", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "108", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "109", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "110", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "111", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "112", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "113", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "114", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "115", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "116", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "117", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "118", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "119", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "120", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "121", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "122", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "123", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "124", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "125", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "126", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "127", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "128", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "129", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "130", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "131", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "132", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "133", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "134", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "135", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "136", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "137", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "138", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "139", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "140", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "141", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "142", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "143", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "144", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "145", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "146", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "147", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "148", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "149", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "150", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "151", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "152", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "153", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "154", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "155", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "156", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "157", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "158", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "159", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "160", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "161", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "162", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "163", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "164", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "165", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "166", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "167", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "168", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "169", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "170", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "171", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "172", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "173", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "174", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "175", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "176", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "177", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "178", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "179", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "180", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "181", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "182", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "183", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "184", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "185", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "186", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "187", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "188", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "189", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "190", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "191", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "192", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "193", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "194", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "195", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "196", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "197", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "198", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "199", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "200", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "201", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "202", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "203", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "204", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "205", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "206", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "207", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "208", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "209", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "210", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "211", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "212", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "213", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "214", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "215", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "216", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "217", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "218", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "219", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "220", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "221", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "222", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz", - "223", - "GenuineIntel", - "Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz" - ], - "ansible_processor_cores": 28, - "ansible_processor_count": 4, - "ansible_processor_threads_per_core": 2, - "ansible_processor_vcpus": 224, - "ansible_product_name": "PowerEdge R940", - "ansible_product_serial": "C8PJVY2", - "ansible_product_uuid": "4c4c4544-0038-5010-804a-c3c04f565932", - "ansible_product_version": "NA", - "ansible_python": { - "executable": "/usr/libexec/platform-python", - "has_sslcontext": true, - "type": "cpython", - "version": { - "major": 3, - "micro": 8, - "minor": 6, - "releaselevel": "final", - "serial": 0 - }, - "version_info": [ - 3, - 6, - 8, - "final", - 0 - ] - }, - "ansible_python_version": "3.6.8", - "ansible_real_group_id": 0, - "ansible_real_user_id": 0, - "ansible_selinux": { - "config_mode": "permissive", - "mode": "permissive", - "policyvers": 31, - "status": "enabled", - "type": "targeted" - }, - "ansible_selinux_python_present": true, - "ansible_service_mgr": "systemd", - "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM4WqXsVwwzN6qMvnVgeitQSMTyjWQjbxXaSxc4/Iwouo2V4ewSMhC2kBtqGLTu5e6vWJ9SZ2WOuwARDYPbLWvA=", - "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIMGjaZpMDLfOyJM8FtRcvPpPExRtIkDECOa+g8DfnRwv", - "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDbV1CPZG/jRoo7nGbUSS4JAX4wx+Uy2iNH2gQOptyy0A9AsC/aYHwHHnTnn6GYToi1oEcsrbknlRUzMTPnrS6U4h96EGlECIgdzjYAya4TuusWaFFXFiJQ99z59HwV48ffWKoEBxC5sMuCz7vkgdMhe3+Bb8t1eKSxRi6ENohLK1br1/zQ2pJnphyjmO7541sPkpTPt3YCUYBjqhlPD8g81KgKg0jU5F0fY/lDtWEeBszN6EPkcjxdU6tbCOmKlkguWmhO+JJHYCPZ86W8wi1//+mhI+mOc9b04luGmhzEMbsgH49lk1356D56Yh7Tt4cwtCJWTQJ39UhtjEYMBw5cjzR01QkrtyiCMtJnHLbDBob6JzUUbBqLUo05+U1TkyuOinhI7bFMokvvkGe4qhEXBjEzSGRM03pmZusyh1Fl7Ttwl/wnSVo3oTHbKRiMuN4MTm7c7nGDWqhmF2TH+850I+Pb8vFJrDo9NLZpytbozAn9La2g5PTG6Wb8PIDP8mc=", - "ansible_swapfree_mb": 4095, - "ansible_swaptotal_mb": 4095, - "ansible_system": "Linux", - "ansible_system_capabilities": [ - "cap_chown", - "cap_dac_override", - "cap_dac_read_search", - "cap_fowner", - "cap_fsetid", - "cap_kill", - "cap_setgid", - "cap_setuid", - "cap_setpcap", - "cap_linux_immutable", - "cap_net_bind_service", - "cap_net_broadcast", - "cap_net_admin", - "cap_net_raw", - "cap_ipc_lock", - "cap_ipc_owner", - "cap_sys_module", - "cap_sys_rawio", - "cap_sys_chroot", - "cap_sys_ptrace", - "cap_sys_pacct", - "cap_sys_admin", - "cap_sys_boot", - "cap_sys_nice", - "cap_sys_resource", - "cap_sys_time", - "cap_sys_tty_config", - "cap_mknod", - "cap_lease", - "cap_audit_write", - "cap_audit_control", - "cap_setfcap", - "cap_mac_override", - "cap_mac_admin", - "cap_syslog", - "cap_wake_alarm", - "cap_block_suspend", - "cap_audit_read+ep" - ], - "ansible_system_capabilities_enforced": "True", - "ansible_system_vendor": "Dell Inc.", - "ansible_uptime_seconds": 584642, - "ansible_user_dir": "/root", - "ansible_user_gecos": "root", - "ansible_user_gid": 0, - "ansible_user_id": "root", - "ansible_user_shell": "/bin/bash", - "ansible_user_uid": 0, - "ansible_userspace_architecture": "x86_64", - "ansible_userspace_bits": "64", - "ansible_virtualization_role": "host", - "ansible_virtualization_type": "kvm", - "discovered_interpreter_python": "/usr/libexec/platform-python", - "gather_subset": [ - "all" - ], - "module_setup": true - }, - "changed": false -} From f726881051dc6e7268b345424c0e921126cf7b5f Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 10 May 2022 15:54:01 +0200 Subject: [PATCH 021/375] updated handler for sap_hana_rhv_*; removed TSX from guest role; docu updates --- roles/sap_hana_rhv_guest/README.md | 20 +++-- roles/sap_hana_rhv_guest/defaults/main.yml | 4 - roles/sap_hana_rhv_guest/handlers/main.yml | 89 ++++++++++++++----- .../tasks/assert-configuration.yml | 15 ---- .../tasks/configuration.yml | 14 --- roles/sap_hana_rhv_guest/tasks/main.yml | 19 ---- .../sap_hana_rhv_hypervisor/handlers/main.yml | 89 ++++++++++++++----- 7 files changed, 144 insertions(+), 106 deletions(-) delete mode 100644 roles/sap_hana_rhv_guest/tasks/assert-configuration.yml delete mode 100644 roles/sap_hana_rhv_guest/tasks/configuration.yml diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_hana_rhv_guest/README.md index c724e1a83..9350cfb14 100644 --- a/roles/sap_hana_rhv_guest/README.md +++ b/roles/sap_hana_rhv_guest/README.md @@ -1,7 +1,7 @@ sap_hana_rhv_guest ================== -This role will check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. +This role will set and check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. Requirements @@ -14,14 +14,20 @@ The roles sap_preconfigure and sap_hana_preconfigure have been run on that syste Role Variables -------------- -`sap_hana_rhv_guest_tsx (default: "on")` Intel Transactional Synchronization Extensions (TSX): {"on"|"off"}. -Note the importance of the quotes, otherwise off will be mapped to false. +### Run the role in assert mode +```yaml +sap_hana_rhv_guest_assert (default: no) +``` +If the following variable is set to `yes`, the role will only check if the configuration of the managed mmachines is according to this role. Default is `no`. -`sap_hana_rhv_guest_assert (default: false)` In assert mode, the parameters on the system are checked if the confirm with what this role would set. -`sap_hana_rhv_guest_ignore_failed_assertion (default: no)` Fail if assertion is invalid. +### Behavior of the role in assert mode +```yaml +sap_hana_rhv_guest_assert_ignore_errors (default: no) +``` +If the role is run in assert mode and the following variable is set to `yes`, assertion errors will not cause the role to fail. This can be useful for creating reports. +Default is `no`, meaning that the role will fail for any assertion error which is discovered. This variable has no meaning if the role is not run in assert mode. -`sap_hana_rhv_guest_run_grub2_mkconfig (default: yes)` Update the grub2 config. Dependencies @@ -37,6 +43,8 @@ Simple example that just sets the parameters. ``` - hosts: all roles: + - sap_preconfigure + - sap_hana_preconfigure - sap_hana_rhv_guest ``` diff --git a/roles/sap_hana_rhv_guest/defaults/main.yml b/roles/sap_hana_rhv_guest/defaults/main.yml index d8faa4f71..938ef8743 100644 --- a/roles/sap_hana_rhv_guest/defaults/main.yml +++ b/roles/sap_hana_rhv_guest/defaults/main.yml @@ -3,10 +3,6 @@ sap_hana_rhv_guest_run_grub2_mkconfig: yes -# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} -# Note the importance of the quotes, otherwise off will be mapped to false -sap_hana_rhv_guest_tsx: "on" - # run role in assert mode? sap_hana_rhv_guest_assert: false diff --git a/roles/sap_hana_rhv_guest/handlers/main.yml b/roles/sap_hana_rhv_guest/handlers/main.yml index 63d3cdbc7..c2f6d38c3 100644 --- a/roles/sap_hana_rhv_guest/handlers/main.yml +++ b/roles/sap_hana_rhv_guest/handlers/main.yml @@ -1,53 +1,94 @@ --- -# handlers file for sap_hana_rhv_guest - name: "Check if server is booted in BIOS or UEFI mode" stat: path: /sys/firmware/efi get_checksum: no - register: efi_exists - listen: "Regenerate grub2 conf handler" + register: __sap_hana_rhv_guest_register_stat_sys_firmware_efi + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler when: - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) -- debug: - var: efi_exists.stat.exists - listen: "Regenerate grub2 conf handler" +- name: Debug BIOS or UEFI + debug: + var: __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler when: - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - name: "Run grub-mkconfig (BIOS mode)" command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: command_result - listen: "Regenerate grub2 conf handler" + register: __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler + notify: __sap_hana_rhv_guest_reboot_handler when: - - not efi_exists.stat.exists + - not __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) -- debug: - var: command_result.stdout_lines, command_result.stderr_lines - listen: "Regenerate grub2 conf handler" +- name: "Debug grub-mkconfig BIOS mode" + debug: + var: __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler when: - - not efi_exists.stat.exists + - not __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) +- name: "Set the grub.cfg location RHEL" + set_fact: + __sap_hana_rhv_guest_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + set_fact: + __sap_hana_rhv_guest_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + - name: "Run grub-mkconfig (UEFI mode)" - command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg - register: command_result - listen: "Regenerate grub2 conf handler" + command: "grub2-mkconfig -o {{ __sap_hana_rhv_guest_uefi_boot_dir }}" + register: __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler + notify: __sap_hana_rhv_guest_reboot_handler when: - - efi_exists.stat.exists + - __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) -- debug: - var: command_result.stdout_lines, command_result.stderr_lines - listen: "Regenerate grub2 conf handler" +- name: "Debug grub-mkconfig UEFI" + debug: + var: __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler when: - - efi_exists.stat.exists + - __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) -- name: "Reboot handler" +- name: "Run grubby for enabling TSX" + command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_hana_rhv_guest_register_grubby_update + listen: __sap_hana_rhv_guest_grubby_update_handler + notify: __sap_hana_rhv_guest_reboot_handler + +- name: Reboot the managed node + reboot: + test_command: /bin/true + listen: __sap_hana_rhv_guest_reboot_handler + when: + - sap_hana_rhv_guest_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required fail: msg: Reboot is required! - when: sap_hana_rhv_guest_fail_if_reboot_required|d(true) -... + listen: __sap_hana_rhv_guest_reboot_handler + when: + - sap_hana_rhv_guest_fail_if_reboot_required|d(true) + - not sap_hana_rhv_guest_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + debug: + msg: "WARN: Reboot is required!" + listen: __sap_hana_rhv_guest_reboot_handler + when: + - not sap_hana_rhv_guest_fail_if_reboot_required|d(true) + - not sap_hana_rhv_guest_reboot_ok|d(false) diff --git a/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml b/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml deleted file mode 100644 index 43388f09b..000000000 --- a/roles/sap_hana_rhv_guest/tasks/assert-configuration.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# tasks file for sap-hana-rhv-hypervisor - -- name: Get kernel command line - command: cat /proc/cmdline - register: __sap_hana_rhv_guest_register_kernelcmdline_assert - -- name: Assert - check Kernel command line - block: - - assert: - that: "'tsx=on' in __sap_hana_rhv_guest_register_kernelcmdline_assert.stdout" - fail_msg: "FAIL: tsx=on not on Kernel command line" - success_msg: "PASS: tsx=on on Kernel command line" - ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" -... diff --git a/roles/sap_hana_rhv_guest/tasks/configuration.yml b/roles/sap_hana_rhv_guest/tasks/configuration.yml deleted file mode 100644 index 04f72bd7c..000000000 --- a/roles/sap_hana_rhv_guest/tasks/configuration.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Set TSX - lineinfile: - path: /etc/default/grub - backup: yes - backrefs: yes - state: present - regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' - line: "\\1 {{ item }}\"" - with_items: - - "tsx={{ sap_hana_rhv_guest_tsx }}" - notify: "Regenerate grub2 conf handler" - tags: grubconfig -... diff --git a/roles/sap_hana_rhv_guest/tasks/main.yml b/roles/sap_hana_rhv_guest/tasks/main.yml index 8b36e4be8..79ffea6c3 100644 --- a/roles/sap_hana_rhv_guest/tasks/main.yml +++ b/roles/sap_hana_rhv_guest/tasks/main.yml @@ -4,23 +4,6 @@ - name: Trigger tuned profile sap-hana-kvm-guest activation include_tasks: set-tuned-profile.yml -- name: Set TSX - lineinfile: - path: /etc/default/grub - backup: yes - backrefs: yes - state: present - regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' - line: "\\1 {{ item }}\"" - with_items: - - "tsx={{ sap_hana_rhv_guest_tsx }}" - notify: "Regenerate grub2 conf handler" - tags: grubconfig - -- name: Display the role path - debug: - var: role_path - - name: Set filename prefix to empty string if role is run in normal mode set_fact: __sap_hana_rhv_guest_fact_assert_prefix: "" @@ -31,7 +14,5 @@ __sap_hana_rhv_guest_fact_assert_prefix: "assert-" when: sap_hana_rhv_hypervisor_assert|d(false) -- include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}configuration.yml' - - include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}set-tuned-profile.yml' ... diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml index 3e084eee6..331d5f238 100644 --- a/roles/sap_hana_rhv_hypervisor/handlers/main.yml +++ b/roles/sap_hana_rhv_hypervisor/handlers/main.yml @@ -1,53 +1,94 @@ --- -# handlers file for sap_hana_rhv_hypervisor - name: "Check if server is booted in BIOS or UEFI mode" stat: path: /sys/firmware/efi get_checksum: no - register: efi_exists - listen: "Regenerate grub2 conf handler" + register: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler when: - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) -- debug: - var: efi_exists.stat.exists - listen: "Regenerate grub2 conf handler" +- name: Debug BIOS or UEFI + debug: + var: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler when: - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - name: "Run grub-mkconfig (BIOS mode)" command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: command_result - listen: "Regenerate grub2 conf handler" + register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + notify: __sap_hana_rhv_hypervisor_reboot_handler when: - - not efi_exists.stat.exists + - not __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) -- debug: - var: command_result.stdout_lines, command_result.stderr_lines - listen: "Regenerate grub2 conf handler" +- name: "Debug grub-mkconfig BIOS mode" + debug: + var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler when: - - not efi_exists.stat.exists + - not __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) +- name: "Set the grub.cfg location RHEL" + set_fact: + __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + set_fact: + __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + - name: "Run grub-mkconfig (UEFI mode)" - command: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg - register: command_result - listen: "Regenerate grub2 conf handler" + command: "grub2-mkconfig -o {{ __sap_hana_rhv_hypervisor_uefi_boot_dir }}" + register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + notify: __sap_hana_rhv_hypervisor_reboot_handler when: - - efi_exists.stat.exists + - __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) -- debug: - var: command_result.stdout_lines, command_result.stderr_lines - listen: "Regenerate grub2 conf handler" +- name: "Debug grub-mkconfig UEFI" + debug: + var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler when: - - efi_exists.stat.exists + - __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) -- name: "Reboot handler" +- name: "Run grubby for enabling TSX" + command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_hana_rhv_hypervisor_register_grubby_update + listen: __sap_hana_rhv_hypervisor_grubby_update_handler + notify: __sap_hana_rhv_hypervisor_reboot_handler + +- name: Reboot the managed node + reboot: + test_command: /bin/true + listen: __sap_hana_rhv_hypervisor_reboot_handler + when: + - sap_hana_rhv_hypervisor_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required fail: msg: Reboot is required! - when: sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) -... + listen: __sap_hana_rhv_hypervisor_reboot_handler + when: + - sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) + - not sap_hana_rhv_hypervisor_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + debug: + msg: "WARN: Reboot is required!" + listen: __sap_hana_rhv_hypervisor_reboot_handler + when: + - not sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) + - not sap_hana_rhv_hypervisor_reboot_ok|d(false) From 5390fa155041147ddda7f5742a19972c6e4ce72a Mon Sep 17 00:00:00 2001 From: kksat <> Date: Mon, 23 May 2022 11:00:30 +0200 Subject: [PATCH 022/375] [sap_hana_rhv_hypervisor] testing with molecule --- roles/sap_hana_rhv_hypervisor/.yamllint | 33 ++++ roles/sap_hana_rhv_hypervisor/meta/main.yml | 14 +- .../molecule/default/INSTALL.rst | 15 ++ .../molecule/default/converge.yml | 7 + .../molecule/default/create.yml | 52 +++++ .../molecule/default/defaults/main.yml | 13 ++ .../molecule/default/destroy.yml | 27 +++ .../molecule/default/molecule.yml | 36 ++++ .../molecule/default/requirements.yml | 2 + .../default/tasks/create_instance.yml | 187 ++++++++++++++++++ .../default/tasks/destroy_instance.yml | 80 ++++++++ .../molecule/default/verify.yml | 10 + .../tasks/configuration.yml | 36 +++- .../tasks/installation.yml | 2 + .../tasks/rhv-hooks.yml | 4 + .../tasks/set-tuned-profile.yml | 6 + roles/sap_hana_rhv_hypervisor/vars/main.yml | 2 + 17 files changed, 518 insertions(+), 8 deletions(-) create mode 100644 roles/sap_hana_rhv_hypervisor/.yamllint create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/create.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml create mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml diff --git a/roles/sap_hana_rhv_hypervisor/.yamllint b/roles/sap_hana_rhv_hypervisor/.yamllint new file mode 100644 index 000000000..882767605 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/sap_hana_rhv_hypervisor/meta/main.yml b/roles/sap_hana_rhv_hypervisor/meta/main.yml index 9139271b8..de7cb5fa0 100644 --- a/roles/sap_hana_rhv_hypervisor/meta/main.yml +++ b/roles/sap_hana_rhv_hypervisor/meta/main.yml @@ -3,6 +3,7 @@ galaxy_info: role_name: sap_hana_rhv_hypervisor author: Nils Koenig + namespace: community description: Provide the configuration for a RHV hypervisor for SAP HANA company: Red Hat @@ -19,7 +20,7 @@ galaxy_info: # - CC-BY-4.0 license: GPL-2.0-or-later - min_ansible_version: 2.9 + min_ansible_version: "2.9" # If this a Container Enabled role, provide the minimum Ansible Container version. # min_ansible_container_version: @@ -30,11 +31,12 @@ galaxy_info: # To view available platforms and versions (or releases), visit: # https://galaxy.ansible.com/api/v1/platforms/ # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 + platforms: + - name: EL + versions: + - "7" + - "8" + - "9" # - name: SomePlatform # versions: # - all diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst b/roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst new file mode 100644 index 000000000..c615318ef --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst @@ -0,0 +1,15 @@ +******* +Delegated driver installation guide +******* + +Requirements +============ + +This driver is delegated to the developer. Up to the developer to implement +requirements. + +Install +======= + +This driver is delegated to the developer. Up to the developer to implement +requirements. diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml new file mode 100644 index 000000000..918a9f742 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include sap_hana_rhv_hypervisor" + include_role: + name: "sap_hana_rhv_hypervisor" diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/create.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/create.yml new file mode 100644 index 000000000..5d8768f14 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/create.yml @@ -0,0 +1,52 @@ +--- +# based on example from IBM +# https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/examples/simple-vm-ssh/create.yml + +- name: Create + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ molecule_no_log }}" + + vars: + ibm_molecule_servers: + results: [] + changed: false + + tasks: + - name: Include default variables + ansible.builtin.include_vars: + file: defaults/main.yml + + - name: Create instances + ansible.builtin.include_tasks: tasks/create_instance.yml + with_items: "{{ molecule_yml.platforms }}" + + + # TODO: Developer must implement and populate 'server' variable + + - when: ibm_molecule_servers.changed | default(false) | bool + block: + - name: Populate instance config dict + set_fact: + instance_conf_dict: { + 'instance': "{{ item.instance }}", + 'address': "{{ item.address }}", + 'user': "{{ item.user }}", + 'port': "{{ item.port }}", + 'identity_file': "{{ item.identity_file }}", } + with_items: "{{ ibm_molecule_servers.results }}" + register: instance_config_dict + + - name: Convert instance config dict to a list + set_fact: + instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" + + - name: Dump instance config + copy: + content: | + # Molecule managed + + {{ instance_conf | to_json | from_json | to_yaml }} + dest: "{{ molecule_instance_config }}" + mode: 0600 diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml new file mode 100644 index 000000000..5be8882de --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml @@ -0,0 +1,13 @@ +--- +resource_group_name_default: "rh-pacemaker" +ibm_is_vpc_name_default: "molecule" +ibm_is_subnet_name_default: "molecule-subnet" +total_ipv4_address_count_const: 256 +ibm_is_ssh_public_key_path_default: "~/.ssh/id_rsa.pub" +ibm_is_ssh_private_key_path_default: "~/.ssh/id_rsa" +ibm_is_floating_ip_create_default: true +ibm_molecule_user_const: vpcuser +ibm_molecule_port_const: 22 +instance_tcp_allowed_ports_default: + - port_max: 22 + port_min: 22 \ No newline at end of file diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml new file mode 100644 index 000000000..e4e2b38a8 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml @@ -0,0 +1,27 @@ +--- +- name: Destroy + hosts: localhost + connection: local + gather_facts: false + no_log: "{{ molecule_no_log }}" + tasks: + - name: Create instances + ansible.builtin.include_tasks: + file: tasks/destroy_instance.yml + with_items: "{{ molecule_yml.platforms }}" + + # Mandatory configuration for Molecule to function. + + - name: Populate instance config + set_fact: + instance_conf: {} + + - name: Dump instance config + copy: + content: | + # Molecule managed + + {{ instance_conf | to_json | from_json | to_yaml }} + dest: "{{ molecule_instance_config }}" + mode: 0600 + when: server.changed | default(false) | bool diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml new file mode 100644 index 000000000..d51b28998 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml @@ -0,0 +1,36 @@ +--- +dependency: + name: shell + command: | + ansible-galaxy install -r $MOLECULE_SCENARIO_DIRECTORY/requirements.yml + # pip install -r $MOLECULE_SCENARIO_DIRECTORY/requirements.txt + +driver: + name: delegated +platforms: + - name: rhel8-4 + # placement_group: + # name: sap-ppg + # placement_strategy: host + # TODO: add management of proximity placement group + # see https://github.com/IBM-Cloud/ansible-collection-ibm/blob/bcea72c9b1cb2b7792259d66655b01c6a6d650fb/docs/ibm_compute_placement_group.rst + + # resource_group_name: "rh-pacemaker" + # ibm_is_vpc_name: "molecule" + # ibm_is_subnet_name: "molecule-subnet" + # ibm_is_ssh_public_key_path: "~/.ssh/id_rsa.pub" + # ibm_is_ssh_private_key_path: "~/.ssh/id_rsa" + instance_profile: "bx2d-16x64" # 64 Gb + instance_image_name: "ibm-redhat-8-4-amd64-sap-hana-2" + instance_zone: "us-south-3" + # https://cloud.ibm.com/docs/overview?topic=overview-locations + + # ibm_is_floating_ip_create: true + # instance_tcp_allowed_ports: + # - port_max: 22 + # port_min: 22 + +provisioner: + name: ansible +verifier: + name: ansible diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml new file mode 100644 index 000000000..606556e25 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml @@ -0,0 +1,2 @@ +collections: + - ibm.cloudcollection \ No newline at end of file diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml new file mode 100644 index 000000000..87175d6a7 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml @@ -0,0 +1,187 @@ +--- + # - name: Check resource group exists + # ibm.cloudcollection.ibm_resource_group_info: + # name: "{{ item.resource_group_name }}" + # failed_when: + # - ibm_molecule_resource_group.rc != 0 + # - '"ResourceGroupDoesnotExist" not in ibm_molecule_resource_group.stderr' + # register: ibm_molecule_resource_group + + # - name: Print ibm_molecule_resource_group + # ansible.builtin.debug: + # msg: "{{ ibm_molecule_resource_group }}" + + - name: Create resource group + ibm.cloudcollection.ibm_resource_group: + name: "{{ item.resource_group_name | + default (resource_group_name_default) }}" + register: ibm_molecule_resource_group + + # - name: Print ibm_molecule_resource_group + # ansible.builtin.debug: + # msg: "{{ ibm_molecule_resource_group }}" + + # - name: Checking for existing VPC + # ibm.cloudcollection.ibm_is_vpc_info: + # name: "{{ item.ibm_is_vpc_name }}" + # failed_when: + # - ibm_molecule_vpc.rc != 0 + # - '"No VPC found" not in ibm_molecule_vpc.stderr' + # register: ibm_molecule_vpc + + - name: Configure VPC + ibm.cloudcollection.ibm_is_vpc: + name: "{{ item.ibm_is_vpc_name | + default(ibm_is_vpc_name_default) }}" + resource_group: "{{ ibm_molecule_resource_group.resource.id }}" + state: available + id: "{{ ibm_molecule_vpc.resource.id | default(omit) }}" + register: ibm_molecule_vpc + + # - name: Checking for existing VPC Subnet + # ibm.cloudcollection.ibm_is_subnet_info: + # name: "{{ item.ibm_is_subnet_name }}" + # failed_when: + # - ibm_molecule_subnet.rc != 0 + # - '"No subnet found" not in subnet.stderr' + # register: ibm_molecule_subnet + + - name: Configure VPC Subnet + ibm.cloudcollection.ibm_is_subnet: + name: "{{ item.ibm_is_subnet_name | + default(ibm_is_subnet_name_default) }}" + resource_group: "{{ ibm_molecule_resource_group.resource.id }}" + state: available + id: "{{ ibm_molecule_subnet.id | default(omit) }}" + vpc: "{{ ibm_molecule_vpc.resource.id }}" + total_ipv4_address_count: "{{ total_ipv4_address_count_const | int }}" + zone: "{{ item.instance_zone }}" + register: ibm_molecule_subnet + + - name: Checking for existing SSH key + ibm.cloudcollection.ibm_is_ssh_key_info: + name: "key-{{ lookup('file', ibm_is_ssh_public_key_path | + default(ibm_is_ssh_public_key_path_default) ) | b64encode | hash('md5') }}" + failed_when: + - ibm_molecule_ssh_key.rc != 0 + - '"No SSH Key found" not in ibm_molecule_ssh_key.stderr' + register: ibm_molecule_ssh_key +# TODO: do not create key if it already exists +# if key is used by at least one machine it cannot be recreated, and this tasks actually recreates the key + - name: Configure SSH Key + ibm.cloudcollection.ibm_is_ssh_key: + name: "key-{{ lookup('file', ibm_is_ssh_public_key_path | + default(ibm_is_ssh_public_key_path_default) ) | b64encode | hash('md5') }}" + resource_group: "{{ ibm_molecule_resource_group.resource.id }}" + public_key: "{{ lookup('file', ibm_is_ssh_public_key_path | + default(ibm_is_ssh_public_key_path_default) ) }}" + id: "{{ ibm_molecule_ssh_key.resource.id | default(omit) }}" + register: ibm_molecule_ssh_key_create + when: ibm_molecule_ssh_key.resource.id is not defined +# See how to create ssh key fingerprint - it should be used as key name when key is created +# https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated +# https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html +# To work with Base64 encoded strings: +# {{ encoded | b64decode }} +# {{ decoded | string | b64encode }} +# To get the md5 hash of a string: +# {{ 'test1' | hash('md5') }} +# # => "5a105e8b9d40e1329780d62ea2265d8a" +# "key-5a105e8b9d40e1329780d62ea2265d8a" - key name cannot start with number + + - name: Retrieve image list for mapping + ibm.cloudcollection.ibm_is_images_info: + register: ibm_molecule_images_list + changed_when: false + + - name: Set VM image name/id dictionary fact + set_fact: + ibm_molecule_image_dict: + "{{ ibm_molecule_images_list.resource.images | + items2dict(key_name='name', value_name='id') }}" + changed_when: false + + - name: Check for existing VSI + ibm.cloudcollection.ibm_is_instance_info: + name: "{{ item.name }}" + failed_when: + - ibm_molecule_vsi.rc != 0 + - '"No Instance found" not in ibm_molecule_vsi.stderr' + register: ibm_molecule_vsi + + - name: Configure VSI + ibm.cloudcollection.ibm_is_instance: + name: "{{ item.name }}" + resource_group: "{{ ibm_molecule_resource_group.resource.id }}" + state: available + id: "{{ ibm_molecule_vsi.resource.id | default(omit) }}" + vpc: "{{ ibm_molecule_vpc.resource.id }}" + profile: "{{ item.instance_profile }}" + image: "{{ ibm_molecule_image_dict[item.instance_image_name] }}" + keys: + - "{{ ibm_molecule_ssh_key_create.resource.id | + default(ibm_molecule_ssh_key.resource.id) }}" + primary_network_interface: + - subnet: "{{ ibm_molecule_subnet.resource.id }}" + zone: "{{ item.instance_zone }}" + register: ibm_molecule_vsi + + # - name: Print ibm_molecule_vsi + # ansible.builtin.debug: + # msg: "{{ ibm_molecule_vsi }}" + + - name: Check for existing Floating IP + ibm.cloudcollection.ibm_is_floating_ip_info: + name: "{{ item.name }}-fip" + failed_when: + - ibm_molecule_fip.rc != 0 + - '"No floatingIP found" not in ibm_molecule_fip.stderr' + register: ibm_molecule_fip + + - name: Configure Floating IP Address + ibm.cloudcollection.ibm_is_floating_ip: + name: "{{ item.name }}-fip" + resource_group: "{{ ibm_molecule_resource_group.resource.id }}" + state: available + id: "{{ ibm_molecule_fip.id | default(omit) }}" + target: "{{ ibm_molecule_vsi.resource.primary_network_interface[0]['id'] }}" + register: ibm_molecule_fip + when: + - item.ibm_is_floating_ip_create | + default (ibm_is_floating_ip_create_default) + + # - name: Print Floating IP Address + # debug: + # msg: + # - "IP Address: {{ ibm_molecule_fip.resource.address }}" + + - name: Configure Security Group Rule to open SSH on the VSI + ibm.cloudcollection.ibm_is_security_group_rule: + state: available + group: "{{ ibm_molecule_vpc.resource.default_security_group }}" + direction: inbound + remote: 0.0.0.0/0 + tcp: "{{ item.instance_tcp_allowed_ports | + default(instance_tcp_allowed_ports_default) }}" + + - name: Return array with inventory parameters + ansible.builtin.set_fact: + ibm_molecule_servers: + results: "{{ ibm_molecule_servers.results }} + + [{ + 'instance': '{{ item.name }}', + 'address': '{{ ibm_molecule_fip.resource.address }}', + 'user': '{{ ibm_molecule_user_const }}', + 'port': '{{ ibm_molecule_port_const }}', + 'identity_file': '{{ item.ibm_is_ssh_private_key_path | + default (ibm_is_ssh_private_key_path_default) }}' + }]" + changed: true + + # - name: Set ibm_molecule_servers.changed to true + # ansible.builtin.set_fact: + # ibm_molecule_servers.changed: true + + - name: Print ibm_molecule_servers + ansible.builtin.debug: + msg: "{{ ibm_molecule_servers }}" \ No newline at end of file diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml new file mode 100644 index 000000000..db4592f01 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml @@ -0,0 +1,80 @@ +--- + + # Developer must implement. + # https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/examples/simple-vm-ssh/destroy.yml + - name: Check for existing Floating IP + ibm.cloudcollection.ibm_is_floating_ip_info: + name: "{{ item.name }}-fip" + failed_when: + - ibm_molecule_fip.rc != 0 + - '"No floating IP found" not in ibm_molecule_fip.stderr' + register: ibm_molecule_fip + + - name: Release Floating IP + ibm.cloudcollection.ibm_is_floating_ip: + state: absent + id: "{{ ibm_molecule_fip.resource.id }}" + when: ibm_molecule_fip.resource.id is defined + + - name: Check for existing VSI + ibm.cloudcollection.ibm_is_instance_info: + name: "{{ item.name }}" + failed_when: + - ibm_molecule_vsi.rc != 0 + - '"No Instance found" not in ibm_molecule_vsi.stderr' + register: ibm_molecule_vsi + + - name: Remove VSI + ibm.cloudcollection.ibm_is_instance: + state: absent + id: "{{ ibm_molecule_vsi.resource.id }}" + vpc: "{{ ibm_molecule_vsi.resource.vpc }}" + keys: [] + image: "{{ ibm_molecule_vsi.resource.image }}" + profile: "{{ ibm_molecule_vsi.resource.profile }}" + zone: "{{ ibm_molecule_vsi.resource.zone }}" + primary_network_interface: + - subnet: "{{ ibm_molecule_vsi.resource.primary_network_interface[0].subnet }}" + when: ibm_molecule_vsi.resource.id is defined + + # - name: Checking for existing SSH key + # ibm.cloudcollection.ibm_is_ssh_key_info: + # name: "{{ ssh_key_name }}" + # failed_when: + # - ssh_key.rc != 0 + # - '"No SSH Key found" not in ssh_key.stderr' + # register: ssh_key + + # - name: Remove SSH Key + # ibm.cloudcollection.ibm_is_ssh_key: + # state: absent + # id: "{{ ssh_key.resource.id }}" + # when: ssh_key.resource.id is defined + + # - name: Checking for existing VPC Subnet + # ibm.cloudcollection.ibm_is_subnet_info: + # name: "{{ subnet_name }}" + # failed_when: + # - subnet.rc != 0 + # - '"No subnet found" not in subnet.stderr' + # register: subnet + + # - name: Remove VPC Subnet + # ibm.cloudcollection.ibm_is_subnet: + # state: absent + # id: "{{ subnet.resource.id }}" + # when: subnet.resource.id is defined + + # - name: Checking for existing VPC + # ibm.cloudcollection.ibm_is_vpc_info: + # name: "{{ vpc_name }}" + # failed_when: + # - vpc.rc != 0 + # - '"No VPC found" not in vpc.stderr' + # register: vpc + + # - name: Remove VPC + # ibm.cloudcollection.ibm_is_vpc: + # state: absent + # id: "{{ vpc.resource.id }}" + # when: vpc.resource.id is defined \ No newline at end of file diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml new file mode 100644 index 000000000..79044cd06 --- /dev/null +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml @@ -0,0 +1,10 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + gather_facts: false + tasks: + - name: Example assertion + assert: + that: true diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index c4ebc22ec..537b45592 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -4,38 +4,56 @@ - name: Test if kernel same page merging (KSM) exists shell: systemctl cat ksm register: ksm - ignore_errors: yes + ignore_errors: true + become: true + become_user: root - name: Test if kernel same page merging (KSM) tuning daemon exists shell: systemctl cat ksmtuned register: ksmtuned - ignore_errors: yes + ignore_errors: true + become: true + become_user: root - name: Stop kernel same page merging (KSM) shell: systemctl stop ksm when: ksm.rc == 0 + become: true + become_user: root - name: Disable kernel same page merging (KSM) shell: systemctl disable ksm when: ksm.rc == 0 + become: true + become_user: root - name: Stop Kernel Samepage Merging (KSM) Tuning Daemon shell: systemctl stop ksmtuned when: ksmtuned.rc == 0 + become: true + become_user: root - name: Disable Kernel Samepage Merging (KSM) Tuning Daemon shell: systemctl disable ksmtuned when: ksmtuned.rc == 0 + become: true + become_user: root - name: Check CPU Stepping shell: lscpu | awk '/Stepping/{print $2}' register: cpu_stepping_output + become: true + become_user: root - set_fact: cpu_stepping: "{{ cpu_stepping_output.stdout }}" + become: true + become_user: root - name: Print CPU Stepping shell: echo "{{ cpu_stepping }}" + become: true + become_user: root # skylake: - name: Set ple_gap=0 on Intel Skylake CPU Platform @@ -43,6 +61,8 @@ path: /etc/modprobe.d/kvm.conf line: options kvm_intel ple_gap=0 when: cpu_stepping == "4" + become: true + become_user: root # skylake - name: Set spectre_v2=retpoline on Intel Skylake CPU Platform @@ -58,6 +78,8 @@ notify: "Regenerate grub2 conf handler" tags: grubconfig when: cpu_stepping == "4" + become: true + become_user: root - name: "Set kvm.nx_huge_pages to {{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" lineinfile: @@ -72,6 +94,8 @@ notify: "Regenerate grub2 conf handler" tags: grubconfig when: sap_hana_rhv_hypervisor_kvm_nx_huge_pages is defined + become: true + become_user: root - name: Set seccomp_sanbox=0 lineinfile: @@ -81,6 +105,8 @@ state: present regexp: 'seccomp_sandbox' line: "seccomp_sandbox = 0" + become: true + become_user: root - name: Trigger tuned profile sap-hana-kvm activation include_tasks: allocate-hugepages-at-runtime.yml @@ -101,6 +127,8 @@ notify: "Regenerate grub2 conf handler" tags: grubconfig when: sap_hana_rhv_hypervisor_reserve_hugepages == "static" + become: true + become_user: root - name: Enable IOMMU PT lineinfile: @@ -115,6 +143,8 @@ - iommu=pt notify: "Regenerate grub2 conf handler" tags: grubconfig + become: true + become_user: root - name: Enable TSX lineinfile: @@ -128,4 +158,6 @@ - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" notify: "Regenerate grub2 conf handler" tags: grubconfig + become: true + become_user: root ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml index a362c84fd..91160153e 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml @@ -3,4 +3,6 @@ package: state: present name: "{{ sap_hana_rhv_hypervisor_packages }}" + become: true + become_user: root ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml index 1e5801479..ab1ac0f3a 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml @@ -3,10 +3,14 @@ file: path: /usr/libexec/vdsm/hooks/before_vm_start state: directory + become: true + become_user: root - name: Copy hook copy: dest: "/usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" src: "{{ item }}" mode: '0755' + become: true + become_user: root ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml index b2a347e4a..d376af2a2 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml @@ -3,6 +3,8 @@ file: path: /usr/lib/tuned/sap-hana-kvm-host state: directory + become: true + become_user: root - name: Create sap-hana-kvm-host tuned profile copy: @@ -29,7 +31,11 @@ # Setting C3 state sleep mode/power savings on X86 # and force_latency=70 on Power force_latency=cstate.id:3|70 + become: true + become_user: root - name: Activate tuned profile command: tuned-adm profile sap-hana-kvm-host + become: true + become_user: root ... diff --git a/roles/sap_hana_rhv_hypervisor/vars/main.yml b/roles/sap_hana_rhv_hypervisor/vars/main.yml index 90adf4888..f258aec1c 100644 --- a/roles/sap_hana_rhv_hypervisor/vars/main.yml +++ b/roles/sap_hana_rhv_hypervisor/vars/main.yml @@ -5,4 +5,6 @@ # packages to install sap_hana_rhv_hypervisor_packages: - libhugetlbfs-utils + - qemu-kvm + - libvirt ... From 28727072da0164e9def01a8d410b8f57d2b60347 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 24 May 2022 20:05:18 +0200 Subject: [PATCH 023/375] added become root and defaults for sap_hana_rhv_hypervisor_reboot_ok and sap_hana_rhv_hypervisor_fail_if_reboot_required --- roles/sap_hana_rhv_hypervisor/defaults/main.yml | 8 +++++++- roles/sap_hana_rhv_hypervisor/handlers/main.yml | 6 ++++++ .../molecule/default/molecule.yml | 2 +- roles/sap_hana_rhv_hypervisor/tasks/configuration.yml | 10 +++++----- roles/sap_hana_rhv_hypervisor/vars/main.yml | 1 + 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hana_rhv_hypervisor/defaults/main.yml index 81806aba8..7c9678101 100644 --- a/roles/sap_hana_rhv_hypervisor/defaults/main.yml +++ b/roles/sap_hana_rhv_hypervisor/defaults/main.yml @@ -1,7 +1,13 @@ --- # defaults file for sap_hana_rhv_hypervisor -#sap_hana_rhv_hypervisor_modify_grub_cmdline_linux: yes +# is it okay to reboot host? +sap_hana_rhv_hypervisor_reboot_ok: true + +# should the role fail if a reboot is required +sap_hana_rhv_hypervisor_fail_if_reboot_required: false + +# recreate kernel command line with grub2-mkconfig sap_hana_rhv_hypervisor_run_grub2_mkconfig: yes # Reserve memory [GB] for hypervisor host diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml index 331d5f238..4625d66a2 100644 --- a/roles/sap_hana_rhv_hypervisor/handlers/main.yml +++ b/roles/sap_hana_rhv_hypervisor/handlers/main.yml @@ -24,6 +24,9 @@ when: - not __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + become: true + become_user: root + - name: "Debug grub-mkconfig BIOS mode" debug: @@ -54,6 +57,9 @@ when: - __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) + become: true + become_user: root + - name: "Debug grub-mkconfig UEFI" debug: diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml index d51b28998..fd25be96b 100644 --- a/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml +++ b/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml @@ -8,7 +8,7 @@ dependency: driver: name: delegated platforms: - - name: rhel8-4 + - name: "sap-hana-rhv-hypervisor-default" # placement_group: # name: sap-ppg # placement_strategy: host diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index 537b45592..240516761 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -75,7 +75,7 @@ line: "\\1 {{ item }}\"" with_items: - "spectre_v2=retpoline" - notify: "Regenerate grub2 conf handler" + notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler tags: grubconfig when: cpu_stepping == "4" become: true @@ -91,7 +91,7 @@ line: "\\1 {{ item }}\"" with_items: - "kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" - notify: "Regenerate grub2 conf handler" + notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler tags: grubconfig when: sap_hana_rhv_hypervisor_kvm_nx_huge_pages is defined become: true @@ -124,7 +124,7 @@ - default_hugepagesz=1GB - hugepagesz=1GB - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} - notify: "Regenerate grub2 conf handler" + notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler tags: grubconfig when: sap_hana_rhv_hypervisor_reserve_hugepages == "static" become: true @@ -141,7 +141,7 @@ with_items: - intel_iommu=on - iommu=pt - notify: "Regenerate grub2 conf handler" + notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler tags: grubconfig become: true become_user: root @@ -156,7 +156,7 @@ line: "\\1 {{ item }}\"" with_items: - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" - notify: "Regenerate grub2 conf handler" + notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler tags: grubconfig become: true become_user: root diff --git a/roles/sap_hana_rhv_hypervisor/vars/main.yml b/roles/sap_hana_rhv_hypervisor/vars/main.yml index f258aec1c..c3c96fe66 100644 --- a/roles/sap_hana_rhv_hypervisor/vars/main.yml +++ b/roles/sap_hana_rhv_hypervisor/vars/main.yml @@ -7,4 +7,5 @@ sap_hana_rhv_hypervisor_packages: - libhugetlbfs-utils - qemu-kvm - libvirt + - tuned ... From a67a626c895f6db4fd240e636d5a1b6cf012a6e2 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 24 May 2022 20:32:15 +0200 Subject: [PATCH 024/375] converted to fqcns --- .../sap_hana_rhv_hypervisor/handlers/main.yml | 24 +++++++------- .../tasks/allocate-hugepages-at-runtime.yml | 6 ++-- .../tasks/assert-configuration.yml | 28 ++++++++-------- .../tasks/assert-installation.yml | 4 +-- .../tasks/assert-rhv-hooks.yml | 12 +++---- .../tasks/assert-set-tuned-profile.yml | 4 +-- .../tasks/configuration.yml | 32 +++++++++---------- .../tasks/installation.yml | 2 +- roles/sap_hana_rhv_hypervisor/tasks/main.yml | 6 ++-- .../tasks/rhv-hooks.yml | 4 +-- .../tasks/set-tuned-profile.yml | 6 ++-- 11 files changed, 64 insertions(+), 64 deletions(-) diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml index 4625d66a2..d26179283 100644 --- a/roles/sap_hana_rhv_hypervisor/handlers/main.yml +++ b/roles/sap_hana_rhv_hypervisor/handlers/main.yml @@ -1,7 +1,7 @@ --- - name: "Check if server is booted in BIOS or UEFI mode" - stat: + ansible.builtin.stat: path: /sys/firmware/efi get_checksum: no register: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi @@ -10,14 +10,14 @@ - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - name: Debug BIOS or UEFI - debug: + ansible.builtin.debug: var: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler when: - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - name: "Run grub-mkconfig (BIOS mode)" - command: grub2-mkconfig -o /boot/grub2/grub.cfg + ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler notify: __sap_hana_rhv_hypervisor_reboot_handler @@ -29,7 +29,7 @@ - name: "Debug grub-mkconfig BIOS mode" - debug: + ansible.builtin.debug: var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stdout_lines, __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stderr_lines listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler @@ -38,19 +38,19 @@ - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - name: "Set the grub.cfg location RHEL" - set_fact: + ansible.builtin.set_fact: __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg when: - ansible_distribution == 'RedHat' - name: "Set the grub.cfg location SLES" - set_fact: + ansible.builtin.set_fact: __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg when: - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - name: "Run grub-mkconfig (UEFI mode)" - command: "grub2-mkconfig -o {{ __sap_hana_rhv_hypervisor_uefi_boot_dir }}" + ansible.builtin.command: "grub2-mkconfig -o {{ __sap_hana_rhv_hypervisor_uefi_boot_dir }}" register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler notify: __sap_hana_rhv_hypervisor_reboot_handler @@ -62,7 +62,7 @@ - name: "Debug grub-mkconfig UEFI" - debug: + ansible.builtin.debug: var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stdout_lines, __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stderr_lines listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler @@ -71,20 +71,20 @@ - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - name: "Run grubby for enabling TSX" - command: grubby --args="tsx=on" --update-kernel=ALL + ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL register: __sap_hana_rhv_hypervisor_register_grubby_update listen: __sap_hana_rhv_hypervisor_grubby_update_handler notify: __sap_hana_rhv_hypervisor_reboot_handler - name: Reboot the managed node - reboot: + ansible.builtin.reboot: test_command: /bin/true listen: __sap_hana_rhv_hypervisor_reboot_handler when: - sap_hana_rhv_hypervisor_reboot_ok|d(false) - name: Let the role fail if a reboot is required - fail: + ansible.builtin.fail: msg: Reboot is required! listen: __sap_hana_rhv_hypervisor_reboot_handler when: @@ -92,7 +92,7 @@ - not sap_hana_rhv_hypervisor_reboot_ok|d(false) - name: Show a warning message if a reboot is required - debug: + ansible.builtin.debug: msg: "WARN: Reboot is required!" listen: __sap_hana_rhv_hypervisor_reboot_handler when: diff --git a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml index a002026db..2017dd004 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml @@ -1,19 +1,19 @@ --- - name: Install libhugetlbfs - yum: + ansible.builtin.yum: name: libhugetlbfs, libhugetlbfs-utils state: present #XXX better location than rc.local? - name: Add hugepage allocation to /etc/rc.local - blockinfile: + ansible.builtin.blockinfile: path: /etc/rc.local marker: "" block: | hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hana_rhv_hypervisor_reserved_ram }}"}') - name: Set default hugepage size - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml index fc7df26b1..e8fc8ca2b 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml @@ -2,61 +2,61 @@ # tasks file for sap_hana_rhv_hypervisor - name: Get kernel command line - command: cat /proc/cmdline + ansible.builtin.command: cat /proc/cmdline register: __sap_hana_rhv_hypervisor_kernelcmdline_assert - name: "Assert - Kernel same page merging (KSM): Get status" - shell: systemctl status ksm + ansible.builtin.shell: systemctl status ksm register: __sap_hana_rhv_hypervisor_ksmstatus_assert ignore_errors: yes - name: "Assert - Kernel same page merging (KSM): Check if stopped" - assert: + ansible.builtin.assert: that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmstatus_assert.stdout" fail_msg: "FAIL: ksm is running" success_msg: "PASS: ksm not running" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Get status" - shell: systemctl status ksmtuned + ansible.builtin.shell: systemctl status ksmtuned register: __sap_hana_rhv_hypervisor_ksmtunedstatus_assert ignore_errors: yes - name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Check if stopped" - assert: + ansible.builtin.assert: that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmtunedstatus_assert.stdout" fail_msg: "FAIL: ksmtuned is running" success_msg: "PASS: ksmtuned not running" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - name: Check CPU Stepping - shell: lscpu | awk '/Stepping/{print $2}' + ansible.builtin.shell: lscpu | awk '/Stepping/{print $2}' register: __sap_hana_rhv_hypervisor_cpu_stepping_output_assert - set_fact: __sap_hana_rhv_hypervisor_cpu_stepping_assert: "{{ __sap_hana_rhv_hypervisor_cpu_stepping_output_assert.stdout }}" - name: Print CPU Stepping - debug: + ansible.builtin.debug: var: __sap_hana_rhv_hypervisor_cpu_stepping_assert # skylake: - name: Assert - Check Intel Skylake CPU Platform block: - name: Get ple_gap - command: grep -E '^options\s+kvm_intel.*?ple_gap\s*=\s*0.*$' /etc/modprobe.d/kvm.conf + ansible.builtin.command: grep -E '^options\s+kvm_intel.*?ple_gap\s*=\s*0.*$' /etc/modprobe.d/kvm.conf register: __sap_hana_rhv_hypervisor_skylake_plegap_assert ignore_errors: yes - name: Assert - Check if ple_gap=0 - assert: + ansible.builtin.assert: that: "__sap_hana_rhv_hypervisor_skylake_plegap_assert.rc == 0" fail_msg: "FAIL: ple_gap is not set to 0" success_msg: "PASS: ple_gap is set to 0" ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - name: Assert - Check for spectre_v2=retpoline - assert: + ansible.builtin.assert: that: "'spectre_v2=retpoline' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" fail_msg: "FAIL: spectre_v2=retpoline is not on Kernel command line" success_msg: "PASS: spectre_v2=retpoline is on Kernel command line" @@ -66,7 +66,7 @@ - name: Assert - check sap_hana_rhv_hypervisor_nx_huge_pages block: - name: "Assert - Check kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" - assert: + ansible.builtin.assert: that: "'kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_nx_huge_pages }}' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" fail_msg: "FAIL: kvm.nx_huge_pages is not {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" success_msg: "PASS: kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" @@ -81,7 +81,7 @@ ignore_errors: yes - name: "Assert - Check seccomp_sanbox=0 is in /etc/libvirt/qemu.conf" - assert: + ansible.builtin.assert: that: "{{ __sap_hana_rhv_hypervisor_seccomp_assert.rc }} == 0" fail_msg: "FAIL: seccomp_sandbox != 0" success_msg: "PASS: seccomp_sanbox == 0" @@ -90,11 +90,11 @@ - name: Assert - check amount of 1G hugepages block: - name: Get amount of 1G hugepages - shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' + ansible.builtin.shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' register: __sap_hana_rhv_hypervisor_1Ghugepages_assert - name: "Check that at least {{ sap_hana_rhv_hypervisor_reserved_ram }} GB are available for the hypervisor and the rest are 1G hugepages" - assert: + ansible.builtin.assert: that: "{{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} >= {{ __sap_hana_rhv_hypervisor_1Ghugepages_assert.stdout }}" fail_msg: "FAIL: Not enough memory reserved for hypervisor" success_msg: "PASS: Enough memory reserved for hypervisor" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml index 953bdf387..089b6b3b6 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml @@ -1,9 +1,9 @@ --- - name: Gather package facts - package_facts: + ansible.builtin.package_facts: - name: Assert that all required packages are installed - assert: + ansible.builtin.assert: that: "'{{ line_item }}' in ansible_facts.packages" fail_msg: "FAIL: Package '{{ line_item }}' is not installed!" success_msg: "PASS: Package '{{ line_item }}' is installed." diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml index 09e24c536..32b159795 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml @@ -1,32 +1,32 @@ --- - name: Check file permissions - command: "stat -c%a /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + ansible.builtin.command: "stat -c%a /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" register: __sap_hana_rhv_hypervisor_register_file_permissions_assert - name: Assert hook file permissions - assert: + ansible.builtin.assert: that: "__sap_hana_rhv_hypervisor_register_file_permissions_assert.stdout == '755'" fail_msg: "FAIL: Hook {{ item }} does not have the correct file permissions (!= 755)." success_msg: "PASS: Hook {{ item }} does have the correct file permissions (755)." ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - name: Create tmp dir - file: + ansible.builtin.file: path: /tmp/sap_hana_rhv_hypervisor state: directory - name: Copy hook for checking - copy: + ansible.builtin.copy: dest: "/tmp/sap_hana_rhv_hypervisor/{{ item }}" src: "{{ item }}" - name: Diff hook - command: "diff -uw /tmp/sap_hana_rhv_hypervisor/{{ item }} /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + ansible.builtin.command: "diff -uw /tmp/sap_hana_rhv_hypervisor/{{ item }} /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" register: __sap_hana_rhv_hypervisor_register_hook_diff_assert ignore_errors: yes - name: Assert hook content - assert: + ansible.builtin.assert: that: "__sap_hana_rhv_hypervisor_register_hook_diff_assert.rc == 0" fail_msg: "FAIL: Hook {{ item }} has been modified, please investigate manually." success_msg: "PASS: Hook {{ item }} not modified" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml index f86f3de35..9825381e1 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml @@ -2,11 +2,11 @@ - name: Assert - Check tuned profile block: - name: Get tuned profile - command: tuned-adm active + ansible.builtin.command: tuned-adm active register: __sap_hana_rhv_hypervisor_tuned_profile_assert - name: Verify tuned profile - assert: + ansible.builtin.assert: that: "'Current active profile: sap-hana-kvm-host' in __sap_hana_rhv_hypervisor_tuned_profile_assert.stdout" fail_msg: "FAIL: tuned profile is not sap-hana-kvm-host" success_msg: "PASS: tuned profile is sap-hana-kvm-host" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml index 240516761..7fd6da704 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml @@ -2,45 +2,45 @@ # tasks file for sap_hana_rhv_hypervisor - name: Test if kernel same page merging (KSM) exists - shell: systemctl cat ksm + ansible.builtin.shell: systemctl cat ksm register: ksm ignore_errors: true become: true become_user: root - name: Test if kernel same page merging (KSM) tuning daemon exists - shell: systemctl cat ksmtuned + ansible.builtin.shell: systemctl cat ksmtuned register: ksmtuned ignore_errors: true become: true become_user: root - name: Stop kernel same page merging (KSM) - shell: systemctl stop ksm + ansible.builtin.shell: systemctl stop ksm when: ksm.rc == 0 become: true become_user: root - name: Disable kernel same page merging (KSM) - shell: systemctl disable ksm + ansible.builtin.shell: systemctl disable ksm when: ksm.rc == 0 become: true become_user: root - name: Stop Kernel Samepage Merging (KSM) Tuning Daemon - shell: systemctl stop ksmtuned + ansible.builtin.shell: systemctl stop ksmtuned when: ksmtuned.rc == 0 become: true become_user: root - name: Disable Kernel Samepage Merging (KSM) Tuning Daemon - shell: systemctl disable ksmtuned + ansible.builtin.shell: systemctl disable ksmtuned when: ksmtuned.rc == 0 become: true become_user: root - name: Check CPU Stepping - shell: lscpu | awk '/Stepping/{print $2}' + ansible.builtin.shell: lscpu | awk '/Stepping/{print $2}' register: cpu_stepping_output become: true become_user: root @@ -51,13 +51,13 @@ become_user: root - name: Print CPU Stepping - shell: echo "{{ cpu_stepping }}" + ansible.builtin.shell: echo "{{ cpu_stepping }}" become: true become_user: root # skylake: - name: Set ple_gap=0 on Intel Skylake CPU Platform - lineinfile: + ansible.builtin.lineinfile: path: /etc/modprobe.d/kvm.conf line: options kvm_intel ple_gap=0 when: cpu_stepping == "4" @@ -66,7 +66,7 @@ # skylake - name: Set spectre_v2=retpoline on Intel Skylake CPU Platform - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes @@ -82,7 +82,7 @@ become_user: root - name: "Set kvm.nx_huge_pages to {{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes @@ -98,7 +98,7 @@ become_user: root - name: Set seccomp_sanbox=0 - lineinfile: + ansible.builtin.lineinfile: path: /etc/libvirt/qemu.conf backup: yes backrefs: yes @@ -109,11 +109,11 @@ become_user: root - name: Trigger tuned profile sap-hana-kvm activation - include_tasks: allocate-hugepages-at-runtime.yml + ansible.builtin.include_tasks: allocate-hugepages-at-runtime.yml when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" - name: Reserve Hugepages statically - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes @@ -131,7 +131,7 @@ become_user: root - name: Enable IOMMU PT - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes @@ -147,7 +147,7 @@ become_user: root - name: Enable TSX - lineinfile: + ansible.builtin.lineinfile: path: /etc/default/grub backup: yes backrefs: yes diff --git a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml index 91160153e..89b902a52 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/installation.yml @@ -1,6 +1,6 @@ --- - name: Ensure required packages are installed - package: + ansible.builtin.package: state: present name: "{{ sap_hana_rhv_hypervisor_packages }}" become: true diff --git a/roles/sap_hana_rhv_hypervisor/tasks/main.yml b/roles/sap_hana_rhv_hypervisor/tasks/main.yml index 655e2c3f3..dc88a53a9 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/main.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/main.yml @@ -1,15 +1,15 @@ --- - name: Display the role path - debug: + ansible.builtin.debug: var: role_path - name: Set filename prefix to empty string if role is run in normal mode - set_fact: + ansible.builtin.set_fact: assert_prefix: "" when: not sap_hana_rhv_hypervisor_assert|d(false) - name: Prepend filename with assert string if role is run in assert mode - set_fact: + ansible.builtin.set_fact: assert_prefix: "assert-" when: sap_hana_rhv_hypervisor_assert|d(false) diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml index ab1ac0f3a..09a5b0ddd 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml @@ -1,13 +1,13 @@ --- - name: Create hook dir - file: + ansible.builtin.file: path: /usr/libexec/vdsm/hooks/before_vm_start state: directory become: true become_user: root - name: Copy hook - copy: + ansible.builtin.copy: dest: "/usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" src: "{{ item }}" mode: '0755' diff --git a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml index d376af2a2..305050cc3 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml +++ b/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml @@ -1,13 +1,13 @@ --- - name: Create tuned profile directory /usr/lib/tuned/sap-hana-kvm-host - file: + ansible.builtin.file: path: /usr/lib/tuned/sap-hana-kvm-host state: directory become: true become_user: root - name: Create sap-hana-kvm-host tuned profile - copy: + ansible.builtin.copy: dest: "/usr/lib/tuned/sap-hana-kvm-host/tuned.conf" content: | # @@ -35,7 +35,7 @@ become_user: root - name: Activate tuned profile - command: tuned-adm profile sap-hana-kvm-host + ansible.builtin.command: tuned-adm profile sap-hana-kvm-host become: true become_user: root ... From b59e6bfa319bfb3b47ad35f66fe0793b9e7190a3 Mon Sep 17 00:00:00 2001 From: Karoly Czovek <30385976+karolyczovek@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:04:38 +0200 Subject: [PATCH 025/375] explicit delegaiton of become:false become: false does not gets delegated to localhost - if running from container where no sudo installed fails with error. --- roles/sap_hana_install/tasks/post_install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 090981854..11af3a708 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -49,6 +49,8 @@ mode: '0600' become: false delegate_to: 127.0.0.1 + vars: + ansible_become: false tags: sap_hana_install_generate_input_file when: sap_hana_install_new_system|d(true) From 95fbcfbefbfeda1ba0738058558db4f8a9d163fd Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 13:39:04 +0200 Subject: [PATCH 026/375] preconfigure and hana_install roles: ansible-lint improvements - Further ansible-lint cleanup - Added links from .ansible-lint and .yamllint.yml in the collection's home to the home directories of the preconfigure and hana_install roles --- roles/sap_general_preconfigure/.ansible-lint | 1 + roles/sap_general_preconfigure/.yamllint.yml | 1 + roles/sap_general_preconfigure/tasks/main.yml | 9 +++-- .../tasks/sapnote/0941735.yml | 3 +- .../tasks/sapnote/1391070.yml | 3 +- .../tasks/sapnote/1771258.yml | 3 +- .../tasks/sapnote/2002167.yml | 15 ++++++--- .../02-assert-configuration-changes.yml | 6 ++-- .../2002167/02-configuration-changes.yml | 6 ++-- .../03-assert-setting-the-hostname.yml | 11 +++++-- .../2002167/03-setting-the-hostname.yml | 11 +++++-- .../04-assert-linux-kernel-parameters.yml | 3 +- .../2002167/04-linux-kernel-parameters.yml | 3 +- .../05-assert-process-resource-limits.yml | 7 ++-- .../2002167/05-process-resource-limits.yml | 3 +- ...ional-notes-for-installing-sap-systems.yml | 3 +- ...ional-notes-for-installing-sap-systems.yml | 3 +- .../tasks/sapnote/2772999.yml | 27 ++++++++++----- .../sapnote/2772999/02-assert-selinux.yml | 3 +- .../sapnote/2772999/02-configure-selinux.yml | 3 +- .../sapnote/2772999/03-assert-hostname.yml | 11 +++++-- .../sapnote/2772999/03-configure-hostname.yml | 11 +++++-- .../sapnote/2772999/05-assert-firewall.yml | 3 +- .../sapnote/2772999/05-configure-firewall.yml | 3 +- .../tasks/sapnote/2772999/06-assert-uuidd.yml | 3 +- .../sapnote/2772999/06-configure-uuidd.yml | 3 +- .../tasks/sapnote/2772999/07-assert-tmpfs.yml | 3 +- .../sapnote/2772999/07-configure-tmpfs.yml | 3 +- .../08-assert-linux-kernel-parameters.yml | 3 +- .../08-configure-linux-kernel-parameters.yml | 3 +- .../09-assert-process-resource-limits.yml | 7 ++-- .../09-configure-process-resource-limits.yml | 3 +- .../2772999/10-assert-systemd-tmpfiles.yml | 3 +- .../2772999/10-configure-systemd-tmpfiles.yml | 3 +- .../tasks/sapnote/assert-0941735.yml | 3 +- .../tasks/sapnote/assert-1391070.yml | 3 +- .../tasks/sapnote/assert-1771258.yml | 3 +- .../tasks/sapnote/assert-2002167.yml | 15 ++++++--- .../tasks/sapnote/assert-2772999.yml | 27 ++++++++++----- roles/sap_hana_install/.ansible-lint | 1 + roles/sap_hana_install/.yamllint.yml | 1 + roles/sap_hana_install/defaults/main.yml | 2 +- roles/sap_hana_preconfigure/.ansible-lint | 1 + roles/sap_hana_preconfigure/.yamllint.yml | 1 + roles/sap_hana_preconfigure/tasks/main.yml | 3 +- .../tasks/sapnote/2292690.yml | 27 ++++++++++----- .../tasks/sapnote/2777782.yml | 33 ++++++++++++------- .../tasks/sapnote/assert-2009879.yml | 3 +- .../tasks/sapnote/assert-2292690.yml | 27 ++++++++++----- .../tasks/sapnote/assert-2777782.yml | 33 ++++++++++++------- .../sap_netweaver_preconfigure/.ansible-lint | 1 + .../sap_netweaver_preconfigure/.yamllint.yml | 1 + .../sap_netweaver_preconfigure/tasks/main.yml | 6 ++-- 53 files changed, 257 insertions(+), 120 deletions(-) create mode 120000 roles/sap_general_preconfigure/.ansible-lint create mode 120000 roles/sap_general_preconfigure/.yamllint.yml create mode 120000 roles/sap_hana_install/.ansible-lint create mode 120000 roles/sap_hana_install/.yamllint.yml create mode 120000 roles/sap_hana_preconfigure/.ansible-lint create mode 120000 roles/sap_hana_preconfigure/.yamllint.yml create mode 120000 roles/sap_netweaver_preconfigure/.ansible-lint create mode 120000 roles/sap_netweaver_preconfigure/.yamllint.yml diff --git a/roles/sap_general_preconfigure/.ansible-lint b/roles/sap_general_preconfigure/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_general_preconfigure/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_general_preconfigure/.yamllint.yml b/roles/sap_general_preconfigure/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_general_preconfigure/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 3f2a26bcb..c856e0c85 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -72,14 +72,16 @@ - name: Gather package facts ansible.builtin.package_facts: -- ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}installation.yml' +- name: Include tasks from 'installation.yml' + ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}installation.yml' when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_installation|d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' - '{{ ansible_os_family }}.yml' -- ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}configuration.yml' +- name: Include tasks from 'configuration.yml' + ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}configuration.yml' when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_configuration|d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' @@ -87,4 +89,5 @@ - '{{ ansible_os_family }}.yml' # allow a reboot at the end of the preconfigure role -- ansible.builtin.meta: flush_handlers +- name: Flush handlers + ansible.builtin.meta: flush_handlers diff --git a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml index def9d3683..d44159081 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml @@ -9,5 +9,6 @@ swaptotal_mb = {{ ansible_swaptotal_mb }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" -- ansible.builtin.import_tasks: ../RedHat/generic/configure-tmpfs.yml +- name: Import tasks from '../RedHat/generic/configure-tmpfs.yml' + ansible.builtin.import_tasks: ../RedHat/generic/configure-tmpfs.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_0941735|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml b/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml index 4f5b0b4d0..9726fc385 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml @@ -6,5 +6,6 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1391070$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1391070$') | first).version }}): Configure uuidd" -- ansible.builtin.import_tasks: ../RedHat/generic/configure-uuidd.yml +- name: Import tasks from '../RedHat/generic/configure-uuidd.yml' + ansible.builtin.import_tasks: ../RedHat/generic/configure-uuidd.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1391070|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml b/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml index 7322c3bbd..fb884c8e8 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml @@ -6,5 +6,6 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1771258$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1771258$') | first).version }}): User and system resouce limits" -- ansible.builtin.import_tasks: ../RedHat/generic/increase-nofile-limits.yml +- name: Import tasks from '../RedHat/generic/increase-nofile-limits.yml' + ansible.builtin.import_tasks: ../RedHat/generic/increase-nofile-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1771258|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml index d8c211632..fc3200f03 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml @@ -5,17 +5,22 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2002167$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2002167$') | first).version }}): Configure RHEL 7" -- ansible.builtin.import_tasks: 2002167/02-configuration-changes.yml +- name: Import tasks from '2002167/02-configuration-changes.yml' + ansible.builtin.import_tasks: 2002167/02-configuration-changes.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_02|d(false) -- ansible.builtin.import_tasks: 2002167/03-setting-the-hostname.yml +- name: Import tasks from '2002167/03-setting-the-hostname.yml' + ansible.builtin.import_tasks: 2002167/03-setting-the-hostname.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_03|d(false) -- ansible.builtin.import_tasks: 2002167/04-linux-kernel-parameters.yml +- name: Import tasks from '2002167/04-linux-kernel-parameters.yml' + ansible.builtin.import_tasks: 2002167/04-linux-kernel-parameters.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_04|d(false) -- ansible.builtin.import_tasks: 2002167/05-process-resource-limits.yml +- name: Import tasks from '2002167/05-process-resource-limits.yml' + ansible.builtin.import_tasks: 2002167/05-process-resource-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_05|d(false) -- ansible.builtin.import_tasks: 2002167/06-additional-notes-for-installing-sap-systems.yml +- name: Import tasks from '2002167/06-additional-notes-for-installing-sap-systems.yml' + ansible.builtin.import_tasks: 2002167/06-additional-notes-for-installing-sap-systems.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_06|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-assert-configuration-changes.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-assert-configuration-changes.yml index 06531e072..cb5f0cbd3 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-assert-configuration-changes.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-assert-configuration-changes.yml @@ -4,10 +4,12 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 2a: Configure the Firewall" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-firewall.yml +- name: Import tasks from '../../RedHat/generic/assert-firewall.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-firewall.yml - name: Assert 2002167-2b ansible.builtin.debug: msg: "SAP note 2002167 Step 2b: Configure SELinux" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-selinux.yml +- name: Import tasks from '../../RedHat/generic/assert-selinux.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-selinux.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-configuration-changes.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-configuration-changes.yml index 9ad336b73..feaca9a22 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-configuration-changes.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/02-configuration-changes.yml @@ -4,10 +4,12 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 2a: Configure the Firewall" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-firewall.yml +- name: Import tasks from '../../RedHat/generic/configure-firewall.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-firewall.yml - name: Configure 2002167-2b ansible.builtin.debug: msg: "SAP note 2002167 Step 2b: Configure SELinux" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-selinux.yml +- name: Import tasks from '../../RedHat/generic/configure-selinux.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-selinux.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-assert-setting-the-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-assert-setting-the-hostname.yml index e24c3e393..8c5dae0be 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-assert-setting-the-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-assert-setting-the-hostname.yml @@ -4,6 +4,11 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 3: Setting the Hostname" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-hostname.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-etc-hosts.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-dns-name-resolution.yml +- name: Import tasks from '../../RedHat/generic/assert-hostname.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-hostname.yml + +- name: Import tasks from '../../RedHat/generic/assert-etc-hosts.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-etc-hosts.yml + +- name: Import tasks from '../../RedHat/generic/assert-dns-name-resolution.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-dns-name-resolution.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml index 681a87b1a..7a59c12ca 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml @@ -4,6 +4,11 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 3: Setting the Hostname" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-hostname.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-etc-hosts.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/check-dns-name-resolution.yml +- name: Import tasks from '../../RedHat/generic/configure-hostname.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-hostname.yml + +- name: Import tasks from '../../RedHat/generic/configure-etc-hosts.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-etc-hosts.yml + +- name: Import tasks from '../../RedHat/generic/check-dns-name-resolution.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/check-dns-name-resolution.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-assert-linux-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-assert-linux-kernel-parameters.yml index 65ad10a35..c4f1be843 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-assert-linux-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-assert-linux-kernel-parameters.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 4: Linux Kernel Parameters" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-kernel-parameters.yml +- name: Import tasks from '../../RedHat/generic/assert-kernel-parameters.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-kernel-parameters.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-linux-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-linux-kernel-parameters.yml index e009fdea7..c428d82b2 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-linux-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/04-linux-kernel-parameters.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 4: Linux Kernel Parameters" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-kernel-parameters.yml +- name: Import tasks from '../../RedHat/generic/configure-kernel-parameters.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-kernel-parameters.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-assert-process-resource-limits.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-assert-process-resource-limits.yml index 49baddd37..6dc973607 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-assert-process-resource-limits.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-assert-process-resource-limits.yml @@ -4,5 +4,8 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 5: Process Resource Limits" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-limits-conf-file.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-nproc-limits.yml +- name: Import tasks from '../../RedHat/generic/assert-limits-conf-file.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-limits-conf-file.yml + +- name: Import tasks from '../../RedHat/generic/assert-nproc-limits.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-nproc-limits.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-process-resource-limits.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-process-resource-limits.yml index 58937eff5..ec9164179 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-process-resource-limits.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/05-process-resource-limits.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2002167 Step 5: Process Resource Limits" -- ansible.builtin.import_tasks: ../../RedHat/generic/increase-nproc-limits.yml +- name: Import tasks from '../../RedHat/generic/increase-nproc-limits.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/increase-nproc-limits.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml index 462fcdeed..e922748f0 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml @@ -16,4 +16,5 @@ dest: /usr/lib64/liblber.so.199 state: link -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-systemd-tmpfiles.yml +- name: Import tasks from '../../RedHat/generic/configure-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-systemd-tmpfiles.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml index 928d3c78d..54aa6730d 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml @@ -60,4 +60,5 @@ ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" when: __sap_general_preconfigure_register_stat_liblber_assert.stat.exists -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-systemd-tmpfiles.yml +- name: Import tasks from '../../RedHat/generic/assert-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-systemd-tmpfiles.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml index 7835b37bc..794d3ed86 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml @@ -5,29 +5,38 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2772999$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2772999$') | first).version }}): Configure RHEL 8" -- ansible.builtin.import_tasks: 2772999/02-configure-selinux.yml +- name: Import tasks from '2772999/02-configure-selinux.yml' + ansible.builtin.import_tasks: 2772999/02-configure-selinux.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_02|d(false) -- ansible.builtin.import_tasks: 2772999/03-configure-hostname.yml +- name: Import tasks from '2772999/03-configure-hostname.yml' + ansible.builtin.import_tasks: 2772999/03-configure-hostname.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_03|d(false) -- ansible.builtin.import_tasks: 2772999/04-configure-network-time-and-date.yml +- name: Import tasks from '2772999/04-configure-network-time-and-date.yml' + ansible.builtin.import_tasks: 2772999/04-configure-network-time-and-date.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_04|d(false) -- ansible.builtin.import_tasks: 2772999/05-configure-firewall.yml +- name: Import tasks from '2772999/05-configure-firewall.yml' + ansible.builtin.import_tasks: 2772999/05-configure-firewall.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_05|d(false) -- ansible.builtin.import_tasks: 2772999/06-configure-uuidd.yml +- name: Import tasks from '2772999/06-configure-uuidd.yml' + ansible.builtin.import_tasks: 2772999/06-configure-uuidd.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_06|d(false) -- ansible.builtin.import_tasks: 2772999/07-configure-tmpfs.yml +- name: Import tasks from '2772999/07-configure-tmpfs.yml' + ansible.builtin.import_tasks: 2772999/07-configure-tmpfs.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_07|d(false) -- ansible.builtin.import_tasks: 2772999/08-configure-linux-kernel-parameters.yml +- name: Import tasks from '2772999/08-configure-linux-kernel-parameters.yml' + ansible.builtin.import_tasks: 2772999/08-configure-linux-kernel-parameters.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_08|d(false) -- ansible.builtin.import_tasks: 2772999/09-configure-process-resource-limits.yml +- name: Import tasks from '2772999/09-configure-process-resource-limits.yml' + ansible.builtin.import_tasks: 2772999/09-configure-process-resource-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_09|d(false) -- ansible.builtin.import_tasks: 2772999/10-configure-systemd-tmpfiles.yml +- name: Import tasks from '2772999/10-configure-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: 2772999/10-configure-systemd-tmpfiles.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_10|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-assert-selinux.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-assert-selinux.yml index 007ad73e7..f5cbea7d0 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-assert-selinux.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 2: Configure SELinux" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-selinux.yml +- name: Import tasks from '../../RedHat/generic/assert-selinux.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-selinux.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-configure-selinux.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-configure-selinux.yml index 2a976b98c..e77d8d6d1 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/02-configure-selinux.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 2: Configure SELinux" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-selinux.yml +- name: Import tasks from '../../RedHat/generic/configure-selinux.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-selinux.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-assert-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-assert-hostname.yml index ddef03b7d..6214a6487 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-assert-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-assert-hostname.yml @@ -4,6 +4,11 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 3: Configure Hostname" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-hostname.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-etc-hosts.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-dns-name-resolution.yml +- name: Import tasks from '../../RedHat/generic/assert-hostname.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-hostname.yml + +- name: Import tasks from '../../RedHat/generic/assert-etc-hosts.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-etc-hosts.yml + +- name: Import tasks from '../../RedHat/generic/assert-dns-name-resolution.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-dns-name-resolution.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml index 77ef96d72..20204c9aa 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml @@ -4,6 +4,11 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 3: Configure Hostname" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-hostname.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-etc-hosts.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/check-dns-name-resolution.yml +- name: Import tasks from '../../RedHat/generic/configure-hostname.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-hostname.yml + +- name: Import tasks from '../../RedHat/generic/configure-etc-hosts.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-etc-hosts.yml + +- name: Import tasks from '../../RedHat/generic/check-dns-name-resolution.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/check-dns-name-resolution.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-assert-firewall.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-assert-firewall.yml index 606fe2b09..4b974c632 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-assert-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-assert-firewall.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 5: Configure the Firewall" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-firewall.yml +- name: Import tasks from '../../RedHat/generic/assert-firewall.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-firewall.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-configure-firewall.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-configure-firewall.yml index a0fb15323..14b4b87bf 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-configure-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/05-configure-firewall.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 5: Configure the Firewall" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-firewall.yml +- name: Import tasks from '../../RedHat/generic/configure-firewall.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-firewall.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-assert-uuidd.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-assert-uuidd.yml index 02dedd4cb..c3cac0639 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-assert-uuidd.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-assert-uuidd.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 6: Configure uuidd" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-uuidd.yml +- name: Import tasks from '../../RedHat/generic/assert-uuidd.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-uuidd.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-configure-uuidd.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-configure-uuidd.yml index 4045d74f8..6736ab75f 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-configure-uuidd.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/06-configure-uuidd.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 6: Configure uuidd" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-uuidd.yml +- name: Import tasks from '../../RedHat/generic/configure-uuidd.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-uuidd.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml index fcb2d0c4f..555f4f3ca 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml @@ -7,4 +7,5 @@ swaptotal_mb = {{ ansible_swaptotal_mb }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-tmpfs.yml +- name: Import tasks from '../../RedHat/generic/assert-tmpfs.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-tmpfs.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml index ef86395b8..effbbb6a5 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml @@ -7,4 +7,5 @@ swaptotal_mb = {{ ansible_swaptotal_mb }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-tmpfs.yml +- name: Import tasks from '../../RedHat/generic/configure-tmpfs.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-tmpfs.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-assert-linux-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-assert-linux-kernel-parameters.yml index 28a0acbac..c4fdddd17 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-assert-linux-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-assert-linux-kernel-parameters.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 8: Configure Linux Kernel Parameters" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-kernel-parameters.yml +- name: Import tasks from '../../RedHat/generic/assert-kernel-parameters.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-kernel-parameters.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml index 37baf4edc..ef98d6043 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/08-configure-linux-kernel-parameters.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 8: Configure Linux Kernel Parameters" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-kernel-parameters.yml +- name: Import tasks from '../../RedHat/generic/configure-kernel-parameters.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-kernel-parameters.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-assert-process-resource-limits.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-assert-process-resource-limits.yml index 8ce801be6..4d11551ba 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-assert-process-resource-limits.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-assert-process-resource-limits.yml @@ -4,5 +4,8 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 9: Configure Process Resource Limits" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-limits-conf-file.yml -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-nproc-limits.yml +- name: Import tasks from '../../RedHat/generic/assert-limits-conf-file.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-limits-conf-file.yml + +- name: Import tasks from '../../RedHat/generic/assert-nproc-limits.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-nproc-limits.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-configure-process-resource-limits.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-configure-process-resource-limits.yml index ffc9dc4b4..d04dd88f2 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-configure-process-resource-limits.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/09-configure-process-resource-limits.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 9: Configure Process Resource Limits" -- ansible.builtin.import_tasks: ../../RedHat/generic/increase-nproc-limits.yml +- name: Import tasks from '../../RedHat/generic/increase-nproc-limits.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/increase-nproc-limits.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-assert-systemd-tmpfiles.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-assert-systemd-tmpfiles.yml index 68a12a320..a24301744 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-assert-systemd-tmpfiles.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-assert-systemd-tmpfiles.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 10: Configure systemd-tmpfiles" -- ansible.builtin.import_tasks: ../../RedHat/generic/assert-systemd-tmpfiles.yml +- name: Import tasks from '../../RedHat/generic/assert-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/assert-systemd-tmpfiles.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml index d20d72d49..6af633653 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2772999 Step 10: Configure systemd-tmpfiles" -- ansible.builtin.import_tasks: ../../RedHat/generic/configure-systemd-tmpfiles.yml +- name: Import tasks from '../../RedHat/generic/configure-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: ../../RedHat/generic/configure-systemd-tmpfiles.yml diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml index c5afbb064..1a4c84dc7 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml @@ -9,5 +9,6 @@ swaptotal_mb = {{ ansible_swaptotal_mb }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" -- ansible.builtin.import_tasks: ../RedHat/generic/assert-tmpfs.yml +- name: Import tasks from '../RedHat/generic/assert-tmpfs.yml' + ansible.builtin.import_tasks: ../RedHat/generic/assert-tmpfs.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_0941735|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml index 10e3bc6cb..7988436ea 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml @@ -6,5 +6,6 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1391070$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1391070$') | first).version }}): Configure uuidd" -- ansible.builtin.import_tasks: ../RedHat/generic/assert-uuidd.yml +- name: Import tasks from '../RedHat/generic/assert-uuidd.yml' + ansible.builtin.import_tasks: ../RedHat/generic/assert-uuidd.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1391070|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml index 6ac9d0e54..3e4050f21 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml @@ -6,5 +6,6 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1771258$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^1771258$') | first).version }}): User and system resouce limits" -- ansible.builtin.import_tasks: ../RedHat/generic/assert-nofile-limits.yml +- name: Import tasks from '../RedHat/generic/assert-nofile-limits.yml' + ansible.builtin.import_tasks: ../RedHat/generic/assert-nofile-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1771258|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml index 6e0511359..1b39bbbb8 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml @@ -5,17 +5,22 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2002167$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2002167$') | first).version }}): Configure RHEL 7" -- ansible.builtin.import_tasks: 2002167/02-assert-configuration-changes.yml +- name: Import tasks from '2002167/02-assert-configuration-changes.yml' + ansible.builtin.import_tasks: 2002167/02-assert-configuration-changes.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_02|d(false) -- ansible.builtin.import_tasks: 2002167/03-assert-setting-the-hostname.yml +- name: Import tasks from '2002167/03-assert-setting-the-hostname.yml' + ansible.builtin.import_tasks: 2002167/03-assert-setting-the-hostname.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_03|d(false) -- ansible.builtin.import_tasks: 2002167/04-assert-linux-kernel-parameters.yml +- name: Import tasks from '2002167/04-assert-linux-kernel-parameters.yml' + ansible.builtin.import_tasks: 2002167/04-assert-linux-kernel-parameters.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_04|d(false) -- ansible.builtin.import_tasks: 2002167/05-assert-process-resource-limits.yml +- name: Import tasks from '2002167/05-assert-process-resource-limits.yml' + ansible.builtin.import_tasks: 2002167/05-assert-process-resource-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_05|d(false) -- ansible.builtin.import_tasks: 2002167/06-assert-additional-notes-for-installing-sap-systems.yml +- name: Import tasks from '2002167/06-assert-additional-notes-for-installing-sap-systems.yml' + ansible.builtin.import_tasks: 2002167/06-assert-additional-notes-for-installing-sap-systems.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_06|d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml index d8a151d56..b0bd5da02 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml @@ -5,29 +5,38 @@ msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2772999$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2772999$') | first).version }}): Configure RHEL 8" -- ansible.builtin.import_tasks: 2772999/02-assert-selinux.yml +- name: Import tasks from '2772999/02-assert-selinux.yml' + ansible.builtin.import_tasks: 2772999/02-assert-selinux.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_02|d(false) -- ansible.builtin.import_tasks: 2772999/03-assert-hostname.yml +- name: Import tasks from '2772999/03-assert-hostname.yml' + ansible.builtin.import_tasks: 2772999/03-assert-hostname.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_03|d(false) -- ansible.builtin.import_tasks: 2772999/04-assert-network-time-and-date.yml +- name: Import tasks from '2772999/04-assert-network-time-and-date.yml' + ansible.builtin.import_tasks: 2772999/04-assert-network-time-and-date.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_04|d(false) -- ansible.builtin.import_tasks: 2772999/05-assert-firewall.yml +- name: Import tasks from '2772999/05-assert-firewall.yml' + ansible.builtin.import_tasks: 2772999/05-assert-firewall.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_05|d(false) -- ansible.builtin.import_tasks: 2772999/06-assert-uuidd.yml +- name: Import tasks from '2772999/06-assert-uuidd.yml' + ansible.builtin.import_tasks: 2772999/06-assert-uuidd.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_06|d(false) -- ansible.builtin.import_tasks: 2772999/07-assert-tmpfs.yml +- name: Import tasks from '2772999/07-assert-tmpfs.yml' + ansible.builtin.import_tasks: 2772999/07-assert-tmpfs.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_07|d(false) -- ansible.builtin.import_tasks: 2772999/08-assert-linux-kernel-parameters.yml +- name: Import tasks from '2772999/08-assert-linux-kernel-parameters.yml' + ansible.builtin.import_tasks: 2772999/08-assert-linux-kernel-parameters.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_08|d(false) -- ansible.builtin.import_tasks: 2772999/09-assert-process-resource-limits.yml +- name: Import tasks from '2772999/09-assert-process-resource-limits.yml' + ansible.builtin.import_tasks: 2772999/09-assert-process-resource-limits.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_09|d(false) -- ansible.builtin.import_tasks: 2772999/10-assert-systemd-tmpfiles.yml +- name: Import tasks from '2772999/10-assert-systemd-tmpfiles.yml' + ansible.builtin.import_tasks: 2772999/10-assert-systemd-tmpfiles.yml when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_10|d(false) diff --git a/roles/sap_hana_install/.ansible-lint b/roles/sap_hana_install/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_hana_install/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_hana_install/.yamllint.yml b/roles/sap_hana_install/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_hana_install/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index a39f2f5d6..3a33797ef 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -100,7 +100,7 @@ sap_hana_install_restrict_max_mem: 'n' sap_hana_install_max_mem: # hdblcm will use default ids if blank -sap_hana_install_userid: +sap_hana_install_userid: sap_hana_install_groupid: # Passwords diff --git a/roles/sap_hana_preconfigure/.ansible-lint b/roles/sap_hana_preconfigure/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_hana_preconfigure/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/.yamllint.yml b/roles/sap_hana_preconfigure/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_hana_preconfigure/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index e0a0e55be..b829f90cc 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -48,4 +48,5 @@ - '{{ ansible_distribution }}' # allow a reboot at the end of the preconfigure role -- ansible.builtin.meta: flush_handlers +- name: Flush handlers + ansible.builtin.meta: flush_handlers diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690.yml index 5202c4595..93bb800e6 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690.yml @@ -4,31 +4,40 @@ msg: "SAP note {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2292690$') | first).number }} (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2292690$') | first).version }}): SAP HANA settings for RHEL 7" -- ansible.builtin.import_tasks: 2292690/01-configure-tuned.yml +- name: Import tasks from '2292690/01-configure-tuned.yml' + ansible.builtin.import_tasks: 2292690/01-configure-tuned.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_01|d(false) -- ansible.builtin.import_tasks: 2292690/02-turn-off-auto-numa-balancing.yml +- name: Import tasks from '2292690/02-turn-off-auto-numa-balancing.yml' + ansible.builtin.import_tasks: 2292690/02-turn-off-auto-numa-balancing.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_02|d(false) -- ansible.builtin.import_tasks: 2292690/03-disable-thp.yml +- name: Import tasks from '2292690/03-disable-thp.yml' + ansible.builtin.import_tasks: 2292690/03-disable-thp.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_03|d(false) -- ansible.builtin.import_tasks: 2292690/04-configure-c-states-for-lower-latency.yml +- name: Import tasks from '2292690/04-configure-c-states-for-lower-latency.yml' + ansible.builtin.import_tasks: 2292690/04-configure-c-states-for-lower-latency.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_04|d(false) -- ansible.builtin.import_tasks: 2292690/05-configure-cpu-governor.yml +- name: Import tasks from '2292690/05-configure-cpu-governor.yml' + ansible.builtin.import_tasks: 2292690/05-configure-cpu-governor.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_05|d(false) -- ansible.builtin.import_tasks: 2292690/06-configure-epb.yml +- name: Import tasks from '2292690/06-configure-epb.yml' + ansible.builtin.import_tasks: 2292690/06-configure-epb.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_06|d(false) -- ansible.builtin.import_tasks: 2292690/07-disable-ksm.yml +- name: Import tasks from '2292690/07-disable-ksm.yml' + ansible.builtin.import_tasks: 2292690/07-disable-ksm.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_07|d(false) # Step 8: SELinux is already configured in role sap_general_preconfigure. -- ansible.builtin.import_tasks: 2292690/09-check-etc-sudoers.yml +- name: Import tasks from '2292690/09-check-etc-sudoers.yml' + ansible.builtin.import_tasks: 2292690/09-check-etc-sudoers.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_09|d(false) -- ansible.builtin.import_tasks: 2292690/10-ibm-energyscale.yml +- name: Import tasks from '2292690/10-ibm-energyscale.yml' + ansible.builtin.import_tasks: 2292690/10-ibm-energyscale.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_10|d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml index 9a864c229..fd4191eb9 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml @@ -4,35 +4,46 @@ msg: "SAP note {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2777782$') | first).number }} (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2777782$') | first).version }}): SAP HANA settings for RHEL 8" -- ansible.builtin.import_tasks: 2777782/01-configure-selinux.yml +- name: Import tasks from '2777782/01-configure-selinux.yml' + ansible.builtin.import_tasks: 2777782/01-configure-selinux.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) -- ansible.builtin.import_tasks: 2777782/02-configure-tuned.yml +- name: Import tasks from '2777782/02-configure-tuned.yml' + ansible.builtin.import_tasks: 2777782/02-configure-tuned.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_02|d(false) -- ansible.builtin.import_tasks: 2777782/03-disable-abrt-coredumps-kdump.yml +- name: Import tasks from '2777782/03-disable-abrt-coredumps-kdump.yml' + ansible.builtin.import_tasks: 2777782/03-disable-abrt-coredumps-kdump.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_03|d(false) -- ansible.builtin.import_tasks: 2777782/04-turn-off-auto-numa-balancing.yml +- name: Import tasks from '2777782/04-turn-off-auto-numa-balancing.yml' + ansible.builtin.import_tasks: 2777782/04-turn-off-auto-numa-balancing.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_04|d(false) -- ansible.builtin.import_tasks: 2777782/05-disable-thp.yml +- name: Import tasks from '2777782/05-disable-thp.yml' + ansible.builtin.import_tasks: 2777782/05-disable-thp.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_05|d(false) -- ansible.builtin.import_tasks: 2777782/06-configure-c-states-for-lower-latency.yml +- name: Import tasks from '2777782/06-configure-c-states-for-lower-latency.yml' + ansible.builtin.import_tasks: 2777782/06-configure-c-states-for-lower-latency.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_06|d(false) -- ansible.builtin.import_tasks: 2777782/07-configure-cpu-governor.yml +- name: Import tasks from '2777782/07-configure-cpu-governor.yml' + ansible.builtin.import_tasks: 2777782/07-configure-cpu-governor.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_07|d(false) -- ansible.builtin.import_tasks: 2777782/08-configure-epb.yml +- name: Import tasks from '2777782/08-configure-epb.yml' + ansible.builtin.import_tasks: 2777782/08-configure-epb.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_08|d(false) -- ansible.builtin.import_tasks: 2777782/09-disable-ksm.yml +- name: Import tasks from '2777782/09-disable-ksm.yml' + ansible.builtin.import_tasks: 2777782/09-disable-ksm.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_09|d(false) -- ansible.builtin.import_tasks: 2777782/10-increase-pidmax.yml +- name: Import tasks from '2777782/10-increase-pidmax.yml' + ansible.builtin.import_tasks: 2777782/10-increase-pidmax.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_10|d(false) -- ansible.builtin.import_tasks: 2777782/11-enable-tsx.yml +- name: Import tasks from '2777782/11-enable-tsx.yml' + ansible.builtin.import_tasks: 2777782/11-enable-tsx.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_11|d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879.yml index 8a14361fd..ce2b1519a 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879.yml @@ -14,4 +14,5 @@ ### Package installation is done in installation.yml -- ansible.builtin.include_tasks: assert-2009879_{{ ansible_distribution_major_version }}.yml +- name: Import tasks from 'assert-2009879_X.yml' + ansible.builtin.include_tasks: assert-2009879_{{ ansible_distribution_major_version }}.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2292690.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2292690.yml index 17ea6e7cf..783edd6b4 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2292690.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2292690.yml @@ -4,31 +4,40 @@ msg: "SAP note {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2292690$') | first).number }} (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2292690$') | first).version }}): SAP HANA settings for RHEL 7" -- ansible.builtin.import_tasks: 2292690/01-assert-tuned.yml +- name: Import tasks from '2292690/01-assert-tuned.yml' + ansible.builtin.import_tasks: 2292690/01-assert-tuned.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_01|d(false) -- ansible.builtin.import_tasks: 2292690/02-assert-auto-numa-balancing.yml +- name: Import tasks from '2292690/02-assert-auto-numa-balancing.yml' + ansible.builtin.import_tasks: 2292690/02-assert-auto-numa-balancing.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_02|d(false) -- ansible.builtin.import_tasks: 2292690/03-assert-thp.yml +- name: Import tasks from '2292690/03-assert-thp.yml' + ansible.builtin.import_tasks: 2292690/03-assert-thp.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_03|d(false) -- ansible.builtin.import_tasks: 2292690/04-assert-c-states-for-lower-latency.yml +- name: Import tasks from '2292690/04-assert-c-states-for-lower-latency.yml' + ansible.builtin.import_tasks: 2292690/04-assert-c-states-for-lower-latency.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_04|d(false) -- ansible.builtin.import_tasks: 2292690/05-assert-cpu-governor.yml +- name: Import tasks from '2292690/05-assert-cpu-governor.yml' + ansible.builtin.import_tasks: 2292690/05-assert-cpu-governor.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_05|d(false) -- ansible.builtin.import_tasks: 2292690/06-assert-epb.yml +- name: Import tasks from '2292690/06-assert-epb.yml' + ansible.builtin.import_tasks: 2292690/06-assert-epb.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_06|d(false) -- ansible.builtin.import_tasks: 2292690/07-assert-ksm.yml +- name: Import tasks from '2292690/07-assert-ksm.yml' + ansible.builtin.import_tasks: 2292690/07-assert-ksm.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_07|d(false) # Step 8: SELinux is already asserted in role sap_general_preconfigure. -- ansible.builtin.import_tasks: 2292690/09-assert-etc-sudoers.yml +- name: Import tasks from '2292690/09-assert-etc-sudoers.yml' + ansible.builtin.import_tasks: 2292690/09-assert-etc-sudoers.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_09|d(false) -- ansible.builtin.import_tasks: 2292690/10-assert-ibm-energyscale.yml +- name: Import tasks from '2292690/10-assert-ibm-energyscale.yml' + ansible.builtin.import_tasks: 2292690/10-assert-ibm-energyscale.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2292690_10|d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml index 963a391e7..358a7b836 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml @@ -4,35 +4,46 @@ msg: "SAP note {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2777782$') | first).number }} (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2777782$') | first).version }}): SAP HANA settings for RHEL 8" -- ansible.builtin.import_tasks: 2777782/01-assert-selinux.yml +- name: Import tasks from '2777782/01-assert-selinux.yml' + ansible.builtin.import_tasks: 2777782/01-assert-selinux.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) -- ansible.builtin.import_tasks: 2777782/02-assert-tuned.yml +- name: Import tasks from '2777782/02-assert-tuned.yml' + ansible.builtin.import_tasks: 2777782/02-assert-tuned.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_02|d(false) -- ansible.builtin.import_tasks: 2777782/03-assert-abrt-coredumps-kdump.yml +- name: Import tasks from '2777782/03-assert-abrt-coredumps-kdump.yml' + ansible.builtin.import_tasks: 2777782/03-assert-abrt-coredumps-kdump.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_03|d(false) -- ansible.builtin.import_tasks: 2777782/04-assert-auto-numa-balancing.yml +- name: Import tasks from '2777782/04-assert-auto-numa-balancing.yml' + ansible.builtin.import_tasks: 2777782/04-assert-auto-numa-balancing.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_04|d(false) -- ansible.builtin.import_tasks: 2777782/05-assert-thp.yml +- name: Import tasks from '2777782/05-assert-thp.yml' + ansible.builtin.import_tasks: 2777782/05-assert-thp.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_05|d(false) -- ansible.builtin.import_tasks: 2777782/06-assert-c-states-for-lower-latency.yml +- name: Import tasks from '2777782/06-assert-c-states-for-lower-latency.yml' + ansible.builtin.import_tasks: 2777782/06-assert-c-states-for-lower-latency.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_06|d(false) -- ansible.builtin.import_tasks: 2777782/07-assert-cpu-governor.yml +- name: Import tasks from '2777782/07-assert-cpu-governor.yml' + ansible.builtin.import_tasks: 2777782/07-assert-cpu-governor.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_07|d(false) -- ansible.builtin.import_tasks: 2777782/08-assert-epb.yml +- name: Import tasks from '2777782/08-assert-epb.yml' + ansible.builtin.import_tasks: 2777782/08-assert-epb.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_08|d(false) -- ansible.builtin.import_tasks: 2777782/09-assert-ksm.yml +- name: Import tasks from '2777782/09-assert-ksm.yml' + ansible.builtin.import_tasks: 2777782/09-assert-ksm.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_09|d(false) -- ansible.builtin.import_tasks: 2777782/10-assert-pidmax.yml +- name: Import tasks from '2777782/10-assert-pidmax.yml' + ansible.builtin.import_tasks: 2777782/10-assert-pidmax.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_10|d(false) -- ansible.builtin.import_tasks: 2777782/11-assert-tsx.yml +- name: Import tasks from '2777782/11-assert-tsx.yml' + ansible.builtin.import_tasks: 2777782/11-assert-tsx.yml when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_11|d(false) diff --git a/roles/sap_netweaver_preconfigure/.ansible-lint b/roles/sap_netweaver_preconfigure/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_netweaver_preconfigure/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/.yamllint.yml b/roles/sap_netweaver_preconfigure/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index 47ec68bcf..3ce3b5170 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -26,13 +26,15 @@ - name: Gather package facts ansible.builtin.package_facts: -- ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}installation.yml' +- name: Include tasks from 'installation.yml' + ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}installation.yml' when: sap_netweaver_preconfigure_config_all|d(true) or sap_netweaver_preconfigure_installation|d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' -- ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' +- name: Include tasks from 'configuration.yml' + ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' when: sap_netweaver_preconfigure_config_all|d(true) or sap_netweaver_preconfigure_configuration|d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' From d21573c895e36923c58572ddbb7d4398302ee6d2 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 14:33:22 +0200 Subject: [PATCH 027/375] sap_swpm: Add ansible-lint config files --- roles/sap_swpm/.ansible-lint | 1 + roles/sap_swpm/.yamllint.yml | 1 + 2 files changed, 2 insertions(+) create mode 120000 roles/sap_swpm/.ansible-lint create mode 120000 roles/sap_swpm/.yamllint.yml diff --git a/roles/sap_swpm/.ansible-lint b/roles/sap_swpm/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_swpm/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_swpm/.yamllint.yml b/roles/sap_swpm/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_swpm/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file From a139a67f322d64cb0fc96bf39847dd49e6a15ade Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 14:43:47 +0200 Subject: [PATCH 028/375] preconfigure roles: Solve pylint issues --- .../tests/run-sap_general_preconfigure-tests.py | 6 +++--- .../tests/run-sap_hana_preconfigure-tests.py | 6 +++--- .../tests/run-sap_netweaver_preconfigure-tests.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index da9791ad3..f49bd7ea3 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -126,17 +126,17 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output'] == True): + if (par1['compact_assert_output']): command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) if (_py_rc != 0): - if (par1['ignore_error_final'] == True): + if (par1['ignore_error_final']): print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') - exit(_py_rc) + sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index b3fa25246..e6b31519d 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -247,17 +247,17 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output'] == True): + if (par1['compact_assert_output']): command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) if (_py_rc != 0): - if (par1['ignore_error_final'] == True): + if (par1['ignore_error_final']): print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') - exit(_py_rc) + sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') diff --git a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py index 7226c1144..e9b4d1228 100755 --- a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py +++ b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py @@ -133,17 +133,17 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output'] == True): + if (par1['compact_assert_output']): command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) if (_py_rc != 0): - if (par1['ignore_error_final'] == True): + if (par1['ignore_error_final']): print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') - exit(_py_rc) + sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') From 4112b3625a728f04e28b34376f673ea794be0be9 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 15:14:57 +0200 Subject: [PATCH 029/375] Further pylint cleanup --- .pylintrc | 3 + .../sap_general_preconfigure/tests/.pylintrc | 1 + .../run-sap_general_preconfigure-tests.py | 77 ++++++++++----- .../run-sap_hana_install-sapcar-tests.py | 1 - roles/sap_hana_preconfigure/tests/.pylintrc | 1 + .../tests/run-sap_hana_preconfigure-tests.py | 97 +++++++++++++------ .../tests/.pylintrc | 1 + .../run-sap_netweaver_preconfigure-tests.py | 69 ++++++++----- 8 files changed, 173 insertions(+), 77 deletions(-) create mode 100644 .pylintrc create mode 120000 roles/sap_general_preconfigure/tests/.pylintrc create mode 120000 roles/sap_hana_preconfigure/tests/.pylintrc create mode 120000 roles/sap_netweaver_preconfigure/tests/.pylintrc diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..3ceceb453 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,3 @@ +[MASTER] +disable= + C0103, # invalid-name diff --git a/roles/sap_general_preconfigure/tests/.pylintrc b/roles/sap_general_preconfigure/tests/.pylintrc new file mode 120000 index 000000000..0d402e7ea --- /dev/null +++ b/roles/sap_general_preconfigure/tests/.pylintrc @@ -0,0 +1 @@ +../../../.pylintrc \ No newline at end of file diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index f49bd7ea3..68f5d5e87 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -1,13 +1,17 @@ #!/usr/bin/python3 +""" +Tests for role sap_general_preconfigure +""" + import os import sys import subprocess # output field delimiter for displaying the results: -_field_delimiter = '\t' +FIELD_DELIMITER = '\t' -if (len(sys.argv) == 1): +if len(sys.argv) == 1: _managed_node=input("Provide name of managed node: ") else: _managed_node=sys.argv[1] @@ -15,7 +19,10 @@ print('Running tests for role sap_general_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" + _managed_node + " cat /etc/redhat-release | awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput("ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -32,7 +39,9 @@ }, { 'number': '2', - 'name': 'Run in assert mode on new system, check for enabled repos and for minor release lock, check for possible RHEL update, ignore any assert error.', + 'name': 'Run in assert mode on new system, \ + check for enabled repos and for minor release lock, \ + check for possible RHEL update, ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -62,7 +71,10 @@ }, { 'number': '4', - 'name': 'Run in normal mode on modified system, enable repos and set minor release lock, check for possible RHEL update, set SELinux to permisive, allow a reboot.', + 'name': 'Run in normal mode on modified system, \ + enable repos and set minor release lock, \ + check for possible RHEL update, \ + set SELinux to permisive, allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -79,7 +91,10 @@ }, { 'number': '5', - 'name': 'Run in assert mode on modified system, enable repos and set minor release lock, check for possible RHEL update, set SELinux to permisive, ignore any assert errors.', + 'name': 'Run in assert mode on modified system, \ + enable repos and set minor release lock, \ + check for possible RHEL update, \ + set SELinux to permisive, ignore any assert errors.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -97,7 +112,10 @@ }, { 'number': '6', - 'name': 'Run in assert mode on modified system, enable repos and set minor release lock, check for possible RHEL update, set SELinux to permisive, ignore any assert errors.', + 'name': 'Run in assert mode on modified system, \ + enable repos and set minor release lock, \ + check for possible RHEL update, \ + set SELinux to permisive, ignore any assert errors.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': True, @@ -126,37 +144,48 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output']): + if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) - if (_py_rc != 0): - if (par1['ignore_error_final']): - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') + if _py_rc != 0: + if par1['ignore_error_final']: + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '. Continuing with the next test') else: - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_general_preconfigure: ' + _managed_node + ' - RHEL ' + _mn_rhel_release + ' - ' + _mn_hw_arch + ':') +print ('\nResults for role sap_general_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + ':') print ('\n#' - + _field_delimiter - + 'RC' + _field_delimiter - + 'name' + _field_delimiter - + 'argument' + _field_delimiter - + 'compact' + _field_delimiter + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + 'role_vars') for par1 in __tests: - print (par1['number'] + _field_delimiter - + par1['rc'] + _field_delimiter - + par1['name'] + _field_delimiter - + par1['command_line_parameter'] + _field_delimiter - + str(par1['compact_assert_output']) + _field_delimiter, end='') - if (len(par1['role_vars']) == 0): + print (par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + if len(par1['role_vars']) == 0: print ("") else: for par2 in par1['role_vars']: diff --git a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py index 4b1ff6ade..6aa33ea25 100755 --- a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py +++ b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py @@ -171,4 +171,3 @@ else: for par2 in par1['role_vars']: print (str(par2)) - diff --git a/roles/sap_hana_preconfigure/tests/.pylintrc b/roles/sap_hana_preconfigure/tests/.pylintrc new file mode 120000 index 000000000..0d402e7ea --- /dev/null +++ b/roles/sap_hana_preconfigure/tests/.pylintrc @@ -0,0 +1 @@ +../../../.pylintrc \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index e6b31519d..b70ea1967 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -1,13 +1,17 @@ #!/usr/bin/python3 +""" +Tests for role sap_hana_preconfigure +""" + import os import sys import subprocess # output field delimiter for displaying the results: -_field_delimiter = '\t' +FIELD_DELIMITER = '\t' -if (len(sys.argv) == 1): +if len(sys.argv) == 1: _managed_node=input("Provide name of managed node: ") else: _managed_node=sys.argv[1] @@ -15,7 +19,10 @@ print('Running tests for role sap_hana_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" + _managed_node + " cat /etc/redhat-release | awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput("ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -45,7 +52,8 @@ }, { 'number': '3', - 'name': 'Run in assert mode on new system, check for possible RHEL update, ignore any assert error.', + 'name': 'Run in assert mode on new system, \ + check for possible RHEL update, ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -53,14 +61,17 @@ 'role_vars': [ { 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, + 'sap_hana_preconfigure_assert_ignore_errors': True, 'sap_hana_preconfigure_update': True } ] }, { 'number': '4', - 'name': 'Run in assert mode on new system, check for possible RHEL update, compact output, ignore any assert or final error.', + 'name': 'Run in assert mode on new system, \ + check for possible RHEL update, \ + compact output, \ + ignore any assert or final error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -68,7 +79,7 @@ 'role_vars': [ { 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, + 'sap_hana_preconfigure_assert_ignore_errors': True, 'sap_hana_preconfigure_update': True } ] @@ -110,7 +121,10 @@ }, { 'number': '8', - 'name': 'Run in assert mode on modified system, check for possible RHEL update, compact output, ignore any assert or final error.', + 'name': 'Run in assert mode on modified system, \ + check for possible RHEL update, \ + compact output, \ + ignore any assert or final error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -154,7 +168,10 @@ }, { 'number': '11', - 'name': 'Run in assert mode on modified system, check for possible RHEL update, compact output, ignore any assert or final error.', + 'name': 'Run in assert mode on modified system, \ + check for possible RHEL update, \ + compact output, \ + ignore any assert or final error.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': True, @@ -186,7 +203,11 @@ }, { 'number': '13', - 'name': 'Run in assert mode again, check for possible RHEL update, check all config, compact output, ignore any assert or final error.', + 'name': 'Run in assert mode again, \ + check for possible RHEL update, \ + check all config, \ + compact output, \ + ignore any assert or final error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -202,7 +223,9 @@ }, { 'number': '14', - 'name': 'Run in normal mode. Use tuned and also modify boot command line. Allow a reboot.', + 'name': 'Run in normal mode. \ + Use tuned and also modify boot command line. \ + Allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -220,7 +243,11 @@ }, { 'number': '15', - 'name': 'Run in assert mode again, check for possible RHEL update, check all config, compact output, ignore any assert error.', + 'name': 'Run in assert mode again, \ + check for possible RHEL update, \ + check all config, \ + compact output, \ + ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -247,37 +274,49 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output']): + if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) - if (_py_rc != 0): - if (par1['ignore_error_final']): - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') + if _py_rc != 0: + if par1['ignore_error_final']: + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + + '. Continuing with the next test') else: - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_hana_preconfigure: ' + _managed_node + ' - RHEL ' + _mn_rhel_release + ' - ' + _mn_hw_arch + ':') +print ('\nResults for role sap_hana_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + ':') print ('\n#' - + _field_delimiter - + 'RC' + _field_delimiter - + 'name' + _field_delimiter - + 'argument' + _field_delimiter - + 'compact' + _field_delimiter + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + 'role_vars') for par1 in __tests: - print (par1['number'] + _field_delimiter - + par1['rc'] + _field_delimiter - + par1['name'] + _field_delimiter - + par1['command_line_parameter'] + _field_delimiter - + str(par1['compact_assert_output']) + _field_delimiter, end='') - if (len(par1['role_vars']) == 0): + print (par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + if len(par1['role_vars']) == 0: print ("") else: for par2 in par1['role_vars']: diff --git a/roles/sap_netweaver_preconfigure/tests/.pylintrc b/roles/sap_netweaver_preconfigure/tests/.pylintrc new file mode 120000 index 000000000..0d402e7ea --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tests/.pylintrc @@ -0,0 +1 @@ +../../../.pylintrc \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py index e9b4d1228..7c573cce8 100755 --- a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py +++ b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py @@ -1,13 +1,17 @@ #!/usr/bin/python3 +""" +Tests for role sap_netweaver_preconfigure +""" + import os import sys import subprocess # output field delimiter for displaying the results: -_field_delimiter = '\t' +FIELD_DELIMITER = '\t' -if (len(sys.argv) == 1): +if len(sys.argv) == 1: _managed_node=input("Provide name of managed node: ") else: _managed_node=sys.argv[1] @@ -15,7 +19,10 @@ print('Running tests for role sap_netweaver_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" + _managed_node + " cat /etc/redhat-release | awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput("ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -59,7 +66,9 @@ }, { 'number': '4', - 'name': 'Run in assert mode on new system, compact output, ignore any assert or final error.', + 'name': 'Run in assert mode on new system, \ + compact output, \ + ignore any assert or final error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -73,7 +82,8 @@ }, { 'number': '5', - 'name': 'Run in normal mode on new system. Do not fail in case not enough swap space is configured.', + 'name': 'Run in normal mode on new system. \ + Do not fail in case not enough swap space is configured.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -108,7 +118,9 @@ }, { 'number': '8', - 'name': 'Run in assert mode on modified system, compact output, ignore any assert error.', + 'name': 'Run in assert mode on modified system, \ + compact output, \ + ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -133,37 +145,48 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - if (par1['compact_assert_output']): + if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' print ("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc/256)) - if (_py_rc != 0): - if (par1['ignore_error_final']): - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') + if _py_rc != 0: + if par1['ignore_error_final']: + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + + '. Continuing with the next test') else: - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_netweaver_preconfigure: ' + _managed_node + ' - RHEL ' + _mn_rhel_release + ' - ' + _mn_hw_arch + ':') +print ('\nResults for role sap_netweaver_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + _mn_hw_arch + ':') print ('\n#' - + _field_delimiter - + 'RC' + _field_delimiter - + 'name' + _field_delimiter - + 'argument' + _field_delimiter - + 'compact' + _field_delimiter + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + 'role_vars') for par1 in __tests: - print (par1['number'] + _field_delimiter - + par1['rc'] + _field_delimiter - + par1['name'] + _field_delimiter - + par1['command_line_parameter'] + _field_delimiter - + str(par1['compact_assert_output']) + _field_delimiter, end='') - if (len(par1['role_vars']) == 0): + print (par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + if len(par1['role_vars']) == 0: print ("") else: for par2 in par1['role_vars']: From 7838aaaab46eb93414f3365c835a8c657dea0f90 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 17:10:36 +0200 Subject: [PATCH 030/375] preconfigure roles: Solve pep8 errors --- .../run-sap_general_preconfigure-tests.py | 85 ++++++++++--------- .../tests/run-sap_hana_preconfigure-tests.py | 73 ++++++++-------- .../run-sap_netweaver_preconfigure-tests.py | 71 ++++++++-------- 3 files changed, 117 insertions(+), 112 deletions(-) diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index 68f5d5e87..8d529a506 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -12,17 +12,18 @@ FIELD_DELIMITER = '\t' if len(sys.argv) == 1: - _managed_node=input("Provide name of managed node: ") + _managed_node = input("Provide name of managed node: ") else: - _managed_node=sys.argv[1] + _managed_node = sys.argv[1] print('Running tests for role sap_general_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" - + _managed_node - + " cat /etc/redhat-release | \ - awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput( + "ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -134,59 +135,61 @@ ] for par1 in __tests: - print ('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) - command = ('ansible-playbook sap_general_preconfigure-default-settings.yml ' - + par1['command_line_parameter'] - + '-l ' - + _managed_node - + ' ' - + '-e "') + print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) + command = ( + 'ansible-playbook sap_general_preconfigure-default-settings.yml ' + + par1['command_line_parameter'] + + '-l ' + + _managed_node + + ' ' + + '-e "' + ) for par2 in par1['role_vars']: command += str(par2) command += '"' if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' - print ("command: " + command) + print("command: " + command) _py_rc = os.system(command) - par1['rc'] = str(int(_py_rc/256)) + par1['rc'] = str(int(_py_rc / 256)) if _py_rc != 0: if par1['ignore_error_final']: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '. Continuing with the next test') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '. Continuing with the next test') else: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '.') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_general_preconfigure: ' - + _managed_node - + ' - RHEL ' - + _mn_rhel_release - + ' - ' - + _mn_hw_arch + ':') +print('\nResults for role sap_general_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + ':') -print ('\n#' - + FIELD_DELIMITER - + 'RC' + FIELD_DELIMITER - + 'name' + FIELD_DELIMITER - + 'argument' + FIELD_DELIMITER - + 'compact' + FIELD_DELIMITER - + 'role_vars') +print('\n#' + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + + 'role_vars') for par1 in __tests: - print (par1['number'] + FIELD_DELIMITER - + par1['rc'] + FIELD_DELIMITER - + par1['name'] + FIELD_DELIMITER - + par1['command_line_parameter'] + FIELD_DELIMITER - + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + print(par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') if len(par1['role_vars']) == 0: - print ("") + print("") else: for par2 in par1['role_vars']: - print (str(par2)) + print(str(par2)) diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index b70ea1967..5e2399414 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -12,17 +12,18 @@ FIELD_DELIMITER = '\t' if len(sys.argv) == 1: - _managed_node=input("Provide name of managed node: ") + _managed_node = input("Provide name of managed node: ") else: - _managed_node=sys.argv[1] + _managed_node = sys.argv[1] print('Running tests for role sap_hana_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" - + _managed_node - + " cat /etc/redhat-release | \ - awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput( + "ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -264,7 +265,7 @@ ] for par1 in __tests: - print ('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) + print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) command = ('ansible-playbook sap_hana_preconfigure-default-settings.yml ' + par1['command_line_parameter'] + '-l ' @@ -276,48 +277,48 @@ command += '"' if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' - print ("command: " + command) + print("command: " + command) _py_rc = os.system(command) - par1['rc'] = str(int(_py_rc/256)) + par1['rc'] = str(int(_py_rc / 256)) if _py_rc != 0: if par1['ignore_error_final']: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] - + '. Continuing with the next test') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + + '. Continuing with the next test') else: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '.') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_hana_preconfigure: ' - + _managed_node - + ' - RHEL ' - + _mn_rhel_release - + ' - ' - + _mn_hw_arch + ':') +print('\nResults for role sap_hana_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + ':') -print ('\n#' - + FIELD_DELIMITER - + 'RC' + FIELD_DELIMITER - + 'name' + FIELD_DELIMITER - + 'argument' + FIELD_DELIMITER - + 'compact' + FIELD_DELIMITER - + 'role_vars') +print('\n#' + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + + 'role_vars') for par1 in __tests: - print (par1['number'] + FIELD_DELIMITER - + par1['rc'] + FIELD_DELIMITER - + par1['name'] + FIELD_DELIMITER - + par1['command_line_parameter'] + FIELD_DELIMITER - + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + print(par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') if len(par1['role_vars']) == 0: - print ("") + print("") else: for par2 in par1['role_vars']: - print (str(par2)) + print(str(par2)) diff --git a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py index 7c573cce8..466e67f3d 100755 --- a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py +++ b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py @@ -12,17 +12,18 @@ FIELD_DELIMITER = '\t' if len(sys.argv) == 1: - _managed_node=input("Provide name of managed node: ") + _managed_node = input("Provide name of managed node: ") else: - _managed_node=sys.argv[1] + _managed_node = sys.argv[1] print('Running tests for role sap_netweaver_preconfigure...\n') print('Managed node: ' + _managed_node) -_mn_rhel_release = subprocess.getoutput("ssh root@" - + _managed_node - + " cat /etc/redhat-release | \ - awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput( + "ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) @@ -135,7 +136,7 @@ ] for par1 in __tests: - print ('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) + print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) command = ('ansible-playbook sap_netweaver_preconfigure-default-settings.yml ' + par1['command_line_parameter'] + '-l ' @@ -147,47 +148,47 @@ command += '"' if par1['compact_assert_output']: command += ' | ../tools/beautify-assert-output.sh' - print ("command: " + command) + print("command: " + command) _py_rc = os.system(command) - par1['rc'] = str(int(_py_rc/256)) + par1['rc'] = str(int(_py_rc / 256)) if _py_rc != 0: if par1['ignore_error_final']: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] - + '. Continuing with the next test') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + + '. Continuing with the next test') else: print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '.') + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') sys.exit(_py_rc) else: print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_netweaver_preconfigure: ' - + _managed_node - + ' - RHEL ' - + _mn_rhel_release - + ' - ' + _mn_hw_arch + ':') +print('\nResults for role sap_netweaver_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + _mn_hw_arch + ':') -print ('\n#' - + FIELD_DELIMITER - + 'RC' + FIELD_DELIMITER - + 'name' + FIELD_DELIMITER - + 'argument' + FIELD_DELIMITER - + 'compact' + FIELD_DELIMITER - + 'role_vars') +print('\n#' + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + + 'role_vars') for par1 in __tests: - print (par1['number'] + FIELD_DELIMITER - + par1['rc'] + FIELD_DELIMITER - + par1['name'] + FIELD_DELIMITER - + par1['command_line_parameter'] + FIELD_DELIMITER - + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + print(par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') if len(par1['role_vars']) == 0: - print ("") + print("") else: for par2 in par1['role_vars']: - print (str(par2)) + print(str(par2)) From 1f2ecf7a1ed944f69da6ce643acc87cbbb50de59 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 17:34:19 +0200 Subject: [PATCH 031/375] sap_hana_install: pep8 cleanup --- .../run-sap_hana_install-install-tests.py | 114 ++++++++++-------- .../run-sap_hana_install-sapcar-tests.py | 73 ++++++----- 2 files changed, 104 insertions(+), 83 deletions(-) diff --git a/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py b/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py index 7e27a7842..a84f10ab9 100755 --- a/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py +++ b/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py @@ -8,49 +8,57 @@ import shlex import yaml + def print_log(text): sys.stdout.write(str(text)) __filedescriptor.write(str(text)) + # output field delimiter for displaying the results: -__field_delimiter='\t' +__field_delimiter = '\t' -if (len(sys.argv) != 3): +if(len(sys.argv) != 3): print('Please provide the name of the managed node and the user name for logging in.') - __managed_node=input('Name of managed node: ') - __username=input('User name for connecting to managed node: ') + __managed_node = input('Name of managed node: ') + __username = input('User name for connecting to managed node: ') else: - __managed_node=sys.argv[1] - __username=sys.argv[2] + __managed_node = sys.argv[1] + __username = sys.argv[2] -__datestr=datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S') -__logfile_prefix='hana-install-test-' +__datestr = datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S') +__logfile_prefix = 'hana-install-test-' print('Running HANA install tests for role sap_hana_install...\n') print('Managed node: ' + __managed_node) print('Username: ' + __username) with open("install-vars.yml", 'r') as __filedescriptor: - __yml_data=yaml.safe_load(__filedescriptor) + __yml_data = yaml.safe_load(__filedescriptor) print(__yml_data) -#print('sap_hana_install_sapcar_filename: ' + __yml_data.get('sap_hana_install_sapcar_filename')) -#print('sap_hana_install_sarfiles: ' + str(__yml_data.get('sap_hana_install_sarfiles')[0])) -#print('sap_hana_install_sarfiles: ' + str(__yml_data.get('sap_hana_install_sarfiles')[1])) - -#input('Press RETURN to continue: ') - -__mn_rhel_release=subprocess.getoutput("ssh " + __username + "@" + __managed_node + " cat /etc/redhat-release | awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") -__mn_hw_arch=subprocess.getoutput("ssh " + __username + "@" + __managed_node + " uname -m") +# print('sap_hana_install_sapcar_filename: ' + __yml_data.get('sap_hana_install_sapcar_filename')) +# print('sap_hana_install_sarfiles: ' + str(__yml_data.get('sap_hana_install_sarfiles')[0])) +# print('sap_hana_install_sarfiles: ' + str(__yml_data.get('sap_hana_install_sarfiles')[1])) + +# input('Press RETURN to continue: ') + +__mn_rhel_release = subprocess.getoutput( + "ssh " + + __username + + "@" + + __managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") +__mn_hw_arch = subprocess.getoutput("ssh " + __username + "@" + __managed_node + " uname -m") print('Managed node Red Hat release: ' + __mn_rhel_release) print('Managed node HW architecture: ' + __mn_hw_arch) -__logdir='hana-install-test-logs-' + __mn_rhel_release + '_' + __mn_hw_arch + '_' + __datestr +__logdir = 'hana-install-test-logs-' + __mn_rhel_release + '_' + __mn_hw_arch + '_' + __datestr print('Logdir: ' + __logdir) if not os.path.exists(__logdir): os.mkdir(__logdir) -__tests=[ +__tests = [ { 'number': '01', 'name': 'install test, rev 59.01, default parameters', @@ -70,9 +78,9 @@ def print_log(text): 'rc': '99', 'role_vars': [ { - 'sap_hana_install_check_installation': True, - 'sap_hana_install_verify_checksums': True, - 'sap_hana_install_verify_signature': True + 'sap_hana_install_check_installation': True, + 'sap_hana_install_verify_checksums': True, + 'sap_hana_install_verify_signature': True } ] }, @@ -93,23 +101,23 @@ def print_log(text): for par1 in __tests[0:3]: print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) # prepare the test: - command=('ansible-playbook prepare-install-test-' + command = ('ansible-playbook prepare-install-test-' + par1['number'] + '.yml ' + '-l ' + __managed_node) - args=shlex.split(command) -# _py_rc=os.system(command) - __logfile=__logdir + '/' + __logfile_prefix + __datestr + '-prepare-' + par1['number'] + '.log' + args = shlex.split(command) +# _py_rc = os.system(command) + __logfile = __logdir + '/' + __logfile_prefix + __datestr + '-prepare-' + par1['number'] + '.log' with open(__logfile, 'wb') as __filedescriptor: - process=subprocess.Popen(args, stdout=subprocess.PIPE) + process = subprocess.Popen(args, stdout=subprocess.PIPE) for line in iter(process.stdout.readline, b''): sys.stdout.write(line.decode(sys.stdout.encoding)) __filedescriptor.write(line) __filedescriptor.flush() # run the test: - command=('ansible-playbook run-install-test-' + command = ('ansible-playbook run-install-test-' + par1['number'] + '.yml ' + par1['command_line_parameter'] @@ -122,33 +130,33 @@ def print_log(text): command += str(par2) command += '"' print("command: " + command) - args=shlex.split(command) -# _output=subprocess.getoutput(command) - __logfile=__logdir + '/' + __logfile_prefix + __datestr + '-run-' + par1['number'] + '.log' + args = shlex.split(command) +# _output = subprocess.getoutput(command) + __logfile = __logdir + '/' + __logfile_prefix + __datestr + '-run-' + par1['number'] + '.log' with open(__logfile, 'wb') as __filedescriptor: - process=subprocess.Popen(args, stdout=subprocess.PIPE) + process = subprocess.Popen(args, stdout=subprocess.PIPE) for line in iter(process.stdout.readline, b''): sys.stdout.write(line.decode(sys.stdout.encoding)) __filedescriptor.write(line) __filedescriptor.flush() print('Expected output string: \'' + par1['expected_output_string'] + '\'') - __match=open(__logfile, 'r').read().find(par1['expected_output_string']) + __match = open(__logfile, 'r').read().find(par1['expected_output_string']) print('__match: ' + str(__match)) -# __match=re.search(par1['expected_output_string'], _output) +# __match = re.search(par1['expected_output_string'], _output) if __match >= 0: - par1['rc']='0' - print('Test ' + par1['number'] + ' passed!!!') + par1['rc'] = '0' + print('Test ' + par1['number'] + ' passed!!!') else: - print('Test ' + par1['number'] + ' FAILED!!!') + print('Test ' + par1['number'] + ' FAILED!!!') # uninstall SAP HANA: - command=('ansible-playbook hana-uninstall.yml ' + command = ('ansible-playbook hana-uninstall.yml ' + '-l ' + __managed_node) - args=shlex.split(command) - __logfile=__logdir + '/' + __logfile_prefix + __datestr + '-uninstall-' + par1['number'] + '.log' + args = shlex.split(command) + __logfile = __logdir + '/' + __logfile_prefix + __datestr + '-uninstall-' + par1['number'] + '.log' with open(__logfile, 'wb') as __filedescriptor: - process=subprocess.Popen(args, stdout=subprocess.PIPE) + process = subprocess.Popen(args, stdout=subprocess.PIPE) for line in iter(process.stdout.readline, b''): sys.stdout.write(line.decode(sys.stdout.encoding)) __filedescriptor.write(line) @@ -156,25 +164,25 @@ def print_log(text): print('\n') -__logfile=__logdir + '/' + __logfile_prefix + __datestr + '-result.log' +__logfile = __logdir + '/' + __logfile_prefix + __datestr + '-result.log' with open(__logfile, 'w') as __filedescriptor: print_log('Results for role sap_hana_install on ' + __managed_node + ' - RHEL ' + __mn_rhel_release + ' - ' + __mn_hw_arch + ':\n') print_log('\n#' - + __field_delimiter - + 'RC' + __field_delimiter - + 'name' + __field_delimiter - + 'argument' + __field_delimiter - + 'expected output string' + __field_delimiter - + 'role_vars' + '\n') + + __field_delimiter + + 'RC' + __field_delimiter + + 'name' + __field_delimiter + + 'argument' + __field_delimiter + + 'expected output string' + __field_delimiter + + 'role_vars' + '\n') for par1 in __tests[0:3]: print_log(par1['number'] + __field_delimiter - + par1['rc'] + __field_delimiter - + par1['name'] + __field_delimiter - + '\'' + par1['command_line_parameter'] + '\'' + __field_delimiter - + '\'' + par1['expected_output_string'] + '\'' + __field_delimiter) -# + '\'' + par1['expected_output_string'] + '\'' + __field_delimiter, end='') + + par1['rc'] + __field_delimiter + + par1['name'] + __field_delimiter + + '\'' + par1['command_line_parameter'] + '\'' + __field_delimiter + + '\'' + par1['expected_output_string'] + '\'' + __field_delimiter) +# + '\'' + par1['expected_output_string'] + '\'' + __field_delimiter, end='') if(len(par1['role_vars']) == 0): print_log('\n') else: diff --git a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py index 6aa33ea25..d964ae0d6 100755 --- a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py +++ b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py @@ -9,28 +9,33 @@ # output field delimiter for displaying the results: _field_delimiter = '\t' -if (len(sys.argv) != 3): +if(len(sys.argv) != 3): print('Please provide the name of the managed node and the user name for logging in.') - _managed_node=input('Name of managed node: ') - _username=input('User name for connecting to managed node: ') + _managed_node = input('Name of managed node: ') + _username = input('User name for connecting to managed node: ') else: - _managed_node=sys.argv[1] - _username=sys.argv[2] + _managed_node = sys.argv[1] + _username = sys.argv[2] print('Running sapcar preinstall tests for role sap_hana_install...\n') print('Managed node: ' + _managed_node) print('Username: ' + _username) -_mn_rhel_release = subprocess.getoutput("ssh " + _username + "@" + _managed_node + " cat /etc/redhat-release | awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") +_mn_rhel_release = subprocess.getoutput( + "ssh " + + _username + + "@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split ($2, a, \" \"); print a[1]}'") print('Managed node Red Hat release: ' + _mn_rhel_release) _mn_hw_arch = subprocess.getoutput("ssh " + _username + "@" + _managed_node + " uname -m") print('Managed node HW architecture: ' + _mn_hw_arch) _vars_file = 'sapcar-vars.yml' with open(_vars_file, 'r') as _file: - _vars_1 = yaml.safe_load(_file) + _vars_1 = yaml.safe_load(_file) -#print(_vars_1) sap_hana_install_sapcar_filename = _vars_1.get('sap_hana_install_sapcar_filename_' + _mn_hw_arch) print('sap_hana_install_sapcar_filename: ' + sap_hana_install_sapcar_filename) @@ -52,7 +57,9 @@ 'number': '02', 'name': 'SAPCAR checksum test, sha256 file exists but checksum is not correct', 'command_line_parameter': '--tags=sap_hana_install_prepare_sapcar ', - 'expected_output_string': ' does not match the checksum stored in file \'/software/sap_hana_install_test/' + sap_hana_install_sapcar_filename + '.sha256\'!', + 'expected_output_string': ' does not match the checksum stored in file \'/software/sap_hana_install_test/' + + sap_hana_install_sapcar_filename + + '.sha256\'!', 'rc': '99', 'role_vars': [ { @@ -110,7 +117,7 @@ _py_rc = os.system(command) for par1 in __tests[0:5]: - print ('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) + print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) command = ('ansible-playbook prepare-test-' + par1['number'] + '.yml ' @@ -130,7 +137,7 @@ for par2 in par1['role_vars']: command += str(par2) command += '"' - print ("command: >" + command + '<') + print("command: >" + command + '<') # _py_rc = os.system(command) # _py_rc = os.popen(command).read() # _output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True) @@ -138,11 +145,11 @@ print('Output of test: ' + _output) _match = re.search(par1['expected_output_string'], _output) if _match: - par1['rc'] = '0' - print('Test ' + par1['number'] + ' passed!!!') + par1['rc'] = '0' + print('Test ' + par1['number'] + ' passed!!!') # par1['rc'] = str(int(_py_rc/256)) -# if (_py_rc != 0): -# if (par1['ignore_error_final'] == True): +# if(_py_rc != 0): +# if par1['ignore_error_final']: # print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '. Continuing with the next test') # else: # print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') @@ -150,24 +157,30 @@ # else: # print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') -print ('\nResults for role sap_hana_install preinstall: ' + _managed_node + ' - RHEL ' + _mn_rhel_release + ' - ' + _mn_hw_arch + ':') +print('\nResults for role sap_hana_install preinstall: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + + ':') -print ('\n#' - + _field_delimiter - + 'RC' + _field_delimiter - + 'name' + _field_delimiter - + 'argument' + _field_delimiter - + 'expected error string' + _field_delimiter - + 'role_vars') +print('\n#' + + _field_delimiter + + 'RC' + _field_delimiter + + 'name' + _field_delimiter + + 'argument' + _field_delimiter + + 'expected error string' + _field_delimiter + + 'role_vars') for par1 in __tests[0:5]: - print (par1['number'] + _field_delimiter - + par1['rc'] + _field_delimiter - + par1['name'] + _field_delimiter - + '\'' + par1['command_line_parameter'] + '\'' + _field_delimiter - + '\'' + par1['expected_output_string'] + '\'' + _field_delimiter, end='') + print(par1['number'] + _field_delimiter + + par1['rc'] + _field_delimiter + + par1['name'] + _field_delimiter + + '\'' + par1['command_line_parameter'] + '\'' + _field_delimiter + + '\'' + par1['expected_output_string'] + '\'' + _field_delimiter, end='') if (len(par1['role_vars']) == 0): - print ("") + print("") else: for par2 in par1['role_vars']: - print (str(par2)) + print(str(par2)) From 263b0d0def625fe5085327b7a6fd2e01fe1eba4c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 1 Jul 2022 18:19:46 +0200 Subject: [PATCH 032/375] swpm2_parameters_inifile_generate.py: pep8 cleanup --- .../swpm2_parameters_inifile_generate.py | 135 +++++++++++------- 1 file changed, 85 insertions(+), 50 deletions(-) diff --git a/plugins/module_utils/swpm2_parameters_inifile_generate.py b/plugins/module_utils/swpm2_parameters_inifile_generate.py index 35c0dd4a2..173edde93 100755 --- a/plugins/module_utils/swpm2_parameters_inifile_generate.py +++ b/plugins/module_utils/swpm2_parameters_inifile_generate.py @@ -11,7 +11,7 @@ def debug_bs4(): - ### Diagnose XML file parsing errors in Beautiful Soup + # Diagnose XML file parsing errors in Beautiful Soup # https://stackoverflow.com/questions/56942892/cannot-parse-iso-8859-15-encoded-xml-with-bs4/56947172#56947172 from bs4.diagnose import diagnose with open('control.xml', 'rb') as f: @@ -22,13 +22,13 @@ def debug_bs4(): def control_xml_utf8(filepath): source = filepath + "/control.xml" - ### Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser + # Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser # https://stackoverflow.com/questions/64629600/how-can-you-convert-a-xml-iso-8859-1-to-utf-8-using-python-3-7-7/64634454#64634454 with open(source, 'rb') as source: - parser = etree.XMLParser(encoding = "iso-8859-1", strip_cdata=False) + parser = etree.XMLParser(encoding="iso-8859-1", strip_cdata=False) root = etree.parse(source, parser) - string = etree.tostring(root, xml_declaration = True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') + string = etree.tostring(root, xml_declaration=True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') with open('control_utf8.xml', 'wb') as target: target.write(string) @@ -37,32 +37,48 @@ def control_xml_utf8(filepath): # SWPM2 Component and Parameters extract all as CSV def control_xml_to_csv(filepath): - infile = open(filepath + "/control_utf8.xml","r") + infile = open(filepath + "/control_utf8.xml", "r") contents = infile.read() soup = BeautifulSoup(markup=contents, features='lxml-xml') space = soup.find('components') - component_list = space.findChildren("component" , recursive=False) + component_list = space.findChildren("component", recursive=False) csv_output = open('control_output.csv', 'w') - csv_header = '"' + 'Component Name' + '","' + 'Component Display Name' + '","' + 'Parameter Name' + '","' + 'Parameter Inifile Key' + '","' + 'Parameter Access' + '","' + 'Parameter Encode' + '","' + 'Parameter Default Value' + '","' + 'Parameter Inifile description' + '"' + csv_header = ('"' + + 'Component Name' + '","' + + 'Component Display Name' + '","' + + 'Parameter Name' + '","' + + 'Parameter Inifile Key' + '","' + + 'Parameter Access' + '","' + + 'Parameter Encode' + '","' + + 'Parameter Default Value' + '","' + + 'Parameter Inifile description' + '"') csv_output.write("%s\n" % csv_header) for component in component_list: for parameter in component.findChildren("parameter"): - component_key=parameter.findParent("component") - component_key_name_text=component_key["name"] + component_key = parameter.findParent("component") + component_key_name_text = component_key["name"] for child in component_key.findChildren("display-name"): - component_key_display_name_text=child.get_text().replace('\n','') - component_parameter_key_name=parameter["name"] - component_parameter_key_inifile_name=parameter.get("defval-for-inifile-generation", "") - component_parameter_key_access=parameter.get("access", "") - component_parameter_key_encode=parameter.get("encode", "") - component_parameter_key_defval=parameter.get("defval", "") - component_parameter_contents_doclong_text=parameter.get_text().replace('\n','') - component_parameter_contents_doclong_text_quote_replacement=component_parameter_contents_doclong_text.replace('"','\'') - csv_string = '"' + component_key_name_text + '","' + component_key_display_name_text + '","' + component_parameter_key_name + '","' + component_parameter_key_inifile_name + '","' + component_parameter_key_access + '","' + component_parameter_key_encode + '","' + component_parameter_key_defval + '","' + component_parameter_contents_doclong_text_quote_replacement + '"' + component_key_display_name_text = child.get_text().replace('\n', '') + component_parameter_key_name = parameter["name"] + component_parameter_key_inifile_name = parameter.get("defval-for-inifile-generation", "") + component_parameter_key_access = parameter.get("access", "") + component_parameter_key_encode = parameter.get("encode", "") + component_parameter_key_defval = parameter.get("defval", "") + component_parameter_contents_doclong_text = parameter.get_text().replace('\n', '') + component_parameter_contents_doclong_text_quote_replacement = component_parameter_contents_doclong_text.replace('"', '\'') + csv_string = ('"' + + component_key_name_text + '","' + + component_key_display_name_text + '","' + + component_parameter_key_name + '","' + + component_parameter_key_inifile_name + '","' + + component_parameter_key_access + '","' + + component_parameter_key_encode + '","' + + component_parameter_key_defval + '","' + + component_parameter_contents_doclong_text_quote_replacement + '"') csv_output.write("%s\n" % csv_string) csv_output.close() @@ -70,17 +86,16 @@ def control_xml_to_csv(filepath): # SWPM2 Component and Parameters extract all and generate template inifile.params def control_xml_to_inifile_params(filepath): - infile = open(filepath + "/control_utf8.xml","r") + infile = open(filepath + "/control_utf8.xml", "r") contents = infile.read() soup = BeautifulSoup(markup=contents, features='lxml-xml') space = soup.find('components') - component_list = space.findChildren("component" , recursive=False) + component_list = space.findChildren("component", recursive=False) inifile_output = open('generated_inifile_params', 'w') - inifile_params_header = """############ # SWPM Unattended Parameters inifile.params generated export # @@ -89,38 +104,40 @@ def control_xml_to_inifile_params(filepath): # # All parameters are commented-out, each hash # before the parameter is removed to activate the parameter. # When running SWPM in Unattended Mode, the activated parameters will create a new SWPM file in the sapinst directory. - # If any parameter is marked as 'encode', the plaintext value will be coverted to DES hash for this parameter in the new SWPM file (in the sapinst directory). + # If any parameter is marked as 'encode', the plaintext value will be coverted to DES hash for this parameter + # in the new SWPM file (in the sapinst directory). # # An inifile.params is otherwise obtained after running SWPM as GUI or Unattended install, # and will be generated for a specific Product ID (such as 'NW_ABAP_OneHost:S4HANA1809.CORE.HDB.CP'). ############ - - ############ # MANUAL ############ - # The folder containing all archives that have been downloaded from http://support.sap.com/swdc and are supposed to be used in this procedure - # archives.downloadBasket = + # The folder containing all archives that have been downloaded from http://support.sap.com/swdc and are supposed to be + # used in this procedure + # archives.downloadBasket = """ inifile_output.write(inifile_params_header) - for component in component_list: - component_key_name_text=component["name"] - component_key_display_name=component.find("display-name") + component_key_name_text = component["name"] + component_key_display_name = component.find("display-name") if component_key_display_name is not None: - component_key_display_name_text=component_key_display_name.get_text() - inifile_output.write("\n\n\n\n############\n# Component: %s\n# Component Display Name: %s\n############\n" % (component_key_name_text, component_key_display_name_text)) + component_key_display_name_text = component_key_display_name.get_text() + inifile_output.write( + "\n\n\n\n############\n# Component: %s\n" + + "# Component Display Name: %s\n############\n" + + % (component_key_name_text, component_key_display_name_text)) for parameter in component.findChildren("parameter"): -# component_key=parameter.findParent("component") - component_parameter_key_encode=parameter.get("encode", None) - component_parameter_key_inifile_name=parameter.get("defval-for-inifile-generation", None) - component_parameter_key_defval=parameter.get("defval", "") - component_parameter_contents_doclong_text=parameter.get_text().replace('\n','') -# component_parameter_contents_doclong_text_quote_replacement=component_parameter_contents_doclong_text.replace('"','\'') + # component_key = parameter.findParent("component") + component_parameter_key_encode = parameter.get("encode", None) + component_parameter_key_inifile_name = parameter.get("defval-for-inifile-generation", None) + component_parameter_key_defval = parameter.get("defval", "") + component_parameter_contents_doclong_text = parameter.get_text().replace('\n', '') + # component_parameter_contents_doclong_text_quote_replacement = component_parameter_contents_doclong_text.replace('"','\'') if component_parameter_key_inifile_name is not None: inifile_output.write("\n# %s" % (component_parameter_contents_doclong_text)) if component_parameter_key_encode == "true": @@ -129,48 +146,66 @@ def control_xml_to_inifile_params(filepath): inifile_output.close() + # SWPM2 product.catalog conversion to utf8 def product_catalog_xml_utf8(filepath): source = filepath + "/product.catalog" - ### Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser + # Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser # https://stackoverflow.com/questions/64629600/how-can-you-convert-a-xml-iso-8859-1-to-utf-8-using-python-3-7-7/64634454#64634454 with open(source, 'rb') as source: - parser = etree.XMLParser(encoding = "iso-8859-1", strip_cdata=False) + parser = etree.XMLParser(encoding="iso-8859-1", strip_cdata=False) root = etree.parse(source, parser) - string = etree.tostring(root, xml_declaration = True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') + string = etree.tostring(root, xml_declaration=True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') with open('product_catalog_utf8.xml', 'wb') as target: target.write(string) + # SWPM2 Product Catalog entries to CSV -# Each Product Catalog entry is part of a components group, which may have attributes = output-dir, control-file, product-dir (link to SWPM directory of param file etc) -# Attributes possible for each entry = control-file, db, id, name, os, os-type, output-dir, ppms-component, ppms-component-release, product, product-dir, release, table +# Each Product Catalog entry is part of a components group, +# which may have attributes = output-dir, control-file, +# product-dir (link to SWPM directory of param file etc) +# Attributes possible for each entry = control-file, db, id, name, +# os, os-type, output-dir, ppms-component, ppms-component-release, +# product, product-dir, release, table def product_catalog_xml_to_csv(filepath): - infile = open(filepath + "/product_catalog_utf8.xml","r") + infile = open(filepath + "/product_catalog_utf8.xml", "r") contents = infile.read() soup = BeautifulSoup(markup=contents, features='lxml-xml') space = soup.find_all('component') csv_output = open('product_catalog_output.csv', 'w') - csv_header = '"' + 'Product Catalog Component Name' + '","' + 'Product Catalog Component ID' + '","' + 'Product Catalog Component Table' + '","' + 'Product Catalog Component Output Dir' + '","' + 'Product Catalog Component Display Name' + '","' + 'Product Catalog Component UserInfo' + '"' + csv_header = ('"' + + 'Product Catalog Component Name' + '","' + + 'Product Catalog Component ID' + '","' + + 'Product Catalog Component Table' + '","' + + 'Product Catalog Component Output Dir' + '","' + + 'Product Catalog Component Display Name' + '","' + + 'Product Catalog Component UserInfo' + '"') csv_output.write("%s\n" % csv_header) for component in space: - component_name = component.get("name","") - component_id = component.get("id","") - component_table = component.get("table","") - component_output_dir = component.get("output-dir","") + component_name = component.get("name", "") + component_id = component.get("id", "") + component_table = component.get("table", "") + component_output_dir = component.get("output-dir", "") for displayname in component.findChildren("display-name"): component_displayname = displayname.get_text().strip() for userinfo in component.findChildren("user-info"): html_raw = userinfo.get_text().strip() html_parsed = BeautifulSoup(html_raw, 'html.parser') - component_userinfo = html_parsed.get_text().replace('"','\'') - csv_string = '"' + component_name + '","' + component_id + '","' + component_table + '","' + component_output_dir + '","' + component_displayname + '","' + component_userinfo + '"' + component_userinfo = html_parsed.get_text().replace('"', '\'') + csv_string = ('"' + + component_name + '","' + + component_id + '","' + + component_table + '","' + + component_output_dir + '","' + + component_displayname + '","' + + component_userinfo + '"') csv_output.write("%s\n" % csv_string) csv_output.close() From 21113af622aaf473e483441ea33b6fef9bf1884e Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 5 Jul 2022 18:18:55 +0200 Subject: [PATCH 033/375] collection: Further ansible-test sanity cleanup --- .../run-sap_general_preconfigure-tests.py | 2 +- .../run-sap_hana_install-install-tests.py | 2 +- .../run-sap_hana_install-sapcar-tests.py | 2 +- .../tests/run-sap_hana_preconfigure-tests.py | 2 +- .../run-sap_netweaver_preconfigure-tests.py | 2 +- tests/sanity/ignore-2.10.txt | 4 ++ tests/sanity/ignore-2.11.txt | 4 ++ tests/sanity/ignore-2.12.txt | 4 ++ tests/sanity/ignore-2.9.txt | 4 ++ .../swpm2_parameters_inifile_generate.py | 43 ++++++++++++------- 10 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 tests/sanity/ignore-2.10.txt create mode 100644 tests/sanity/ignore-2.11.txt create mode 100644 tests/sanity/ignore-2.12.txt create mode 100644 tests/sanity/ignore-2.9.txt rename {plugins/module_utils => tools}/swpm2_parameters_inifile_generate.py (91%) diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index 8d529a506..cfa83df4d 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python """ Tests for role sap_general_preconfigure diff --git a/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py b/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py index a84f10ab9..fbf422ec5 100755 --- a/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py +++ b/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python import os import sys diff --git a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py index d964ae0d6..d9eceff3d 100755 --- a/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py +++ b/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python import os import sys diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index 5e2399414..dbfd8b359 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python """ Tests for role sap_hana_preconfigure diff --git a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py index 466e67f3d..1be108caf 100755 --- a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py +++ b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python """ Tests for role sap_netweaver_preconfigure diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt new file mode 100644 index 000000000..7bb5a8fc4 --- /dev/null +++ b/tests/sanity/ignore-2.10.txt @@ -0,0 +1,4 @@ +roles/sap_general_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh shebang!skip +roles/sap_hana_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh shebang!skip diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt new file mode 100644 index 000000000..7bb5a8fc4 --- /dev/null +++ b/tests/sanity/ignore-2.11.txt @@ -0,0 +1,4 @@ +roles/sap_general_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh shebang!skip +roles/sap_hana_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh shebang!skip diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt new file mode 100644 index 000000000..7bb5a8fc4 --- /dev/null +++ b/tests/sanity/ignore-2.12.txt @@ -0,0 +1,4 @@ +roles/sap_general_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh shebang!skip +roles/sap_hana_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh shebang!skip diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt new file mode 100644 index 000000000..7bb5a8fc4 --- /dev/null +++ b/tests/sanity/ignore-2.9.txt @@ -0,0 +1,4 @@ +roles/sap_general_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh shebang!skip +roles/sap_hana_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh shebang!skip diff --git a/plugins/module_utils/swpm2_parameters_inifile_generate.py b/tools/swpm2_parameters_inifile_generate.py similarity index 91% rename from plugins/module_utils/swpm2_parameters_inifile_generate.py rename to tools/swpm2_parameters_inifile_generate.py index 173edde93..aea54fae2 100755 --- a/plugins/module_utils/swpm2_parameters_inifile_generate.py +++ b/tools/swpm2_parameters_inifile_generate.py @@ -1,4 +1,6 @@ -#!/bin/python +#!/usr/bin/env python +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type # Prerequisites: # pip install beautifulsoup4 lxml @@ -6,8 +8,19 @@ import sys import os -from bs4 import BeautifulSoup -from lxml import etree +import traceback + +try: + from bs4 import BeautifulSoup + from lxml import etree +except ImportError: + HAS_ANOTHER_LIBRARY = False + ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc() +else: + HAS_ANOTHER_LIBRARY = True + +# from bs4 import BeautifulSoup +# from lxml import etree def debug_bs4(): @@ -127,10 +140,7 @@ def control_xml_to_inifile_params(filepath): component_key_display_name = component.find("display-name") if component_key_display_name is not None: component_key_display_name_text = component_key_display_name.get_text() - inifile_output.write( - "\n\n\n\n############\n# Component: %s\n" + - "# Component Display Name: %s\n############\n" + - % (component_key_name_text, component_key_display_name_text)) + inifile_output.write("\n\n\n\n############\n# Component: %s\n# Component Display Name: %s\n############\n" % (component_key_name_text, component_key_display_name_text)) # nopep8: line-too-long for parameter in component.findChildren("parameter"): # component_key = parameter.findParent("component") component_parameter_key_encode = parameter.get("encode", None) @@ -214,14 +224,15 @@ def product_catalog_xml_to_csv(filepath): # Get arguments passed to Python script session # Define path to control.xml, else assume in /tmp directory -if len(sys.argv) > 1: - control_xml_path = sys.argv[1] -else: - control_xml_path = "/tmp" +if __name__ == "__main__": + if len(sys.argv) > 1: + control_xml_path = sys.argv[1] + else: + control_xml_path = "/tmp" -if control_xml_path == "": - control_xml_path = os.getcwd() + if control_xml_path == "": + control_xml_path = os.getcwd() -control_xml_utf8(control_xml_path) -control_xml_to_csv(control_xml_path) -control_xml_to_inifile_params(control_xml_path) + control_xml_utf8(control_xml_path) + control_xml_to_csv(control_xml_path) + control_xml_to_inifile_params(control_xml_path) From 8e7d3cf8ea3fcdd6e9d5702aaa7a64488e9811e1 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 5 Jul 2022 19:34:55 +0200 Subject: [PATCH 034/375] collection: fix ansible-lint error in GitHub action --- .github/workflows/ansible-lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 27dca12f0..44160503b 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -10,6 +10,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install dependencies + run: ansible-galaxy collection install community.general + - name: Lint Ansible Playbook uses: ansible/ansible-lint-action@main with: From fa6e1cf61853d3177b5dba2af31cbd5be19c2581 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 10:01:22 +0200 Subject: [PATCH 035/375] collection: solve some ansible-test sanity issues --- .github/workflows/ansible-test-sanity.yml | 41 +++++++++++++++++++---- tests/sanity/ignore-2.13.txt | 4 +++ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 tests/sanity/ignore-2.13.txt diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index ffd54e9b2..07ca8b274 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -4,9 +4,13 @@ name: ansible-test sanity on: push: - branches: [ main ] + branches: + - main + - dev pull_request: - branches: [ main ] + branches: + - main + - dev workflow_dispatch: @@ -15,8 +19,33 @@ jobs: runs-on: ubuntu-latest steps: - - name: Perform sanity testing with ansible-test - uses: ansible-community/ansible-test-gh-action@release/v1 + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - ansible-core-version: stable-2.11 - testing-type: sanity + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install yamllint ansible ansible-lint + + - name: Install collection dependencies + run: ansible-galaxy collection install community.general + + - name: Move the collection to the correct location + run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community && mv /home/runner/work/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install +# run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community && ln -s /home/runner/work/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install + + - name: Run sanity tests + working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_install + run: ansible-test sanity + + - name: Move the collection to its previous location + run: rm /home/runner/.ansible/collections/ansible_collections/community/sap_install + +# - name: Perform sanity testing with ansible-test +# uses: ansible-community/ansible-test-gh-action@release/v1 +# with: +# ansible-core-version: stable-2.11 +# testing-type: sanity diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt new file mode 100644 index 000000000..7bb5a8fc4 --- /dev/null +++ b/tests/sanity/ignore-2.13.txt @@ -0,0 +1,4 @@ +roles/sap_general_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh shebang!skip +roles/sap_hana_preconfigure/tools/beautify-assert-output.sh shebang!skip +roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh shebang!skip From 7dd95645e5b75081157ce0010989eaea1a76a0e3 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 13:06:48 +0200 Subject: [PATCH 036/375] collection: fix shebang ansible-test sanity errors in GH action --- .github/workflows/ansible-test-sanity.yml | 66 ++++++++++++++++++----- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index 07ca8b274..abdc54c7a 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -30,22 +30,64 @@ jobs: - name: Install test dependencies run: pip3 install yamllint ansible ansible-lint - - name: Install collection dependencies - run: ansible-galaxy collection install community.general +# - name: Install collection dependencies +# run: ansible-galaxy collection install community.general - - name: Move the collection to the correct location - run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community && mv /home/runner/work/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install -# run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community && ln -s /home/runner/work/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install + - name: List directory /home/runner/work/ + working-directory: /home/runner/ + run: ls -al /home/runner/work/ + + - name: List directory /home/runner/work/_actions + working-directory: /home/runner/ + run: ls -al /home/runner/work/_actions + + - name: List directory /home/runner/work/community.sap_install + working-directory: /home/runner/ + run: ls -al /home/runner/work/community.sap_install + + - name: List directory /home/runner/work/community.sap_install/community.sap_install + working-directory: /home/runner/ + run: ls -al /home/runner/work/community.sap_install/community.sap_install + + - name: Move the collection to the correct location - Create new directory + run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community + + - name: Move the collection to the correct location - Move the collection + working-directory: /home/runner/ + run: mv /home/runner/work/community.sap_install/community.sap_install /home/runner/.ansible/collections/ansible_collections/community + + - name: List directory /home/runner/.ansible/collections/ansible_collections/community + working-directory: /home/runner/ + run: ls -al /home/runner/.ansible/collections/ansible_collections/community + + - name: Move the collection to the correct location - Rename the directory + working-directory: /home/runner/ + run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install + + - name: List directory /home/runner/.ansible/collections/ansible_collections/community + working-directory: /home/runner/ + run: ls -al /home/runner/.ansible/collections/ansible_collections/community + + - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install + working-directory: /home/runner/ + run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install + + - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests + working-directory: /home/runner/ + run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests + + - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity + working-directory: /home/runner/ + run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity + + - name: Show the content of file /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity/ignore-2.13.txt + working-directory: /home/runner/ + run: cat /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity/ignore-2.13.txt - name: Run sanity tests working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_install run: ansible-test sanity - name: Move the collection to its previous location - run: rm /home/runner/.ansible/collections/ansible_collections/community/sap_install - -# - name: Perform sanity testing with ansible-test -# uses: ansible-community/ansible-test-gh-action@release/v1 -# with: -# ansible-core-version: stable-2.11 -# testing-type: sanity + working-directory: /home/runner/ + run: mv /home/runner/.ansible/collections/ansible_collections/community/sap_install /home/runner/work/community.sap_install/community.sap_install From ce93abc390a41324b601432d0c582070b998bad0 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 13:20:29 +0200 Subject: [PATCH 037/375] collection: fix ansible-lint errors in GH action --- .github/workflows/ansible-lint.yml | 69 ++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 44160503b..d7f468355 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -1,28 +1,53 @@ -name: Ansible Lint +# Worflow for ansible-lint -on: [push, pull_request] +name: ansible-lint -jobs: - ansible-lint: +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + + workflow_dispatch: +jobs: + sanity: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Install dependencies - run: ansible-galaxy collection install community.general - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_general_preconfigure - ./roles/sap_netweaver_preconfigure - ./roles/sap_hana_preconfigure - ./roles/sap_hana_install - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + +# - name: Install collection dependencies +# run: ansible-galaxy collection install community.general + + - name: Move the collection to the correct location - Create new directory + run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community + + - name: Move the collection to the correct location - Move the collection + working-directory: /home/runner/ + run: mv /home/runner/work/community.sap_install/community.sap_install /home/runner/.ansible/collections/ansible_collections/community + + - name: Move the collection to the correct location - Rename the directory + working-directory: /home/runner/ + run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install + + - name: Run ansible-lint + working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_install + run: ansible-lint + + - name: Move the collection to its previous location + working-directory: /home/runner/ + run: mv /home/runner/.ansible/collections/ansible_collections/community/sap_install /home/runner/work/community.sap_install/community.sap_install From fb71558e0c6e456c92441ee964a61c1321354966 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 14:45:05 +0200 Subject: [PATCH 038/375] collection: fix further ansible-lint errors reported in GH action --- changelogs/.plugin-cache.yaml | 2 +- changelogs/changelog.yaml | 8 +++++ changelogs/config.yaml | 34 ++++++++++--------- galaxy.yml | 20 ++++++----- .../sample-sap-swpm-all-modes-interactive.yml | 11 +++--- .../sample-variables-sap-hana-install.yml | 2 ++ 6 files changed, 46 insertions(+), 31 deletions(-) diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 29f9bede6..61d43b3bc 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -14,4 +14,4 @@ plugins: shell: {} strategy: {} vars: {} -version: 1.0.3 +version: 1.1.0 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 81367da6d..06a80a11b 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -10,3 +10,11 @@ releases: fragments: - v1.0.3_summary.yaml release_date: '2022-05-13' + 1.1.0: + changes: + release_summary: '| Release Date: 2022-06-30 + + | Add SAP HANA Two-Node Scale-Up Cluster Installation + + ' + release_date: '2022-07-06' diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 16bbe1298..daa7cdebf 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -1,3 +1,5 @@ +--- + changelog_filename_template: ../CHANGELOG.rst changelog_filename_version_depth: 0 changes_file: changelog.yaml @@ -11,22 +13,22 @@ prelude_section_name: release_summary prelude_section_title: Release Summary sanitize_changelog: true sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: community.sap_install trivial_section_name: trivial use_fqcn: true diff --git a/galaxy.yml b/galaxy.yml index 0b5f2d1d2..42a325f7c 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,3 +1,5 @@ +--- + ### REQUIRED # The namespace of the collection. This can be a company/brand/organization or product namespace under which all # content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with @@ -15,12 +17,12 @@ readme: README.md # A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) authors: -- Bernd Finger -- Sean Freeman -- Rainer Leber -- Markus Koch -- Markus Moster -- Janine Fuchs + - Bernd Finger + - Sean Freeman + - Rainer Leber + - Markus Koch + - Markus Moster + - Janine Fuchs ### OPTIONAL but strongly recommended # A short summary description of the collection @@ -38,9 +40,9 @@ license_file: '' # A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character # requirements as 'namespace' and 'name' tags: -- database -- application -- sap + - database + - application + - sap # Collections that this collection requires to be installed for it to be usable. The key of the dict is the # collection label 'namespace.name'. The value is a version range diff --git a/playbooks/sample-sap-swpm-all-modes-interactive.yml b/playbooks/sample-sap-swpm-all-modes-interactive.yml index 791474700..888ae2b0b 100644 --- a/playbooks/sample-sap-swpm-all-modes-interactive.yml +++ b/playbooks/sample-sap-swpm-all-modes-interactive.yml @@ -18,8 +18,9 @@ register: prompt no_log: yes run_once: yes + - set_fact: - sap_swpm_ansible_role_mode: "{{prompt.user_input}}" + sap_swpm_ansible_role_mode: "{{ prompt.user_input }}" no_log: yes run_once: yes @@ -32,7 +33,7 @@ - (sap_swpm_ansible_role_mode == "default" or sap_swpm_ansible_role_mode == "advanced") - (sap_swpm_product_catalog_id is not defined or sap_swpm_product_catalog_id == None) - include_vars: - file: "{{prompt.user_input}}" + file: "{{ prompt.user_input }}" no_log: no run_once: yes when: @@ -47,7 +48,7 @@ when: - sap_swpm_ansible_role_mode == "inifile_reuse" - set_fact: - sap_swpm_inifile_reuse_source: "{{prompt.user_input}}" + sap_swpm_inifile_reuse_source: "{{ prompt.user_input }}" no_log: no run_once: yes when: @@ -62,7 +63,7 @@ - (sap_swpm_ansible_role_mode == "default_templates" or sap_swpm_ansible_role_mode == "advanced_templates") - (sap_swpm_templates_install_dictionary is not defined or sap_swpm_templates_install_dictionary == None) - include_vars: - file: "{{prompt.user_input}}" + file: "{{ prompt.user_input }}" no_log: no run_once: yes when: @@ -76,7 +77,7 @@ when: - sap_swpm_ansible_role_mode == "default_templates" or sap_swpm_ansible_role_mode == "advanced_templates" - set_fact: - sap_swpm_templates_product_input: "{{prompt.user_input}}" + sap_swpm_templates_product_input: "{{ prompt.user_input }}" no_log: no run_once: yes when: diff --git a/playbooks/vars/sample-variables-sap-hana-install.yml b/playbooks/vars/sample-variables-sap-hana-install.yml index b0c2fec91..0b12e4752 100644 --- a/playbooks/vars/sample-variables-sap-hana-install.yml +++ b/playbooks/vars/sample-variables-sap-hana-install.yml @@ -1,3 +1,5 @@ +--- + # ----------------------------- Mandatory parameters ----------------------------- # # Install directory must contain From b1f482aa89ca986ef142d4b3e444c64d79227279 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 15:09:32 +0200 Subject: [PATCH 039/375] collection: fix some more ansible-lint errors reported in GH action --- changelogs/changelog.yaml | 2 +- galaxy.yml | 2 +- playbooks/sample-sap-hana-install.yml | 3 ++- playbooks/sample-sap-hana-preconfigure.yml | 4 ++-- playbooks/sample-sap-netweaver-preconfigure.yml | 2 +- playbooks/sample-sap-preconfigure.yml | 8 ++++---- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 06a80a11b..bd7411429 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -8,7 +8,7 @@ releases: ' fragments: - - v1.0.3_summary.yaml + - v1.0.3_summary.yaml release_date: '2022-05-13' 1.1.0: changes: diff --git a/galaxy.yml b/galaxy.yml index 42a325f7c..2519b13ad 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -31,7 +31,7 @@ description: Collection of Ansible Roles for SAP software installation in variou # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- Apache-2.0 + - Apache-2.0 # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' diff --git a/playbooks/sample-sap-hana-install.yml b/playbooks/sample-sap-hana-install.yml index 39169cf23..19dc4d027 100644 --- a/playbooks/sample-sap-hana-install.yml +++ b/playbooks/sample-sap-hana-install.yml @@ -2,6 +2,7 @@ - hosts: all become: true pre_tasks: - - include_vars: ./vars/sample-variables-sap-hana-install.yml + - name: Include vars + ansible.builtin.include_vars: ./vars/sample-variables-sap-hana-install.yml roles: - { role: ../roles/sap_hana_install } diff --git a/playbooks/sample-sap-hana-preconfigure.yml b/playbooks/sample-sap-hana-preconfigure.yml index f5c9d226c..4624dfdeb 100644 --- a/playbooks/sample-sap-hana-preconfigure.yml +++ b/playbooks/sample-sap-hana-preconfigure.yml @@ -2,7 +2,7 @@ - hosts: all become: true vars: - sap_hana_preconfigure_fail_if_reboot_required: no - sap_hana_preconfigure_update: yes + sap_hana_preconfigure_fail_if_reboot_required: no + sap_hana_preconfigure_update: yes roles: - { role: community.sap_install.sap_hana_preconfigure } diff --git a/playbooks/sample-sap-netweaver-preconfigure.yml b/playbooks/sample-sap-netweaver-preconfigure.yml index 2cfbdf652..506074b86 100644 --- a/playbooks/sample-sap-netweaver-preconfigure.yml +++ b/playbooks/sample-sap-netweaver-preconfigure.yml @@ -2,6 +2,6 @@ - hosts: all become: true vars: - sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no + sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no roles: - { role: community.sap_install.sap_netweaver_preconfigure } diff --git a/playbooks/sample-sap-preconfigure.yml b/playbooks/sample-sap-preconfigure.yml index d35c3fc01..c7bc17b62 100644 --- a/playbooks/sample-sap-preconfigure.yml +++ b/playbooks/sample-sap-preconfigure.yml @@ -2,10 +2,10 @@ - hosts: all become: true vars: - sap_general_preconfigure_fail_if_reboot_required: no - sap_hana_preconfigure_fail_if_reboot_required: no - sap_hana_preconfigure_update: yes - sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no + sap_general_preconfigure_fail_if_reboot_required: no + sap_hana_preconfigure_fail_if_reboot_required: no + sap_hana_preconfigure_update: yes + sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no roles: - { role: community.sap_install.sap_general_preconfigure } - { role: community.sap_install.sap_hana_preconfigure } From e93269a5bdebfb31524fb10b81b460ba61ab1bde Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 15:22:52 +0200 Subject: [PATCH 040/375] collection: fix new ansible-lint errors reported in GH action --- .ansible-lint | 1 + playbooks/vars/sample-variables-sap-storage-lvm-stripes.yml | 2 ++ playbooks/vars/sample-variables-sap-storage-lvm.yml | 2 ++ ...sample-variables-sap-swpm-advanced-mode-s4hana-install.yml | 2 ++ .../sample-variables-sap-swpm-advanced-templates-mode.yml | 2 ++ ...sample-variables-sap-swpm-default-mode-bw4hana-install.yml | 4 +++- ...-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml | 4 +++- ...-sap-swpm-default-mode-s4hana-distributed-dbci-install.yml | 4 +++- ...s-sap-swpm-default-mode-s4hana-distributed-ers-install.yml | 2 ++ ...s-sap-swpm-default-mode-s4hana-distributed-pas-install.yml | 4 +++- .../sample-variables-sap-swpm-default-mode-s4hana-install.yml | 4 +++- .../sample-variables-sap-swpm-default-mode-s4hana-restore.yml | 2 ++ ...le-variables-sap-swpm-default-mode-solman-abap-install.yml | 4 +++- ...le-variables-sap-swpm-default-mode-solman-java-install.yml | 2 ++ .../sample-variables-sap-swpm-default-mode-system-rename.yml | 2 ++ ...sample-variables-sap-swpm-default-mode-webdisp-install.yml | 2 ++ .../vars/sample-variables-sap-swpm-default-templates-mode.yml | 2 ++ 17 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 57cac1a1b..3ac003f72 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,3 +3,4 @@ enable_list: - yaml skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - var-spacing # An attempt to reduce the number of errors in the ansible-lint GitHub run diff --git a/playbooks/vars/sample-variables-sap-storage-lvm-stripes.yml b/playbooks/vars/sample-variables-sap-storage-lvm-stripes.yml index bbf3819da..8c736a99c 100644 --- a/playbooks/vars/sample-variables-sap-storage-lvm-stripes.yml +++ b/playbooks/vars/sample-variables-sap-storage-lvm-stripes.yml @@ -1,3 +1,5 @@ +--- + sap_storage_dict: hanadata: name: 'hanadata' diff --git a/playbooks/vars/sample-variables-sap-storage-lvm.yml b/playbooks/vars/sample-variables-sap-storage-lvm.yml index 3a31b47f0..f92fa8fe5 100644 --- a/playbooks/vars/sample-variables-sap-storage-lvm.yml +++ b/playbooks/vars/sample-variables-sap-storage-lvm.yml @@ -1,3 +1,5 @@ +--- + sap_storage_dict: hanadata: name: 'hanadata' diff --git a/playbooks/vars/sample-variables-sap-swpm-advanced-mode-s4hana-install.yml b/playbooks/vars/sample-variables-sap-swpm-advanced-mode-s4hana-install.yml index 78e827cf9..c7aeabadd 100644 --- a/playbooks/vars/sample-variables-sap-swpm-advanced-mode-s4hana-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-advanced-mode-s4hana-install.yml @@ -1,3 +1,5 @@ +--- + # NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash sap_swpm_ansible_role_mode: "advanced" diff --git a/playbooks/vars/sample-variables-sap-swpm-advanced-templates-mode.yml b/playbooks/vars/sample-variables-sap-swpm-advanced-templates-mode.yml index 977213aff..24aba9806 100644 --- a/playbooks/vars/sample-variables-sap-swpm-advanced-templates-mode.yml +++ b/playbooks/vars/sample-variables-sap-swpm-advanced-templates-mode.yml @@ -1,3 +1,5 @@ +--- + # NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash sap_swpm_templates_install_dictionary: diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-bw4hana-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-bw4hana-install.yml index e881ccdee..a8b8ae3da 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-bw4hana-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-bw4hana-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_OneHost:BW4HANA20.CORE.HDB.ABAP @@ -23,4 +25,4 @@ sap_swpm_fqdn: "poc.cloud" # Software sap_swpm_software_path: /software sap_swpm_sapcar_path: /software -sap_swpm_swpm_path: /software \ No newline at end of file +sap_swpm_swpm_path: /software diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml index 0ecf9cf8d..6168fee19 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_ASCS:S4HANA2020.CORE.HDB.ABAP #NW_ABAP_ASCS:S4HANA2020.CORE.HDB.ABAPHA @@ -34,4 +36,4 @@ sap_swpm_sidadm_uid: '3001' # HDB Instance Parameters sap_swpm_db_host: "hana01" sap_swpm_db_sid: HDD -sap_swpm_db_instance_nr: "00" \ No newline at end of file +sap_swpm_db_instance_nr: "00" diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-dbci-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-dbci-install.yml index 71925b802..fc5206691 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-dbci-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-dbci-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_DB:S4HANA2020.CORE.HDB.ABAP #NW_ABAP_DB:S4HANA2020.CORE.HDB.ABAPHA @@ -33,4 +35,4 @@ sap_swpm_sidadm_uid: '3001' # HDB Instance Parameters sap_swpm_db_host: "hana01" sap_swpm_db_sid: HDD -sap_swpm_db_instance_nr: "00" \ No newline at end of file +sap_swpm_db_instance_nr: "00" diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ers-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ers-install.yml index d724d6f58..6b608a88e 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ers-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-ers-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ERS:S4HANA2020.CORE.HDB.ABAPHA diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-pas-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-pas-install.yml index b82bd36a2..3f3e78dfa 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-pas-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-distributed-pas-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_CI:S4HANA2020.CORE.HDB.ABAP #NW_ABAP_CI:S4HANA2020.CORE.HDB.ABAPHA @@ -33,4 +35,4 @@ sap_swpm_sidadm_uid: '3001' # HDB Instance Parameters sap_swpm_db_host: "hana01" sap_swpm_db_sid: HDD -sap_swpm_db_instance_nr: "00" \ No newline at end of file +sap_swpm_db_instance_nr: "00" diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-install.yml index 6f7cab2bb..4e1d67f28 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_OneHost:S4HANA2020.CORE.HDB.ABAP @@ -28,4 +30,4 @@ sap_swpm_fqdn: "poc.cloud" # For dual host installation, change the db_host to appropriate value sap_swpm_db_host: "{{ ansible_hostname }}" sap_swpm_db_sid: HDB -sap_swpm_db_instance_nr: "00" \ No newline at end of file +sap_swpm_db_instance_nr: "00" diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-restore.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-restore.yml index c3502d709..29d6baf1c 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-restore.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-s4hana-restore.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_ABAP_OneHost:S4HANA2020.CORE.HDB.CP diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-abap-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-abap-install.yml index e4ec16ba7..4f6cc4f1b 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-abap-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-abap-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for Solman New Installation sap_swpm_product_catalog_id: NW_ABAP_OneHost:SOLMAN72SR2.ABAP.HDB.PD @@ -37,4 +39,4 @@ sap_swpm_db_host: "{{ ansible_hostname }}" sap_swpm_db_sid: HSA sap_swpm_db_instance_nr: "00" -# Java Stack Details \ No newline at end of file +# Java Stack Details diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-java-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-java-install.yml index 6f5489969..94680b10b 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-java-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-java-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for Solman New Installation sap_swpm_product_catalog_id: NW_Java_OneHost:SOLMAN72SR2.JAVA.HDB.PD diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-system-rename.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-system-rename.yml index 6139f31cd..89d341e7a 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-system-rename.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-system-rename.yml @@ -1,3 +1,5 @@ +--- + # Target host path and file name for the sapcar installation file sap_swpm_sapcar_path: /software sap_swpm_sapcar_file_name: SAPCAR_1010-70006178.EXE diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-webdisp-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-webdisp-install.yml index 71db992a6..b68007158 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-webdisp-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-webdisp-install.yml @@ -1,3 +1,5 @@ +--- + # Product ID for New Installation sap_swpm_product_catalog_id: NW_Webdispatcher:NW750.IND.PD diff --git a/playbooks/vars/sample-variables-sap-swpm-default-templates-mode.yml b/playbooks/vars/sample-variables-sap-swpm-default-templates-mode.yml index b06947251..94e068d71 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-templates-mode.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-templates-mode.yml @@ -1,3 +1,5 @@ +--- + # Override any variable set in sap_swpm_inifile_dictionary sap_swpm_master_password: NewPass$321 sap_swpm_ddic_000_password: "NewPass$321" From 3e050fbf7159b41b7bb4856e1e2bc829642cc524 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 16:10:11 +0200 Subject: [PATCH 041/375] sap_general_preconfigure: solve var-spacing lint errors --- .ansible-lint | 1 - .../tasks/RedHat/assert-installation.yml | 26 +++++++++---------- .../generic/assert-dns-name-resolution.yml | 14 +++++----- .../tasks/RedHat/generic/assert-etc-hosts.yml | 12 ++++----- .../tasks/RedHat/generic/assert-firewall.yml | 4 +-- .../tasks/RedHat/generic/assert-hostname.yml | 4 +-- .../assert-kernel-parameters-loop-block.yml | 4 +-- .../generic/assert-kernel-parameters.yml | 4 +-- .../generic/assert-limits-conf-file.yml | 4 +-- .../RedHat/generic/assert-nofile-limits.yml | 8 +++--- .../RedHat/generic/assert-nproc-limits.yml | 8 +++--- .../tasks/RedHat/generic/assert-selinux.yml | 6 ++--- .../generic/assert-systemd-tmpfiles.yml | 2 +- .../tasks/RedHat/generic/assert-tmpfs.yml | 6 ++--- .../tasks/RedHat/generic/assert-uuidd.yml | 6 ++--- .../RedHat/generic/configure-selinux.yml | 2 +- .../tasks/sapnote/0941735.yml | 2 +- .../tasks/sapnote/1391070.yml | 2 +- .../tasks/sapnote/1771258.yml | 2 +- .../tasks/sapnote/2002167.yml | 10 +++---- ...ional-notes-for-installing-sap-systems.yml | 12 ++++----- .../tasks/sapnote/2772999.yml | 18 ++++++------- .../04-assert-network-time-and-date.yml | 4 +-- .../tasks/sapnote/assert-0941735.yml | 2 +- .../tasks/sapnote/assert-1391070.yml | 2 +- .../tasks/sapnote/assert-1771258.yml | 2 +- .../tasks/sapnote/assert-2002167.yml | 10 +++---- .../tasks/sapnote/assert-2772999.yml | 18 ++++++------- 28 files changed, 97 insertions(+), 98 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 3ac003f72..57cac1a1b 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,4 +3,3 @@ enable_list: - yaml skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - - var-spacing # An attempt to reduce the number of errors in the ansible-lint GitHub run diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index afaf7d817..8e438960d 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -58,7 +58,7 @@ - "{{ __sap_general_preconfigure_req_repos }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_enable_repos @@ -77,7 +77,7 @@ fail_msg: "FAIL: The RHEL release lock status is '{{ __sap_general_preconfigure_register_subscription_manager_release_assert.stdout }}' but the expected value is '{{ ansible_distribution_version }}'!" success_msg: "PASS: The RHEL release is correctly locked to '{{ ansible_distribution_version }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: "ansible_distribution_version != '7.9'" - name: Report that checking the release lock is not necessary if the system is on RHEL 7.9 @@ -114,10 +114,10 @@ loop: "{{ sap_general_preconfigure_packagegroups | map('replace', '@', '') | list }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - - sap_general_preconfigure_packagegroups|d([]) + - sap_general_preconfigure_packagegroups | d([]) - ansible_distribution_major_version == '7' # Reason for noqa: A double brace might also occur in an awk command sequence. @@ -146,10 +146,10 @@ - "{{ sap_general_preconfigure_envgroups }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - - sap_general_preconfigure_envgroups|d([]) + - sap_general_preconfigure_envgroups | d([]) - ansible_distribution_major_version == '8' - name: Assert that all required packages are installed @@ -161,7 +161,7 @@ - "{{ sap_general_preconfigure_packages }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check block: @@ -222,13 +222,13 @@ when: - sap_general_preconfigure_min_package_check|bool - - __sap_general_preconfigure_min_pkgs|d([]) + - __sap_general_preconfigure_min_pkgs | d([]) - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." ignore_errors: yes - when: not __sap_general_preconfigure_min_pkgs|d([]) + when: not __sap_general_preconfigure_min_pkgs | d([]) - name: Get info about possible package updates ansible.builtin.command: yum check-update @@ -236,7 +236,7 @@ args: warn: false changed_when: false - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update - name: Assert that there are no more possible package updates @@ -244,7 +244,7 @@ that: __sap_general_preconfigure_register_yum_check_update_assert is success fail_msg: "FAIL: System needs to be updated!" success_msg: "PASS: There are no more outstanding package updates." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update - name: Report if checking for possible package updates is not requested @@ -285,11 +285,11 @@ args: warn: false check_mode: false - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that system needs no restart ansible.builtin.assert: that: __sap_general_preconfigure_register_needs_restarting_assert is success fail_msg: "FAIL: System needs to be restarted!" success_msg: "PASS: System needs no restart." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml index 6232ff3b9..6d83943af 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml @@ -5,7 +5,7 @@ that: not( (ansible_domain is undefined) or (ansible_domain is none) or (ansible_domain | trim == '') ) fail_msg: "FAIL: The DNS domain is not configured! So variable 'sap_domain' needs to be configured!" success_msg: "PASS: The DNS domain is configured." -# ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" +# ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" ignore_errors: yes - name: Assert that variable sap_domain is set @@ -13,13 +13,13 @@ that: not( (sap_domain is undefined) or (sap_domain is none) or (sap_domain | trim == '') ) fail_msg: "FAIL: The variable 'sap_domain' is not set!" success_msg: "PASS: The variable 'sap_domain' is set." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check if the bind-utils package, which contains the dig command, is available ansible.builtin.assert: that: "'bind-utils' in ansible_facts.packages" fail_msg: "FAIL: The package 'bind-utils' is not installed! DNS checking not possible!" - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check if IP address for sap_hostname.sap_domain is resolved correctly ansible.builtin.command: dig {{ sap_hostname }}.{{ sap_domain }} +short @@ -33,14 +33,14 @@ that: not( (ansible_default_ipv4.address is undefined) or (ansible_default_ipv4.address is none) or (ansible_default_ipv4.address | trim == '') ) fail_msg: "FAIL: The variable 'ansible_default_ipv4.address' is not defined!" success_msg: "PASS: The variable 'ansible_default_ipv4.address' is defined." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that sap_ip is set ansible.builtin.assert: that: "__sap_general_preconfigure_register_dig_short_assert.stdout == '{{ sap_ip }}'" fail_msg: "FAIL: The variable 'sap_ip' is not set!" success_msg: "PASS: The variable 'sap_ip' is set." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: "'bind-utils' in ansible_facts.packages" ### BUG: dig does not use search path in resolv.con on PPCle @@ -56,7 +56,7 @@ that: "__sap_general_preconfigure_register_dig_search_short_assert.stdout == '{{ sap_ip }}'" fail_msg: "FAIL: The IP address for 'sap_hostname' could not be resolved!" success_msg: "PASS: The IP address for 'sap_hostname' was resolved." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(true) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(true) }}" when: "'bind-utils' in ansible_facts.packages" - name: Check if the reverse name resolution is correct @@ -71,5 +71,5 @@ that: "__sap_general_preconfigure_register_dig_reverse_assert.stdout == '{{ sap_hostname }}.{{ sap_domain }}.'" fail_msg: "FAIL: The reverse name resolution of 'sap_ip' was not successful!" success_msg: "PASS: The reverse name resolution of 'sap_ip' was successful." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(true) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(true) }}" when: "'bind-utils' in ansible_facts.packages" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml index 216391142..d2cf27049 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml @@ -34,7 +34,7 @@ that: "__sap_general_preconfigure_register_ipv4_fqdn_sap_hostname_once_assert.stdout == '1'" fail_msg: "FAIL: The line '{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }}' needs to be once in /etc/hosts!" success_msg: "PASS: The line '{{ sap_ip }} {{ sap_hostname }}.{{ sap_domain }} {{ sap_hostname }}' is once in /etc/hosts." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" #- name: Ensure that the entry in /etc/hosts is correct # ansible.builtin.lineinfile: @@ -55,7 +55,7 @@ that: "__sap_general_preconfigure_register_sap_ip_once_assert.stdout == '1'" fail_msg: "FAIL: There is no line, or more than one line, containing '{{ sap_ip }}' in /etc/hosts!" success_msg: "PASS: There is only one line containing '{{ sap_ip }}' in /etc/hosts." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check for duplicate or missing entries of {{ sap_hostname }}.{{ sap_domain }} in /etc/hosts ansible.builtin.command: awk '/^{{ sap_hostname }}.{{ sap_domain }} /|| @@ -70,7 +70,7 @@ that: "__sap_general_preconfigure_register_fqdn_once_assert.stdout == '1'" fail_msg: "FAIL: There is no line, or more than one line, containing '{{ sap_hostname }}.{{ sap_domain }}' in /etc/hosts!" success_msg: "PASS: There is only one line containing '{{ sap_hostname }}.{{ sap_domain }}' in /etc/hosts." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check for duplicate or missing entries of {{ sap_hostname }} in /etc/hosts ansible.builtin.command: awk '/^{{ sap_hostname }} /|| @@ -85,7 +85,7 @@ that: "__sap_general_preconfigure_register_sap_hostname_once_assert.stdout == '1'" fail_msg: "FAIL: There is no line, or more than one line, containing '{{ sap_hostname }}' in /etc/hosts!" success_msg: "PASS: There is only one line containing '{{ sap_hostname }}' in /etc/hosts." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check hostname -s ansible.builtin.shell: test "$(hostname -s)" = "$(hostname)" @@ -98,7 +98,7 @@ that: __sap_general_preconfigure_register_hostname_s_assert is success fail_msg: "FAIL: The output of 'hostname -s' does not match the output of 'hostname'!" success_msg: "PASS: The output of 'hostname -s' matches the output of 'hostname'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Check hostname -f ansible.builtin.shell: test "$(hostname -f)" = "$(hostname).$(hostname -d)" @@ -111,4 +111,4 @@ that: __sap_general_preconfigure_register_hostname_f_assert is success fail_msg: "FAIL: The output of 'hostname -f' does not match the output of 'hostname'.'hostname -d'!" success_msg: "PASS: The output of 'hostname -f' matches the output of 'hostname'.'hostname -d'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml index 8dd8a7406..86ca2cd49 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml @@ -25,14 +25,14 @@ that: "'/usr/lib/systemd/system/firewalld.service; disabled' in __sap_general_preconfigure_register_firewalld_status_assert.stdout" fail_msg: "FAIL: Service 'firewalld' is not disabled!" success_msg: "PASS: Service 'firewalld' is disabled." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that firewalld is inactive ansible.builtin.assert: that: "'inactive (dead)' in __sap_general_preconfigure_register_firewalld_status_assert.stdout" fail_msg: "FAIL: Service 'firewalld' is active!" success_msg: "PASS: Service 'firewalld' is inactive." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: "'firewalld' in ansible_facts.packages" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml index 8c4e5b03c..64957c5dc 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml @@ -11,11 +11,11 @@ that: "__sap_general_preconfigure_register_hostname_assert.stdout == '{{ sap_hostname }}'" fail_msg: "FAIL: The output of 'hostname' does not match the content of variable 'sap_hostname'!" success_msg: "PASS: The output of 'hostname' matches the content of variable 'sap_hostname'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: "Assert that the length of the hostname is not longer than 'sap_general_preconfigure_max_hostname_length'" ansible.builtin.assert: that: "{{ sap_hostname | length | int }} <= {{ sap_general_preconfigure_max_hostname_length | int }}" fail_msg: "FAIL: The length of the hostname is {{ sap_hostname | length | int }} but must be less or equal to {{ sap_general_preconfigure_max_hostname_length }} (variable 'sap_general_preconfigure_max_hostname_length')!" success_msg: "PASS: The length of the hostname is {{ sap_hostname | length | int }}, which is less or equal to {{ sap_general_preconfigure_max_hostname_length }} (variable 'sap_general_preconfigure_max_hostname_length')." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml index 4b1e6d080..2c721ed28 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml @@ -16,7 +16,7 @@ '{{ __sap_general_preconfigure_register_sysctl_sap_conf_kernel_parameter_assert.stdout }}' but the expected value is '{{ line_item.value }}'!" success_msg: "PASS: The value of '{{ line_item.name }}' in '{{ __sap_general_preconfigure_etc_sysctl_sap_conf }}' is '{{ __sap_general_preconfigure_register_sysctl_sap_conf_kernel_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_sysctl_sap_conf_assert.stat.exists - name: Get {{ line_item.name }} from sysctl @@ -32,4 +32,4 @@ '{{ __sap_general_preconfigure_register_sysctl_kernel_parameter_assert.stdout }}' but the expected value is '{{ line_item.value }}'!" success_msg: "PASS: The current value of '{{ line_item.name }}' as per sysctl is '{{ __sap_general_preconfigure_register_sysctl_kernel_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters.yml index 617e0ad28..caa1dae03 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters.yml @@ -10,14 +10,14 @@ that: __sap_general_preconfigure_register_stat_sysctl_sap_conf_assert.stat.exists fail_msg: "FAIL: File {{ __sap_general_preconfigure_etc_sysctl_sap_conf }} does not exist!" success_msg: "PASS: File {{ __sap_general_preconfigure_etc_sysctl_sap_conf }} exist." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/sysctl.d/sap.conf is a regular file ansible.builtin.assert: that: __sap_general_preconfigure_register_stat_sysctl_sap_conf_assert.stat.isreg fail_msg: "FAIL: File {{ __sap_general_preconfigure_etc_sysctl_sap_conf }} is not a regular file!" success_msg: "PASS: File {{ __sap_general_preconfigure_etc_sysctl_sap_conf }} is a regular file." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_sysctl_sap_conf_assert.stat.exists - name: Get and assert kernel tunables diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-limits-conf-file.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-limits-conf-file.yml index 9953dc5e7..612edc4ce 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-limits-conf-file.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-limits-conf-file.yml @@ -10,12 +10,12 @@ that: __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists fail_msg: "FAIL: File /etc/security/limits.d/99-sap.conf does not exist!" success_msg: "PASS: File /etc/security/limits.d/99-sap.conf exist." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/security/limits.d/99-sap.conf is a regular file ansible.builtin.assert: that: __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/security/limits.d/99-sap.conf is not a regular file!" success_msg: "PASS: File /etc/security/limits.d/99-sap.conf is a regular file." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml index 8601e8340..08c8fa1a7 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml @@ -16,7 +16,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_nofile_hard_assert.stdout }}' but the expected value is 1048576 !" success_msg: "PASS: The hard limit of nofile for group 'sapsys' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_nofile_hard_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -37,7 +37,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_nofile_soft_assert.stdout }}' but the expected value is 1048576 !" success_msg: "PASS: The soft limit of nofile for group 'sapsys' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_nofile_soft_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -57,7 +57,7 @@ that: "__sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_hard_assert.stdout == '1048576'" fail_msg: "FAIL: The hard limit of nofile for group '{{ sap_general_preconfigure_db_group_name }}' is not set to '1048576' in /etc/security/limits.d/99-sap.conf!" success_msg: "PASS: The hard limit of nofile for group '{{ sap_general_preconfigure_db_group_name }}' is set to '1048576' in /etc/security/limits.d/99-sap.conf." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -78,7 +78,7 @@ that: "__sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_soft_assert.stdout == '1048576'" fail_msg: "FAIL: The soft limit of nofile for group '{{ sap_general_preconfigure_db_group_name }}' is not set to '1048576' in /etc/security/limits.d/99-sap.conf!" success_msg: "PASS: The soft limit of nofile for group '{{ sap_general_preconfigure_db_group_name }}' is set to '1048576' in /etc/security/limits.d/99-sap.conf." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml index 9a996a014..9edf3e320 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml @@ -16,7 +16,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_nproc_hard_assert.stdout }}' but the expected value is 'unlimited'!" success_msg: "PASS: The hard limit of nproc for group 'sapsys' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_nproc_hard_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -37,7 +37,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_nproc_hard_assert.stdout }}' but the expected value is 'unlimited'!" success_msg: "PASS: The soft limit of nproc for group 'sapsys' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_nproc_soft_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -59,7 +59,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_hard_assert.stdout }}' but the expected value is 'unlimited'!" success_msg: "PASS: The hard limit of nproc for group '{{ sap_general_preconfigure_db_group_name }}' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_hard_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -82,7 +82,7 @@ '{{ __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_soft_assert.stdout }}' but the expected value is 'unlimited'!" success_msg: "PASS: The soft limit of nproc for group '{{ sap_general_preconfigure_db_group_name }}' in /etc/security/limits.d/99-sap.conf is '{{ __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_soft_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 45abf9bc0..89efd2c53 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -10,7 +10,7 @@ that: __sap_general_preconfigure_register_stat_selinux_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/selinux/config does not exist or is not a regular file!" # success_msg: "PASS: File /etc/selinux/config exists and is a regular file." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Warn about SELinux being set to 'enforcing' ansible.builtin.debug: @@ -38,7 +38,7 @@ fail_msg: "FAIL: The system is not configured for the SELinux state of '{{ sap_general_preconfigure_selinux_state }}'. Current configuration: '{{ __sap_general_preconfigure_register_selinux_conf_assert.stdout }}'." success_msg: "PASS: The system is configured for the SELinux state of '{{ sap_general_preconfigure_selinux_state }}'" - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_selinux_conf_assert.stat.isreg - name: Assert - Determine the current SELinux state @@ -52,4 +52,4 @@ fail_msg: "FAIL: SELinux is currently not '{{ sap_general_preconfigure_selinux_state }}'! The current SELinux state is: '{{ __sap_general_preconfigure_register_getenforce_assert.stdout | lower }}'." success_msg: "PASS: SELinux is currently {{ sap_general_preconfigure_selinux_state }}." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-systemd-tmpfiles.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-systemd-tmpfiles.yml index 7a4b71b12..4c0b69601 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-systemd-tmpfiles.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-systemd-tmpfiles.yml @@ -10,4 +10,4 @@ that: __sap_general_preconfigure_register_stat_tmpfiles_sap_conf_assert.stat.exists fail_msg: "FAIL: File /etc/tmpfiles.d/sap.conf does not exist!" success_msg: "PASS: File /etc/tmpfiles.d/sap.conf exist." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml index cb28d52ff..748e31be9 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml @@ -11,7 +11,7 @@ that: __sap_general_preconfigure_register_fstab_tmpfs_size_gb_assert.stdout | length > 0 fail_msg: "FAIL: There is no entry for 'tmpfs' in /etc/fstab!" success_msg: "PASS: An entry for 'tmpfs' in /etc/fstab exists." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that the size of tmpfs is large enough as per /etc/fstab ansible.builtin.assert: @@ -19,7 +19,7 @@ fail_msg: "FAIL: The size of tmpfs in /etc/fstab is '{{ __sap_general_preconfigure_register_fstab_tmpfs_size_gb_assert.stdout }}' but the expected size is '{{ sap_general_preconfigure_size_of_tmpfs_gb }}G'!" success_msg: "PASS: The size of tmpfs in /etc/fstab is '{{ __sap_general_preconfigure_register_fstab_tmpfs_size_gb_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_fstab_tmpfs_size_gb_assert.stdout | length > 0 - name: Check if /dev/shm is available and has the expected size @@ -34,4 +34,4 @@ fail_msg: "FAIL: The current size of tmpfs is '{{ __sap_general_preconfigure_register_df_shm_assert.stdout }}' but the expected size is '{{ sap_general_preconfigure_size_of_tmpfs_gb }}G'!" success_msg: "PASS: The current size of tmpfs is '{{ __sap_general_preconfigure_register_df_shm_assert.stdout }}'." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml index 4951e6d6f..0951483f9 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml @@ -5,7 +5,7 @@ that: "'uuidd.service' in ansible_facts.services" fail_msg: "FAIL: Service 'uuidd' could not be found!" success_msg: "PASS: Service 'uuidd' is available." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" # uuidd is started on demand by uuidd.socket, so it does not need to be running: - name: Report uuidd service status @@ -31,7 +31,7 @@ that: "'/usr/lib/systemd/system/uuidd.socket; enabled' in __sap_general_preconfigure_register_uuidd_socket_status_assert.stdout" fail_msg: "FAIL: Service 'uuidd.socket' is not enabled!" success_msg: "PASS: Service 'uuidd.socket' is enabled." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that uuidd.socket is active ansible.builtin.assert: @@ -39,4 +39,4 @@ in __sap_general_preconfigure_register_uuidd_socket_status_assert.stdout" fail_msg: "FAIL: Service 'uuidd.socket' is not active!" success_msg: "PASS: Service 'uuidd.socket' is active." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 9b4271d1a..b21fa84c8 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -95,4 +95,4 @@ - name: SELinux - Display the content of sap_general_preconfigure_fact_reboot_required ansible.builtin.debug: - var: sap_general_preconfigure_fact_reboot_required|d(false) + var: sap_general_preconfigure_fact_reboot_required | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml index d44159081..71314ca65 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml @@ -11,4 +11,4 @@ - name: Import tasks from '../RedHat/generic/configure-tmpfs.yml' ansible.builtin.import_tasks: ../RedHat/generic/configure-tmpfs.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_0941735|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_0941735 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml b/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml index 9726fc385..9c8d90ceb 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/1391070.yml @@ -8,4 +8,4 @@ - name: Import tasks from '../RedHat/generic/configure-uuidd.yml' ansible.builtin.import_tasks: ../RedHat/generic/configure-uuidd.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1391070|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_1391070 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml b/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml index fb884c8e8..6d6a290b9 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/1771258.yml @@ -8,4 +8,4 @@ - name: Import tasks from '../RedHat/generic/increase-nofile-limits.yml' ansible.builtin.import_tasks: ../RedHat/generic/increase-nofile-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1771258|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_1771258 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml index fc3200f03..d05266228 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167.yml @@ -7,20 +7,20 @@ - name: Import tasks from '2002167/02-configuration-changes.yml' ansible.builtin.import_tasks: 2002167/02-configuration-changes.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_02|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_02 | d(false) - name: Import tasks from '2002167/03-setting-the-hostname.yml' ansible.builtin.import_tasks: 2002167/03-setting-the-hostname.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_03|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_03 | d(false) - name: Import tasks from '2002167/04-linux-kernel-parameters.yml' ansible.builtin.import_tasks: 2002167/04-linux-kernel-parameters.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_04|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_04 | d(false) - name: Import tasks from '2002167/05-process-resource-limits.yml' ansible.builtin.import_tasks: 2002167/05-process-resource-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_05|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_05 | d(false) - name: Import tasks from '2002167/06-additional-notes-for-installing-sap-systems.yml' ansible.builtin.import_tasks: 2002167/06-additional-notes-for-installing-sap-systems.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_06|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_06 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml index 54aa6730d..6ab03b878 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/06-assert-additional-notes-for-installing-sap-systems.yml @@ -14,14 +14,14 @@ that: __sap_general_preconfigure_register_stat_libldap_assert.stat.exists fail_msg: "FAIL: File /usr/lib64/libldap.so.199 does not exist!" success_msg: "PASS: File /usr/lib64/libldap.so.199 exist." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /usr/lib64/libldap.so.199 is a link ansible.builtin.assert: that: __sap_general_preconfigure_register_stat_libldap_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/libldap.so.199 is not a link!" success_msg: "PASS: File /usr/lib64/libldap.so.199 is a link." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_libldap_assert.stat.exists - name: Assert that file /usr/lib64/libldap.so.199 is a link to /usr/lib64/libldap-2.3.so.0 @@ -29,7 +29,7 @@ that: __sap_general_preconfigure_register_stat_libldap_assert.stat.lnk_target == '/usr/lib64/libldap-2.3.so.0' fail_msg: "FAIL: File /usr/lib64/libldap.so.199 is not a link to /usr/lib64/libldap-2.3.so.0!" success_msg: "PASS: File /usr/lib64/libldap.so.199 is a link to /usr/lib64/libldap-2.3.so.0." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_libldap_assert.stat.exists - name: Get info about file /usr/lib64/liblber.so.199 @@ -42,14 +42,14 @@ that: __sap_general_preconfigure_register_stat_liblber_assert.stat.exists fail_msg: "FAIL: File /usr/lib64/liblber.so.199 does not exist!" success_msg: "PASS: File /usr/lib64/liblber.so.199 exist." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /usr/lib64/liblber.so.199 exists and is a link ansible.builtin.assert: that: __sap_general_preconfigure_register_stat_liblber_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/liblber.so.199 is not a link!" success_msg: "PASS: File /usr/lib64/liblber.so.199 is a link." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_liblber_assert.stat.exists - name: Assert that file /usr/lib64/liblber.so.199 is a link to /usr/lib64/liblber-2.3.so.0 @@ -57,7 +57,7 @@ that: __sap_general_preconfigure_register_stat_liblber_assert.stat.lnk_target == '/usr/lib64/liblber-2.3.so.0' fail_msg: "FAIL: File /usr/lib64/liblber.so.199 is not a link to /usr/lib64/liblber-2.3.so.0!" success_msg: "PASS: File /usr/lib64/liblber.so.199 is a link to /usr/lib64/liblber-2.3.so.0." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_general_preconfigure_register_stat_liblber_assert.stat.exists - name: Import tasks from '../../RedHat/generic/assert-systemd-tmpfiles.yml' diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml index 794d3ed86..12fb3317d 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999.yml @@ -7,36 +7,36 @@ - name: Import tasks from '2772999/02-configure-selinux.yml' ansible.builtin.import_tasks: 2772999/02-configure-selinux.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_02|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_02 | d(false) - name: Import tasks from '2772999/03-configure-hostname.yml' ansible.builtin.import_tasks: 2772999/03-configure-hostname.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_03|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_03 | d(false) - name: Import tasks from '2772999/04-configure-network-time-and-date.yml' ansible.builtin.import_tasks: 2772999/04-configure-network-time-and-date.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_04|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_04 | d(false) - name: Import tasks from '2772999/05-configure-firewall.yml' ansible.builtin.import_tasks: 2772999/05-configure-firewall.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_05|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_05 | d(false) - name: Import tasks from '2772999/06-configure-uuidd.yml' ansible.builtin.import_tasks: 2772999/06-configure-uuidd.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_06|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_06 | d(false) - name: Import tasks from '2772999/07-configure-tmpfs.yml' ansible.builtin.import_tasks: 2772999/07-configure-tmpfs.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_07|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_07 | d(false) - name: Import tasks from '2772999/08-configure-linux-kernel-parameters.yml' ansible.builtin.import_tasks: 2772999/08-configure-linux-kernel-parameters.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_08|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_08 | d(false) - name: Import tasks from '2772999/09-configure-process-resource-limits.yml' ansible.builtin.import_tasks: 2772999/09-configure-process-resource-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_09|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_09 | d(false) - name: Import tasks from '2772999/10-configure-systemd-tmpfiles.yml' ansible.builtin.import_tasks: 2772999/10-configure-systemd-tmpfiles.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_10|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_10 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml index bf829ada9..28a36f531 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml @@ -16,11 +16,11 @@ that: "'/usr/lib/systemd/system/chronyd.service; enabled' in __sap_general_preconfigure_register_chronyd_status_assert.stdout" fail_msg: "FAIL: Service 'chronyd' is not enabled!" success_msg: "PASS: Service 'chronyd' is enabled." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that chronyd is active ansible.builtin.assert: that: "'active (running)' in __sap_general_preconfigure_register_chronyd_status_assert.stdout" fail_msg: "FAIL: Service 'chronyd' is not active!" success_msg: "PASS: Service 'chronyd' is active." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml index 1a4c84dc7..b411463ce 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml @@ -11,4 +11,4 @@ - name: Import tasks from '../RedHat/generic/assert-tmpfs.yml' ansible.builtin.import_tasks: ../RedHat/generic/assert-tmpfs.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_0941735|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_0941735 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml index 7988436ea..5285dae87 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-1391070.yml @@ -8,4 +8,4 @@ - name: Import tasks from '../RedHat/generic/assert-uuidd.yml' ansible.builtin.import_tasks: ../RedHat/generic/assert-uuidd.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1391070|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_1391070 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml index 3e4050f21..a5b82dc82 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-1771258.yml @@ -8,4 +8,4 @@ - name: Import tasks from '../RedHat/generic/assert-nofile-limits.yml' ansible.builtin.import_tasks: ../RedHat/generic/assert-nofile-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_1771258|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_1771258 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml index 1b39bbbb8..bbf5aea5b 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2002167.yml @@ -7,20 +7,20 @@ - name: Import tasks from '2002167/02-assert-configuration-changes.yml' ansible.builtin.import_tasks: 2002167/02-assert-configuration-changes.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_02|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_02 | d(false) - name: Import tasks from '2002167/03-assert-setting-the-hostname.yml' ansible.builtin.import_tasks: 2002167/03-assert-setting-the-hostname.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_03|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_03 | d(false) - name: Import tasks from '2002167/04-assert-linux-kernel-parameters.yml' ansible.builtin.import_tasks: 2002167/04-assert-linux-kernel-parameters.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_04|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_04 | d(false) - name: Import tasks from '2002167/05-assert-process-resource-limits.yml' ansible.builtin.import_tasks: 2002167/05-assert-process-resource-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_05|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_05 | d(false) - name: Import tasks from '2002167/06-assert-additional-notes-for-installing-sap-systems.yml' ansible.builtin.import_tasks: 2002167/06-assert-additional-notes-for-installing-sap-systems.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2002167_06|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2002167_06 | d(false) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml index b0bd5da02..91adfa3bd 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2772999.yml @@ -7,36 +7,36 @@ - name: Import tasks from '2772999/02-assert-selinux.yml' ansible.builtin.import_tasks: 2772999/02-assert-selinux.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_02|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_02 | d(false) - name: Import tasks from '2772999/03-assert-hostname.yml' ansible.builtin.import_tasks: 2772999/03-assert-hostname.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_03|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_03 | d(false) - name: Import tasks from '2772999/04-assert-network-time-and-date.yml' ansible.builtin.import_tasks: 2772999/04-assert-network-time-and-date.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_04|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_04 | d(false) - name: Import tasks from '2772999/05-assert-firewall.yml' ansible.builtin.import_tasks: 2772999/05-assert-firewall.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_05|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_05 | d(false) - name: Import tasks from '2772999/06-assert-uuidd.yml' ansible.builtin.import_tasks: 2772999/06-assert-uuidd.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_06|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_06 | d(false) - name: Import tasks from '2772999/07-assert-tmpfs.yml' ansible.builtin.import_tasks: 2772999/07-assert-tmpfs.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_07|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_07 | d(false) - name: Import tasks from '2772999/08-assert-linux-kernel-parameters.yml' ansible.builtin.import_tasks: 2772999/08-assert-linux-kernel-parameters.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_08|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_08 | d(false) - name: Import tasks from '2772999/09-assert-process-resource-limits.yml' ansible.builtin.import_tasks: 2772999/09-assert-process-resource-limits.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_09|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_09 | d(false) - name: Import tasks from '2772999/10-assert-systemd-tmpfiles.yml' ansible.builtin.import_tasks: 2772999/10-assert-systemd-tmpfiles.yml - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_2772999_10|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2772999_10 | d(false) From 88a377a0965874d461de3fcc676c0f84bf35003d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 17:04:52 +0200 Subject: [PATCH 042/375] sap_hana_preconfigure: solve var-spacing lint errors --- .ansible-lint | 1 + .github/workflows/ansible-lint.yml | 2 +- roles/sap_hana_preconfigure/defaults/main.yml | 4 +- .../tasks/RedHat/assert-installation.yml | 28 ++++++------- .../generic/assert-2055470-loop-block.yml | 4 +- .../generic/assert-2382421-loop-block.yml | 4 +- .../generic/assert-3024346-loop-block.yml | 4 +- .../assert-c-states-for-lower-latency.yml | 8 ++-- .../tasks/RedHat/generic/assert-coredumps.yml | 8 ++-- .../assert-cpu-governor-for-performance.yml | 10 ++--- .../tasks/RedHat/generic/assert-epb.yml | 10 ++--- .../tasks/RedHat/generic/assert-ksm.yml | 10 ++--- .../tasks/RedHat/generic/assert-services.yml | 4 +- .../tasks/RedHat/generic/assert-thp.yml | 6 +-- .../tasks/RedHat/generic/assert-tsx.yml | 6 +-- .../tasks/RedHat/generic/assert-tuned.yml | 12 +++--- .../tasks/RedHat/installation.yml | 14 +++---- .../sapnote/2292690/09-assert-etc-sudoers.yml | 2 +- .../tasks/sapnote/assert-2009879_7.yml | 42 +++++++++---------- .../tasks/sapnote/assert-2055470.yml | 8 ++-- .../tasks/sapnote/assert-2382421.yml | 20 ++++----- .../tasks/sapnote/assert-3024346.yml | 30 ++++++------- roles/sap_hana_preconfigure/vars/RedHat_7.yml | 2 +- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 2 +- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 2 +- 25 files changed, 122 insertions(+), 121 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 57cac1a1b..8ec477952 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,3 +3,4 @@ enable_list: - yaml skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index d7f468355..4cddfb96a 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -15,7 +15,7 @@ on: workflow_dispatch: jobs: - sanity: + ansible-lint: runs-on: ubuntu-latest steps: diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index 4a0db3291..758ba1bdf 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -113,11 +113,11 @@ sap_hana_preconfigure_ibm_power_repo_url: "{{ __sap_hana_preconfigure_ibm_power_ #### The following parameters are for PPC LE only ## add a list of interfaces where MTU size will be set to 9000 ## defaults to empty -#sap_hana_preconfigure_ppcle_mtu9000_if: "{{ ansible_interfaces| difference(['lo']) }}" # all interfaces +#sap_hana_preconfigure_ppcle_mtu9000_if: "{{ ansible_interfaces | difference(['lo']) }}" # all interfaces sap_hana_preconfigure_ppcle_mtu9000_if: '' ## list where tso flag should be set ## defaults to all interfaces -sap_hana_preconfigure_ppcle_tso_if: "{{ ansible_interfaces| difference(['lo']) }}" +sap_hana_preconfigure_ppcle_tso_if: "{{ ansible_interfaces | difference(['lo']) }}" # SELinux is already configured in role sap_general_preconfigure: #sap_hana_preconfigure_selinux_state: "{{ __sap_hana_preconfigure_selinux_state }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index f76f120e6..ca66fa472 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -5,7 +5,7 @@ that: ansible_distribution_version in "{{ sap_hana_preconfigure_supported_rhel_minor_releases }}" fail_msg: "FAIL: The RHEL release {{ ansible_distribution_version }} is not supported for SAP HANA!" success_msg: "PASS: The RHEL release {{ ansible_distribution_version }} is supported for SAP HANA." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_min_rhel_release_check - name: Report if the RHEL release is supported for SAP HANA @@ -20,7 +20,7 @@ - name: Fill the variable for the generic list of required repos ansible.builtin.set_fact: __sap_hana_preconfigure_required_repos: "{{ lookup('vars','__sap_hana_preconfigure_req_repos_redhat_' + - ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture|string) }}" + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture | string) }}" - name: Get info about enabled repos ansible.builtin.shell: set -o pipefail && subscription-manager repos --list-enabled | awk '/Repo ID:/{print $NF}' @@ -36,7 +36,7 @@ - "{{ __sap_hana_preconfigure_required_repos }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Detect if and how the minor RHEL release is set ansible.builtin.shell: set -o pipefail && subscription-manager release | awk 'NF==2{printf $NF}NF!=2{print}' @@ -54,7 +54,7 @@ fail_msg: "FAIL: The RHEL release lock status is '{{ __sap_hana_preconfigure_register_subscription_manager_release_assert.stdout }}' but the expected value is '{{ ansible_distribution_version }}'!" success_msg: "PASS: The RHEL release is correctly locked to '{{ ansible_distribution_version }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: "ansible_distribution_version != '7.9'" - name: Report that checking the release lock is not necessary if the system is on RHEL 7.9 @@ -72,7 +72,7 @@ - "{{ sap_hana_preconfigure_packages }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" ### If this task fails, you need to enable the IBM PowerTools repository ### see https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html for details @@ -98,7 +98,7 @@ loop_control: loop_var: line_item when: ansible_architecture == "ppc64le" - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check block: @@ -158,14 +158,14 @@ ignore_errors: yes when: - - sap_hana_preconfigure_min_package_check|bool - - __sap_hana_preconfigure_min_pkgs|d([]) - - sap_hana_preconfigure_assert_ignore_errors|d(false) + - sap_hana_preconfigure_min_package_check | bool + - __sap_hana_preconfigure_min_pkgs | d([]) + - sap_hana_preconfigure_assert_ignore_errors | d(false) - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_hana_preconfigure_min_pkgs)." - when: not __sap_hana_preconfigure_min_pkgs|d([]) + when: not __sap_hana_preconfigure_min_pkgs | d([]) - name: Get info about possible package updates ansible.builtin.command: yum check-update @@ -173,7 +173,7 @@ args: warn: false changed_when: false - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_update - name: Assert that there are no more possible package updates @@ -181,7 +181,7 @@ that: __sap_hana_preconfigure_register_yum_check_update_assert is success fail_msg: "FAIL: System needs to be updated!" success_msg: "PASS: There are no more outstanding package updates." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_update - name: Report if checking for possible package updates is not requested @@ -226,11 +226,11 @@ args: warn: false check_mode: false - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that system needs no restart ansible.builtin.assert: that: __sap_hana_preconfigure_register_needs_restarting_assert is success fail_msg: "FAIL: System needs to be restarted!" success_msg: "PASS: System needs no restart." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2055470-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2055470-loop-block.yml index ff6d381e1..b0729f9fb 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2055470-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2055470-loop-block.yml @@ -16,7 +16,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_ibm_largesend_conf_parameter_assert.stdout }}' but the expected value is 'line_item.value'!" success_msg: "PASS: The value of '{{ line_item.name }}' in /etc/sysctl.d/ibm_largesend.conf is '{{ __sap_hana_preconfigure_register_sysctl_ibm_largesend_conf_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_ibm_largesend_conf_assert.stat.exists - name: 2055470 - Get {{ line_item.name }} from sysctl @@ -32,4 +32,4 @@ '{{ __sap_hana_preconfigure_register_sysctl_ibm_parameter_assert.stdout }}' but the expected value is '{{ line_item.value }}'!" success_msg: "PASS: The current value of '{{ line_item.name }}' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_ibm_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2382421-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2382421-loop-block.yml index 5b203bd4f..1e86d0e9f 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2382421-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2382421-loop-block.yml @@ -16,7 +16,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_saphana_conf_network_parameter_assert.stdout }}' but the expected value is 'line_item.value'!" success_msg: "PASS: The value of '{{ line_item.name }}' in {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is '{{ __sap_hana_preconfigure_register_sysctl_saphana_conf_network_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists - name: 2382421 - Get {{ line_item.name }} from sysctl @@ -32,4 +32,4 @@ '{{ __sap_hana_preconfigure_register_sysctl_network_parameter_assert.stdout }}' but the expected value is '{{ line_item.value }}'!" success_msg: "PASS: The current value of '{{ line_item.name }}' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_network_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-3024346-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-3024346-loop-block.yml index e5c5c7a83..f343a882d 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-3024346-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-3024346-loop-block.yml @@ -16,7 +16,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_netapp_hana_conf_network_parameter_assert.stdout }}' but the expected value is 'line_item.value'!" success_msg: "PASS: The value of '{{ line_item.name }}' in '{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}' is '{{ __sap_hana_preconfigure_register_sysctl_netapp_hana_conf_network_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_sysctl_netapp_hana_conf_assert.stat.exists - name: 3024346 - Get {{ line_item.name }} from sysctl @@ -32,4 +32,4 @@ '{{ __sap_hana_preconfigure_register_sysctl_netapp_hana_network_parameter_assert.stdout }}' but the expected value is '{{ line_item.value }}'!" success_msg: "PASS: The current value of '{{ line_item.name }}' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_netapp_hana_network_parameter_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml index 139209f71..9db7d71bf 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml @@ -13,14 +13,14 @@ that: "'processor.max_cstate=1' in __sap_hana_preconfigure_register_default_grub_cmdline_cstate_assert.stdout" fail_msg: "FAIL: 'processor.max_cstate=1' is not in GRUB_CMDLINE_LINUX in /etc/default/grub!" success_msg: "PASS: 'processor.max_cstate=1' is in GRUB_CMDLINE_LINUX in /etc/default/grub." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that intel_idle.max_cstate=1 is in GRUB_CMDLINE_LINUX in /etc/default/grub ansible.builtin.assert: that: "'intel_idle.max_cstate=1' in __sap_hana_preconfigure_register_default_grub_cmdline_cstate_assert.stdout" fail_msg: "FAIL: 'intel_idle.max_cstate=1' is not in GRUB_CMDLINE_LINUX in /etc/default/grub!" success_msg: "PASS: 'intel_idle.max_cstate=1' is in GRUB_CMDLINE_LINUX in /etc/default/grub." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: C-States - Get contents of /proc/cmdline ansible.builtin.command: cat /proc/cmdline @@ -32,14 +32,14 @@ that: "'processor.max_cstate=1' in __sap_hana_preconfigure_register_proc_cmdline_cstate_assert.stdout" fail_msg: "FAIL: 'processor.max_cstate=1' is not in /proc/cmdline!" success_msg: "PASS: 'processor.max_cstate=1' is in /proc/cmdline." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that intel_idle.max_cstate=1 is in /proc/cmdline ansible.builtin.assert: that: "'intel_idle.max_cstate=1' in __sap_hana_preconfigure_register_proc_cmdline_cstate_assert.stdout" fail_msg: "FAIL: 'intel_idle.max_cstate=1' is not in /proc/cmdline!" success_msg: "PASS: 'intel_idle.max_cstate=1' is in /proc/cmdline." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: ansible_architecture == 'x86_64' and (not sap_hana_preconfigure_use_tuned or diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-coredumps.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-coredumps.yml index 571246c9b..99b25667f 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-coredumps.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-coredumps.yml @@ -10,14 +10,14 @@ that: __sap_hana_preconfigure_register_stat_limits_sap_conf_assert.stat.exists fail_msg: "FAIL: File /etc/security/limits.d/99-sap.conf does not exist!" success_msg: "PASS: File /etc/security/limits.d/99-sap.conf exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/security/limits.d/99-sap.conf is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/security/limits.d/99-sap.conf is not a regular file!" success_msg: "PASS: File /etc/security/limits.d/99-sap.conf is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - name: Check if the hard limit of core file creation is 0 for all users @@ -34,7 +34,7 @@ '{{ __sap_hana_preconfigure_register_limits_sap_conf_core_hard_assert.stdout }}' but the expected value is 0!" success_msg: "PASS: The hard limit of core file creation for all users in /etc/security/limits.d/99-sap.conf is '{{ __sap_hana_preconfigure_register_limits_sap_conf_core_hard_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - name: Check if the soft limit of core file creation is 0 for all users @@ -51,5 +51,5 @@ '{{ __sap_hana_preconfigure_register_limits_sap_conf_core_soft_assert.stdout }}' but the expected value is 0!" success_msg: "PASS: The soft limit of core file creation for all users in /etc/security/limits.d/99-sap.conf is '{{ __sap_hana_preconfigure_register_limits_sap_conf_core_soft_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_limits_sap_conf_assert.stat.exists diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml index b1198c20d..c13d32fe4 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml @@ -28,14 +28,14 @@ that: __sap_hana_preconfigure_register_stat_rc_local_assert.stat.exists fail_msg: "FAIL: File /etc/rc.d/rc.local does not exist!" success_msg: "PASS: File /etc/rc.d/rc.local exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/rc.d/rc.local is a regular file (x86_64 platform only) ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_rc_local_assert.stat.isreg fail_msg: "FAIL: File /etc/rc.d/rc.local is not a regular file!" success_msg: "PASS: File /etc/rc.d/rc.local is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_rc_local_assert.stat.exists - name: Assert that the mode of file /etc/rc.d/rc.local is 0644 (x86_64 platform only) @@ -44,7 +44,7 @@ fail_msg: "FAIL: File /etc/rc.d/rc.local has mode '{{ __sap_hana_preconfigure_register_stat_rc_local_assert.stat.mode }}' but the expected mode is '0644'!" success_msg: "PASS: File /etc/rc.d/rc.local has mode 0644." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_rc_local_assert.stat.exists - name: Get the contents of file /etc/rc.d/rc.local (x86_64 platform only) @@ -59,7 +59,7 @@ that: "__sap_hana_preconfigure_register_rc_local_cpupower_assert.stdout == 'cpupower frequency-set -g performance'" fail_msg: "FAIL: The CPU Governor for performance is not configured at boot time!" success_msg: "PASS: CPU Governor for performance is configured at boot time." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Get the current status of the CPU Governor for performance (x86_64 platform only) ansible.builtin.command: cpupower frequency-info -g @@ -76,7 +76,7 @@ that: "'performance' in __sap_hana_preconfigure_register_cpupower_frequency_info_assert.stdout" fail_msg: "FAIL: The current status of the CPU Governor for performance is not 'performance'!" success_msg: "PASS: The current status of the CPU Governor for performance is 'performance'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: "__sap_hana_preconfigure_register_cpupower_frequency_info_supported_assert.stdout != 'Not Available'" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml index aad9eb881..d54707834 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml @@ -29,14 +29,14 @@ that: __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.exists fail_msg: "FAIL: File /etc/init.d/boot.local does not exist!" success_msg: "PASS: File /etc/init.d/boot.local exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/init.d/boot.local is a regular file (x86_64 platform only) ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.isreg fail_msg: "FAIL: File /etc/init.d/boot.local is not a regular file!" success_msg: "PASS: File /etc/init.d/boot.local is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.exists - name: Assert that the mode of file /etc/init.d/boot.local is 0755 (x86_64 platform only) @@ -45,7 +45,7 @@ fail_msg: "FAIL: File /etc/init.d/boot.local has mode '{{ __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.mode }}' but the expected mode is '0755'!" success_msg: "PASS: File /etc/init.d/boot.local has mode '0755'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.exists - name: Get the contents of file /etc/init.d/boot.local (x86_64 platform only) @@ -60,7 +60,7 @@ that: "__sap_hana_preconfigure_register_boot_local_cpupower_assert.stdout == 'cpupower set -b 0'" fail_msg: "FAIL: EPB is not configured to bet set to '0' ('performance') at boot time!" success_msg: "PASS: EPB is configured to bet set to '0' ('performance') at boot time." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_epb_assert.stat.exists - name: Get the current setting of EPB (x86_64 platform only) @@ -78,7 +78,7 @@ that: "__sap_hana_preconfigure_register_cpupower_info_epb_assert.stdout == '0'" fail_msg: "FAIL: EPB is currently not set to '0' ('performance')!" success_msg: "PASS: EPB is currently set to '0' ('performance')." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: "__sap_hana_preconfigure_register_cpupower_info_epb_supported_assert.stdout != 'does not support'" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-ksm.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-ksm.yml index 28ba3c0a5..383f58c3b 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-ksm.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-ksm.yml @@ -10,14 +10,14 @@ that: __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.exists fail_msg: "FAIL: File /etc/init.d/boot.local does not exist!" success_msg: "PASS: File /etc/init.d/boot.local exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/init.d/boot.local is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.isreg fail_msg: "FAIL: File /etc/init.d/boot.local is not a regular file!" success_msg: "PASS: File /etc/init.d/boot.local is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.exists - name: Assert that the mode of file /etc/init.d/boot.local is 0755 @@ -26,7 +26,7 @@ fail_msg: "FAIL: File /etc/init.d/boot.local has mode '{{ __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.mode }}' but the expected mode is '0755'!" success_msg: "PASS: File /etc/init.d/boot.local has mode 0755." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.exists - name: Get KSM setting in /etc/init.d/boot.local @@ -41,7 +41,7 @@ that: "'echo 0 > /sys/kernel/mm/ksm/run' in __sap_hana_preconfigure_register_boot_local_ksm_assert.stdout" fail_msg: "FAIL: The line 'echo 0 > /sys/kernel/mm/ksm/run' is not in file /etc/init.d/boot.local!" success_msg: "PASS: The line 'echo 0 > /sys/kernel/mm/ksm/run' is in file /etc/init.d/boot.local." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_boot_local_ksm_assert.stat.exists - name: Assert - Get status of KSM @@ -55,4 +55,4 @@ that: "__sap_hana_preconfigure_register_ksm_active_assert.stdout == '0'" fail_msg: "FAIL: KSM is currently enabled but it needs to be disabled!" success_msg: "PASS: KSM is disabled currently." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml index 02fe52f19..7a1eba005 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml @@ -16,7 +16,7 @@ {{ __sap_hana_preconfigure_packages_and_services[line_item].svc_status }}!" success_msg: "PASS: Service '{{ __sap_hana_preconfigure_packages_and_services[line_item].svc }}' is {{ __sap_hana_preconfigure_packages_and_services[line_item].svc_status }}." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that service {{ __sap_hana_preconfigure_packages_and_services[line_item].svc }} is {{ __sap_hana_preconfigure_packages_and_services[line_item].svc_state }} or @@ -31,7 +31,7 @@ success_msg: "PASS: Service '{{ __sap_hana_preconfigure_packages_and_services[line_item].svc }}' is {{ __sap_hana_preconfigure_packages_and_services[line_item].svc_state }} or {{ __sap_hana_preconfigure_packages_and_services[line_item].systemd_state }}." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: "__sap_hana_preconfigure_packages_and_services[line_item].pkg in ansible_facts.packages" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml index da8c5bee9..d7a3f0c5a 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml @@ -13,7 +13,7 @@ that: "'transparent_hugepage=never' in __sap_hana_preconfigure_register_default_grub_cmdline_thp_assert.stdout" fail_msg: "FAIL: 'transparent_hugepage=never' is not in GRUB_CMDLINE_LINUX in /etc/default/grub!" success_msg: "PASS: 'transparent_hugepage=never' is in GRUB_CMDLINE_LINUX in /etc/default/grub." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: THP - Get contents of /proc/cmdline ansible.builtin.command: cat /proc/cmdline @@ -25,8 +25,8 @@ that: "'transparent_hugepage=never' in __sap_hana_preconfigure_register_proc_cmdline_thp_assert.stdout" fail_msg: "FAIL: 'transparent_hugepage=never' is not in /proc/cmdline!" success_msg: "PASS: 'transparent_hugepage=never' is in /proc/cmdline." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: not sap_hana_preconfigure_use_tuned or sap_hana_preconfigure_modify_grub_cmdline_linux or - sap_hana_preconfigure_assert_all_config|d(false) + sap_hana_preconfigure_assert_all_config | d(false) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml index ac03be76f..345f50f26 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml @@ -30,7 +30,7 @@ that: "'tsx=on' in __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert.stdout" fail_msg: "FAIL: 'tsx=on' is not in GRUB_CMDLINE_LINUX in /etc/default/grub!" success_msg: "PASS: 'tsx=on' is in GRUB_CMDLINE_LINUX in /etc/default/grub." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_lscpu_flags.stdout is not regex("^Flags:.*\s*rtm\s*.*") - name: Report if tsx=on is in GRUB_CMDLINE_LINUX in /etc/default/grub @@ -57,7 +57,7 @@ that: "'tsx=on' in __sap_hana_preconfigure_register_proc_cmdline_tsx_assert.stdout" fail_msg: "FAIL: 'tsx=on' is not in /proc/cmdline!" success_msg: "PASS: 'tsx=on' is in /proc/cmdline." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_lscpu_flags.stdout is not regex("^Flags:.*\s*rtm\s*.*") - name: Report if tsx=on is in /proc/cmdline @@ -77,4 +77,4 @@ when: ansible_architecture == 'x86_64' and ansible_distribution == 'RedHat' and ansible_distribution_major_version == '8' and - __sap_hana_preconfigure_fact_ansible_distribution_minor_version|int >= 3 + __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3 diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml index 499a87042..3c9363364 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml @@ -14,14 +14,14 @@ fail_msg: "FAIL: Service 'tuned' could not be found!" success_msg: "PASS: Service 'tuned' is available." when: sap_hana_preconfigure_use_tuned - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: "Assert that tuned is enabled - use_tuned: yes" ansible.builtin.assert: that: "ansible_facts.services['tuned.service']['status'] == 'enabled'" fail_msg: "FAIL: Service 'tuned' is not enabled!" success_msg: "PASS: Service 'tuned' is enabled." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - "'tuned.service' in ansible_facts.services" - sap_hana_preconfigure_use_tuned @@ -31,7 +31,7 @@ that: "ansible_facts.services['tuned.service']['state'] == 'running'" fail_msg: "FAIL: Service 'tuned' is not active!" success_msg: "PASS: Service 'tuned' is active." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - "'tuned.service' in ansible_facts.services" - sap_hana_preconfigure_use_tuned @@ -48,7 +48,7 @@ that: "ansible_facts.services['tuned.service']['status'] == 'disabled'" fail_msg: "FAIL: Service 'tuned' is not disabled!" success_msg: "PASS: Service 'tuned' is disabled." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - "'tuned.service' in ansible_facts.services" - not sap_hana_preconfigure_use_tuned @@ -58,7 +58,7 @@ that: "ansible_facts.services['tuned.service']['state'] == 'inactive'" fail_msg: "FAIL: Service 'tuned' is not inactive!" success_msg: "PASS: Service 'tuned' is inactive." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - "'tuned.service' in ansible_facts.services" - not sap_hana_preconfigure_use_tuned @@ -94,6 +94,6 @@ fail_msg: "FAIL: The tuned profile '{{ sap_hana_preconfigure_tuned_profile }}' is currently not active! Currently active profile: '{{ __sap_hana_preconfigure_register_current_tuned_profile_assert.stdout }}'." success_msg: "PASS: The tuned profile '{{ sap_hana_preconfigure_tuned_profile }}' is currently active." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_use_tuned or sap_hana_preconfigure_assert_all_config diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml index e6d369b67..0a0b4adde 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml @@ -13,7 +13,7 @@ - name: Fill the variable for the generic list of required repos ansible.builtin.set_fact: __sap_hana_preconfigure_fact_required_repos: "{{ lookup('vars','__sap_hana_preconfigure_req_repos_redhat_' + - ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture) }}" + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" - name: Construct valid argument list to the subscription-manager repos command ansible.builtin.set_fact: @@ -74,13 +74,13 @@ disable_gpg_check: True when: - ansible_architecture == "ppc64le" - - sap_hana_preconfigure_add_ibm_power_repo|d(true) + - sap_hana_preconfigure_add_ibm_power_repo | d(true) - name: Accept the license for the IBM Service and Productivity Tools ansible.builtin.shell: LESS=+q /opt/ibm/lop/configure <<<'y' when: - ansible_architecture == "ppc64le" - - sap_hana_preconfigure_add_ibm_power_repo|d(true) + - sap_hana_preconfigure_add_ibm_power_repo | d(true) # Reason for noqa: Both yum and dnf support "state: latest" - name: Install the IBM Service and Productivity Tools # noqa package-latest @@ -161,15 +161,15 @@ loop_var: line_item when: - - sap_hana_preconfigure_min_package_check|bool - - __sap_hana_preconfigure_min_pkgs|d([]) + - sap_hana_preconfigure_min_package_check | bool + - __sap_hana_preconfigure_min_pkgs | d([]) # Reason for noqa: Both yum and dnf support "state: latest" - name: Ensure that the system is updated to the latest patchlevel # noqa package-latest ansible.builtin.package: state: latest name: "*" - when: sap_hana_preconfigure_update|bool + when: sap_hana_preconfigure_update | bool - name: "Set needs-restarting command in case of RHEL 7" ansible.builtin.set_fact: @@ -220,7 +220,7 @@ - name: Call reboot handler if necessary as per role sap_general_preconfigure ansible.builtin.command: /bin/true notify: __sap_hana_preconfigure_reboot_handler - when: sap_general_preconfigure_fact_reboot_required|d(false) + when: sap_general_preconfigure_fact_reboot_required | d(false) - name: Call reboot handler if necessary as per this role ansible.builtin.command: /bin/true diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/09-assert-etc-sudoers.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/09-assert-etc-sudoers.yml index f34d2c940..8311241ed 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/09-assert-etc-sudoers.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/09-assert-etc-sudoers.yml @@ -15,4 +15,4 @@ that: __sap_hana_preconfigure_register_etc_sudoers_requiretty_assert is failed fail_msg: "FAIL: The string 'Defaults requiretty' was found in /etc/sudoers!" success_msg: "PASS: The string 'Defaults requiretty' was not found in /etc/sudoers!" - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml index 9bc1f4484..ba4a912c3 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml @@ -33,14 +33,14 @@ that: __stat_lpbldap.stat.exists fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 does not exist!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: RHEL 7.2 - Assert that file /usr/lib64/libssl.so.1.0.1 is a link ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_libssl_rhel_72_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 is not a link!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 is a link." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libssl_rhel_72_assert.stat.exists - name: RHEL 7.2 - Assert that file /usr/lib64/libssl.so.1.0.1 is a link to /usr/lib64/libssl.so.1.0.1e @@ -48,7 +48,7 @@ that: "__sap_hana_preconfigure_register_stat_libssl_rhel_72_assert.stat.lnk_target == '/usr/lib64/libssl.so.1.0.1e'" fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 is not a link to /usr/lib64/libssl.so.1.0.1e!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 is a link to /usr/lib64/libssl.so.1.0.1e." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libssl_rhel_72_assert.stat.exists - name: RHEL 7.2 - Get info about file /usr/lib64/libcrypto.so.1.0.1 @@ -61,14 +61,14 @@ that: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.exists fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 does not exist!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: RHEL 7.2 - Assert that file /usr/lib64/libcrypto.so.1.0.1 exists and is a link ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 is not a link!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 is a link." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.exists - name: RHEL 7.2 - Assert that file /usr/lib64/libcrypto.so.1.0.1 is a link to /usr/lib64/libcrypto.so.1.0.1e @@ -76,7 +76,7 @@ that: "__sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.lnk_target == '/usr/lib64/libcrypto.so.1.0.1e'" fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 is not a link to /usr/lib64/libcrypto.so.1.0.1e!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 is a link to /usr/lib64/libcrypto.so.1.0.1e." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.exists when: "ansible_distribution_version == '7.2'" @@ -93,14 +93,14 @@ that: __sap_hana_preconfigure_register_stat_libssl_rhel_7_assert.stat.exists fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 does not exist!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /usr/lib64/libssl.so.1.0.1 is a link ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_libssl_rhel_7_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 is not a link!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 is a link." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libssl_rhel_7_assert.stat.exists - name: Assert that file /usr/lib64/libssl.so.1.0.1 is a link to /usr/lib64/libssl.so.10 @@ -108,7 +108,7 @@ that: "__sap_hana_preconfigure_register_stat_libssl_rhel_7_assert.stat.lnk_target == '/usr/lib64/libssl.so.10'" fail_msg: "FAIL: File /usr/lib64/libssl.so.1.0.1 is not a link to /usr/lib64/libssl.so.10!" success_msg: "PASS: File /usr/lib64/libssl.so.1.0.1 is a link to /usr/lib64/libssl.so.10." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libssl_rhel_7_assert.stat.exists - name: Get info about file /usr/lib64/libcrypto.so.1.0.1 @@ -121,14 +121,14 @@ that: __sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.exists fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 does not exist!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 exist." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /usr/lib64/libcrypto.so.1.0.1 is a link ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.islnk fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 is not a link!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 is a link." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.exists - name: Assert that file /usr/lib64/libcrypto.so.1.0.1 is a link to /usr/lib64/libcrypto.so.10 @@ -136,12 +136,12 @@ that: "__sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.lnk_target == '/usr/lib64/libcrypto.so.10'" fail_msg: "FAIL: File /usr/lib64/libcrypto.so.1.0.1 is not a link to /usr/lib64/libcrypto.so.10!" success_msg: "PASS: File /usr/lib64/libcrypto.so.1.0.1 is a link to /usr/lib64/libcrypto.so.10." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.exists when: "ansible_distribution_version != '7.2'" - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_9|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) ### 3.10 - THP -> SAP Note 2292690 ### 3.11 - CPU Governor for performance -> TunedProfile -> SAP Note 2292690 @@ -176,7 +176,7 @@ # - "awk_nofile_hard_result.stdout == 'unlimited'" # fail_msg: "FAIL: The hard limit of nproc is not set to 'unlimited' in /etc/security/limits.d/99-sap.conf!" # success_msg: "PASS: The hard limit of nproc is set to 'unlimited' in /etc/security/limits.d/99-sap.conf." -# ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" +# ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" # # - name: Get the soft limit of nproc for group sapsys # command: awk '/sapsys/&&/nproc/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf @@ -189,24 +189,24 @@ # - "awk_nofile_soft_result.stdout == 'unlimited'" # fail_msg: "FAIL: The soft limit of nproc is not set to 'unlimited' in /etc/security/limits.d/99-sap.conf!" # success_msg: "PASS: The soft limit of nproc is set to 'unlimited' in /etc/security/limits.d/99-sap.conf." -# ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" +# ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" # -# when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_13|d(false) +# when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_13 | d(false) ### 3.14 - Disable ABRT - include_tasks: ../RedHat/generic/assert-abrtd.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_1|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_1 | d(false) - include_tasks: ../RedHat/generic/assert-abrt-ccpp.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_2|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_2 | d(false) ### 3.14 - Disable core Dumps - include_tasks: ../RedHat/generic/assert-coredumps.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_3|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_3 | d(false) ### 3.14 - Disable Kdump - include_tasks: ../RedHat/generic/assert-kdump.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_4|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_4 | d(false) ### 3.15 - Disable Firewalld ### Firewall Settings can only be done if SAP instance ID is known, @@ -214,7 +214,7 @@ ### NYI: Set proper firewall rules if SID/instance number is known ### - include_tasks: ../RedHat/generic/assert-firewalld.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_15|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_15 | d(false) # - name: 3.15 Ensure firewall is disabled when instance ID unknown # service: name=firewalld state=stopped enabled=no # ignore_errors: True diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml index d0f51c503..bf0bb5de7 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml @@ -69,23 +69,23 @@ that: __sap_hana_preconfigure_register_stat_sysctl_ibm_largesend_conf_assert.stat.exists fail_msg: "FAIL: File /etc/sysctl.d/ibm_largesend.conf does not exist!" success_msg: "PASS: File /etc/sysctl.d/ibm_largesend.conf exists." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/sysctl.d/ibm_largesend.conf is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_sysctl_ibm_largesend_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/sysctl.d/ibm_largesend.conf is not a regular file!" success_msg: "PASS: File /etc/sysctl.d/ibm_largesend.conf is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_ibm_largesend_conf_assert.stat.exists - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2055470|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2055470 | d(false) - name: Get and assert kernel tunables for ppc64le ansible.builtin.include_tasks: ../RedHat/generic/assert-2055470-loop-block.yml loop: "{{ sap_hana_preconfigure_kernel_parameters_ppc64le }}" loop_control: loop_var: line_item - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2055470|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2055470 | d(false) when: ansible_architecture == 'ppc64le' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml index fc23132fe..f69360266 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml @@ -20,24 +20,24 @@ that: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists fail_msg: "FAIL: File {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} does not exist!" success_msg: "PASS: File {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} exists." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.isreg fail_msg: "FAIL: File {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is not a regular file!" success_msg: "PASS: File {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2382421|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) - name: Get and assert kernel tunables ansible.builtin.include_tasks: ../RedHat/generic/assert-2382421-loop-block.yml loop: "{{ __sap_hana_preconfigure_kernel_parameters_default }}" loop_control: loop_var: line_item - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2382421|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) - name: Check net.core.wmem_max and net.core.rmem_max if necessary block: @@ -67,7 +67,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_wmem_assert.stdout.split()[-1] }}'!" success_msg: "PASS: The value of 'net.core.wmem_max' in {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is '{{ __sap_hana_preconfigure_register_sysctl_saphana_conf_wmem_max_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists - name: 2382421 - Get the current value of net.core.wmem_max from sysctl @@ -85,7 +85,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_wmem_assert.stdout.split()[-1] }}'!" success_msg: "PASS: The current value of 'net.core.wmem_max' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_wmem_assert.stdout.split()[-1] }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: 2382421 - Get the maximum value of net.ipv4.tcp_rmem ansible.builtin.command: sysctl net.ipv4.tcp_rmem @@ -113,7 +113,7 @@ '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem_assert.stdout.split()[-1] }}'!" success_msg: "PASS: The value of 'net.core.rmem_max' in {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} is '{{ __sap_hana_preconfigure_register_sysctl_saphana_conf_rmem_max_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists - name: 2382421 - Get the current value of net.core.rmem_max from sysctl @@ -131,9 +131,9 @@ '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem_assert.stdout.split()[-1] }}'!" success_msg: "PASS: The current value of 'net.core.rmem_max' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem_assert.stdout.split()[-1] }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2382421|d(false) - - not sap_hana_preconfigure_use_netapp_settings_nfs|d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) + - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - not ansible_architecture == 'ppc64le' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml index 0cc8869b1..f0a3f5de8 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml @@ -19,19 +19,19 @@ that: __sap_hana_preconfigure_register_etc_sysctl_netapp_hana_conf_assert.stat.exists fail_msg: "FAIL: File {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} does not exist!" success_msg: "PASS: File {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} exists." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_etc_sysctl_netapp_hana_conf_assert.stat.isreg fail_msg: "FAIL: File {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} is not a regular file!" success_msg: "PASS: File {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_sysctl_netapp_hana_conf_assert.stat.exists when: - - sap_hana_preconfigure_use_netapp_settings_nfs|d(false) - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - name: Get and assert kernel tunables for NetApp NFS ansible.builtin.include_tasks: ../RedHat/generic/assert-3024346-loop-block.yml @@ -39,8 +39,8 @@ loop_control: loop_var: line_item when: - - sap_hana_preconfigure_use_netapp_settings_nfs|d(false) - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - name: Check NetApp modprobe conf file for SAP HANA with NFSv3 block: @@ -54,19 +54,19 @@ that: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists fail_msg: "FAIL: File /etc/modprobe.d/sunrpc.conf does not exist!" success_msg: "PASS: File /etc/modprobe.d/sunrpc.conf exists." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that file /etc/modprobe.d/sunrpc.conf is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/modprobe.d/sunrpc.conf is not a regular file!" success_msg: "PASS: File /etc/modprobe.d/sunrpc.conf is a regular file." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3|d(false) - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) + - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - name: Get value of 'options sunrpc tcp_max_slot_table_entries' from /etc/modprobe.d/sunrpc.conf ansible.builtin.command: awk 'BEGIN{FS="="}/options sunrpc tcp_max_slot_table_entries/{print $NF}' /etc/modprobe.d/sunrpc.conf @@ -74,9 +74,9 @@ changed_when: no ignore_errors: yes when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3|d(false) + - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) - __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - name: Assert that 'options sunrpc tcp_max_slot_table_entries' is set correctly in /etc/modprobe.d/sunrpc.conf ansible.builtin.assert: @@ -85,8 +85,8 @@ '{{ __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert.stdout }}' but the expected value is '128'!" success_msg: "PASS: The value of 'options sunrpc tcp_max_slot_table_entries' in '/etc/modprobe.d/sunrpc.conf' is '{{ __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert.stdout }}'." - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3|d(false) + - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) - __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_7.yml b/roles/sap_hana_preconfigure/vars/RedHat_7.yml index 9dab714c9..907e84ca4 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_7.yml @@ -115,7 +115,7 @@ __sap_hana_preconfigure_min_packages_7_9_x86_64: __sap_hana_preconfigure_min_packages_7_9_ppc64le: - [ 'kernel', '3.10.0-1160.11.1.el7' ] -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture|string) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture | string) }}" __sap_hana_preconfigure_packages: # SAP note 2009879: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index 3d2ec35d8..c94d96638 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -164,7 +164,7 @@ __sap_hana_preconfigure_min_packages_8_8_x86_64: __sap_hana_preconfigure_min_packages_8_8_ppc64le: -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" __sap_hana_preconfigure_packages: # SAP NOTE 2772999: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index d3440e566..1e92dcb59 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -83,7 +83,7 @@ __sap_hana_preconfigure_min_packages_9_8_x86_64: __sap_hana_preconfigure_min_packages_9_8_ppc64le: -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version|string|replace (\".\", \"_\") + '_' + ansible_architecture) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" __sap_hana_preconfigure_packages: # SAP NOTE 2772999: From 0c8f2a0ed05ec9efe1cb6a6e9e9f027340b01bda Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 17:16:25 +0200 Subject: [PATCH 043/375] sap_hana_install: solve var-spacing lint errors --- .../sap_hana_install/tasks/hana_addhosts.yml | 6 ++--- roles/sap_hana_install/tasks/hana_install.yml | 4 ++-- roles/sap_hana_install/tasks/main.yml | 16 +++++++------- roles/sap_hana_install/tasks/post_install.yml | 22 +++++++++---------- .../tasks/post_install/update_etchosts.yml | 4 ++-- .../tasks/pre_install/hdblcm_configfile.yml | 2 +- .../tasks/pre_install/prepare_sapcar.yml | 11 +++++----- .../tasks/pre_install/prepare_sarfiles.yml | 6 ++--- 8 files changed, 36 insertions(+), 35 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_addhosts.yml b/roles/sap_hana_install/tasks/hana_addhosts.yml index 15a576f40..ccd152f08 100644 --- a/roles/sap_hana_install/tasks/hana_addhosts.yml +++ b/roles/sap_hana_install/tasks/hana_addhosts.yml @@ -2,7 +2,7 @@ - name: SAP HANA Add Hosts - Fill new variable __sap_hana_install_addhosts_hosts ansible.builtin.set_fact: - __sap_hana_install_addhosts_hosts: "{{ __sap_hana_install_addhosts_hosts|default([]) + [ item.split(':')[0] ] }}" + __sap_hana_install_addhosts_hosts: "{{ __sap_hana_install_addhosts_hosts | d([]) + [ item.split(':')[0] ] }}" with_items: "{{ sap_hana_install_addhosts.split(',') }}" - name: SAP HANA Add Hosts - Show the contents of __sap_hana_install_addhosts_hosts @@ -52,9 +52,9 @@ - name: SAP HANA Add Hosts - Set fact for hdblcm command line ansible.builtin.set_fact: - __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs|d('') }} + __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} --action=add_hosts - --password={{ sap_hana_install_sidadm_password|d(sap_hana_install_master_password) }} + --password={{ sap_hana_install_sidadm_password | d(sap_hana_install_master_password) }} --configfile={{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg -b" tags: sap_hana_install_hdblcm_commandline diff --git a/roles/sap_hana_install/tasks/hana_install.yml b/roles/sap_hana_install/tasks/hana_install.yml index ca557873f..966de0ffe 100644 --- a/roles/sap_hana_install/tasks/hana_install.yml +++ b/roles/sap_hana_install/tasks/hana_install.yml @@ -27,8 +27,8 @@ - name: Set fact for hdblcm command line ansible.builtin.set_fact: - __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs|d('') }} - {{ __sap_hana_install_fact_verify_signature|d('') }} + __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} + {{ __sap_hana_install_fact_verify_signature | d('') }} --configfile={{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg -b" tags: sap_hana_install_hdblcm_commandline diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 0d5a6826d..5960917b0 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -2,11 +2,11 @@ - name: Rename some variables used by hdblcm configfile ansible.builtin.set_fact: - sap_hana_install_sid: "{{ sap_hana_sid|d(sap_hana_install_sid)|d('') }}" - sap_hana_install_number: "{{ sap_hana_instance_number|d(sap_hana_install_instance_number|d(sap_hana_install_number)|d('')) }}" - sap_hana_install_master_password: "{{ sap_hana_install_common_master_password|d(sap_hana_install_master_password) }}" - sap_hana_install_system_usage: "{{ sap_hana_install_env_type|d(sap_hana_install_system_usage) }}" - sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict|d(sap_hana_install_restrict_max_mem) }}" + sap_hana_install_sid: "{{ sap_hana_sid | d(sap_hana_install_sid) | d('') }}" + sap_hana_install_number: "{{ sap_hana_instance_number | d(sap_hana_install_instance_number | d(sap_hana_install_number) | d('')) }}" + sap_hana_install_master_password: "{{ sap_hana_install_common_master_password | d(sap_hana_install_master_password) }}" + sap_hana_install_system_usage: "{{ sap_hana_install_env_type | d(sap_hana_install_system_usage) }}" + sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict | d(sap_hana_install_restrict_max_mem) }}" tags: - sap_hana_install_preinstall - sap_hana_install_set_log_mode @@ -26,7 +26,7 @@ - name: SAP HANA existence checking ansible.builtin.import_tasks: hana_exists.yml - when: sap_hana_install_new_system|d(true) + when: sap_hana_install_new_system | d(true) - name: SAP HANA pre-install steps ansible.builtin.import_tasks: pre_install.yml @@ -34,11 +34,11 @@ - name: SAP HANA installation steps ansible.builtin.import_tasks: hana_install.yml - when: sap_hana_install_new_system|d(true) + when: sap_hana_install_new_system | d(true) - name: SAP HANA addhosts steps ansible.builtin.import_tasks: hana_addhosts.yml - when: not sap_hana_install_new_system|d(true) + when: not sap_hana_install_new_system | d(true) - name: SAP HANA post-install steps ansible.builtin.import_tasks: post_install.yml diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 090981854..5010877af 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -26,7 +26,7 @@ - name: SAP HANA Post Install - Recreate the initial tenant database ansible.builtin.include_tasks: post_install/recreate_tenant_database.yml - when: sap_hana_install_recreate_tenant_database|d(true) + when: sap_hana_install_recreate_tenant_database | d(true) # Optional Post Install Tasks @@ -51,7 +51,7 @@ delegate_to: 127.0.0.1 tags: sap_hana_install_generate_input_file - when: sap_hana_install_new_system|d(true) + when: sap_hana_install_new_system | d(true) ################ @@ -64,7 +64,7 @@ awk ' !/^ /&&!/^\n")} - /^ /{split ($0, b, "[\*\*\*]"); gsub (">", ""); split ($0, a, "<"); printf ("%s\{\{ sap_hana_install_%s|d(sap_hana_install_master_password) \}\}%s\n", b[1], a[2], b[4])}' {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg.xml > {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.xml.j2 + /^ /{split ($0, b, "[\*\*\*]"); gsub (">", ""); split ($0, a, "<"); printf ("%s\{\{ sap_hana_install_%s | d(sap_hana_install_master_password) \}\}%s\n", b[1], a[2], b[4])}' {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg.xml > {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.xml.j2 register: __sap_hana_install_create_jinja2_template changed_when: no @@ -98,14 +98,14 @@ --remote_execution=ssh --scope=system -b < {{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg.xml" - when: sap_hana_install_use_hdbcheck|d(true) + when: sap_hana_install_use_hdbcheck | d(true) - name: SAP HANA hdblcm installation check - Construct an hdblcm command line ansible.builtin.set_fact: __sap_hana_install_fact_installation_check_command: "set -o pipefail && ./hdblcm --action=check_installation --read_password_from_stdin=xml -b < {{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg.xml" - when: not sap_hana_install_use_hdbcheck|d(true) + when: not sap_hana_install_use_hdbcheck | d(true) - name: SAP HANA hdblcm installation check - Display the command line ansible.builtin.debug: @@ -117,12 +117,12 @@ args: chdir: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/global/hdb/install/bin" register: __sap_hana_install_register_installation_check - when: sap_hana_install_use_hdbcheck|d(true) + when: sap_hana_install_use_hdbcheck | d(true) - name: SAP HANA hdblcm installation check - Display the result ansible.builtin.debug: var: __sap_hana_install_register_installation_check.stdout_lines - when: sap_hana_install_use_hdbcheck|d(true) + when: sap_hana_install_use_hdbcheck | d(true) # Reason for noqa: The command to be executed contains input redirection - name: SAP HANA hdblcm installation check - Perform the check # noqa command-instead-of-shell @@ -130,14 +130,14 @@ args: chdir: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/hdblcm" register: __sap_hana_install_register_installation_check - when: not sap_hana_install_use_hdbcheck|d(true) + when: not sap_hana_install_use_hdbcheck | d(true) - name: SAP HANA hdblcm installation check - Display the result ansible.builtin.debug: var: __sap_hana_install_register_installation_check.stdout_lines - when: not sap_hana_install_use_hdbcheck|d(true) + when: not sap_hana_install_use_hdbcheck | d(true) - when: sap_hana_install_check_installation|d(false) + when: sap_hana_install_check_installation | d(false) tags: sap_hana_install_check_installation - name: SAP HANA Install - Run 'hdblcm --list_systems' after the installation @@ -175,7 +175,7 @@ - ' SID - {{ sap_hana_install_sid }}' - ' NR - {{ sap_hana_install_number }}' # - ' Master Password - {{ sap_hana_install_master_password }}' -# - ' IP - {{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }}' +# - ' IP - {{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}' # - ' Host - {{ ansible_hostname }}' # - ' FQDN - {{ ansible_fqdn }}' when: not ansible_check_mode diff --git a/roles/sap_hana_install/tasks/post_install/update_etchosts.yml b/roles/sap_hana_install/tasks/post_install/update_etchosts.yml index 85ac50e60..584252e3f 100644 --- a/roles/sap_hana_install/tasks/post_install/update_etchosts.yml +++ b/roles/sap_hana_install/tasks/post_install/update_etchosts.yml @@ -4,10 +4,10 @@ ansible.builtin.lineinfile: path: /etc/hosts create: false - regexp: (?i)^\s*{{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }}\s+ + regexp: (?i)^\s*{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}\s+ state: absent - name: SAP HANA Post Install - Update /etc/hosts ansible.builtin.lineinfile: path: /etc/hosts - line: "{{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }} {{ ansible_fqdn }} {{ ansible_hostname }}" + line: "{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }} {{ ansible_fqdn }} {{ ansible_hostname }}" diff --git a/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml b/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml index 52148da98..5f11ae6c1 100644 --- a/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml +++ b/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml @@ -44,7 +44,7 @@ set -o pipefail && awk 'BEGIN{FS="="; printf ("\{\{ ansible_managed | comment \}\}\n# File created on: \{\{ template_host \}\}\n# Template file: \{\{ template_path \}\}\n#\n")} !/^[a-z]/{print} - /^[a-z]/{printf ("%s=\{\{ sap_hana_install_%s|d(\047%s\047) \}\}\n", $1, $1, $2)}' {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg > {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.j2 + /^[a-z]/{printf ("%s=\{\{ sap_hana_install_%s | d(\047%s\047) \}\}\n", $1, $1, $2)}' {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg > {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.j2 register: __sap_hana_install_create_jinja2_template changed_when: no diff --git a/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml b/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml index acfd1e4a0..e91c9367f 100644 --- a/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml +++ b/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml @@ -46,7 +46,7 @@ - name: SAP HANA hdblcm prepare - SAPCAR defined - Create a list of one dict for checksum verification ansible.builtin.set_fact: - __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict|d([]) + [ __sap_hana_install_fact_sapcar_dict_tmp ] }}" + __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict | d([]) + [ __sap_hana_install_fact_sapcar_dict_tmp ] }}" - name: SAP HANA hdblcm prepare - SAPCAR defined - Verify checksum for the SAPCAR executable ansible.builtin.include_tasks: verify_checksum.yml @@ -82,7 +82,8 @@ state: directory mode: '0755' - - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Identify matching SAR executables in '{{ sap_hana_install_software_directory }}' +# Reason for noqa: There are pipe symbols - as part of an or statement - in an awk command sequence. + - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Identify matching SAR executables in '{{ sap_hana_install_software_directory }}' # noqa var-spacing ansible.builtin.shell: | set -o pipefail && for sapcar_any in SAPCAR*EXE; do @@ -109,7 +110,7 @@ - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Create a list of files from SAPCAR executables of the matching architecture ansible.builtin.set_fact: - __sap_hana_install_fact_sapcar_filenames_matching_arch: "{{ __sap_hana_install_fact_sapcar_filenames_matching_arch|d([]) + [ item ] }}" + __sap_hana_install_fact_sapcar_filenames_matching_arch: "{{ __sap_hana_install_fact_sapcar_filenames_matching_arch | d([]) + [ item ] }}" loop: "{{ __sap_hana_install_register_sapcar_matching_arch.stdout_lines }}" - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Copy matching SAPCAR executables to '{{ sap_hana_install_software_extract_directory }}/sapcar_tmp/' @@ -124,7 +125,7 @@ - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Fill list of dicts containing dir, file, and global checksum file ansible.builtin.set_fact: - __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict|d([]) + [ __sap_hana_install_tmp_sapcar_dict ] }}" + __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict | d([]) + [ __sap_hana_install_tmp_sapcar_dict ] }}" with_items: "{{ __sap_hana_install_fact_sapcar_filenames_matching_arch }}" vars: __sap_hana_install_tmp_sapcar_dict: @@ -135,7 +136,7 @@ - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Fill list of dicts containing dir, file, and specific checksum file ansible.builtin.set_fact: - __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict|d([]) + [ __sap_hana_install_tmp_sapcar_dict ] }}" + __sap_hana_install_fact_sapcar_dict: "{{ __sap_hana_install_fact_sapcar_dict | d([]) + [ __sap_hana_install_tmp_sapcar_dict ] }}" with_items: "{{ __sap_hana_install_fact_sapcar_filenames_matching_arch }}" vars: __sap_hana_install_tmp_sapcar_dict: diff --git a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml index cd537f20a..ef1b3e6e7 100644 --- a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml +++ b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml @@ -28,7 +28,7 @@ - name: SAP HANA hdblcm prepare - Create list of file names from the find result ansible.builtin.set_fact: - __sap_hana_install_fact_sarfiles: "{{ __sap_hana_install_fact_sarfiles|d([]) + [ item.path | basename ] }}" + __sap_hana_install_fact_sarfiles: "{{ __sap_hana_install_fact_sarfiles | d([]) + [ item.path | basename ] }}" loop: "{{ __sap_hana_install_register_find_sarfiles.files }}" - name: Display the resulting list of file names after find @@ -64,7 +64,7 @@ - name: SAP HANA hdblcm prepare - Fill list of dicts containing dir, file, and global checksum file ansible.builtin.set_fact: - __sap_hana_install_fact_sarfiles_dict: "{{ __sap_hana_install_fact_sarfiles_dict|d([]) + [ __sap_hana_install_tmp_sarfiles_dict ] }}" + __sap_hana_install_fact_sarfiles_dict: "{{ __sap_hana_install_fact_sarfiles_dict | d([]) + [ __sap_hana_install_tmp_sarfiles_dict ] }}" with_items: "{{ __sap_hana_install_fact_sarfiles }}" vars: __sap_hana_install_tmp_sarfiles_dict: @@ -75,7 +75,7 @@ - name: SAP HANA hdblcm prepare - Fill list of dicts containing dir, file, and specific checksum file ansible.builtin.set_fact: - __sap_hana_install_fact_sarfiles_dict: "{{ __sap_hana_install_fact_sarfiles_dict|d([]) + [ __sap_hana_install_tmp_sarfiles_dict ] }}" + __sap_hana_install_fact_sarfiles_dict: "{{ __sap_hana_install_fact_sarfiles_dict | d([]) + [ __sap_hana_install_tmp_sarfiles_dict ] }}" with_items: "{{ __sap_hana_install_fact_sarfiles }}" vars: __sap_hana_install_tmp_sarfiles_dict: From b701d0d7d04d43a741b1f69b67fbbf32eef09157 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 17:43:56 +0200 Subject: [PATCH 044/375] sap_netweaver_preconfigure: solve var-spacing lint errors --- .github/workflows/ansible-lint.yml | 2 +- .github/workflows/ansible-test-sanity.yml | 58 ++++++++----------- .../tasks/RedHat/assert-configuration.yml | 2 +- .../tasks/RedHat/assert-installation.yml | 10 ++-- .../tasks/sapnote/assert-2526952.yml | 8 +-- 5 files changed, 36 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 4cddfb96a..8fe87d0f1 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -1,6 +1,6 @@ # Worflow for ansible-lint -name: ansible-lint +name: ansible-lint of the collection on: push: diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index abdc54c7a..dd2954a51 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -1,6 +1,6 @@ # Worflow for ansible-test sanity tests -name: ansible-test sanity +name: ansible-test sanity of the collection on: push: @@ -33,21 +33,25 @@ jobs: # - name: Install collection dependencies # run: ansible-galaxy collection install community.general - - name: List directory /home/runner/work/ - working-directory: /home/runner/ - run: ls -al /home/runner/work/ +# - name: List directory /home/runner/work/ +# working-directory: /home/runner/ +# run: ls -al /home/runner/work/ - - name: List directory /home/runner/work/_actions - working-directory: /home/runner/ - run: ls -al /home/runner/work/_actions +# - name: List directory /home/runner/work/_actions +# working-directory: /home/runner/ +# run: ls -al /home/runner/work/_actions - - name: List directory /home/runner/work/community.sap_install + - name: List directory /home/runner/work/_actions/actions working-directory: /home/runner/ - run: ls -al /home/runner/work/community.sap_install + run: ls -al /home/runner/work/_actions/actions - - name: List directory /home/runner/work/community.sap_install/community.sap_install - working-directory: /home/runner/ - run: ls -al /home/runner/work/community.sap_install/community.sap_install +# - name: List directory /home/runner/work/community.sap_install +# working-directory: /home/runner/ +# run: ls -al /home/runner/work/community.sap_install + +# - name: List directory /home/runner/work/community.sap_install/community.sap_install +# working-directory: /home/runner/ +# run: ls -al /home/runner/work/community.sap_install/community.sap_install - name: Move the collection to the correct location - Create new directory run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community @@ -56,33 +60,21 @@ jobs: working-directory: /home/runner/ run: mv /home/runner/work/community.sap_install/community.sap_install /home/runner/.ansible/collections/ansible_collections/community - - name: List directory /home/runner/.ansible/collections/ansible_collections/community - working-directory: /home/runner/ - run: ls -al /home/runner/.ansible/collections/ansible_collections/community +# - name: List directory /home/runner/.ansible/collections/ansible_collections/community +# working-directory: /home/runner/ +# run: ls -al /home/runner/.ansible/collections/ansible_collections/community - name: Move the collection to the correct location - Rename the directory working-directory: /home/runner/ run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install - - name: List directory /home/runner/.ansible/collections/ansible_collections/community - working-directory: /home/runner/ - run: ls -al /home/runner/.ansible/collections/ansible_collections/community +# - name: List directory /home/runner/.ansible/collections/ansible_collections/community +# working-directory: /home/runner/ +# run: ls -al /home/runner/.ansible/collections/ansible_collections/community - - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install - working-directory: /home/runner/ - run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install - - - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests - working-directory: /home/runner/ - run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests - - - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity - working-directory: /home/runner/ - run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity - - - name: Show the content of file /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity/ignore-2.13.txt - working-directory: /home/runner/ - run: cat /home/runner/.ansible/collections/ansible_collections/community/sap_install/tests/sanity/ignore-2.13.txt +# - name: List directory /home/runner/.ansible/collections/ansible_collections/community/sap_install +# working-directory: /home/runner/ +# run: ls -al /home/runner/.ansible/collections/ansible_collections/community/sap_install - name: Run sanity tests working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_install diff --git a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-configuration.yml b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-configuration.yml index 9584da8c2..60d2e5ad5 100644 --- a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-configuration.yml @@ -27,4 +27,4 @@ success_msg: "PASS: The system has {{ ansible_swaptotal_mb }} MB of swap space configured, which is equal to or more than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver." when: sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml index f1a475814..e2c565ca2 100644 --- a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml @@ -10,7 +10,7 @@ - "{{ __sap_netweaver_preconfigure_packages }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" - name: Check if required packages for Adobe Document Services are installed ansible.builtin.shell: rpm -q --qf "%{NAME}.%{ARCH}\n" {{ __sap_netweaver_preconfigure_adobe_doc_services_packages | map('quote') | join(' ') }} @@ -18,8 +18,8 @@ changed_when: no args: warn: false - when: sap_netweaver_preconfigure_use_adobe_doc_services|d(false) - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + when: sap_netweaver_preconfigure_use_adobe_doc_services | d(false) + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that all required packages for Adobe Document Services are installed ansible.builtin.assert: @@ -29,5 +29,5 @@ with_items: "{{ __sap_netweaver_preconfigure_register_rpm_q_ads_packages.stdout_lines }}" loop_control: loop_var: line_item - when: sap_netweaver_preconfigure_use_adobe_doc_services|d(false) - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + when: sap_netweaver_preconfigure_use_adobe_doc_services | d(false) + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-2526952.yml b/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-2526952.yml index acfe63491..fd73c4df0 100644 --- a/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-2526952.yml +++ b/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-2526952.yml @@ -15,7 +15,7 @@ that: "'tuned.service' in ansible_facts.services" fail_msg: "FAIL: Service tuned could not be found!" success_msg: "PASS: Service tuned is available." - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that tuned is enabled ansible.builtin.assert: @@ -23,7 +23,7 @@ fail_msg: "FAIL: Service tuned is not enabled!" success_msg: "PASS: Service tuned is enabled." when: "'tuned.service' in ansible_facts.services" - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that tuned is active ansible.builtin.assert: @@ -31,7 +31,7 @@ fail_msg: "FAIL: Service tuned is not active!" success_msg: "PASS: Service tuned is active." when: "'tuned.service' in ansible_facts.services" - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" - name: Display the version of tuned-profiles-sap ansible.builtin.debug: @@ -55,4 +55,4 @@ fail_msg: "FAIL: The tuned profile 'sap-netweaver' is currently not active! Currently active profile: '{{ __sap_netweaver_preconfigure_register_current_tuned_profile.stdout }}'." success_msg: "PASS: The tuned profile 'sap-netweaver' is currently active." - ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" From 70e56ad0a55a47a5cad6b0d5571a943af80db089 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 17:49:24 +0200 Subject: [PATCH 045/375] sample playbook: removed trailing spaces --- .../sample-playbook_deploy-2-node-sap-hana-cluster.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml index dccce6833..6a5911b88 100644 --- a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml +++ b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml @@ -1,5 +1,5 @@ --- -# This playbook will +# This playbook will # - prepare and install SAP HANA on 2 target nodes # - set up SAP HANA System Replication (HSR) # - install and configure a basic pacemaker cluster @@ -11,7 +11,7 @@ # and infrastructure (e.g. IP definitions matching your network). # Prerequisite: -# - target nodes are registered with subscription-manager and +# - target nodes are registered with subscription-manager and # subscribed to "RHEL for SAP Solutions" - name: "Install SAP HANA and configure it in a 2-node pacemaker cluster" From 45098a90cb0713a4ede83e4cc679c125fa1f2735 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 6 Jul 2022 18:05:55 +0200 Subject: [PATCH 046/375] sap_general_preconfigure: solve more var-spacing lint errors --- .../tasks/SLES/assert-installation.yml | 16 ++-- roles/sap_general_preconfigure/tasks/main.yml | 80 +++++++++---------- .../vars/RedHat_7.yml | 6 +- .../vars/RedHat_8.yml | 2 +- .../vars/RedHat_9.yml | 2 +- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index 5226ccfc0..bb519cb51 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -9,7 +9,7 @@ - "{{ sap_general_preconfigure_packages }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check block: @@ -69,14 +69,14 @@ ignore_errors: yes when: - - sap_general_preconfigure_min_package_check|bool - - __sap_general_preconfigure_min_pkgs|d([]) + - sap_general_preconfigure_min_package_check | bool + - __sap_general_preconfigure_min_pkgs | d([]) - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." ignore_errors: yes - when: not __sap_general_preconfigure_min_pkgs|d([]) + when: not __sap_general_preconfigure_min_pkgs | d([]) - name: Get info about possible package updates ansible.builtin.command: yum check-update @@ -84,7 +84,7 @@ args: warn: false changed_when: false - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update - name: Assert that there are no more possible package updates @@ -92,7 +92,7 @@ that: __sap_general_preconfigure_register_yum_check_update_assert is success fail_msg: "FAIL: System needs to be updated!" success_msg: "PASS: There are no more outstanding package updates." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update - name: Report if checking for possible package updates is not requested @@ -138,11 +138,11 @@ args: warn: false check_mode: false - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that system needs no restart ansible.builtin.assert: that: __sap_general_preconfigure_register_needs_restarting_assert is success fail_msg: "FAIL: System needs to be restarted!" success_msg: "PASS: System needs no restart." - ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors|d(false) }}" + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index c856e0c85..e48f58992 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -13,60 +13,60 @@ - name: Rename user sap_preconfigure variables if found, generic ansible.builtin.set_fact: - sap_general_preconfigure_config_all: "{{ (sap_preconfigure_config_all|d(sap_general_preconfigure_config_all))|d(true) }}" - sap_general_preconfigure_installation: "{{ (sap_preconfigure_installation|d(sap_general_preconfigure_installation))|d(false) }}" - sap_general_preconfigure_configuration: "{{ (sap_preconfigure_configuration|d(sap_general_preconfigure_configuration))|d(false) }}" - sap_general_preconfigure_assert: "{{ sap_preconfigure_assert|d(sap_general_preconfigure_assert) }}" - sap_general_preconfigure_assert_ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(sap_general_preconfigure_assert_ignore_errors) }}" - sap_general_preconfigure_packagegroups: "{{ sap_preconfigure_packagegroups|d(sap_general_preconfigure_packagegroups) }}" - sap_general_preconfigure_envgroups: "{{ sap_preconfigure_envgroups|d(sap_general_preconfigure_envgroups) }}" - sap_general_preconfigure_packages: "{{ sap_preconfigure_packages|d(sap_general_preconfigure_packages) }}" - sap_general_preconfigure_min_package_check: "{{ sap_preconfigure_min_package_check|d(sap_general_preconfigure_min_package_check) }}" - sap_general_preconfigure_update: "{{ sap_preconfigure_update|d(sap_general_preconfigure_update) }}" - sap_general_preconfigure_reboot_ok: "{{ sap_preconfigure_reboot_ok|d(sap_general_preconfigure_reboot_ok) }}" - sap_general_preconfigure_fail_if_reboot_required: "{{ sap_preconfigure_fail_if_reboot_required|d(sap_general_preconfigure_fail_if_reboot_required) }}" - sap_general_preconfigure_selinux_state: "{{ sap_preconfigure_selinux_state|d(sap_general_preconfigure_selinux_state) }}" - sap_general_preconfigure_size_of_tmpfs_gb: "{{ sap_preconfigure_size_of_tmpfs_gb|d(sap_general_preconfigure_size_of_tmpfs_gb) }}" - sap_general_preconfigure_locale: "{{ sap_preconfigure_locale|d(sap_general_preconfigure_locale) }}" - sap_general_preconfigure_modify_etc_hosts: "{{ sap_preconfigure_modify_etc_hosts|d(sap_general_preconfigure_modify_etc_hosts) }}" - sap_general_preconfigure_kernel_parameters: "{{ sap_preconfigure_kernel_parameters|d(sap_general_preconfigure_kernel_parameters) }}" - sap_general_preconfigure_max_hostname_length: "{{ sap_preconfigure_max_hostname_length|d(sap_general_preconfigure_max_hostname_length) }}" + sap_general_preconfigure_config_all: "{{ (sap_preconfigure_config_all | d(sap_general_preconfigure_config_all)) | d(true) }}" + sap_general_preconfigure_installation: "{{ (sap_preconfigure_installation | d(sap_general_preconfigure_installation)) | d(false) }}" + sap_general_preconfigure_configuration: "{{ (sap_preconfigure_configuration | d(sap_general_preconfigure_configuration)) | d(false) }}" + sap_general_preconfigure_assert: "{{ sap_preconfigure_assert | d(sap_general_preconfigure_assert) }}" + sap_general_preconfigure_assert_ignore_errors: "{{ sap_preconfigure_assert_ignore_errors | d(sap_general_preconfigure_assert_ignore_errors) }}" + sap_general_preconfigure_packagegroups: "{{ sap_preconfigure_packagegroups | d(sap_general_preconfigure_packagegroups) }}" + sap_general_preconfigure_envgroups: "{{ sap_preconfigure_envgroups | d(sap_general_preconfigure_envgroups) }}" + sap_general_preconfigure_packages: "{{ sap_preconfigure_packages | d(sap_general_preconfigure_packages) }}" + sap_general_preconfigure_min_package_check: "{{ sap_preconfigure_min_package_check | d(sap_general_preconfigure_min_package_check) }}" + sap_general_preconfigure_update: "{{ sap_preconfigure_update | d(sap_general_preconfigure_update) }}" + sap_general_preconfigure_reboot_ok: "{{ sap_preconfigure_reboot_ok | d(sap_general_preconfigure_reboot_ok) }}" + sap_general_preconfigure_fail_if_reboot_required: "{{ sap_preconfigure_fail_if_reboot_required | d(sap_general_preconfigure_fail_if_reboot_required) }}" + sap_general_preconfigure_selinux_state: "{{ sap_preconfigure_selinux_state | d(sap_general_preconfigure_selinux_state) }}" + sap_general_preconfigure_size_of_tmpfs_gb: "{{ sap_preconfigure_size_of_tmpfs_gb | d(sap_general_preconfigure_size_of_tmpfs_gb) }}" + sap_general_preconfigure_locale: "{{ sap_preconfigure_locale | d(sap_general_preconfigure_locale) }}" + sap_general_preconfigure_modify_etc_hosts: "{{ sap_preconfigure_modify_etc_hosts | d(sap_general_preconfigure_modify_etc_hosts) }}" + sap_general_preconfigure_kernel_parameters: "{{ sap_preconfigure_kernel_parameters | d(sap_general_preconfigure_kernel_parameters) }}" + sap_general_preconfigure_max_hostname_length: "{{ sap_preconfigure_max_hostname_length | d(sap_general_preconfigure_max_hostname_length) }}" - name: Rename user sap_preconfigure variables if found, RHEL only ansible.builtin.set_fact: - sap_general_preconfigure_2002167_02: "{{ (sap_preconfigure_2002167_02|d(sap_general_preconfigure_2002167_02))|d(false) }}" - sap_general_preconfigure_2002167_03: "{{ (sap_preconfigure_2002167_03|d(sap_general_preconfigure_2002167_03))|d(false) }}" - sap_general_preconfigure_2002167_04: "{{ (sap_preconfigure_2002167_04|d(sap_general_preconfigure_2002167_04))|d(false) }}" - sap_general_preconfigure_2002167_05: "{{ (sap_preconfigure_2002167_05|d(sap_general_preconfigure_2002167_05))|d(false) }}" - sap_general_preconfigure_2002167_06: "{{ (sap_preconfigure_2002167_06|d(sap_general_preconfigure_2002167_06))|d(false) }}" - sap_general_preconfigure_0941735: "{{ (sap_preconfigure_0941735|d(sap_general_preconfigure_0941735))|d(false) }}" - sap_general_preconfigure_1391070: "{{ (sap_preconfigure_1391070|d(sap_general_preconfigure_1391070))|d(false) }}" - sap_general_preconfigure_1771258: "{{ (sap_preconfigure_1771258|d(sap_general_preconfigure_1771258)|d(false)) }}" - sap_general_preconfigure_2772999_02: "{{ (sap_preconfigure_2772999_02|d(sap_general_preconfigure_2772999_02)|d(false)) }}" - sap_general_preconfigure_2772999_03: "{{ (sap_preconfigure_2772999_03|d(sap_general_preconfigure_2772999_03)|d(false)) }}" - sap_general_preconfigure_2772999_04: "{{ (sap_preconfigure_2772999_04|d(sap_general_preconfigure_2772999_04)|d(false)) }}" - sap_general_preconfigure_2772999_05: "{{ (sap_preconfigure_2772999_05|d(sap_general_preconfigure_2772999_05)|d(false)) }}" - sap_general_preconfigure_2772999_06: "{{ (sap_preconfigure_2772999_06|d(sap_general_preconfigure_2772999_06)|d(false)) }}" - sap_general_preconfigure_2772999_07: "{{ (sap_preconfigure_2772999_07|d(sap_general_preconfigure_2772999_07)|d(false)) }}" - sap_general_preconfigure_2772999_08: "{{ (sap_preconfigure_2772999_08|d(sap_general_preconfigure_2772999_08))|d(false) }}" - sap_general_preconfigure_2772999_09: "{{ (sap_preconfigure_2772999_09|d(sap_general_preconfigure_2772999_09))|d(false) }}" - sap_general_preconfigure_2772999_10: "{{ (sap_preconfigure_2772999_10|d(sap_general_preconfigure_2772999_10))|d(false) }}" + sap_general_preconfigure_2002167_02: "{{ (sap_preconfigure_2002167_02 | d(sap_general_preconfigure_2002167_02)) | d(false) }}" + sap_general_preconfigure_2002167_03: "{{ (sap_preconfigure_2002167_03 | d(sap_general_preconfigure_2002167_03)) | d(false) }}" + sap_general_preconfigure_2002167_04: "{{ (sap_preconfigure_2002167_04 | d(sap_general_preconfigure_2002167_04)) | d(false) }}" + sap_general_preconfigure_2002167_05: "{{ (sap_preconfigure_2002167_05 | d(sap_general_preconfigure_2002167_05)) | d(false) }}" + sap_general_preconfigure_2002167_06: "{{ (sap_preconfigure_2002167_06 | d(sap_general_preconfigure_2002167_06)) | d(false) }}" + sap_general_preconfigure_0941735: "{{ (sap_preconfigure_0941735 | d(sap_general_preconfigure_0941735)) | d(false) }}" + sap_general_preconfigure_1391070: "{{ (sap_preconfigure_1391070 | d(sap_general_preconfigure_1391070)) | d(false) }}" + sap_general_preconfigure_1771258: "{{ (sap_preconfigure_1771258 | d(sap_general_preconfigure_1771258) | d(false)) }}" + sap_general_preconfigure_2772999_02: "{{ (sap_preconfigure_2772999_02 | d(sap_general_preconfigure_2772999_02) | d(false)) }}" + sap_general_preconfigure_2772999_03: "{{ (sap_preconfigure_2772999_03 | d(sap_general_preconfigure_2772999_03) | d(false)) }}" + sap_general_preconfigure_2772999_04: "{{ (sap_preconfigure_2772999_04 | d(sap_general_preconfigure_2772999_04) | d(false)) }}" + sap_general_preconfigure_2772999_05: "{{ (sap_preconfigure_2772999_05 | d(sap_general_preconfigure_2772999_05) | d(false)) }}" + sap_general_preconfigure_2772999_06: "{{ (sap_preconfigure_2772999_06 | d(sap_general_preconfigure_2772999_06) | d(false)) }}" + sap_general_preconfigure_2772999_07: "{{ (sap_preconfigure_2772999_07 | d(sap_general_preconfigure_2772999_07) | d(false)) }}" + sap_general_preconfigure_2772999_08: "{{ (sap_preconfigure_2772999_08 | d(sap_general_preconfigure_2772999_08)) | d(false) }}" + sap_general_preconfigure_2772999_09: "{{ (sap_preconfigure_2772999_09 | d(sap_general_preconfigure_2772999_09)) | d(false) }}" + sap_general_preconfigure_2772999_10: "{{ (sap_preconfigure_2772999_10 | d(sap_general_preconfigure_2772999_10)) | d(false) }}" when: ansible_facts['distribution'] in ['RedHat'] - name: Rename sap_preconfigure_db_group_name if defined ansible.builtin.set_fact: - sap_general_preconfigure_db_group_name: "{{ sap_preconfigure_db_group_name|d(sap_general_preconfigure_db_group_name) }}" + sap_general_preconfigure_db_group_name: "{{ sap_preconfigure_db_group_name | d(sap_general_preconfigure_db_group_name) }}" when: sap_preconfigure_db_group_name is defined or sap_general_preconfigure_db_group_name is defined - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: __sap_general_preconfigure_fact_assert_filename_prefix: "" - when: not sap_general_preconfigure_assert|d(false) + when: not sap_general_preconfigure_assert | d(false) - name: Prepend filename with assert string if role is run in assert mode ansible.builtin.set_fact: __sap_general_preconfigure_fact_assert_filename_prefix: "assert-" - when: sap_general_preconfigure_assert|d(false) + when: sap_general_preconfigure_assert | d(false) # required for installation and configuration tasks: - name: Gather package facts @@ -74,7 +74,7 @@ - name: Include tasks from 'installation.yml' ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}installation.yml' - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_installation|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_installation | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' @@ -82,7 +82,7 @@ - name: Include tasks from 'configuration.yml' ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}configuration.yml' - when: sap_general_preconfigure_config_all|d(true) or sap_general_preconfigure_configuration|d(false) + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_configuration | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' diff --git a/roles/sap_general_preconfigure/vars/RedHat_7.yml b/roles/sap_general_preconfigure/vars/RedHat_7.yml index f9cc97598..a4121523a 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_7.yml @@ -45,8 +45,8 @@ __sap_general_preconfigure_max_repo_type_ha_string_7_7: '{{ __sap_general_precon __sap_general_preconfigure_max_repo_type_ha_string_7_8: '' __sap_general_preconfigure_max_repo_type_ha_string_7_9: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version|replace (\".\", \"_\")) }}" -__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_distribution_version|replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms @@ -138,7 +138,7 @@ __sap_general_preconfigure_min_packages_7_8: __sap_general_preconfigure_min_packages_7_9: -__sap_general_preconfigure_min_pkgs: "{{ lookup('vars','__sap_general_preconfigure_min_packages_' + ansible_distribution_version|replace (\".\", \"_\")) }}" +__sap_general_preconfigure_min_pkgs: "{{ lookup('vars','__sap_general_preconfigure_min_packages_' + ansible_distribution_version | replace (\".\", \"_\")) }}" # Note: The value for vm.max_map_count of 2147483647 (previously 2000000) # is set according to SAP note 900929. diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index c355bb7dc..8505cb2d8 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -23,7 +23,7 @@ __sap_general_preconfigure_max_repo_type_string_8_8: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_string_8_9: '' __sap_general_preconfigure_max_repo_type_string_8_10: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version|replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index 2595b5141..80783a7fc 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -16,7 +16,7 @@ __sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preco # RHEL 9 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_9_0: '{{ __sap_general_preconfigure_max_repo_type }}-' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version|replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms From 5d1fb7b030caa40c480da8b3c46125cdfaee2a47 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 7 Jul 2022 10:25:12 +0200 Subject: [PATCH 047/375] collection: modify ansible-lint action for sap_general_preconfigure --- .../ansible-lint sap_general_preconfigure.yml | 27 ------------- .../ansible-lint sap_hana_install.yml | 2 + .../ansible-lint sap_hana_preconfigure.yml | 2 + ...nsible-lint sap_netweaver_preconfigure.yml | 2 + .../ansible-lint-sap_general_preconfigure.yml | 39 +++++++++++++++++++ .github/workflows/ansible-lint.yml | 4 +- .github/workflows/ansible-test-sanity.yml | 2 + .github/workflows/pylint.yml | 2 + .../yamllint-sap_general_preconfigure.yml | 32 --------------- .../workflows/yamllint-sap_hana_install.yml | 32 --------------- .../yamllint-sap_hana_preconfigure.yml | 32 --------------- .../yamllint-sap_netweaver_preconfigure.yml | 32 --------------- .../run-sap_general_preconfigure-tests.py | 1 + 13 files changed, 53 insertions(+), 156 deletions(-) delete mode 100644 .github/workflows/ansible-lint sap_general_preconfigure.yml create mode 100644 .github/workflows/ansible-lint-sap_general_preconfigure.yml delete mode 100644 .github/workflows/yamllint-sap_general_preconfigure.yml delete mode 100644 .github/workflows/yamllint-sap_hana_install.yml delete mode 100644 .github/workflows/yamllint-sap_hana_preconfigure.yml delete mode 100644 .github/workflows/yamllint-sap_netweaver_preconfigure.yml diff --git a/.github/workflows/ansible-lint sap_general_preconfigure.yml b/.github/workflows/ansible-lint sap_general_preconfigure.yml deleted file mode 100644 index 491cd20cb..000000000 --- a/.github/workflows/ansible-lint sap_general_preconfigure.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Ansible Lint for sap_general_preconfigure - -on: - push: - paths: - - 'roles/sap_general_preconfigure/**' - pull_request: - paths: - - 'roles/sap_general_preconfigure/**' -jobs: - ansible-lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_general_preconfigure - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/ansible-lint sap_hana_install.yml b/.github/workflows/ansible-lint sap_hana_install.yml index 12d85c52f..d4aad1f71 100644 --- a/.github/workflows/ansible-lint sap_hana_install.yml +++ b/.github/workflows/ansible-lint sap_hana_install.yml @@ -1,3 +1,5 @@ +--- + name: Ansible Lint for sap_hana_install on: diff --git a/.github/workflows/ansible-lint sap_hana_preconfigure.yml b/.github/workflows/ansible-lint sap_hana_preconfigure.yml index e9ece6e80..95ef84e23 100644 --- a/.github/workflows/ansible-lint sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint sap_hana_preconfigure.yml @@ -1,3 +1,5 @@ +--- + name: Ansible Lint for sap_hana_preconfigure on: diff --git a/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml index a5bdab7d6..283d57de1 100644 --- a/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml @@ -1,3 +1,5 @@ +--- + name: Ansible Lint for sap_netweaver_preconfigure on: diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml new file mode 100644 index 000000000..be5370076 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_general_preconfigure + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_general_preconfigure/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_general_preconfigure/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_general_preconfigure + run: ansible-lint diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 8fe87d0f1..5b276e6af 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -1,4 +1,6 @@ -# Worflow for ansible-lint +--- + +# Workflow for ansible-lint of the collection name: ansible-lint of the collection diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index dd2954a51..58e3ecd7d 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -1,3 +1,5 @@ +--- + # Worflow for ansible-test sanity tests name: ansible-test sanity of the collection diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index f703d057a..e25e28b41 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,3 +1,5 @@ +--- + name: pylint on: # push: diff --git a/.github/workflows/yamllint-sap_general_preconfigure.yml b/.github/workflows/yamllint-sap_general_preconfigure.yml deleted file mode 100644 index 1d74d445e..000000000 --- a/.github/workflows/yamllint-sap_general_preconfigure.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: yamllint-sap_general_preconfigure - -on: - push: - branches: [ main ] - paths: - - 'roles/sap_general_preconfigure/**' - pull_request: - branches: [ main ] - paths: - - 'roles/sap_general_preconfigure/**' - - workflow_dispatch: - -jobs: - # This workflow contains a single job called "build" - yamllint: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Install dependencies - run: pip install yamllint - - # Runs a set of commands using the runners shell - - name: yamllint - run: yamllint ./roles/sap_general_preconfigure diff --git a/.github/workflows/yamllint-sap_hana_install.yml b/.github/workflows/yamllint-sap_hana_install.yml deleted file mode 100644 index afc3e4d4c..000000000 --- a/.github/workflows/yamllint-sap_hana_install.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: yamllint-sap_hana_install - -on: - push: - branches: [ main ] - paths: - - 'roles/sap_hana_install/**' - pull_request: - branches: [ main ] - paths: - - 'roles/sap_hana_install/**' - - workflow_dispatch: - -jobs: - # This workflow contains a single job called "build" - yamllint: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Install dependencies - run: pip install yamllint - - # Runs a set of commands using the runners shell - - name: yamllint - run: yamllint ./roles/sap_hana_install diff --git a/.github/workflows/yamllint-sap_hana_preconfigure.yml b/.github/workflows/yamllint-sap_hana_preconfigure.yml deleted file mode 100644 index 5fd3d0206..000000000 --- a/.github/workflows/yamllint-sap_hana_preconfigure.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: yamllint-sap_hana_preconfigure - -on: - push: - branches: [ main ] - paths: - - 'roles/sap_hana_preconfigure/**' - pull_request: - branches: [ main ] - paths: - - 'roles/sap_hana_preconfigure/**' - - workflow_dispatch: - -jobs: - # This workflow contains a single job called "build" - yamllint: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Install dependencies - run: pip install yamllint - - # Runs a set of commands using the runners shell - - name: yamllint - run: yamllint ./roles/sap_hana_preconfigure diff --git a/.github/workflows/yamllint-sap_netweaver_preconfigure.yml b/.github/workflows/yamllint-sap_netweaver_preconfigure.yml deleted file mode 100644 index fdfc976b2..000000000 --- a/.github/workflows/yamllint-sap_netweaver_preconfigure.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: yamllint-sap_netweaver_preconfigure - -on: - push: - branches: [ main ] - paths: - - 'roles/sap_netweaver_preconfigure/**' - pull_request: - branches: [ main ] - paths: - - 'roles/sap_netweaver_preconfigure/**' - - workflow_dispatch: - -jobs: - # This workflow contains a single job called "build" - yamllint: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Install dependencies - run: pip install yamllint - - # Runs a set of commands using the runners shell - - name: yamllint - run: yamllint ./roles/sap_netweaver_preconfigure diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index cfa83df4d..bfc186536 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -9,6 +9,7 @@ import subprocess # output field delimiter for displaying the results: +# FIELD_DELIMITER = ';' FIELD_DELIMITER = '\t' if len(sys.argv) == 1: From 3d32a9a35520845f12d790c14ea343dbf4a59b72 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 7 Jul 2022 11:42:45 +0200 Subject: [PATCH 048/375] collection: improve GitHub ansible-lint actions --- .../ansible-lint sap_hana_install.yml | 29 -------------- .../ansible-lint sap_hana_preconfigure.yml | 29 -------------- ...nsible-lint sap_netweaver_preconfigure.yml | 29 -------------- .../ansible-lint-sap_ha_install_hana_hsr.yml | 39 +++++++++++++++++++ .../ansible-lint-sap_ha_install_pacemaker.yml | 39 +++++++++++++++++++ .../ansible-lint-sap_ha_prepare_pacemaker.yml | 39 +++++++++++++++++++ .../ansible-lint-sap_ha_set_hana.yml | 39 +++++++++++++++++++ .../ansible-lint-sap_hana_install.yml | 39 +++++++++++++++++++ .../ansible-lint-sap_hana_preconfigure.yml | 39 +++++++++++++++++++ ...nsible-lint-sap_netweaver_preconfigure.yml | 39 +++++++++++++++++++ .github/workflows/pylint.yml | 21 ---------- 11 files changed, 273 insertions(+), 108 deletions(-) delete mode 100644 .github/workflows/ansible-lint sap_hana_install.yml delete mode 100644 .github/workflows/ansible-lint sap_hana_preconfigure.yml delete mode 100644 .github/workflows/ansible-lint sap_netweaver_preconfigure.yml create mode 100644 .github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml create mode 100644 .github/workflows/ansible-lint-sap_ha_install_pacemaker.yml create mode 100644 .github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml create mode 100644 .github/workflows/ansible-lint-sap_ha_set_hana.yml create mode 100644 .github/workflows/ansible-lint-sap_hana_install.yml create mode 100644 .github/workflows/ansible-lint-sap_hana_preconfigure.yml create mode 100644 .github/workflows/ansible-lint-sap_netweaver_preconfigure.yml delete mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/ansible-lint sap_hana_install.yml b/.github/workflows/ansible-lint sap_hana_install.yml deleted file mode 100644 index d4aad1f71..000000000 --- a/.github/workflows/ansible-lint sap_hana_install.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -name: Ansible Lint for sap_hana_install - -on: - push: - paths: - - 'roles/sap_hana_install/**' - pull_request: - paths: - - 'roles/sap_hana_install/**' -jobs: - ansible-lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_hana_install - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/ansible-lint sap_hana_preconfigure.yml b/.github/workflows/ansible-lint sap_hana_preconfigure.yml deleted file mode 100644 index 95ef84e23..000000000 --- a/.github/workflows/ansible-lint sap_hana_preconfigure.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -name: Ansible Lint for sap_hana_preconfigure - -on: - push: - paths: - - 'roles/sap_hana_preconfigure/**' - pull_request: - paths: - - 'roles/sap_hana_preconfigure/**' -jobs: - ansible-lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_hana_preconfigure - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml deleted file mode 100644 index 283d57de1..000000000 --- a/.github/workflows/ansible-lint sap_netweaver_preconfigure.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -name: Ansible Lint for sap_netweaver_preconfigure - -on: - push: - paths: - - 'roles/sap_netweaver_preconfigure/**' - pull_request: - paths: - - 'roles/sap_netweaver_preconfigure/**' -jobs: - ansible-lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_netweaver_preconfigure - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml new file mode 100644 index 000000000..9ff81ad6f --- /dev/null +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_ha_install_hana_hsr + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_ha_install_hana_hsr/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_ha_install_hana_hsr/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_hana_hsr + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml b/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml new file mode 100644 index 000000000..a2e12f62b --- /dev/null +++ b/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_ha_install_pacemaker + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_ha_install_pacemaker/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_ha_install_pacemaker/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_pacemaker + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml b/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml new file mode 100644 index 000000000..5b7c9c613 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_ha_prepare_pacemaker + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_ha_prepare_pacemaker/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_ha_prepare_pacemaker/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_prepare_pacemaker + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_set_hana.yml b/.github/workflows/ansible-lint-sap_ha_set_hana.yml new file mode 100644 index 000000000..bb8431c2a --- /dev/null +++ b/.github/workflows/ansible-lint-sap_ha_set_hana.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_ha_set_hana + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_ha_set_hana/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_ha_set_hana/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_set_hana + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml new file mode 100644 index 000000000..a9b3156b6 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_hana_install + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_hana_install/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_hana_install/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_install + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml new file mode 100644 index 000000000..ac6d78606 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_hana_preconfigure + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_hana_preconfigure/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_hana_preconfigure/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_preconfigure + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml new file mode 100644 index 000000000..0037b5216 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_netweaver_preconfigure + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_netweaver_preconfigure/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_netweaver_preconfigure/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_netweaver_preconfigure + run: ansible-lint diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index e25e28b41..000000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- - -name: pylint -on: -# push: -# branches: [ main ] -# pull_request: -# branches: [ main ] - workflow_dispatch: - -jobs: - pylint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: pip install pylint - - # Runs a set of commands using the runners shell - - name: pylint - run: pylint pylint **/*.py From 75856ee28d5e0f4971f544c71ec90315787b292c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 7 Jul 2022 19:42:29 +0200 Subject: [PATCH 049/375] Ansible host connectivity checks for primary node task delegation --- .../tasks/configure_hsr.yml | 4 +- roles/sap_ha_install_hana_hsr/tasks/main.yml | 58 ++++++++++++++++++- .../tasks/cluster_prepare.yml | 6 +- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 55 ++++++++++++++++++ 4 files changed, 116 insertions(+), 7 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml index 7e4645cc6..f2ce7b718 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml @@ -40,7 +40,7 @@ source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_register --name={{ item.hana_site }} \ - --remoteHost={{ __sap_ha_install_hana_hsr_primary_node }} --remoteInstance={{ sap_ha_install_hana_hsr_instance_number }} \ + --remoteHost={{ __sap_ha_install_hana_hsr_primary_node_name }} --remoteInstance={{ sap_ha_install_hana_hsr_instance_number }} \ --replicationMode={{ sap_ha_install_hana_hsr_rep_mode }} --operationMode={{ sap_ha_install_hana_hsr_oper_mode }} \ --online args: @@ -67,5 +67,5 @@ register: startinstance changed_when: "'StartSystem' in startinstance.stdout" when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node + - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name - ansible_hostname not in __sap_ha_install_hana_hsr_srstate.stdout diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 7651b192d..ecfe73fd1 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -2,6 +2,8 @@ - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: __sap_ha_install_hana_hsr_primary_node: "{{ item.node_name }}" + __sap_ha_install_hana_hsr_primary_node_name: "{{ item.node_name }}" + __sap_ha_install_hana_hsr_primary_node_ip: "{{ item.node_ip }}" when: - item.node_role is defined - item.node_role == 'primary' @@ -13,6 +15,58 @@ - hsr_pki - hsr_register +- name: "SAP HSR - Verify that Ansible can connect to the defined primary node by name" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_name }}" + register: __sap_ha_install_hana_hsr_primary_node_name_check + when: + - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name + ignore_unreachable: true + failed_when: false + changed_when: false + become: false + tags: + - hsr_pki + +# BEGIN of primary node connectivity test block +- block: + + - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" + register: __sap_ha_install_hana_hsr_primary_node_ip_check + ignore_unreachable: true + failed_when: false + changed_when: false + + - name: "SAP HSR - Use IP for tasks that must run on the primary node" + set_fact: + __sap_ha_install_hana_hsr_primary_node: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" + when: + - __sap_ha_install_hana_hsr_primary_node_ip_check.stdout == __sap_ha_install_hana_hsr_primary_node_name + + - name: "SAP HSR - Fail if the primary node cannot be connected to" + ansible.builtin.fail: + msg: | + Aborting due to issues identifying and connecting to the primary node. + It can either not be reached by host name or the connected IP returns + an unmatching hostname. + when: + - __sap_ha_install_hana_hsr_primary_node_ip_check.unreachable is defined or + __sap_ha_install_hana_hsr_primary_node_ip_check.stdout != __sap_ha_install_hana_hsr_primary_node_name + + # block settings + when: + - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined + - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable + become: false + tags: + - hsr_pki +# END of primary node connectivity test block + - name: "SAP HSR - Update /etc/hosts" include_tasks: file: update_etchosts.yml @@ -49,7 +103,7 @@ vars: __sap_ha_install_hana_hsr_secpath: "/usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/security/rsecssfs" when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node + - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name tags: - hsr_pki @@ -62,7 +116,7 @@ become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" tags: hsr_backup when: - - ansible_hostname == __sap_ha_install_hana_hsr_primary_node + - ansible_hostname == __sap_ha_install_hana_hsr_primary_node_name tags: - hsr_backup diff --git a/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml b/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml index a745de6f5..fc8ba15d4 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml @@ -8,11 +8,11 @@ - name: "SAP Prepare Pacemaker - Authenticate primary cluster node" ansible.builtin.shell: | pcs host auth \ - {{ __sap_ha_prepare_pacemaker_primary_node }} \ + {{ ansible_hostname }} \ -u hacluster -p '{{ sap_ha_prepare_pacemaker_hacluster_password }}' register: pcs_host_auth_reg when: - - ansible_hostname == __sap_ha_prepare_pacemaker_primary_node + - ansible_hostname == __sap_ha_prepare_pacemaker_primary_node_name - name: "SAP Prepare Pacemaker - Authenticate secondary cluster node" ansible.builtin.shell: | @@ -21,5 +21,5 @@ -u hacluster -p '{{ sap_ha_prepare_pacemaker_hacluster_password }}' register: pcs_host_auth_reg when: - - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node + - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node }}" diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index 4fd1cf4e2..a3a13a95e 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -2,6 +2,8 @@ - name: "SAP Prepare Pacemaker - Pick up primary node name from definition" ansible.builtin.set_fact: __sap_ha_prepare_pacemaker_primary_node: "{{ item.node_name }}" + __sap_ha_prepare_pacemaker_primary_node_name: "{{ item.node_name }}" + __sap_ha_prepare_pacemaker_primary_node_ip: "{{ item.node_ip }}" when: - item.node_role is defined - item.node_role == 'primary' @@ -14,6 +16,59 @@ - pacemaker - ha +- name: "SAP HSR - Verify that Ansible can connect to the defined primary node by name" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_name }}" + register: __sap_ha_prepare_pacemaker_primary_node_name_check + when: + - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name + ignore_unreachable: true + failed_when: false + changed_when: false + become: false + tags: + - hsr_pki + +# BEGIN of primary node connectivity test block +- block: + + - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" + register: __sap_ha_prepare_pacemaker_primary_node_ip_check + ignore_unreachable: true + failed_when: false + changed_when: false + + - name: "SAP HSR - Use IP for tasks that must run on the primary node" + set_fact: + __sap_ha_prepare_pacemaker_primary_node: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" + when: + - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout == __sap_ha_prepare_pacemaker_primary_node_name + + - name: "SAP HSR - Fail if the primary node cannot be connected to" + ansible.builtin.fail: + msg: | + Aborting due to issues identifying and connecting to the primary node. + It can either not be reached by host name or the connected IP returns + an unmatching hostname. + when: + - __sap_ha_prepare_pacemaker_primary_node_ip_check.unreachable is defined or + __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout != __sap_ha_prepare_pacemaker_primary_node_name + + # block settings + when: + - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name + - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable is defined + - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable + become: false + tags: + - hsr_pki +# END of primary node connectivity test block + + - name: "SAP Prepare Pacemaker - Check if pcs package is installed" shell: | rpm -qa pcs From 83e0c0882cb5d58488305382e107a70dd30633be Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 8 Jul 2022 15:13:08 +0200 Subject: [PATCH 050/375] linter and copy-paste task title fixes --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 54 +++++++++---------- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 48 ++++++++--------- 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index ecfe73fd1..e54516408 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -30,40 +30,40 @@ - hsr_pki # BEGIN of primary node connectivity test block -- block: +- name: "SAP HSR - Check block to verify Ansible access to primary node" + block: + - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" + register: __sap_ha_install_hana_hsr_primary_node_ip_check + ignore_unreachable: true + failed_when: false + changed_when: false - - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" - ansible.builtin.command: | - hostname -s - delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" - register: __sap_ha_install_hana_hsr_primary_node_ip_check - ignore_unreachable: true - failed_when: false - changed_when: false - - - name: "SAP HSR - Use IP for tasks that must run on the primary node" - set_fact: - __sap_ha_install_hana_hsr_primary_node: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" - when: - - __sap_ha_install_hana_hsr_primary_node_ip_check.stdout == __sap_ha_install_hana_hsr_primary_node_name + - name: "SAP HSR - Use IP for tasks that must run on the primary node" + set_fact: + __sap_ha_install_hana_hsr_primary_node: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" + when: + - __sap_ha_install_hana_hsr_primary_node_ip_check.stdout == __sap_ha_install_hana_hsr_primary_node_name - - name: "SAP HSR - Fail if the primary node cannot be connected to" - ansible.builtin.fail: - msg: | - Aborting due to issues identifying and connecting to the primary node. - It can either not be reached by host name or the connected IP returns - an unmatching hostname. - when: - - __sap_ha_install_hana_hsr_primary_node_ip_check.unreachable is defined or - __sap_ha_install_hana_hsr_primary_node_ip_check.stdout != __sap_ha_install_hana_hsr_primary_node_name + - name: "SAP HSR - Fail if the primary node cannot be connected to" + ansible.builtin.fail: + msg: | + Aborting due to issues identifying and connecting to the primary node. + It can either not be reached by host name or the connected IP returns + an unmatching hostname. + when: + - __sap_ha_install_hana_hsr_primary_node_ip_check.unreachable is defined or + __sap_ha_install_hana_hsr_primary_node_ip_check.stdout != __sap_ha_install_hana_hsr_primary_node_name - # block settings + # block settings when: - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined - - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable + - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable become: false - tags: + tags: - hsr_pki # END of primary node connectivity test block diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index a3a13a95e..ca98dbbbc 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -32,33 +32,32 @@ # BEGIN of primary node connectivity test block - block: + - name: "SAP Prepare Pacemaker - Verify that Ansible can connect to the defined primary node by IP" + ansible.builtin.command: | + hostname -s + delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" + register: __sap_ha_prepare_pacemaker_primary_node_ip_check + ignore_unreachable: true + failed_when: false + changed_when: false - - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" - ansible.builtin.command: | - hostname -s - delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" - register: __sap_ha_prepare_pacemaker_primary_node_ip_check - ignore_unreachable: true - failed_when: false - changed_when: false + - name: "SAP Prepare Pacemaker - Use IP for tasks that must run on the primary node" + set_fact: + __sap_ha_prepare_pacemaker_primary_node: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" + when: + - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout == __sap_ha_prepare_pacemaker_primary_node_name - - name: "SAP HSR - Use IP for tasks that must run on the primary node" - set_fact: - __sap_ha_prepare_pacemaker_primary_node: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" - when: - - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout == __sap_ha_prepare_pacemaker_primary_node_name + - name: "SAP Prepare Pacemaker - Fail if the primary node cannot be connected to" + ansible.builtin.fail: + msg: | + Aborting due to issues identifying and connecting to the primary node. + It can either not be reached by host name or the connected IP returns + an unmatching hostname. + when: + - __sap_ha_prepare_pacemaker_primary_node_ip_check.unreachable is defined or + __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout != __sap_ha_prepare_pacemaker_primary_node_name - - name: "SAP HSR - Fail if the primary node cannot be connected to" - ansible.builtin.fail: - msg: | - Aborting due to issues identifying and connecting to the primary node. - It can either not be reached by host name or the connected IP returns - an unmatching hostname. - when: - - __sap_ha_prepare_pacemaker_primary_node_ip_check.unreachable is defined or - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout != __sap_ha_prepare_pacemaker_primary_node_name - - # block settings + # block settings when: - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable is defined @@ -68,7 +67,6 @@ - hsr_pki # END of primary node connectivity test block - - name: "SAP Prepare Pacemaker - Check if pcs package is installed" shell: | rpm -qa pcs From b047e82d2b620634b7862d6b0c5b125c5b8d90a2 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 8 Jul 2022 16:29:25 +0000 Subject: [PATCH 051/375] temporary configuration of ssh keys for direct pki file copy + copy-paste fixes in pacemaker prep --- .../tasks/pki_files.yml | 147 +++++++++++++----- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 6 +- 2 files changed, 111 insertions(+), 42 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index c6fe5ef51..72b1679b4 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -1,42 +1,109 @@ --- # Secondary nodes fetch PKI files from the primary node. -# Use the ansible control node as temporary file storage. -# Avoid dependency on connectivity requirements between the nodes. - -- name: "SAP HSR - Copy PKI files from primary to control node /tmp" - ansible.builtin.fetch: - src: "{{ item }}" - dest: /tmp/ - flat: true - loop: - - "{{ __sap_ha_install_hana_hsr_secpath }}/data/SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" - - "{{ __sap_ha_install_hana_hsr_secpath }}/key/SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" - delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" - register: __sap_ha_install_hana_hsr_fetch_pki - -- name: "SAP HSR - Copy PKI files to /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/security/rsecssfs/" - ansible.builtin.copy: - src: "/tmp/{{ item.file }}" - dest: "{{ item.path }}{{ item.file }}" - owner: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - group: sapsys - mode: "{{ item.mode }}" - loop: - - path: "{{ __sap_ha_install_hana_hsr_secpath }}/data/" - file: "SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" - mode: "0600" - - path: "{{ __sap_ha_install_hana_hsr_secpath }}/key/" - file: "SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" - mode: "0640" - loop_control: - label: "{{ item.path }}{{ item.file }}" - -- name: "SAP HSR - Clean up PKI files from control node /tmp" - ansible.builtin.file: - path: "{{ item }}" - state: absent - loop: - - "/tmp/SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" - - "/tmp/SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" - delegate_to: localhost - become: false +# Setting up temporary direct connection if not yet present +# in order to avoid temporary data storage on the Ansible +# control node. + +- block: + + - name: "SAP HSR - Create .ssh if missing" + file: + path: ~/.ssh + mode: "0700" + state: directory + register: __sap_ha_install_hana_hsr_create_ssh + + - name: "SAP HSR - Read user's public ssh key if present" + shell: | + [ -f ~/.ssh/id_rsa ] && cat ~/.ssh/id_rsa.pub || \ + ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q && \ + cat ~/.ssh/id_rsa.pub + register: __sap_ha_install_hana_hsr_pubkey + changed_when: false + failed_when: false + + - name: "SAP HSR - Create .ssh on primary node if missing" + file: + path: ~/.ssh + state: directory + mode: "0700" + register: __sap_ha_install_hana_hsr_create_ssh_prim + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" + + - name: "SAP HSR - Authorize pub key on primary node" + lineinfile: + backup: yes + create: yes + line: "{{ __sap_ha_install_hana_hsr_pubkey.stdout }}" + mode: "0600" + path: ~/.ssh/authorized_keys + register: __sap_ha_install_hana_hsr_addauth + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" + + - name: "SAP HSR - Copy PKI files from primary node" + ansible.builtin.shell: + rsync -av {{ __sap_ha_install_hana_hsr_primary_node }}:{{ item }} {{ item }} \ + -e "ssh -o StrictHostKeyChecking=no" + loop: + - "{{ __sap_ha_install_hana_hsr_secpath }}/data/SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" + - "{{ __sap_ha_install_hana_hsr_secpath }}/key/SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" + register: __sap_ha_install_hana_hsr_fetch_pki + + - name: "SAP HSR - Update PKI files permissions" + ansible.builtin.file: + path: "{{ item.path }}{{ item.file }}" + owner: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" + group: sapsys + mode: "{{ item.mode }}" + loop: + - path: "{{ __sap_ha_install_hana_hsr_secpath }}/data/" + file: "SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" + mode: "0600" + - path: "{{ __sap_ha_install_hana_hsr_secpath }}/key/" + file: "SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" + mode: "0640" + loop_control: + label: "{{ item.path }}{{ item.file }}" + +# Make sure that we always revert temporary changes, if any were made + always: + + - name: "SAP HSR - Remove .ssh if it was created" + file: + path: ~/.ssh + state: absent + when: + - __sap_ha_install_hana_hsr_create_ssh.changed is defined + - __sap_ha_install_hana_hsr_create_ssh.changed + + - name: "SAP HSR - Primary: Remove authorized_keys file if created" + file: + path: ~/.ssh/authorized_keys + state: absent + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" + when: + - __sap_ha_install_hana_hsr_addauth.backup is defined + - __sap_ha_install_hana_hsr_addauth.backup|length == 0 + + - name: "SAP HSR - Primary: Restore authorized_keys from backup" + copy: + dest: ~/.ssh/authorized_keys + remote_src: true + src: "{{ __sap_ha_install_hana_hsr_addauth.backup }}" + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" + when: + - __sap_ha_install_hana_hsr_addauth.backup is defined + - __sap_ha_install_hana_hsr_addauth.backup|length > 0 + + - name: "SAP HSR - Primary: Remove .ssh if it was created" + file: + path: ~/.ssh + state: absent + when: + - __sap_ha_install_hana_hsr_create_ssh_prim.changed is defined + - __sap_ha_install_hana_hsr_create_ssh_prim.changed + delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" + + become: true + become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" + diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index ca98dbbbc..4d6e3f364 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -28,7 +28,8 @@ changed_when: false become: false tags: - - hsr_pki + - pacemaker + - ha # BEGIN of primary node connectivity test block - block: @@ -64,7 +65,8 @@ - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable become: false tags: - - hsr_pki + - pacemaker + - ha # END of primary node connectivity test block - name: "SAP Prepare Pacemaker - Check if pcs package is installed" From f342ad1576125ca35cea5287de2bb6faed87420d Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 8 Jul 2022 16:32:46 +0000 Subject: [PATCH 052/375] task title for clarity --- roles/sap_ha_install_hana_hsr/tasks/pki_files.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index 72b1679b4..881da7327 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -13,7 +13,7 @@ state: directory register: __sap_ha_install_hana_hsr_create_ssh - - name: "SAP HSR - Read user's public ssh key if present" + - name: "SAP HSR - Read user's public ssh key, create if missing" shell: | [ -f ~/.ssh/id_rsa ] && cat ~/.ssh/id_rsa.pub || \ ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q && \ From c9d8ce404516cdb6d7c03943ed5e15c004d30f21 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Sat, 9 Jul 2022 00:47:43 +0200 Subject: [PATCH 053/375] sap_swpm: ansible-lint cleanup --- .github/workflows/ansible-lint-sap_swpm.yml | 39 ++++ roles/sap_swpm/defaults/main.yml | 2 +- roles/sap_swpm/tasks/post_install.yml | 24 +-- .../sap_swpm/tasks/post_install/firewall.yml | 62 +++--- .../tasks/post_install/update_firewall.yml | 2 +- roles/sap_swpm/tasks/pre_install.yml | 20 +- .../tasks/pre_install/create_os_user.yml | 24 ++- roles/sap_swpm/tasks/pre_install/firewall.yml | 93 +++++---- .../tasks/pre_install/install_type.yml | 24 +-- .../install_type/generic_install.yml | 2 +- .../pre_install/install_type/ha_install.yml | 4 +- .../install_type/restore_install.yml | 2 +- .../install_type/standard_install.yml | 2 +- .../tasks/pre_install/password_facts.yml | 10 +- .../tasks/pre_install/update_etchosts.yml | 44 ++-- .../tasks/pre_install/update_firewall.yml | 2 +- roles/sap_swpm/tasks/swpm.yml | 21 +- .../sap_swpm/tasks/swpm/detect_variables.yml | 44 ++-- .../sap_swpm/tasks/swpm/prepare_software.yml | 196 +++++++++--------- .../swpm/swpm_inifile_generate_advanced.yml | 9 +- ...pm_inifile_generate_advanced_templates.yml | 15 +- .../swpm/swpm_inifile_generate_default.yml | 9 +- ...wpm_inifile_generate_default_templates.yml | 16 +- .../swpm_inifile_generate_inifile_reuse.yml | 12 +- .../sap_swpm/tasks/swpm/swpm_pre_install.yml | 9 +- 25 files changed, 383 insertions(+), 304 deletions(-) create mode 100644 .github/workflows/ansible-lint-sap_swpm.yml diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml new file mode 100644 index 000000000..50325db5b --- /dev/null +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -0,0 +1,39 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_swpm + +on: + push: + branches: + - main + - dev + paths: + - 'roles/sap_swpm/**' + pull_request: + branches: + - main + - dev + paths: + - 'roles/sap_swpm/**' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_swpm + run: ansible-lint diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 67597b6aa..fae7eb77b 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -59,7 +59,7 @@ sap_swpm_inifile_list: ######################################## # SAP product that will be installed and passed as argument to the sapinst installer, example 'NW_ABAP_OneHost:S4HANA2020.CORE.HDB.ABAP' -sap_swpm_product_catalog_id: +sap_swpm_product_catalog_id: # SAPCAR path and file name, only path is mandatory. The script will automatically get file_name sap_swpm_sapcar_path: diff --git a/roles/sap_swpm/tasks/post_install.yml b/roles/sap_swpm/tasks/post_install.yml index 98fe28f31..56746b953 100644 --- a/roles/sap_swpm/tasks/post_install.yml +++ b/roles/sap_swpm/tasks/post_install.yml @@ -1,25 +1,26 @@ --- -- name: SAP SWPM Post Install - Set {{ sap_swpm_sid | lower }}adm to no expire - shell: | - chage -m 0 -M 99999 -I -1 -E -1 {{ sap_swpm_sid | lower }}adm - chage -m 0 -M 99999 -I -1 -E -1 sapadm +# Reason for noqa: The command might change things but we do not yet attempt to find out +- name: SAP SWPM Post Install - Set {{ sap_swpm_sid | lower }}adm to no expire # noqa no-changed-when + ansible.builtin.shell: | + chage -m 0 -M 99999 -I -1 -E -1 {{ sap_swpm_sid | lower }}adm + chage -m 0 -M 99999 -I -1 -E -1 sapadm args: - executable: /bin/bash + executable: /bin/bash become: true register: sap_swpm_post_install_sidadm_noexpire # Firewall - name: SAP SWPM Post Install - Firewall Setup - include_tasks: post_install/firewall.yml - when: + ansible.builtin.include_tasks: post_install/firewall.yml + when: - "sap_swpm_setup_firewall | bool" - -################################################################################################################################################################### + +######################################################################################################################## - name: SAP SWPM Deployment - Finished - debug: + ansible.builtin.debug: msg: - ' SAP SWPM deployment successfully completed ' - ' ' @@ -28,7 +29,6 @@ - ' Primary Instance - {{ sap_swpm_pas_instance_nr }} ' - ' Host - {{ ansible_hostname }} ' - ' FQDN - {{ ansible_fqdn }} ' - - ' IP - {{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }} ' + - ' IP - {{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }} ' - ' Master Password - {{ sap_swpm_master_password }} ' - ' DDIC 000 Password - {{ sap_swpm_ddic_000_password }} ' - diff --git a/roles/sap_swpm/tasks/post_install/firewall.yml b/roles/sap_swpm/tasks/post_install/firewall.yml index 2dd388ba5..48b359e8f 100644 --- a/roles/sap_swpm/tasks/post_install/firewall.yml +++ b/roles/sap_swpm/tasks/post_install/firewall.yml @@ -4,40 +4,42 @@ block: - name: SAP SWPM Post Install - Gathering Firewall Facts - package_facts: + ansible.builtin.package_facts: manager: auto - + - name: SAP SWPM Post Install - Setup Firewall if included in packages block: - - name: SAP SWPM Post Install - Service firewalld state - enable - command: "systemctl enable firewalld" - - - name: SAP SWPM Post Install - Service firewalld state - start - command: "systemctl start firewalld" - - - name: SAP SWPM Post Install - Firewall Setup - set_fact: - sap_nw_firewall_ports: - - "3200-3399" - - "36{{ sap_swpm_pas_instance_nr }}" - - "80{{ sap_swpm_pas_instance_nr }}" - - "443{{ sap_swpm_pas_instance_nr }}" - - "36{{ sap_swpm_ascs_instance_nr }}" - - "80{{ sap_swpm_ascs_instance_nr }}" - - "443{{ sap_swpm_ascs_instance_nr }}" - - "8090" - - "44390" - - - name: SAP SWPM Post Install - Add Ports Based on NR - {{ sap_swpm_pas_instance_nr }} - include_tasks: update_firewall.yml - loop: "{{ sap_nw_firewall_ports }}" - loop_control: - loop_var: passed_port - - - name: SAP SWPM Post Install - Reload Firewall - shell: | - firewall-cmd --reload + - name: SAP SWPM Post Install - Enable and start the firewalld service + ansible.builtin.systemd: + name: firewalld + state: started + enabled: yes + tags: sap_swpm_configure_firewall + + - name: SAP SWPM Post Install - Firewall Setup + ansible.builtin.set_fact: + sap_nw_firewall_ports: + - "3200-3399" + - "36{{ sap_swpm_pas_instance_nr }}" + - "80{{ sap_swpm_pas_instance_nr }}" + - "443{{ sap_swpm_pas_instance_nr }}" + - "36{{ sap_swpm_ascs_instance_nr }}" + - "80{{ sap_swpm_ascs_instance_nr }}" + - "443{{ sap_swpm_ascs_instance_nr }}" + - "8090" + - "44390" + + - name: SAP SWPM Post Install - Add Ports Based on NR - {{ sap_swpm_pas_instance_nr }} + ansible.builtin.include_tasks: update_firewall.yml + loop: "{{ sap_nw_firewall_ports }}" + loop_control: + loop_var: passed_port + +# Reason for noqa: We currently do not determine if reloading the firewall changes anything + - name: SAP SWPM Post Install - Reload Firewall # noqa no-changed-when + ansible.builtin.shell: | + firewall-cmd --reload when: - '"firewalld" in ansible_facts.packages' diff --git a/roles/sap_swpm/tasks/post_install/update_firewall.yml b/roles/sap_swpm/tasks/post_install/update_firewall.yml index 7746b97b9..8172616e7 100644 --- a/roles/sap_swpm/tasks/post_install/update_firewall.yml +++ b/roles/sap_swpm/tasks/post_install/update_firewall.yml @@ -2,7 +2,7 @@ # This task requires the variable passed_port - name: Update Firewall - {{ passed_port }}/tcp - firewalld: + ansible.builtin.firewalld: zone: public port: "{{ passed_port }}/tcp" permanent: yes diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index 9007ba0a5..c90021918 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -5,7 +5,7 @@ ################ - name: SAP SWPM Pre Install - Run Preinstallation Steps - include_tasks: swpm/swpm_pre_install.yml + ansible.builtin.include_tasks: swpm/swpm_pre_install.yml ################ @@ -13,7 +13,7 @@ ################ - name: SAP SWPM Pre Install - Set sapinst command - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_command_inifile: "SAPINST_INPUT_PARAMETERS_URL={{ sap_swpm_tmpdir.path }}/inifile.params" sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank @@ -27,15 +27,15 @@ # Firewall - name: SAP SWPM Pre Install - Firewall Setup - include_tasks: pre_install/firewall.yml - when: + ansible.builtin.include_tasks: pre_install/firewall.yml + when: - "sap_swpm_setup_firewall | bool" # /etc/hosts - name: SAP SWPM Pre Install - Update /etc/hosts - include_tasks: pre_install/update_etchosts.yml - when: + ansible.builtin.include_tasks: pre_install/update_etchosts.yml + when: - "sap_swpm_update_etchosts | bool" ################ @@ -43,8 +43,8 @@ ################ - name: SAP SWPM - Display Software - debug: - msg: + ansible.builtin.debug: + msg: - " SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} " - " SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} " - " IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} " @@ -56,7 +56,7 @@ - " Backup - {{ sap_swpm_backup_location }} " - name: SAP SWPM - Installation Proper - debug: + ansible.builtin.debug: msg: - ' Ready to run SWPM for SAP Software Installation ' - ' ' @@ -66,4 +66,4 @@ - ' ' - ' The installation can take up to 3 hours. Run the following command as root' - ' on {{ ansible_hostname }} to display the installation logs:' - - ' # tail -f $(find /tmp/sapinst_instdir -name sapinst.log)' + - ' # tail -f $(find /tmp/sapinst_instdir -name sapinst.log)' diff --git a/roles/sap_swpm/tasks/pre_install/create_os_user.yml b/roles/sap_swpm/tasks/pre_install/create_os_user.yml index 1b8f13a15..8b6490c37 100644 --- a/roles/sap_swpm/tasks/pre_install/create_os_user.yml +++ b/roles/sap_swpm/tasks/pre_install/create_os_user.yml @@ -2,36 +2,40 @@ - name: SAP SWPM Pre Install - Remove existing {{ sap_swpm_sid | lower }}adm block: - - name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower }}adm - ignore_errors: yes - shell: | + +# Reason for noqa: We currently do not determine if there are processes to be killed + - name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower }}adm # noqa no-changed-when + ansible.builtin.shell: | killall -u {{ sap_swpm_sid | lower }}adm + ignore_errors: yes + - name: SAP SWPM Pre Install - Remove {{ sap_swpm_sid | lower }}adm - user: + ansible.builtin.user: name: '{{ sap_swpm_sid | lower }}adm' state: absent - remove: yes + remove: yes force: yes + - name: SAP SWPM Pre Install - Remove {{ sap_swpm_sid | lower }}adm group - group: + ansible.builtin.group: name: '{{ sap_swpm_sid | lower }}adm' state: absent - name: SAP SWPM Pre Install - Create sapsys group - group: + ansible.builtin.group: name: 'sapsys' gid: '{{ sap_swpm_sapsys_gid }}' state: present - name: SAP SWPM Pre Install - Create {{ sap_swpm_sid | lower }}adm - user: + ansible.builtin.user: name: '{{ sap_swpm_sid | lower }}adm' comment: "SAP User - {{ sap_swpm_sid }}" uid: '{{ sap_swpm_sidadm_uid }}' group: '{{ sap_swpm_sapsys_gid }}' - name: SAP SWPM Pre Install - Create a /usr/sap/{{ sap_swpm_sid }} - file: + ansible.builtin.file: path: /usr/sap/{{ sap_swpm_sid }} state: directory owner: '{{ sap_swpm_sid | lower }}adm' @@ -40,7 +44,7 @@ mode: '0755' # - name: SAP SWPM Pre Install - Purge parameters so it wont populate inifile.params to prevent SWPM from crashing -# set_facts: +# ansible.builtin.set_facts: # sap_swpm_sapadm_uid: "" # sap_swpm_sapsys_gid: "" # sap_swpm_sidadm_uid: "" diff --git a/roles/sap_swpm/tasks/pre_install/firewall.yml b/roles/sap_swpm/tasks/pre_install/firewall.yml index 0557a9ab8..9634b5d5c 100644 --- a/roles/sap_swpm/tasks/pre_install/firewall.yml +++ b/roles/sap_swpm/tasks/pre_install/firewall.yml @@ -4,60 +4,61 @@ block: - name: SAP SWPM Pre Install - Gathering Firewall Facts - package_facts: + ansible.builtin.package_facts: manager: auto - + - name: SAP SWPM Pre Install - Setup Firewall if included in packages block: - - name: SAP SWPM Pre Install - Service firewalld state - enable - command: "systemctl enable firewalld" - - - name: SAP SWPM Pre Install - Service firewalld state - start - command: "systemctl start firewalld" + - name: SAP SWPM Pre Install - Enable and start the firewalld service + ansible.builtin.systemd: + name: firewalld + state: started + enabled: yes + tags: sap_swpm_configure_firewall - - name: SAP SWPM Pre Install - Generate SAP HANA Ports Based on NR - {{ sap_swpm_db_instance_nr }} - set_fact: - sap_hana_firewall_ports: - - "1128" - - "1129" - - "43{{ sap_swpm_db_instance_nr }}" - - "5050" - - "9090" - - "9091" - - "9092" - - "9093" - - "3{{ sap_swpm_db_instance_nr }}00-3{{ sap_swpm_db_instance_nr }}90" - - "30105" - - "30107" - - "30140" - - "4{{ sap_swpm_db_instance_nr }}01" - - "4{{ sap_swpm_db_instance_nr }}02" - - "4{{ sap_swpm_db_instance_nr }}06" - - "4{{ sap_swpm_db_instance_nr }}12" - - "4{{ sap_swpm_db_instance_nr }}14" - - "4{{ sap_swpm_db_instance_nr }}40" - - "5{{ sap_swpm_db_instance_nr }}00" - - "5{{ sap_swpm_db_instance_nr }}13" - - "5{{ sap_swpm_db_instance_nr }}14" - - "51000" - - "64997" - when: - - not sap_swpm_generic | bool + - name: SAP SWPM Pre Install - Generate SAP HANA Ports Based on NR - {{ sap_swpm_db_instance_nr }} + ansible.builtin.set_fact: + sap_hana_firewall_ports: + - "1128" + - "1129" + - "43{{ sap_swpm_db_instance_nr }}" + - "5050" + - "9090" + - "9091" + - "9092" + - "9093" + - "3{{ sap_swpm_db_instance_nr }}00-3{{ sap_swpm_db_instance_nr }}90" + - "30105" + - "30107" + - "30140" + - "4{{ sap_swpm_db_instance_nr }}01" + - "4{{ sap_swpm_db_instance_nr }}02" + - "4{{ sap_swpm_db_instance_nr }}06" + - "4{{ sap_swpm_db_instance_nr }}12" + - "4{{ sap_swpm_db_instance_nr }}14" + - "4{{ sap_swpm_db_instance_nr }}40" + - "5{{ sap_swpm_db_instance_nr }}00" + - "5{{ sap_swpm_db_instance_nr }}13" + - "5{{ sap_swpm_db_instance_nr }}14" + - "51000" + - "64997" + when: + - not sap_swpm_generic | bool - - name: SAP SWPM Pre Install - Add Ports Based on NR - {{ sap_swpm_db_instance_nr }} - include_tasks: update_firewall.yml - loop: "{{ sap_hana_firewall_ports }}" - loop_control: - loop_var: passed_port - when: - - not sap_swpm_generic | bool + - name: SAP SWPM Pre Install - Add Ports Based on NR - {{ sap_swpm_db_instance_nr }} + ansible.builtin.include_tasks: update_firewall.yml + loop: "{{ sap_hana_firewall_ports }}" + loop_control: + loop_var: passed_port + when: + - not sap_swpm_generic | bool +# Reason for noqa: We currently do not determine if reloading the firewall changes anything + - name: SAP SWPM Pre Install - Reload Firewall # noqa no-changed-when + ansible.builtin.shell: | + firewall-cmd --reload - - name: SAP SWPM Pre Install - Reload Firewall - shell: | - firewall-cmd --reload - when: - '"firewalld" in ansible_facts.packages' diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index 36c794ddf..f79d4ce75 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -1,9 +1,9 @@ --- - name: SAP SWPM Pre Install - Determine if Generic Product - set_fact: + ansible.builtin.set_fact: sap_swpm_generic: 'true' - when: + when: - "'Webdispatcher' in sap_swpm_product_catalog_id" # todo: add items for generic SAP products @@ -12,25 +12,25 @@ ################ - name: SAP SWPM Pre Install - Determine Installation Type - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" # Restore from backup - name: SAP SWPM Pre Install - Check if Backup Restore - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "restore" sap_swpm_swpm_installation_header: "Restoring from Backup" - when: + when: - "'.CP' in sap_swpm_product_catalog_id" # Standard - name: SAP SWPM Pre Install - Check if Standard Installation - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "standard" sap_swpm_swpm_installation_header: "Installing" - when: + when: - "not '.ABAPHA' in sap_swpm_product_catalog_id" - "not '.CP' in sap_swpm_product_catalog_id" - "'initial' in sap_swpm_virtual_hostname" @@ -38,20 +38,20 @@ # Generic - name: SAP SWPM Pre Install - Check if Generic SAP Product Installation - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "generic" sap_swpm_swpm_installation_header: "Installing Generic SAP Product" - when: + when: - "not '.CP' in sap_swpm_product_catalog_id" - "sap_swpm_generic | bool" # High Availability - name: SAP SWPM Pre Install - Check if High Availability Installation - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "ha" sap_swpm_swpm_installation_header: "High Availability Installation using virtual hostname" sap_swpm_swpm_command_virtual_hostname: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" - when: + when: - "'.ABAPHA' in sap_swpm_product_catalog_id" - "not 'initial' in sap_swpm_virtual_hostname" - "not sap_swpm_generic | bool" @@ -61,4 +61,4 @@ ################ - name: SAP SWPM Pre Install - Run Installation Type Steps - include_tasks: "install_type/{{ sap_swpm_swpm_installation_type }}_install.yml" + ansible.builtin.include_tasks: "install_type/{{ sap_swpm_swpm_installation_type }}_install.yml" diff --git a/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml index 24796ad13..10dabbfbe 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml @@ -3,7 +3,7 @@ # Generic Install - name: SAP SWPM Pre Install - Generic Install - set_fact: + ansible.builtin.set_fact: sap_swpm_sum_prepare: 'true' sap_swpm_sum_start: 'true' sap_swpm_spam_update: 'false' diff --git a/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml index e1d587078..d1d99fef6 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml @@ -3,11 +3,11 @@ # High Availability Install - name: SAP SWPM Pre Install - HA Installation - Add virtual hostname in sapinst command - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_command_virtual_hostname: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" # Create sidadm and sapsys when HA setup - name: SAP SWPM Pre Install - HA Installation - Create User when ASCS (initial HA setup) - include_tasks: ../create_os_user.yml + ansible.builtin.include_tasks: ../create_os_user.yml when: - "'_ASCS' in sap_swpm_product_catalog_id" diff --git a/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml index 74d878ca3..81d9e151c 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml @@ -3,7 +3,7 @@ # Backup Restore - name: SAP SWPM Pre Install - Check availability backup location - {{ sap_swpm_backup_location }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_backup_location }}" register: sap_swpm_backup_location_stat failed_when: not sap_swpm_backup_location_stat.stat.exists and '.CP' in sap_swpm_product_catalog_id diff --git a/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml index 00d938c26..d1b1d9335 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml @@ -3,7 +3,7 @@ # Standard Install - name: SAP SWPM Pre Install - Standard Install - set_fact: + ansible.builtin.set_fact: sap_swpm_sum_prepare: 'true' sap_swpm_sum_start: 'true' sap_swpm_spam_update: 'false' diff --git a/roles/sap_swpm/tasks/pre_install/password_facts.yml b/roles/sap_swpm/tasks/pre_install/password_facts.yml index b3a1294bf..aa74a597e 100644 --- a/roles/sap_swpm/tasks/pre_install/password_facts.yml +++ b/roles/sap_swpm/tasks/pre_install/password_facts.yml @@ -1,21 +1,21 @@ --- - name: SAP SWPM Pre Install - Set password facts when ABAP - set_fact: + ansible.builtin.set_fact: sap_swpm_db_schema: "{{ sap_swpm_db_schema_abap }}" sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_abap_password }}" - when: + when: - "'ABAP' in sap_swpm_product_catalog_id" - name: SAP SWPM Pre Install - Set password facts when Java - set_fact: + ansible.builtin.set_fact: sap_swpm_db_schema: "{{ sap_swpm_db_schema_java }}" sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}" - when: + when: - "'Java' in sap_swpm_product_catalog_id" - name: SAP SWPM Pre Install - Set other user passwords using master password - set_fact: + ansible.builtin.set_fact: sap_swpm_sapadm_password: "{{ sap_swpm_master_password }}" sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password }}" sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password }}" diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 4a3e6a9cf..9f9ccc78c 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -6,18 +6,20 @@ block: - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts - lineinfile: + ansible.builtin.lineinfile: path: /etc/hosts create: false - regexp: (?i)^\s*{{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }}\s+ + regexp: (?i)^\s*{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\s+ state: absent - - name: SAP SWPM Pre Install - Update /etc/hosts with NW entry - lineinfile: +# Reason for noqa: 1. Tabs can increase readability; +# 2. Tabs are allowed for /etc/hosts + - name: SAP SWPM Pre Install - Update /etc/hosts with NW entry # noqa no-tabs + ansible.builtin.lineinfile: path: /etc/hosts - line: "{{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" - - when: + line: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" + + when: - "sap_swpm_fqdn is defined" # Update etc hosts for HANA @@ -25,19 +27,21 @@ - name: SAP SWPM Pre Install - Update etc hosts for HANA block: - - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts - lineinfile: - path: /etc/hosts - create: false - regexp: (?i)^\s*{{ sap_swpm_db_ip }}\s+ - state: absent - - - name: SAP SWPM Pre Install - Update /etc/hosts with HANA entry - lineinfile: - path: /etc/hosts - line: "{{ sap_swpm_db_ip }}\t{{ sap_swpm_db_host }}.{{ sap_swpm_fqdn }}\t{{ sap_swpm_db_host }}" - - when: + - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts + ansible.builtin.lineinfile: + path: /etc/hosts + create: false + regexp: (?i)^\s*{{ sap_swpm_db_ip }}\s+ + state: absent + +# Reason for noqa: 1. Tabs can increase readability; +# 2. Tabs are allowed for /etc/hosts + - name: SAP SWPM Pre Install - Update /etc/hosts with HANA entry # noqa no-tabs + ansible.builtin.lineinfile: + path: /etc/hosts + line: "{{ sap_swpm_db_ip }}\t{{ sap_swpm_db_host }}.{{ sap_swpm_fqdn }}\t{{ sap_swpm_db_host }}" + + when: - "sap_swpm_db_ip is defined" - "sap_swpm_db_host is defined" - "sap_swpm_db_host != ansible_hostname" diff --git a/roles/sap_swpm/tasks/pre_install/update_firewall.yml b/roles/sap_swpm/tasks/pre_install/update_firewall.yml index 7746b97b9..8172616e7 100644 --- a/roles/sap_swpm/tasks/pre_install/update_firewall.yml +++ b/roles/sap_swpm/tasks/pre_install/update_firewall.yml @@ -2,7 +2,7 @@ # This task requires the variable passed_port - name: Update Firewall - {{ passed_port }}/tcp - firewalld: + ansible.builtin.firewalld: zone: public port: "{{ passed_port }}/tcp" permanent: yes diff --git a/roles/sap_swpm/tasks/swpm.yml b/roles/sap_swpm/tasks/swpm.yml index c3eb7dc8a..bb21d4082 100644 --- a/roles/sap_swpm/tasks/swpm.yml +++ b/roles/sap_swpm/tasks/swpm.yml @@ -23,8 +23,8 @@ - name: Install Python devel and gcc to system Python ansible.builtin.package: name: - - python3-devel - - gcc + - python3-devel + - gcc state: present # Required for Ansible Module pids @@ -35,8 +35,9 @@ # executable: pip3.6 # Execute SAP SWPM -- name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} - command: >- +# Reason for noqa: This command installs software, so it will change things +- name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when + ansible.builtin.command: >- ./sapinst \ {{ sap_swpm_swpm_command_inifile }} \ {{ sap_swpm_swpm_command_product_id }} \ @@ -59,7 +60,7 @@ delay: 60 - name: SAP SWPM - Verify if sapinst process finished successfully - async_status: + ansible.builtin.async_status: jid: "{{ sap_swpm_async_job.ansible_job_id }}" register: sap_swpm_stdout_register failed_when: sap_swpm_stdout_register.finished != 1 or sap_swpm_stdout_register.rc != 0 @@ -76,20 +77,22 @@ # msg: "{{ sap_swpm_stdout_register.stdout_lines }}" - name: SAP SWPM - Find last installation location - command: cat /tmp/sapinst_instdir/.lastInstallationLocation + ansible.builtin.command: cat /tmp/sapinst_instdir/.lastInstallationLocation register: swpm_last_install_path + changed_when: false - name: SAP SWPM - Verify if SWPM success file exists - stat: + ansible.builtin.stat: path: "{{ swpm_last_install_path.stdout }}/installationSuccesfullyFinished.dat" register: swpm_success_file failed_when: swpm_success_file.stat.exists == false # Equivalent to running: cat $(cat /tmp/sapinst_instdir/.lastInstallationLocation)/installationSuccesfullyFinished.dat - name: SAP SWPM - Get success file - command: "cat {{ swpm_last_install_path.stdout }}/installationSuccesfullyFinished.dat" + ansible.builtin.command: "cat {{ swpm_last_install_path.stdout }}/installationSuccesfullyFinished.dat" register: swpm_success_file_contents + changed_when: false - name: SAP SWPM - Display installation finished from success file - debug: + ansible.builtin.debug: msg: "{{ swpm_success_file_contents.stdout_lines }}" diff --git a/roles/sap_swpm/tasks/swpm/detect_variables.yml b/roles/sap_swpm/tasks/swpm/detect_variables.yml index 136527bac..a73931037 100644 --- a/roles/sap_swpm/tasks/swpm/detect_variables.yml +++ b/roles/sap_swpm/tasks/swpm/detect_variables.yml @@ -2,56 +2,68 @@ # Detect Product ID - name: SAP SWPM - Detect Product ID - shell: | - sed -n '3p' {{ sap_swpm_tmpdir.path }}/inifile.params | awk 'NF{print $(NF-1)}' | tr -d \' + ansible.builtin.shell: | + set -o pipefail && sed -n '3p' {{ sap_swpm_tmpdir.path }}/inifile.params | awk 'NF{print $(NF-1)}' | tr -d \' register: sap_swpm_inifile_product_id_detect + changed_when: false # Set fact for product id -- set_fact: +- name: Set SAP product ID + ansible.builtin.set_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_inifile_product_id_detect.stdout }}" -- debug: +- name: Display SAP product ID + ansible.builtin.debug: msg: - "Product ID is {{ sap_swpm_product_catalog_id }}" # Detect Software Path - name: SAP SWPM - Detect Software Path - shell: | - cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep archives.downloadBasket | awk '{ print $3 }' + ansible.builtin.shell: | + set -o pipefail && cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep archives.downloadBasket | awk '{ print $3 }' register: sap_swpm_inifile_software_path + changed_when: false # Set fact for software path -- set_fact: +- name: Set Software Path + ansible.builtin.set_fact: sap_swpm_software_path: "{{ sap_swpm_inifile_software_path.stdout }}" -- debug: +- name: Display SAP SID + ansible.builtin.debug: msg: - "Software path is {{ sap_swpm_software_path }}" # Detect SID - name: SAP SWPM - Detect SID - shell: | - cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep NW_GetSidNoProfiles.sid | awk '{ print $3 }' + ansible.builtin.shell: | + set -o pipefail && cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep NW_GetSidNoProfiles.sid | awk '{ print $3 }' register: sap_swpm_inifile_sid + changed_when: false # Set fact for SID -- set_fact: +- name: Set SID + ansible.builtin.set_fact: sap_swpm_sid: "{{ sap_swpm_inifile_sid.stdout }}" -- debug: +- name: Display SAP SID + ansible.builtin.debug: msg: - "SAP SID {{ sap_swpm_sid }}" # Detect FQDN - name: SAP SWPM - Detect FQDN - shell: | - cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep NW_getFQDN.FQDN | awk '{ print $3 }' + ansible.builtin.shell: | + set -o pipefail && cat {{ sap_swpm_tmpdir.path }}/inifile.params | grep NW_getFQDN.FQDN | awk '{ print $3 }' register: sap_swpm_inifile_fqdn + changed_when: false # Set fact for FQDN -- set_fact: +- name: Set FQDN + ansible.builtin.set_fact: sap_swpm_fqdn: "{{ sap_swpm_inifile_fqdn.stdout }}" -- debug: +- name: Display FQDN + ansible.builtin.debug: msg: - "SAP fqdn {{ sap_swpm_fqdn }}" diff --git a/roles/sap_swpm/tasks/swpm/prepare_software.yml b/roles/sap_swpm/tasks/swpm/prepare_software.yml index a1324cb34..467fd0519 100644 --- a/roles/sap_swpm/tasks/swpm/prepare_software.yml +++ b/roles/sap_swpm/tasks/swpm/prepare_software.yml @@ -7,7 +7,7 @@ # Software Path - name: SAP SWPM Pre Install - Check availability of software path - {{ sap_swpm_software_path }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_software_path }}" register: sap_swpm_software_path_stat failed_when: not sap_swpm_software_path_stat.stat.exists @@ -50,7 +50,7 @@ # SAPCAR Path - name: SAP SWPM Pre Install - Check availability of SAPCAR path - {{ sap_swpm_sapcar_path }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_sapcar_path }}" register: sap_swpm_sapcar_path_stat failed_when: not sap_swpm_sapcar_path_stat.stat.exists @@ -67,7 +67,7 @@ # SWPM Path - name: SAP SWPM Pre Install - Check availability of SWPM path - {{ sap_swpm_swpm_path }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_swpm_path }}" register: sap_swpm_swpm_path_stat failed_when: not sap_swpm_swpm_path_stat.stat.exists @@ -89,18 +89,19 @@ # 1. SAPCAR - name: SAP SWPM Pre Install - Get SAPCAR from {{ sap_swpm_sapcar_path }} - shell: | + ansible.builtin.shell: | ls SAPCAR*.EXE args: chdir: "{{ sap_swpm_sapcar_path }}" register: sap_swpm_sapcar_file_name_get + changed_when: false - name: SAP SWPM Pre Install - Set fact for SAPCAR - set_fact: + ansible.builtin.set_fact: sap_swpm_sapcar_file_name: "{{ sap_swpm_sapcar_file_name_get.stdout }}" - name: SAP SWPM Pre Install - Check availability of SAPCAR - {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }}" register: sap_swpm_sapcar_file_name_stat failed_when: not sap_swpm_sapcar_file_name_stat.stat.exists @@ -108,18 +109,19 @@ # 2. SWPM - name: SAP SWPM Pre Install - Get SWPM from {{ sap_swpm_swpm_path }} - shell: | + ansible.builtin.shell: | ls SWPM*.SAR args: chdir: "{{ sap_swpm_swpm_path }}" register: sap_swpm_swpm_sar_file_name_get + changed_when: false - name: SAP SWPM Pre Install - Set fact for SWPM - set_fact: + ansible.builtin.set_fact: sap_swpm_swpm_sar_file_name: "{{ sap_swpm_swpm_sar_file_name_get.stdout }}" - name: SAP SWPM Pre Install - Check availability of SWPM - {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} - stat: + ansible.builtin.stat: path: "{{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }}" register: sap_swpm_swpm_sar_file_name_stat failed_when: not sap_swpm_swpm_sar_file_name_stat.stat.exists @@ -129,84 +131,87 @@ # 3. IGS - - name: SAP SWPM Pre Install - Get IGS from software path - shell: | - ls igsexe*.sar - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_igs_file_name_get - - - name: SAP SWPM Pre Install - Set fact for IGS - set_fact: - sap_swpm_igs_path: "{{ sap_swpm_software_path }}" - sap_swpm_igs_file_name: "{{ sap_swpm_igs_file_name_get.stdout }}" - - - name: SAP SWPM Pre Install - Check availability of IGS - {{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }} - stat: - path: "{{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }}" - register: sap_swpm_igs_file_name_stat - failed_when: not sap_swpm_igs_file_name_stat.stat.exists + - name: SAP SWPM Pre Install - Get IGS from software path + ansible.builtin.shell: | + ls igsexe*.sar + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_igs_file_name_get + changed_when: false + + - name: SAP SWPM Pre Install - Set fact for IGS + ansible.builtin.set_fact: + sap_swpm_igs_path: "{{ sap_swpm_software_path }}" + sap_swpm_igs_file_name: "{{ sap_swpm_igs_file_name_get.stdout }}" + + - name: SAP SWPM Pre Install - Check availability of IGS - {{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }} + ansible.builtin.stat: + path: "{{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }}" + register: sap_swpm_igs_file_name_stat + failed_when: not sap_swpm_igs_file_name_stat.stat.exists # 4. IGS Helper - - name: SAP SWPM Pre Install - Get IGS Helper from software path - shell: | - ls igshelper*.sar - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_igs_helper_file_name_get - - - name: SAP SWPM Pre Install - Set fact for IGS - set_fact: - sap_swpm_igs_helper_path: "{{ sap_swpm_software_path }}" - sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}" - - - name: SAP SWPM Pre Install - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} - stat: - path: "{{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }}" - register: sap_swpm_igs_helper_file_name_stat - failed_when: not sap_swpm_igs_helper_file_name_stat.stat.exists + - name: SAP SWPM Pre Install - Get IGS Helper from software path + ansible.builtin.shell: | + ls igshelper*.sar + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_igs_helper_file_name_get + changed_when: false + + - name: SAP SWPM Pre Install - Set fact for IGS + ansible.builtin.set_fact: + sap_swpm_igs_helper_path: "{{ sap_swpm_software_path }}" + sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}" + + - name: SAP SWPM Pre Install - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} + ansible.builtin.stat: + path: "{{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }}" + register: sap_swpm_igs_helper_file_name_stat + failed_when: not sap_swpm_igs_helper_file_name_stat.stat.exists # 5. SAPEXEDB - - name: SAP SWPM Pre Install - Get SAPEXEDB from software path - shell: | - ls SAPEXEDB_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_kernel_dependent_file_name_get - - - name: SAP SWPM Pre Install - Set fact for SAPEXEDB - set_fact: - sap_swpm_kernel_dependent_path: "{{ sap_swpm_software_path }}" - sap_swpm_kernel_dependent_file_name: "{{ sap_swpm_kernel_dependent_file_name_get.stdout }}" - - - name: SAP SWPM Pre Install - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} - stat: - path: "{{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }}" - register: sap_swpm_kernel_dependent_file_name_stat - failed_when: not sap_swpm_kernel_dependent_file_name_stat.stat.exists + - name: SAP SWPM Pre Install - Get SAPEXEDB from software path + ansible.builtin.shell: | + ls SAPEXEDB_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_kernel_dependent_file_name_get + changed_when: false + + - name: SAP SWPM Pre Install - Set fact for SAPEXEDB + ansible.builtin.set_fact: + sap_swpm_kernel_dependent_path: "{{ sap_swpm_software_path }}" + sap_swpm_kernel_dependent_file_name: "{{ sap_swpm_kernel_dependent_file_name_get.stdout }}" + + - name: SAP SWPM Pre Install - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} + ansible.builtin.stat: + path: "{{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }}" + register: sap_swpm_kernel_dependent_file_name_stat + failed_when: not sap_swpm_kernel_dependent_file_name_stat.stat.exists # 6. SAPEXE - - name: SAP SWPM Pre Install - Get SAPEXE from software path - shell: | - ls SAPEXE_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_kernel_independent_file_name_get - - - name: SAP SWPM Pre Install - Set fact for SAPEXE - set_fact: - sap_swpm_kernel_independent_path: "{{ sap_swpm_software_path }}" - sap_swpm_kernel_independent_file_name: "{{ sap_swpm_kernel_independent_file_name_get.stdout }}" - - - name: SAP SWPM Pre Install - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} - stat: - path: "{{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }}" - register: sap_swpm_kernel_independent_file_name_stat - failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists - + - name: SAP SWPM Pre Install - Get SAPEXE from software path + ansible.builtin.shell: | + ls SAPEXE_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_kernel_independent_file_name_get + changed_when: false + + - name: SAP SWPM Pre Install - Set fact for SAPEXE + ansible.builtin.set_fact: + sap_swpm_kernel_independent_path: "{{ sap_swpm_software_path }}" + sap_swpm_kernel_independent_file_name: "{{ sap_swpm_kernel_independent_file_name_get.stdout }}" + + - name: SAP SWPM Pre Install - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} + ansible.builtin.stat: + path: "{{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }}" + register: sap_swpm_kernel_independent_file_name_stat + failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists when: - not sap_swpm_generic | bool @@ -216,23 +221,24 @@ # 7. Web Dispatcher - - name: SAP SWPM Pre Install - Get WEBDISP from software path - shell: | - ls SAPWEBDISP_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_web_dispatcher_file_name_get - - - name: SAP SWPM Pre Install - Set fact for WEBDISP - set_fact: - sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}" - sap_swpm_web_dispatcher_file_name: "{{ sap_swpm_web_dispatcher_file_name_get.stdout }}" - - - name: SAP SWPM Pre Install - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} - stat: - path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" - register: sap_swpm_web_dispatcher_file_name_stat - failed_when: not sap_swpm_web_dispatcher_file_name_stat.stat.exists + - name: SAP SWPM Pre Install - Get WEBDISP from software path + ansible.builtin.shell: | + ls SAPWEBDISP_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_web_dispatcher_file_name_get + changed_when: false + + - name: SAP SWPM Pre Install - Set fact for WEBDISP + ansible.builtin.set_fact: + sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}" + sap_swpm_web_dispatcher_file_name: "{{ sap_swpm_web_dispatcher_file_name_get.stdout }}" + + - name: SAP SWPM Pre Install - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} + ansible.builtin.stat: + path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" + register: sap_swpm_web_dispatcher_file_name_stat + failed_when: not sap_swpm_web_dispatcher_file_name_stat.stat.exists when: - "'Webdispatcher' in sap_swpm_product_catalog_id" diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml index bbbdc4723..c270fd38b 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml @@ -2,12 +2,13 @@ # Remove Existing inifile.params - name: SAP SWPM advanced mode - Create inifile.params - file: + ansible.builtin.file: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: touch + mode: '0640' - name: SAP SWPM advanced mode - Loop over the dictionary and output to file - lineinfile: + ansible.builtin.lineinfile: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: present line: "{{ item.key }} = {{ item.value }}" @@ -18,8 +19,8 @@ # Detect variables from generated inifile - name: SAP SWPM advanced mode - Detect Variables - include_tasks: detect_variables.yml + ansible.builtin.include_tasks: detect_variables.yml # Prepare Software - name: SAP SWPM advanced mode - Prepare Software - include_tasks: prepare_software.yml + ansible.builtin.include_tasks: prepare_software.yml diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml index 8a2bcfcb8..ea14a67af 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml @@ -1,24 +1,25 @@ --- # Set facts based on the install dictionary -- set_fact: +- name: SAP SWPM advanced_templates mode - Set product_catalog_id + ansible.builtin.et_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" - name: SAP SWPM advanced_templates mode - Create temporary directory - tempfile: + ansible.builtin.tempfile: state: directory suffix: swpmconfig register: sap_swpm_tmpdir # Remove Existing inifile.params - name: SAP SWPM advanced_templates mode - Ensure inifile.params - file: + ansible.builtin.file: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: touch - + mode: '0640' - name: SAP SWPM advanced_templates mode - Loop over the dictionary and output to file - lineinfile: + ansible.builtin.lineinfile: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: present insertafter: EOF @@ -30,11 +31,11 @@ # Detect variables from generated inifile - name: SAP SWPM advanced_templates mode - Detect Variables - include_tasks: detect_variables.yml + ansible.builtin.include_tasks: detect_variables.yml # Prepare Software - name: SAP SWPM advanced_templates mode - Prepare Software - include_tasks: prepare_software.yml + ansible.builtin.include_tasks: prepare_software.yml # ALT: Generate complete inifile.params with all parameters from control.xml, for every SAP software product diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml index 0ad6f7a0b..14b5ce98c 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml @@ -2,19 +2,20 @@ # Determine Installation Type - name: SAP SWPM default mode - Determine Installation Type - include_tasks: "../pre_install/install_type.yml" + ansible.builtin.include_tasks: "../pre_install/install_type.yml" # Password Facts - name: SAP SWPM default mode - Password Facts - include_tasks: ../pre_install/password_facts.yml + ansible.builtin.include_tasks: ../pre_install/password_facts.yml # Prepare Software - name: SAP SWPM default mode - Prepare Software - include_tasks: prepare_software.yml + ansible.builtin.include_tasks: prepare_software.yml # Process SWPM Configfile Template - name: SAP SWPM default mode - Process SWPM Configfile Template - template: + ansible.builtin.template: src: "{{ role_path }}/templates/configfile.j2" dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" + mode: '0640' register: sap_swpm_cftemplate diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml index e8499c5a7..4f8a05054 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml @@ -1,31 +1,33 @@ --- # Set facts based on the install dictionary -- set_fact: +- name: SAP SWPM default_templates mode - Set product_catalog_id and inifile_list + ansible.builtin.set_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" sap_swpm_inifile_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] }}" -- name: If not already defined, use the default variable for the template (i.e. does not overwrite due to variable precedence) - set_fact: +- name: SAP SWPM default_templates mode - If not already defined, use the default variable for the template + ansible.builtin.set_fact: "{{ item.key }}": "{{ item.value }}" with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_dictionary'] }}" # Determine Installation Type - name: SAP SWPM default_templates mode - Determine Installation Type - include_tasks: "../pre_install/install_type.yml" + ansible.builtin.include_tasks: "../pre_install/install_type.yml" # Password Facts - name: SAP SWPM default_templates mode - Password Facts - include_tasks: ../pre_install/password_facts.yml + ansible.builtin.include_tasks: ../pre_install/password_facts.yml # Prepare Software - name: SAP SWPM default_templates mode - Prepare Software - include_tasks: prepare_software.yml + ansible.builtin.include_tasks: prepare_software.yml # Process SWPM Configfile Template - name: SAP SWPM default_templates mode - Process SWPM Configfile Template - template: + ansible.builtin.template: src: "{{ role_path }}/templates/configfile.j2" dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" + mode: '0640' register: sap_swpm_cftemplate diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml index 4b7b70aaf..25de97159 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml @@ -2,25 +2,27 @@ # Copy reused inifile - name: SAP SWPM inifile_reuse mode - Copy reused inifile - copy: + ansible.builtin.copy: src: "{{ sap_swpm_inifile_reuse_source }}" dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" + mode: '0640' # Check inifile for des25 - name: SAP SWPM inifile_reuse mode - Check inifile for des25 - shell: cat "{{ sap_swpm_tmpdir.path }}/inifile.params" | grep des25 | wc -l + ansible.builtin.shell: set -o pipefail && cat "{{ sap_swpm_tmpdir.path }}/inifile.params" | grep des25 | wc -l register: sap_swpm_inifile_read_file + changed_when: false # Check if inifile is reusable - name: SAP SWPM inifile_reuse mode - Check if inifile is reusable - fail: + ansible.builtin.fail: msg: "{{ sap_swpm_inifile_reuse_source }} is not reusable" when: sap_swpm_inifile_read_file.stdout != '0' # Detect variables from generated inifile - name: SAP SWPM inifile_reuse mode - Detect Variables - include_tasks: detect_variables.yml + ansible.builtin.include_tasks: detect_variables.yml # Prepare Software - name: SAP SWPM inifile_reuse mode - Prepare Software - include_tasks: prepare_software.yml + ansible.builtin.include_tasks: prepare_software.yml diff --git a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml index 9606e7bb5..d8114ca1d 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml @@ -2,17 +2,18 @@ # Create temporary directory - name: SAP SWPM Pre Install - Create temporary directory - tempfile: + ansible.builtin.tempfile: state: directory suffix: swpmconfig register: sap_swpm_tmpdir # Copy password file to the same location as inifile.params - name: SAP SWPM Pre Install - Copy password file to the same location as inifile.params - copy: + ansible.builtin.copy: src: "{{ sap_swpm_password_file_path }}/instkey.pkey" dest: "{{ sap_swpm_tmpdir.path }}/instkey.pkey" remote_src: yes + mode: '0640' when: sap_swpm_use_password_file == "y" # Run SWPM inifile generation based on ansible role mode @@ -20,12 +21,12 @@ # Set fact for SWPM path - name: SAP SWPM Pre Install - Set fact for SWPM path - set_fact: + ansible.builtin.set_fact: sap_swpm_sapinst_path: "{{ sap_swpm_sapcar_path }}" # Extract SWPM - name: SAP SWPM Pre Install - Extract SWPM - command: >- + ansible.builtin.command: >- {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} \ -xvf {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} \ -manifest SIGNATURE.SMF From 5817e014031deeac5c23314822f78b5ae540c027 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 11 Jul 2022 15:30:00 +0200 Subject: [PATCH 054/375] temp custom ssh-key fix and cleanup --- .../tasks/pki_files.yml | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index 881da7327..73d20ba48 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -13,11 +13,12 @@ state: directory register: __sap_ha_install_hana_hsr_create_ssh - - name: "SAP HSR - Read user's public ssh key, create if missing" + - name: "SAP HSR - Create a temporary ssh-key" shell: | - [ -f ~/.ssh/id_rsa ] && cat ~/.ssh/id_rsa.pub || \ - ssh-keygen -t rsa -f ~/.ssh/id_rsa -N "" -q && \ - cat ~/.ssh/id_rsa.pub + [ -f ~/.ssh/hsr_temp ] && [ -f ~/.ssh/hsr_temp.pub ] && \ + cat ~/.ssh/hsr_temp.pub || \ + (ssh-keygen -t rsa -f ~/.ssh/hsr_temp -N "" -q && \ + cat ~/.ssh/hsr_temp.pub) register: __sap_ha_install_hana_hsr_pubkey changed_when: false failed_when: false @@ -43,7 +44,7 @@ - name: "SAP HSR - Copy PKI files from primary node" ansible.builtin.shell: rsync -av {{ __sap_ha_install_hana_hsr_primary_node }}:{{ item }} {{ item }} \ - -e "ssh -o StrictHostKeyChecking=no" + -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/hsr_temp" loop: - "{{ __sap_ha_install_hana_hsr_secpath }}/data/SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" - "{{ __sap_ha_install_hana_hsr_secpath }}/key/SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" @@ -68,6 +69,17 @@ # Make sure that we always revert temporary changes, if any were made always: + - name: "SAP HSR - Remove ~/.ssh/hsr_temp* if it was created" + file: + path: "{{ item }}" + state: absent + loop: + - ~/.ssh/hsr_temp + - ~/.ssh/hsr_temp.pub + when: + - __sap_ha_install_hana_hsr_pubkey.changed is defined + - __sap_ha_install_hana_hsr_pubkey.changed + - name: "SAP HSR - Remove .ssh if it was created" file: path: ~/.ssh From 420c4da982241a165e3323b380c0325df0d3c71a Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 11 Jul 2022 13:43:02 +0000 Subject: [PATCH 055/375] allow changed_when --- roles/sap_ha_install_hana_hsr/tasks/pki_files.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index 73d20ba48..e22dc1750 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -20,7 +20,6 @@ (ssh-keygen -t rsa -f ~/.ssh/hsr_temp -N "" -q && \ cat ~/.ssh/hsr_temp.pub) register: __sap_ha_install_hana_hsr_pubkey - changed_when: false failed_when: false - name: "SAP HSR - Create .ssh on primary node if missing" From 29b37456211c8bf825547f614652f24cf324860a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 12 Jul 2022 10:00:46 +0200 Subject: [PATCH 056/375] sap_general_preconfigure: Solve issue #173 This makes the role Ansible 2.13 compliant. --- .../tasks/RedHat/assert-installation.yml | 14 +++++++------- .../tasks/RedHat/installation.yml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index 8e438960d..f9b6f520f 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -21,10 +21,10 @@ - name: Assert - Set final list of repos, non-s390x, auto ansible.builtin.set_fact: __sap_general_preconfigure_req_repos: - "{{ __sap_general_preconfigure_req_os_repos | list }} + - {{ __sap_general_preconfigure_req_netweaver_repos | list }} + - {{ __sap_general_preconfigure_req_hana_repos | list }} + - {{ __sap_general_preconfigure_req_ha_repos | list }}" + "{{ __sap_general_preconfigure_req_os_repos | list + + __sap_general_preconfigure_req_netweaver_repos | list + + __sap_general_preconfigure_req_hana_repos | list + + __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - ansible_architecture != 's390x' @@ -32,9 +32,9 @@ - name: Assert - Set final list of repos, s390x, auto ansible.builtin.set_fact: __sap_general_preconfigure_req_repos: - "{{ __sap_general_preconfigure_req_os_repos | list }} + - {{ __sap_general_preconfigure_req_netweaver_repos | list }} + - {{ __sap_general_preconfigure_req_ha_repos | list }}" + "{{ __sap_general_preconfigure_req_os_repos | list + + __sap_general_preconfigure_req_netweaver_repos | list + + __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - ansible_architecture == 's390x' diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 856422ff9..79757d999 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -21,10 +21,10 @@ - name: Set final list of repos, non-s390x, auto ansible.builtin.set_fact: __sap_general_preconfigure_req_repos: - "{{ __sap_general_preconfigure_req_os_repos | list }} + - {{ __sap_general_preconfigure_req_netweaver_repos | list }} + - {{ __sap_general_preconfigure_req_hana_repos | list }} + - {{ __sap_general_preconfigure_req_ha_repos | list }}" + "{{ __sap_general_preconfigure_req_os_repos | list + + __sap_general_preconfigure_req_netweaver_repos | list + + __sap_general_preconfigure_req_hana_repos | list + + __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - ansible_architecture != 's390x' @@ -32,9 +32,9 @@ - name: Set final list of repos, s390x, auto ansible.builtin.set_fact: __sap_general_preconfigure_req_repos: - "{{ __sap_general_preconfigure_req_os_repos | list }} + - {{ __sap_general_preconfigure_req_netweaver_repos | list }} + - {{ __sap_general_preconfigure_req_ha_repos | list }}" + "{{ __sap_general_preconfigure_req_os_repos | list + + __sap_general_preconfigure_req_netweaver_repos | list + + __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - ansible_architecture == 's390x' From 8f658f2bdb1c5c099e3acaff18ae7cd4714e9dfe Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 12 Jul 2022 11:17:02 +0000 Subject: [PATCH 057/375] yamllint: some titles shortened --- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index 4d6e3f364..1e9e31b5c 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -16,7 +16,7 @@ - pacemaker - ha -- name: "SAP HSR - Verify that Ansible can connect to the defined primary node by name" +- name: "SAP HSR - Verify Ansible connection to primary node by name" ansible.builtin.command: | hostname -s delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_name }}" @@ -33,7 +33,7 @@ # BEGIN of primary node connectivity test block - block: - - name: "SAP Prepare Pacemaker - Verify that Ansible can connect to the defined primary node by IP" + - name: "SAP Prepare Pacemaker - Verify Ansible conn to primary node IP" ansible.builtin.command: | hostname -s delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" @@ -42,13 +42,13 @@ failed_when: false changed_when: false - - name: "SAP Prepare Pacemaker - Use IP for tasks that must run on the primary node" + - name: "SAP Prepare Pacemaker - Use IP for primary node delegation" set_fact: __sap_ha_prepare_pacemaker_primary_node: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" when: - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout == __sap_ha_prepare_pacemaker_primary_node_name - - name: "SAP Prepare Pacemaker - Fail if the primary node cannot be connected to" + - name: "SAP Prepare Pacemaker - Fail if primary node is unreachable" ansible.builtin.fail: msg: | Aborting due to issues identifying and connecting to the primary node. @@ -118,8 +118,8 @@ - pacemaker - ha when: - - (sap_hana_configure_firewall is defined and sap_hana_configure_firewall) or - sap_ha_prepare_pacemaker_configure_firewall + - (sap_hana_configure_firewall is defined and sap_hana_configure_firewall) + or sap_ha_prepare_pacemaker_configure_firewall tags: - ha_firewall - pacemaker From eab1cc263433f13bf512fe986a60657114f14e82 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 12 Jul 2022 11:59:09 +0000 Subject: [PATCH 058/375] ansible-lint fixes --- roles/sap_ha_prepare_pacemaker/meta/main.yml | 1 - roles/sap_ha_prepare_pacemaker/tasks/main.yml | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/roles/sap_ha_prepare_pacemaker/meta/main.yml b/roles/sap_ha_prepare_pacemaker/meta/main.yml index 129a49c67..d378edecb 100644 --- a/roles/sap_ha_prepare_pacemaker/meta/main.yml +++ b/roles/sap_ha_prepare_pacemaker/meta/main.yml @@ -16,7 +16,6 @@ galaxy_info: "sap", "ha", "dr", - "ha/dr", "linuxpacemaker", "rhel", "redhat", diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index 4fd1cf4e2..6ec14d7e5 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -14,20 +14,6 @@ - pacemaker - ha -- name: "SAP Prepare Pacemaker - Check if pcs package is installed" - shell: | - rpm -qa pcs - args: - executable: /bin/bash - become: true - become_user: root - register: sap_ha_prepare_pacemaker_check_pcs - changed_when: false - tags: - - ha_software - - pacemaker - - ha - - name: "SAP Prepare Pacemaker - Software Setup" include_tasks: file: software_setup.yml @@ -36,8 +22,6 @@ - ha_software - pacemaker - ha - when: - - sap_ha_prepare_pacemaker_check_pcs.rc != '0' tags: - ha_software - pacemaker @@ -71,7 +55,7 @@ - ha - name: "SAP Prepare Pacemaker - Check Cluster Status" - shell: | + ansible.builtin.shell: | pcs cluster status args: executable: /bin/bash From c34e3dfef0025505d709346f8f70cbb752005cd2 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 13 Jul 2022 09:26:59 +0000 Subject: [PATCH 059/375] sap_ha_set_hana: variable accidentally commented out during previous commit --- roles/sap_ha_set_hana/defaults/main.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/roles/sap_ha_set_hana/defaults/main.yml b/roles/sap_ha_set_hana/defaults/main.yml index ce3f0dab4..42dfea3d6 100644 --- a/roles/sap_ha_set_hana/defaults/main.yml +++ b/roles/sap_ha_set_hana/defaults/main.yml @@ -6,11 +6,4 @@ sap_ha_set_hana_cluster_nodes: "{{ sap_hana_cluster_nodes }}" sap_ha_set_hana_vip1: "{{ sap_hana_vip1 }}" sap_ha_set_hana_vip2: "{{ sap_hana_vip2 }}" -## az | aws | ... platform specific todo -## no tasks implemented yet - -#sap_ha_set_hana_type: "" -#sap_ha_set_hana_load_balancer_ip: "" -#sap_ha_set_hana_platform: baremetal - -#sap_ha_set_hana_resource_defaults: update +sap_ha_set_hana_resource_defaults: update From 51e4e3f2e32495e22ac69a07ad11a3e386267338 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 13 Jul 2022 09:34:06 +0000 Subject: [PATCH 060/375] sap_ha_set_hana: wrong role variable prefix --- roles/sap_ha_set_hana/tasks/cluster_srhook.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_set_hana/tasks/cluster_srhook.yml b/roles/sap_ha_set_hana/tasks/cluster_srhook.yml index 05565a623..ca85cd935 100644 --- a/roles/sap_ha_set_hana/tasks/cluster_srhook.yml +++ b/roles/sap_ha_set_hana/tasks/cluster_srhook.yml @@ -4,7 +4,7 @@ path: /hana/shared/myHooks state: directory mode: "0755" - owner: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" + owner: "{{ sap_ha_set_hana_sid | lower }}adm" group: sapsys - name: "SAP Pacemaker Hana - config sr_hook" @@ -13,12 +13,12 @@ src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py dest: /hana/shared/myHooks/SAPHanaSR.py mode: "0755" - owner: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" + owner: "{{ sap_ha_set_hana_sid | lower }}adm" group: sapsys - name: "SAP Pacemaker Hana - check global.ini" shell: | - grep ha_dr_saphanasr /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/SYS/global/hdb/custom/config/global.ini + grep ha_dr_saphanasr /usr/sap/{{ sap_ha_set_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini args: executable: /bin/bash register: trace_global @@ -27,7 +27,7 @@ - name: "SAP Pacemaker Hana - update hook in global.ini" ansible.builtin.blockinfile: - path: /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/SYS/global/hdb/custom/config/global.ini + path: /usr/sap/{{ sap_ha_set_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini marker: "" block: | [ha_dr_provider_SAPHanaSR] From b15ebd4896606499686ae1593f1da6c9c1aece69 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 13 Jul 2022 09:39:51 +0000 Subject: [PATCH 061/375] sap_ha_install_pacemaker: wrong role variable prefix --- roles/sap_ha_install_pacemaker/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_pacemaker/tasks/main.yml b/roles/sap_ha_install_pacemaker/tasks/main.yml index f2d75c80c..cdd078626 100644 --- a/roles/sap_ha_install_pacemaker/tasks/main.yml +++ b/roles/sap_ha_install_pacemaker/tasks/main.yml @@ -5,7 +5,7 @@ when: - item.node_role is defined - item.node_role == 'primary' - loop: "{{ sap_ha_prepare_pacemaker_cluster_nodes }}" + loop: "{{ sap_ha_install_pacemaker_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" tags: From 523d32c92aa8ed49c6870833b0c58a35d500fa0b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 13 Jul 2022 13:24:39 +0200 Subject: [PATCH 062/375] collection: galaxy.yml now on v1.1.1 --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 2519b13ad..13c4fc471 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: community name: sap_install # The version of the collection. Must be compatible with semantic versioning -version: 1.1.0 +version: 1.1.1 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md From bcbf639e61d14997988ce97825ed597b3593022e Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 13 Jul 2022 14:05:37 +0200 Subject: [PATCH 063/375] sap_swpm: typo in swpm_inifile_generate_advanced_templates.yml --- .../tasks/swpm/swpm_inifile_generate_advanced_templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml index ea14a67af..603a0178f 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml @@ -2,7 +2,7 @@ # Set facts based on the install dictionary - name: SAP SWPM advanced_templates mode - Set product_catalog_id - ansible.builtin.et_fact: + ansible.builtin.set_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" - name: SAP SWPM advanced_templates mode - Create temporary directory From 79ead586d89882db9dba3288ff7d7e82bfa6aa0a Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 13 Jul 2022 13:58:42 +0000 Subject: [PATCH 064/375] sap_ha_*: HA roles fqcn fixes --- roles/sap_ha_install_hana_hsr/meta/main.yml | 1 - .../tasks/configure_hsr.yml | 8 +++--- .../tasks/hdbuserstore.yml | 4 +-- .../tasks/log_mode.yml | 4 +-- roles/sap_ha_install_hana_hsr/tasks/main.yml | 2 +- .../tasks/pki_files.yml | 26 +++++++++---------- .../tasks/run_backup.yml | 4 +-- .../tasks/update_etchosts.yml | 4 +-- roles/sap_ha_install_pacemaker/meta/main.yml | 1 - .../tasks/check_properties.yml | 2 +- .../tasks/cluster_setup.yml | 8 +++--- .../tasks/stonith_config.yml | 8 +++--- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 19 +++----------- roles/sap_ha_set_hana/meta/main.yml | 1 - .../tasks/cluster_constraint.yml | 8 +++--- .../tasks/cluster_resources.yml | 14 +++++----- .../sap_ha_set_hana/tasks/cluster_srhook.yml | 4 +-- .../sap_ha_set_hana/tasks/cluster_sudoer.yml | 2 +- roles/sap_ha_set_hana/tasks/main.yml | 2 +- 19 files changed, 53 insertions(+), 69 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/meta/main.yml b/roles/sap_ha_install_hana_hsr/meta/main.yml index f40c7be03..9a9a62cd8 100644 --- a/roles/sap_ha_install_hana_hsr/meta/main.yml +++ b/roles/sap_ha_install_hana_hsr/meta/main.yml @@ -17,7 +17,6 @@ galaxy_info: "hana", "ha", "dr", - "ha/dr", "linuxpacemaker", "rhel", "redhat", diff --git a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml index f2ce7b718..01c845a00 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml @@ -1,6 +1,6 @@ --- - name: "SAP HSR - Check System Replication Status" - shell: | + ansible.builtin.shell: | source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_state @@ -15,7 +15,7 @@ # looping through cluster definition to run on defined primary # and apply the respective 'site' value - name: "SAP HSR - Enable HANA System Replication on primary node" - shell: | + ansible.builtin.shell: | source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_enable --name="{{ item.hana_site }}" @@ -36,7 +36,7 @@ # looping through cluster definition to run on secondary node # and apply the respective 'site' value - name: "SAP HSR - Register secondary node to HANA System Replication" - shell: | + ansible.builtin.shell: | source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_register --name={{ item.hana_site }} \ @@ -57,7 +57,7 @@ label: "{{ item.node_name }}" - name: "SAP HSR - Start HANA instance on secondary" - shell: | + ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/sapcontrol \ -nr {{ sap_ha_install_hana_hsr_instance_number }} -function StartSystem args: diff --git a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml index 546d52e0a..552d45bff 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml @@ -1,7 +1,7 @@ --- - name: "SAP HSR - Check if hdbuserstore exists" become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - shell: | + ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ List {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} args: @@ -12,7 +12,7 @@ - name: "SAP HSR - Create and Store Connection Info in hdbuserstore" become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - shell: | + ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ SET {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} {{ ansible_hostname }}:3{{ sap_ha_install_hana_hsr_instance_number }}13 SYSTEM '{{ sap_ha_install_hana_hsr_db_system_password }}' args: diff --git a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml index 4cb00b0ae..ab03654fd 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml @@ -3,7 +3,7 @@ tags: hsr_logmode become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - shell: | + ansible.builtin.shell: | grep "log_mode" /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/hdb/custom/config/global.ini | grep normal register: sap_ha_install_hana_hsr_log_mode failed_when: false @@ -13,7 +13,7 @@ tags: hsr_logmode become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - shell: | + ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbsql \ -U {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ -m < 0 - name: "SAP HSR - Primary: Remove .ssh if it was created" - file: + ansible.builtin.file: path: ~/.ssh state: absent when: @@ -117,4 +118,3 @@ become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - diff --git a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml index b1d6039c5..2a40eb38c 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml @@ -1,6 +1,6 @@ --- - name: "SAP HSR - Run backup for SYSTEMDB" - shell: | + ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbsql \ -U {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ -m < Date: Wed, 13 Jul 2022 14:08:35 +0000 Subject: [PATCH 065/375] sap_ha_install_hana_hsr: fixed conditional for idempotency --- roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml index 01c845a00..6e248cfc8 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml @@ -28,7 +28,7 @@ when: - ansible_hostname == item.node_name - item.node_role is defined and item.node_role == 'primary' - - ansible_hostname not in __sap_ha_install_hana_hsr_srstate.stdout + - "'is source system' not in __sap_ha_install_hana_hsr_srstate.stdout" loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" From 6fe126bc348efb9aff7794e7eaed7946b6d42ce0 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 14 Jul 2022 09:06:10 +0000 Subject: [PATCH 066/375] sap_ha_install_hana_hsr: ignore_errors for connectivity checkers to make it compatible with any_errors_fatal --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 562704d95..88736aacd 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -23,6 +23,7 @@ when: - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name ignore_unreachable: true + ignore_errors: true failed_when: false changed_when: false become: false @@ -38,6 +39,7 @@ delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_ip }}" register: __sap_ha_install_hana_hsr_primary_node_ip_check ignore_unreachable: true + ignore_errors: true failed_when: false changed_when: false @@ -53,6 +55,7 @@ Aborting due to issues identifying and connecting to the primary node. It can either not be reached by host name or the connected IP returns an unmatching hostname. + when: - __sap_ha_install_hana_hsr_primary_node_ip_check.unreachable is defined or __sap_ha_install_hana_hsr_primary_node_ip_check.stdout != __sap_ha_install_hana_hsr_primary_node_name From 5f2cc7a335085983566efd027ff05139ddc222cb Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 14 Jul 2022 10:20:45 +0000 Subject: [PATCH 067/375] sap_ha_prepare_pacemaker: fix task title --- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index 60576f9f2..f40d269ea 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -16,7 +16,7 @@ - pacemaker - ha -- name: "SAP HSR - Verify Ansible connection to primary node by name" +- name: "SAP Prepare Pacemaker - Verify Ansible connection to primary node by name" ansible.builtin.command: | hostname -s delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_name }}" From 6ff2c4d202aa8c8612a2970568c8f403ad201960 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 14 Jul 2022 14:09:11 +0200 Subject: [PATCH 068/375] sap_general_preconfigure: Solve issue #176 --- roles/sap_general_preconfigure/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index e48f58992..cf646c5a6 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -80,6 +80,9 @@ - '{{ ansible_distribution }}' - '{{ ansible_os_family }}.yml' +- name: Gather package facts again after the installation + ansible.builtin.package_facts: + - name: Include tasks from 'configuration.yml' ansible.builtin.include_tasks: '{{ item }}/{{ __sap_general_preconfigure_fact_assert_filename_prefix }}configuration.yml' when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_configuration | d(false) From a2c6785d02092bb9142d9f2c170ad4b097d1af2f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 14 Jul 2022 14:16:20 +0200 Subject: [PATCH 069/375] sap_hana_preconfigure: Gather package facts after the installation phase --- roles/sap_general_preconfigure/tasks/main.yml | 2 +- roles/sap_hana_preconfigure/tasks/main.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index cf646c5a6..8f8068da5 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -80,7 +80,7 @@ - '{{ ansible_distribution }}' - '{{ ansible_os_family }}.yml' -- name: Gather package facts again after the installation +- name: Gather package facts again after the installation phase ansible.builtin.package_facts: - name: Include tasks from 'configuration.yml' diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index b829f90cc..5d93f5407 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -41,6 +41,9 @@ - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' +- name: Gather package facts again after the installation phase + ansible.builtin.package_facts: + - include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_configuration|d(false) with_first_found: From 59d478d23f6006d5e2f09bead6c9825f6af312c0 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 15 Jul 2022 08:46:44 +0000 Subject: [PATCH 070/375] sap_ha_prepare_pacemaker: ignore_errors for connectivity checkers --- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml index f40d269ea..371192f6e 100644 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ b/roles/sap_ha_prepare_pacemaker/tasks/main.yml @@ -24,6 +24,7 @@ when: - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name ignore_unreachable: true + ignore_errors: true failed_when: false changed_when: false become: false @@ -40,6 +41,7 @@ delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" register: __sap_ha_prepare_pacemaker_primary_node_ip_check ignore_unreachable: true + ignore_errors: true failed_when: false changed_when: false From 076337fd0ccdb57e1963922ef8f79f56b0247e43 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 15 Jul 2022 18:23:52 +0200 Subject: [PATCH 071/375] sap_ha_install_hana_hsr: added --checksum to rsync and parse output for changed_when --- roles/sap_ha_install_hana_hsr/tasks/pki_files.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index 761faa170..fe4b39870 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -43,12 +43,15 @@ - name: "SAP HSR - Copy PKI files from primary node" ansible.builtin.shell: - rsync -av {{ __sap_ha_install_hana_hsr_primary_node }}:{{ item }} {{ item }} \ + rsync --checksum -vv \ + {{ __sap_ha_install_hana_hsr_primary_node }}:{{ item }} {{ item }} \ -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/hsr_temp" loop: - "{{ __sap_ha_install_hana_hsr_secpath }}/data/SSFS_{{ sap_ha_install_hana_hsr_sid }}.DAT" - "{{ __sap_ha_install_hana_hsr_secpath }}/key/SSFS_{{ sap_ha_install_hana_hsr_sid }}.KEY" register: __sap_ha_install_hana_hsr_fetch_pki + changed_when: + - '"is uptodate" not in __sap_ha_install_hana_hsr_fetch_pki.stdout' - name: "SAP HSR - Update PKI files permissions" ansible.builtin.file: From 1e54c02a843ea10f0f543876f6bb21c0ced206c8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 15 Jul 2022 20:15:12 +0200 Subject: [PATCH 072/375] HA roles: added linter symlinks and 2 linter fixes --- roles/sap_ha_install_hana_hsr/.ansible-lint | 1 + roles/sap_ha_install_hana_hsr/.yamllint.yml | 1 + roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml | 4 +++- roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml | 1 + roles/sap_ha_install_pacemaker/.ansible-lint | 1 + roles/sap_ha_install_pacemaker/.yamllint.yml | 1 + roles/sap_ha_prepare_pacemaker/.ansible-lint | 1 + roles/sap_ha_prepare_pacemaker/.yamllint.yml | 1 + roles/sap_ha_set_hana/.ansible-lint | 1 + roles/sap_ha_set_hana/.yamllint.yml | 1 + 10 files changed, 12 insertions(+), 1 deletion(-) create mode 120000 roles/sap_ha_install_hana_hsr/.ansible-lint create mode 120000 roles/sap_ha_install_hana_hsr/.yamllint.yml create mode 120000 roles/sap_ha_install_pacemaker/.ansible-lint create mode 120000 roles/sap_ha_install_pacemaker/.yamllint.yml create mode 120000 roles/sap_ha_prepare_pacemaker/.ansible-lint create mode 120000 roles/sap_ha_prepare_pacemaker/.yamllint.yml create mode 120000 roles/sap_ha_set_hana/.ansible-lint create mode 120000 roles/sap_ha_set_hana/.yamllint.yml diff --git a/roles/sap_ha_install_hana_hsr/.ansible-lint b/roles/sap_ha_install_hana_hsr/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_ha_install_hana_hsr/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/.yamllint.yml b/roles/sap_ha_install_hana_hsr/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_ha_install_hana_hsr/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml index 552d45bff..695a06ef7 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml @@ -14,7 +14,9 @@ become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ - SET {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} {{ ansible_hostname }}:3{{ sap_ha_install_hana_hsr_instance_number }}13 SYSTEM '{{ sap_ha_install_hana_hsr_db_system_password }}' + SET {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ + {{ ansible_hostname }}:3{{ sap_ha_install_hana_hsr_instance_number }}13 \ + SYSTEM '{{ sap_ha_install_hana_hsr_db_system_password }}' args: executable: /bin/bash when: sap_ha_install_hana_hsr_hdbuserstore.rc != '0' diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index 0be151128..0d3a98557 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -13,6 +13,7 @@ ansible.builtin.lineinfile: path: /etc/hosts create: true + mode: '0644' state: present backup: yes line: "{{ item.node_ip }}\t{{ item.node_name }}.{{ sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name }}" diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_ha_install_pacemaker/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_install_pacemaker/.yamllint.yml b/roles/sap_ha_install_pacemaker/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_ha_install_pacemaker/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_ha_prepare_pacemaker/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/.yamllint.yml b/roles/sap_ha_prepare_pacemaker/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_ha_prepare_pacemaker/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint new file mode 120000 index 000000000..3da8d984e --- /dev/null +++ b/roles/sap_ha_set_hana/.ansible-lint @@ -0,0 +1 @@ +../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_set_hana/.yamllint.yml b/roles/sap_ha_set_hana/.yamllint.yml new file mode 120000 index 000000000..54a3654b9 --- /dev/null +++ b/roles/sap_ha_set_hana/.yamllint.yml @@ -0,0 +1 @@ +../../.yamllint.yml \ No newline at end of file From 15a3856ff8c516797f918d7683034ed654ffd4f8 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 19 Jul 2022 18:03:56 +0200 Subject: [PATCH 073/375] first implementations to get rid of hardcoded ansible hostname --- .../tasks/configure_hsr.yml | 10 +++++----- .../tasks/hdbuserstore.yml | 1 + .../tasks/log_mode.yml | 1 + roles/sap_ha_install_hana_hsr/tasks/main.yml | 20 ++++++++++++++----- .../tasks/update_etchosts.yml | 8 ++++---- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml index 6e248cfc8..0511bc44b 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml @@ -26,7 +26,7 @@ register: enablesr changed_when: "'successfully enabled system as system replication source site' in enablesr.stdout" when: - - ansible_hostname == item.node_name + - __sap_ha_install_hana_hsr_node_name == item.node_name.split('.')[0] - item.node_role is defined and item.node_role == 'primary' - "'is source system' not in __sap_ha_install_hana_hsr_srstate.stdout" loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" @@ -49,9 +49,9 @@ become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" register: registersr when: - - ansible_hostname == item.node_name + - __sap_ha_install_hana_hsr_node_name == item.node_name.split('.')[0] - item.node_role is not defined or item.node_role == 'secondary' - - ansible_hostname not in __sap_ha_install_hana_hsr_srstate.stdout + - __sap_ha_install_hana_hsr_node_name not in __sap_ha_install_hana_hsr_srstate.stdout loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" @@ -67,5 +67,5 @@ register: startinstance changed_when: "'StartSystem' in startinstance.stdout" when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name - - ansible_hostname not in __sap_ha_install_hana_hsr_srstate.stdout + - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_node_name not in __sap_ha_install_hana_hsr_srstate.stdout diff --git a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml index 695a06ef7..3803243f6 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml @@ -10,6 +10,7 @@ failed_when: false changed_when: false +# CHECK: if ansible_hostname should be replaced by the connection interface name ? - name: "SAP HSR - Create and Store Connection Info in hdbuserstore" become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.shell: | diff --git a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml index ab03654fd..cf02b3b29 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml @@ -9,6 +9,7 @@ failed_when: false changed_when: false +# CHECK, if ansible_hostname needs to be replaced with interface name - name: "SAP HSR - Set log_mode to normal" tags: hsr_logmode become: true diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 88736aacd..9d9db8e35 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -1,8 +1,18 @@ --- + +# CHECK: we need to define variables, when the Hana Replication interface != ansible_hostname +# for now I set the default to ansible_hostname, so I can update the rest of the role with that variable +# __sap_ha_install_hana_hsr_node_name +# __sap_ha_install_hana_hsr_node_domain +- name: "SAP HSR - Pick up interface node name from definition" + ansible.builtin.set_fact: + __sap_ha_install_hana_hsr_node_name: "{{ ansible_hostname }}" + - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: __sap_ha_install_hana_hsr_primary_node: "{{ item.node_name }}" - __sap_ha_install_hana_hsr_primary_node_name: "{{ item.node_name }}" + __sap_ha_install_hana_hsr_primary_node_name: "{{ item.node_name.split('.')[0] }}" + __sap_ha_install_hana_hsr_primary_node_domain: "{{ item.node_name.split('.')[1:]|join('.') }}" __sap_ha_install_hana_hsr_primary_node_ip: "{{ item.node_ip }}" when: - item.node_role is defined @@ -21,7 +31,7 @@ delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node_name }}" register: __sap_ha_install_hana_hsr_primary_node_name_check when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name ignore_unreachable: true ignore_errors: true failed_when: false @@ -62,7 +72,7 @@ # block settings when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable become: false @@ -106,7 +116,7 @@ vars: __sap_ha_install_hana_hsr_secpath: "/usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/security/rsecssfs" when: - - ansible_hostname != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name tags: - hsr_pki @@ -119,7 +129,7 @@ become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" tags: hsr_backup when: - - ansible_hostname == __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_node_name == __sap_ha_install_hana_hsr_primary_node_name tags: - hsr_backup diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index 0d3a98557..b73edfdd9 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -1,7 +1,7 @@ --- - name: "SAP HSR - Check /etc/hosts for conflicting entries" ansible.builtin.shell: | - awk '(/{{ item.node_name }}/ && !/^{{ item.node_ip }}/) || (/^{{ item.node_ip }}/ && !/{{ item.node_name }}/)' /etc/hosts + awk '(/{{ item.node_name }} / && !/^{{ item.node_ip }}/) || (/^{{ item.node_ip }}/ && !/{{ item.node_name }} /)' /etc/hosts register: etchosts_conflict changed_when: false failed_when: etchosts_conflict.stdout != '' @@ -16,8 +16,8 @@ mode: '0644' state: present backup: yes - line: "{{ item.node_ip }}\t{{ item.node_name }}.{{ sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name }}" - regexp: (?i)^\s*{{ item.node_ip }}\s+{{ item.node_name }} + line: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" + regexp: (?i)^\s*{{ item.node_ip }}\s+{{ item.node_name.split('.')[0] }} loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: - label: "{{ item.node_ip }} {{ item.node_name }}.{{ sap_ha_install_hana_hsr_fqdn }} {{ item.node_name }}" + label: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" From a6966eaa0e2d2524f4f19835b97b91eebceab4bd Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 19 Jul 2022 21:31:28 +0200 Subject: [PATCH 074/375] sap_ha_hana_install_hsr: Updated duplicate host check, so that hana1 as short name is detectedi reliably --- roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index b73edfdd9..8571cd4f6 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -1,7 +1,7 @@ --- - name: "SAP HSR - Check /etc/hosts for conflicting entries" ansible.builtin.shell: | - awk '(/{{ item.node_name }} / && !/^{{ item.node_ip }}/) || (/^{{ item.node_ip }}/ && !/{{ item.node_name }} /)' /etc/hosts + awk '(/{{ item.node_name+" " }}/ && !/^{{ item.node_ip }}/) || (/^{{ item.node_ip }}/ && !/{{ item.node_name }}/)' /etc/hosts register: etchosts_conflict changed_when: false failed_when: etchosts_conflict.stdout != '' From 41ce2c9d187ffe787a984fe96da691e63d24cf76 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 19 Jul 2022 22:01:21 +0200 Subject: [PATCH 075/375] sap_ha_install_hana_hsr: Add connection variable the connection variable (dict) pulls the information of the current host out of the definition of sap_hana_cluster_nodes __sap_ha_install_hana_hsr_connection: node_name: "{{ item.node_name.split('.')[0] }}" node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" node_ip: "{{ item.node_ip }}" node_role: "{{ item.node_role }}" hana_site: "{{ item.hana_site }}" these variables can now be used instead of the loops in that pulls out this information in several loops later. It is also checked that the required IP adress is really configured on the node --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 9d9db8e35..3432ea922 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -8,6 +8,34 @@ ansible.builtin.set_fact: __sap_ha_install_hana_hsr_node_name: "{{ ansible_hostname }}" +## The following variables can be used to simplify the role + +- name: "SAP - HSR create information on HSR connection interface" + ansible.builtin.set_fact: + __sap_ha_install_hana_hsr_connection: + node_name: "{{ item.node_name.split('.')[0] }}" + node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" + node_ip: "{{ item.node_ip }}" + node_role: "{{ item.node_role }}" + hana_site: "{{ item.hana_site }}" + when: + - item.node_ip in ansible_all_ipv4_addresses + loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" + loop_control: + label: "{{ item.node_name }}" + +- name: SAP HSR - Connection Info of this host + debug: + var: __sap_ha_install_hana_hsr_connection + +- name: SAP HSR - Check that hsr interface is configured on host + ansible.builtin.assert: + that: + - __sap_ha_install_hana_hsr_connection.node_ip is defined + - __sap_ha_install_hana_hsr_connection.node_ip != "" + fail_msg: "The IP adress configured for HSR does not exist on this host" + success_msg: "The IP adress for HSR is configured on this host" + - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: __sap_ha_install_hana_hsr_primary_node: "{{ item.node_name }}" From b7256227e670c6b4e79d692ee7bfa86069104b7d Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 19 Jul 2022 22:18:20 +0200 Subject: [PATCH 076/375] sap_ha_install_hana_hsr: lint cleaning --- roles/sap_ha_install_hana_hsr/tasks/log_mode.yml | 2 +- roles/sap_ha_install_hana_hsr/tasks/main.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml index cf02b3b29..92c9213b2 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml @@ -9,7 +9,7 @@ failed_when: false changed_when: false -# CHECK, if ansible_hostname needs to be replaced with interface name +# CHECK, if ansible_hostname needs to be replaced with interface name - name: "SAP HSR - Set log_mode to normal" tags: hsr_logmode become: true diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 3432ea922..52659263f 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -23,18 +23,18 @@ loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" - + - name: SAP HSR - Connection Info of this host debug: - var: __sap_ha_install_hana_hsr_connection + var: __sap_ha_install_hana_hsr_connection - name: SAP HSR - Check that hsr interface is configured on host ansible.builtin.assert: - that: + that: - __sap_ha_install_hana_hsr_connection.node_ip is defined - __sap_ha_install_hana_hsr_connection.node_ip != "" - fail_msg: "The IP adress configured for HSR does not exist on this host" - success_msg: "The IP adress for HSR is configured on this host" + fail_msg: "The IP adress configured for HSR does not exist on this host" + success_msg: "The IP adress for HSR is configured on this host" - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: From 548850173d4c015c8415c04789c1dccba35ff613 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 20 Jul 2022 11:25:52 +0200 Subject: [PATCH 077/375] sap_ha_install_hana_hsr: corrected awk expression in update_hosts.yml --- roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index 8571cd4f6..ca1939a7e 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -1,7 +1,7 @@ --- - name: "SAP HSR - Check /etc/hosts for conflicting entries" ansible.builtin.shell: | - awk '(/{{ item.node_name+" " }}/ && !/^{{ item.node_ip }}/) || (/^{{ item.node_ip }}/ && !/{{ item.node_name }}/)' /etc/hosts + awk '(/{{ "( |\t)"+item.node_name+"($| |\t)" }}/ && !/^{{ item.node_ip+"( |\t)" }}/) || (/^{{ item.node_ip+"( |\t)" }}/ && !/{{ "( |\t)"+item.node_name+"($| |\t)" }}/)' /etc/hosts register: etchosts_conflict changed_when: false failed_when: etchosts_conflict.stdout != '' From d1c39c849bbe67e77e818ab6d22f127a8d3611e8 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 20 Jul 2022 11:41:46 +0200 Subject: [PATCH 078/375] sap_ha_install_hana_hsr: corrected main.yml --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 52659263f..e341be43d 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -18,8 +18,6 @@ node_ip: "{{ item.node_ip }}" node_role: "{{ item.node_role }}" hana_site: "{{ item.hana_site }}" - when: - - item.node_ip in ansible_all_ipv4_addresses loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" @@ -35,6 +33,8 @@ - __sap_ha_install_hana_hsr_connection.node_ip != "" fail_msg: "The IP adress configured for HSR does not exist on this host" success_msg: "The IP adress for HSR is configured on this host" + when: + - item.node_ip in ansible_all_ipv4_addresses - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: From 2961f500f59e371ea624ed7b0a80d86be5b646bd Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 20 Jul 2022 14:50:36 +0200 Subject: [PATCH 079/375] sap_ha_install_hana_hsr: corrected main.yml 2nd time --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index e341be43d..1cfd59878 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -21,6 +21,8 @@ loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" + when: + - item.node_ip in ansible_all_ipv4_addresses - name: SAP HSR - Connection Info of this host debug: @@ -33,8 +35,6 @@ - __sap_ha_install_hana_hsr_connection.node_ip != "" fail_msg: "The IP adress configured for HSR does not exist on this host" success_msg: "The IP adress for HSR is configured on this host" - when: - - item.node_ip in ansible_all_ipv4_addresses - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: From ebc4040270459114648b7b7326bb929f143fbcca Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 20 Jul 2022 15:07:36 +0200 Subject: [PATCH 080/375] sap_ha_install_hana_hsr: corrected yamllint --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 1cfd59878..b25918fc1 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -6,18 +6,18 @@ # __sap_ha_install_hana_hsr_node_domain - name: "SAP HSR - Pick up interface node name from definition" ansible.builtin.set_fact: - __sap_ha_install_hana_hsr_node_name: "{{ ansible_hostname }}" + __sap_ha_install_hana_hsr_node_name: "{{ ansible_hostname }}" ## The following variables can be used to simplify the role - name: "SAP - HSR create information on HSR connection interface" ansible.builtin.set_fact: __sap_ha_install_hana_hsr_connection: - node_name: "{{ item.node_name.split('.')[0] }}" - node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" - node_ip: "{{ item.node_ip }}" - node_role: "{{ item.node_role }}" - hana_site: "{{ item.hana_site }}" + node_name: "{{ item.node_name.split('.')[0] }}" + node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" + node_ip: "{{ item.node_ip }}" + node_role: "{{ item.node_role }}" + hana_site: "{{ item.hana_site }}" loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" @@ -31,8 +31,8 @@ - name: SAP HSR - Check that hsr interface is configured on host ansible.builtin.assert: that: - - __sap_ha_install_hana_hsr_connection.node_ip is defined - - __sap_ha_install_hana_hsr_connection.node_ip != "" + - __sap_ha_install_hana_hsr_connection.node_ip is defined + - __sap_ha_install_hana_hsr_connection.node_ip != "" fail_msg: "The IP adress configured for HSR does not exist on this host" success_msg: "The IP adress for HSR is configured on this host" From 716e81029573c9e3999fec8ceab273df40f067c1 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 20 Jul 2022 17:52:49 +0200 Subject: [PATCH 081/375] sap_ha_install_hana_hsr: fixed feedback from review --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index b25918fc1..45f3e46cc 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -16,7 +16,7 @@ node_name: "{{ item.node_name.split('.')[0] }}" node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" node_ip: "{{ item.node_ip }}" - node_role: "{{ item.node_role }}" + node_role: "{{ item.node_role|default('secondary') }}" hana_site: "{{ item.hana_site }}" loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: @@ -24,10 +24,6 @@ when: - item.node_ip in ansible_all_ipv4_addresses -- name: SAP HSR - Connection Info of this host - debug: - var: __sap_ha_install_hana_hsr_connection - - name: SAP HSR - Check that hsr interface is configured on host ansible.builtin.assert: that: From 10d2f72fd87a36ddd9e20bc489d7b63327c31ff3 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 21 Jul 2022 13:33:00 +0200 Subject: [PATCH 082/375] sap_ha_install_hana_hsr: linter fixes and replaced some shell with command modules --- .../tasks/hdbuserstore.yml | 17 +++++++++-------- roles/sap_ha_install_hana_hsr/tasks/main.yml | 6 +++--- .../sap_ha_install_hana_hsr/tasks/pki_files.yml | 9 +++++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml index 3803243f6..9923be2cf 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml @@ -1,23 +1,24 @@ --- +# ansible-lint: +# become_user string is deduced from a variable + suffix with no spaces - name: "SAP HSR - Check if hdbuserstore exists" - become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - ansible.builtin.shell: | + become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" # noqa var-spacing + ansible.builtin.command: | /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ List {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} - args: - executable: /bin/bash register: sap_ha_install_hana_hsr_hdbuserstore failed_when: false changed_when: false # CHECK: if ansible_hostname should be replaced by the connection interface name ? +# +# ansible-lint: +# become_user string is deduced from a variable + suffix with no spaces - name: "SAP HSR - Create and Store Connection Info in hdbuserstore" - become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" - ansible.builtin.shell: | + become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" # noqa var-spacing + ansible.builtin.command: | /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ SET {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ {{ ansible_hostname }}:3{{ sap_ha_install_hana_hsr_instance_number }}13 \ SYSTEM '{{ sap_ha_install_hana_hsr_db_system_password }}' - args: - executable: /bin/bash when: sap_ha_install_hana_hsr_hdbuserstore.rc != '0' diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 45f3e46cc..74d5950bc 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -14,9 +14,9 @@ ansible.builtin.set_fact: __sap_ha_install_hana_hsr_connection: node_name: "{{ item.node_name.split('.')[0] }}" - node_domain: "{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}" + node_domain: "{{ item.node_name.split('.')[1:] | join('.') or sap_ha_install_hana_hsr_fqdn }}" node_ip: "{{ item.node_ip }}" - node_role: "{{ item.node_role|default('secondary') }}" + node_role: "{{ item.node_role | default('secondary') }}" hana_site: "{{ item.hana_site }}" loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: @@ -36,7 +36,7 @@ ansible.builtin.set_fact: __sap_ha_install_hana_hsr_primary_node: "{{ item.node_name }}" __sap_ha_install_hana_hsr_primary_node_name: "{{ item.node_name.split('.')[0] }}" - __sap_ha_install_hana_hsr_primary_node_domain: "{{ item.node_name.split('.')[1:]|join('.') }}" + __sap_ha_install_hana_hsr_primary_node_domain: "{{ item.node_name.split('.')[1:] | join('.') }}" __sap_ha_install_hana_hsr_primary_node_ip: "{{ item.node_ip }}" when: - item.node_role is defined diff --git a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml index fe4b39870..3031fda73 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -20,6 +20,8 @@ cat ~/.ssh/hsr_temp.pub || \ (ssh-keygen -t rsa -f ~/.ssh/hsr_temp -N "" -q && \ cat ~/.ssh/hsr_temp.pub) + args: + creates: ~/.ssh/hsr_temp.pub register: __sap_ha_install_hana_hsr_pubkey failed_when: false @@ -41,8 +43,10 @@ register: __sap_ha_install_hana_hsr_addauth delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" - - name: "SAP HSR - Copy PKI files from primary node" - ansible.builtin.shell: + # ansible-lint: + # The synchronize module is not part of ansible-core collections. + - name: "SAP HSR - Copy PKI files from primary node" # noqa command-instead-of-module + ansible.builtin.command: rsync --checksum -vv \ {{ __sap_ha_install_hana_hsr_primary_node }}:{{ item }} {{ item }} \ -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/hsr_temp" @@ -105,6 +109,7 @@ dest: ~/.ssh/authorized_keys remote_src: true src: "{{ __sap_ha_install_hana_hsr_addauth.backup }}" + mode: "0600" delegate_to: "{{ __sap_ha_install_hana_hsr_primary_node }}" when: - __sap_ha_install_hana_hsr_addauth.backup is defined From 2899e3a99a6e979c34d32d647e2107379469203f Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 21 Jul 2022 13:58:21 +0200 Subject: [PATCH 083/375] sap_ha_install_hana_hsr: linter fix - added noqa no-tabs for /etc/hosts entries --- roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index ca1939a7e..c0f6dc0f4 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -9,15 +9,17 @@ loop_control: label: "Check if {{ item.node_ip }} exists for hosts other than {{ item.node_name }}" -- name: "SAP HSR - Add Cluster Nodes to /etc/hosts" +# ansible-lint: +# no-tabs exception for standard aligned /etc/hosts entries +- name: "SAP HSR - Add Cluster Nodes to /etc/hosts" # noqa no-tabs ansible.builtin.lineinfile: path: /etc/hosts create: true mode: '0644' state: present backup: yes - line: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" + line: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:] | join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" regexp: (?i)^\s*{{ item.node_ip }}\s+{{ item.node_name.split('.')[0] }} loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: - label: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:]|join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" + label: "{{ item.node_ip }}\t{{ item.node_name.split('.')[0] }}.{{ item.node_name.split('.')[1:] | join('.') or sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name.split('.')[0] }}" From 08c8735dafc756e1befd0014e02ed7c7a877578d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 21 Jul 2022 15:51:29 +0200 Subject: [PATCH 084/375] sap_swpm: Solve issue #183 --- roles/sap_swpm/tasks/post_install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/sap_swpm/tasks/post_install.yml b/roles/sap_swpm/tasks/post_install.yml index 56746b953..7372f615f 100644 --- a/roles/sap_swpm/tasks/post_install.yml +++ b/roles/sap_swpm/tasks/post_install.yml @@ -1,14 +1,14 @@ --- -# Reason for noqa: The command might change things but we do not yet attempt to find out -- name: SAP SWPM Post Install - Set {{ sap_swpm_sid | lower }}adm to no expire # noqa no-changed-when +- name: SAP SWPM Post Install - Set {{ sap_swpm_sid | lower }}adm to no expire ansible.builtin.shell: | chage -m 0 -M 99999 -I -1 -E -1 {{ sap_swpm_sid | lower }}adm chage -m 0 -M 99999 -I -1 -E -1 sapadm args: executable: /bin/bash become: true - register: sap_swpm_post_install_sidadm_noexpire + register: __sap_swpm_post_install_register_sidadm_noexpire + changed_when: __sap_swpm_post_install_register_sidadm_noexpire is succeeded # Firewall @@ -30,5 +30,5 @@ - ' Host - {{ ansible_hostname }} ' - ' FQDN - {{ ansible_fqdn }} ' - ' IP - {{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }} ' - - ' Master Password - {{ sap_swpm_master_password }} ' - - ' DDIC 000 Password - {{ sap_swpm_ddic_000_password }} ' +# - ' Master Password - {{ sap_swpm_master_password }} ' +# - ' DDIC 000 Password - {{ sap_swpm_ddic_000_password }} ' From 9a9b02dc56bfd50d13d9bcfb4bae62bb63b59480 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 21 Jul 2022 14:06:39 +0000 Subject: [PATCH 085/375] sap_ha_install_pacemaker: linter fixes and cluster setup adjustments --- .../tasks/cluster_setup.yml | 26 +++++++++++++------ .../tasks/stonith_config.yml | 3 +++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml index b2d6638e7..db661f6fe 100644 --- a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml +++ b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml @@ -2,19 +2,29 @@ # The following tasks are only included on the primary node! - name: "SAP Pacemaker Setup - Setup Pacemaker cluster" - ansible.builtin.shell: | + ansible.builtin.command: | pcs cluster setup \ {{ sap_ha_install_pacemaker_cluster_name }} {% for node in sap_ha_install_pacemaker_cluster_nodes %}{{ node.node_name }}{{ " " if not loop.last else "" }}{% endfor %} \ - totem token=30000 --force + totem token=30000 \ + --enable --start --wait=30 + register: __sap_ha_install_pacemaker_cluster_create + changed_when: __sap_ha_install_pacemaker_cluster_create.rc == 0 -- name: "SAP Pacemaker Setup - Start Pacemaker cluster" +- name: "SAP Pacemaker Setup - Check cluster nodes are online" ansible.builtin.shell: | - pcs cluster start --all - pcs cluster enable --all + set -e -o pipefail + pcs status nodes corosync | awk -F ':' '/Offline/{print $2}' + args: + executable: /usr/bin/bash + register: __sap_ha_install_pacemaker_cluster_online + failed_when: + - __sap_ha_install_pacemaker_cluster_online.stderr|length != '0' + - __sap_ha_install_pacemaker_cluster_online.stdout|length != '0' + changed_when: false -- name: "SAP Pacemaker Setup - Set Expected Votes = {{ sap_ha_install_pacemaker_cluster_nodes | length }}" - ansible.builtin.shell: | - pcs quorum expected-votes {{ sap_ha_install_pacemaker_cluster_nodes | length }} +#- name: "SAP Pacemaker Setup - Set Expected Votes = {{ sap_ha_install_pacemaker_cluster_nodes | length }}" +# ansible.builtin.shell: | +# pcs quorum expected-votes {{ sap_ha_install_pacemaker_cluster_nodes | length }} - name: "SAP Pacemaker Setup - Check pcs properties" include_tasks: check_properties.yml diff --git a/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml b/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml index f75303565..5311220ce 100644 --- a/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml +++ b/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml @@ -24,8 +24,11 @@ loop: "{{ sap_ha_install_pacemaker_stonith_devices }}" loop_control: label: "{{ item.agent }} as {{ item.name }}" + register: __sap_ha_install_pacemaker_configure_fence_device when: - item.name not in __sap_ha_install_pacemaker_stonith_check.stdout + failed_when: + - __sap_ha_install_pacemaker_configure_fence_device.stderr != "" - name: "SAP Pacemaker Setup - Enable the STONITH devices" ansible.builtin.shell: | From 271addfdf3db1a09847a459f10b2efe887e6a752 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 21 Jul 2022 16:20:45 +0000 Subject: [PATCH 086/375] sap_ha_install_hana_hsr: linter fixes and new backup verification --- .../tasks/log_mode.yml | 3 +++ roles/sap_ha_install_hana_hsr/tasks/main.yml | 8 +++---- .../tasks/run_backup.yml | 23 +++++++++++++++---- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml index 92c9213b2..0a9383546 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml @@ -4,7 +4,10 @@ become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.shell: | + set -e -o pipefail grep "log_mode" /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/hdb/custom/config/global.ini | grep normal + args: + executable: /usr/bin/bash register: sap_ha_install_hana_hsr_log_mode failed_when: false changed_when: false diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 74d5950bc..d5802149e 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -7,6 +7,7 @@ - name: "SAP HSR - Pick up interface node name from definition" ansible.builtin.set_fact: __sap_ha_install_hana_hsr_node_name: "{{ ansible_hostname }}" + tags: always ## The following variables can be used to simplify the role @@ -23,6 +24,7 @@ label: "{{ item.node_name }}" when: - item.node_ip in ansible_all_ipv4_addresses + tags: always - name: SAP HSR - Check that hsr interface is configured on host ansible.builtin.assert: @@ -31,6 +33,7 @@ - __sap_ha_install_hana_hsr_connection.node_ip != "" fail_msg: "The IP adress configured for HSR does not exist on this host" success_msg: "The IP adress for HSR is configured on this host" + tags: always - name: "SAP HSR - Pick up primary node name from definition" ansible.builtin.set_fact: @@ -44,10 +47,7 @@ loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}" loop_control: label: "{{ item.node_name }}" - tags: - - hsr_hdbuserstore - - hsr_pki - - hsr_register + tags: always - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by name" ansible.builtin.command: | diff --git a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml index 2a40eb38c..23f7f3d76 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml @@ -1,21 +1,34 @@ --- - name: "SAP HSR - Run backup for SYSTEMDB" ansible.builtin.shell: | - /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbsql \ + /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbsql -quiet \ -U {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ -m < Date: Fri, 22 Jul 2022 09:38:22 +0200 Subject: [PATCH 087/375] sap_swpm: switch to synchronously calling sapinst Also some variable name changes for sap_swpm and sap_hana_install --- .../sap_hana_install/tasks/hana_addhosts.yml | 6 +- roles/sap_hana_install/tasks/hana_exists.yml | 2 +- roles/sap_hana_install/tasks/hana_install.yml | 12 +-- roles/sap_hana_install/tasks/post_install.yml | 2 +- roles/sap_swpm/tasks/pre_install.yml | 2 +- roles/sap_swpm/tasks/swpm.yml | 84 +++++++++++-------- 6 files changed, 62 insertions(+), 46 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_addhosts.yml b/roles/sap_hana_install/tasks/hana_addhosts.yml index ccd152f08..a61736e0f 100644 --- a/roles/sap_hana_install/tasks/hana_addhosts.yml +++ b/roles/sap_hana_install/tasks/hana_addhosts.yml @@ -52,7 +52,7 @@ - name: SAP HANA Add Hosts - Set fact for hdblcm command line ansible.builtin.set_fact: - __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} + __sap_hana_install_hdblcm_command: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} --action=add_hosts --password={{ sap_hana_install_sidadm_password | d(sap_hana_install_master_password) }} --configfile={{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg @@ -61,11 +61,11 @@ - name: SAP HANA Add Hosts - Show the hdblcm addhosts command line ansible.builtin.debug: - msg: "SAP HANA addhosts command: '{{ __sap_hana_install_hdblcm_command_line }}'" + msg: "SAP HANA addhosts command: '{{ __sap_hana_install_hdblcm_command }}'" tags: sap_hana_install_hdblcm_commandline - name: SAP HANA Add Hosts - Add hosts to the existing SAP HANA installation - ansible.builtin.command: "{{ __sap_hana_install_hdblcm_command_line }}" + ansible.builtin.command: "{{ __sap_hana_install_hdblcm_command }}" register: __sap_hana_install_register_hdblcm_add_hosts args: chdir: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/hdblcm" diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 957803c76..00c5eb7a5 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -39,7 +39,7 @@ fail_msg: "FAIL: Group sapsys exists but with a different group ID than '{{ sap_hana_install_groupid }}', which has been specified in variable sap_hana_install_groupid. Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - when: __sap_hana_install_register_getent_group_sapsys.rc == 0 + when: __sap_hana_install_register_getent_group_sapsys is succeeded when: - sap_hana_install_groupid is defined diff --git a/roles/sap_hana_install/tasks/hana_install.yml b/roles/sap_hana_install/tasks/hana_install.yml index 966de0ffe..198196f3f 100644 --- a/roles/sap_hana_install/tasks/hana_install.yml +++ b/roles/sap_hana_install/tasks/hana_install.yml @@ -20,26 +20,26 @@ - 'Alternatively, you can run the following command on the control node:' - "ssh {{ inventory_hostname }} {{ __sap_hana_install_register_tmpdir.path }}/tail-f-hdblcm-install-trc.sh" -- name: Set fact for hdblcm verify_signature argument +- name: Set fact for the hdblcm verify_signature argument ansible.builtin.set_fact: __sap_hana_install_fact_verify_signature: '--verify_signature' when: sap_hana_install_verify_signature -- name: Set fact for hdblcm command line +- name: Set fact for the hdblcm command line ansible.builtin.set_fact: - __sap_hana_install_hdblcm_command_line: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} + __sap_hana_install_hdblcm_command: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} {{ __sap_hana_install_fact_verify_signature | d('') }} --configfile={{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg -b" tags: sap_hana_install_hdblcm_commandline -- name: Show the hdblcm command line +- name: Display the hdblcm command line ansible.builtin.debug: - msg: "SAP HANA install command: '{{ __sap_hana_install_hdblcm_command_line }}'" + msg: "SAP HANA install command: '{{ __sap_hana_install_hdblcm_command }}'" tags: sap_hana_install_hdblcm_commandline - name: Install SAP HANA - {{ sap_hana_install_sid }} {{ sap_hana_install_number }} - ansible.builtin.command: "{{ __sap_hana_install_hdblcm_command_line }}" + ansible.builtin.command: "{{ __sap_hana_install_hdblcm_command }}" register: __sap_hana_install_register_hdblcm_install args: chdir: "{{ __sap_hana_install_fact_hdblcm_path }}" diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 5010877af..2014999b5 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -22,7 +22,7 @@ executable: /bin/bash become: true register: __sap_hana_install_post_install_register_sidadm_noexpire - changed_when: __sap_hana_install_post_install_register_sidadm_noexpire.rc == 0 + changed_when: __sap_hana_install_post_install_register_sidadm_noexpire is succeeded - name: SAP HANA Post Install - Recreate the initial tenant database ansible.builtin.include_tasks: post_install/recreate_tenant_database.yml diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index c90021918..8f0c220ee 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -55,7 +55,7 @@ - " MP Stack - {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }} " - " Backup - {{ sap_swpm_backup_location }} " -- name: SAP SWPM - Installation Proper +- name: SAP SWPM - Installation Process ansible.builtin.debug: msg: - ' Ready to run SWPM for SAP Software Installation ' diff --git a/roles/sap_swpm/tasks/swpm.yml b/roles/sap_swpm/tasks/swpm.yml index bb21d4082..74b11a311 100644 --- a/roles/sap_swpm/tasks/swpm.yml +++ b/roles/sap_swpm/tasks/swpm.yml @@ -9,12 +9,12 @@ # {{ sap_swpm_swpm_command_inifile }} \ # {{ sap_swpm_swpm_command_product_id }} \ # {{ sap_swpm_swpm_command_extra_args }} -# register: sap_swpm_stdout_register +# register: __sap_swpm_register_sapinst # args: # chdir: "{{ sap_swpm_sapinst_path }}" -# failed_when: sap_swpm_stdout_register.rc != 0 -# changed_when: "'SAPinst build information' in sap_swpm_stdout_register.stdout" -## changed_when: "'instslana' in sap_swpm_stdout_register.stdout" +# failed_when: __sap_swpm_register_sapinst.rc != 0 +# changed_when: "'SAPinst build information' in __sap_swpm_register_sapinst.stdout" +## changed_when: "'instslana' in __sap_swpm_register_sapinst.stdout" ### Async method @@ -34,47 +34,63 @@ - psutil # executable: pip3.6 -# Execute SAP SWPM +- name: Set fact for the sapinst command line + ansible.builtin.set_fact: + __sap_swpm_sapinst_command: "./sapinst {{ sap_swpm_swpm_command_inifile }} + {{ sap_swpm_swpm_command_product_id }} + {{ sap_swpm_swpm_command_extra_args }}" + tags: sap_swpm_sapinst_commandline + +- name: Display the sapinst command line + ansible.builtin.debug: + msg: "SAP SWPM install command: '{{ __sap_swpm_sapinst_command }}'" + tags: sap_swpm_sapinst_commandline + +# Call sapinst synchronously # Reason for noqa: This command installs software, so it will change things - name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when - ansible.builtin.command: >- - ./sapinst \ - {{ sap_swpm_swpm_command_inifile }} \ - {{ sap_swpm_swpm_command_product_id }} \ - {{ sap_swpm_swpm_command_extra_args }} - register: sap_swpm_async_job + ansible.builtin.command: "{{ __sap_swpm_sapinst_command }}" + register: __sap_swpm_register_sapinst args: chdir: "{{ sap_swpm_sapinst_path }}" - async: 32400 # Seconds for maximum runtime, set to 9 hours - poll: 0 # Seconds between polls, use 0 to run Ansible Tasks concurrently + +# Execute SAP SWPM +# Reason for noqa: This command installs software, so it will change things +# - name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when +# ansible.builtin.command: "{{ __sap_swpm_sapinst_command }}" +# register: __sap_swpm_register_sapinst_async_job +# args: +# chdir: "{{ sap_swpm_sapinst_path }}" +# async: 32400 # Seconds for maximum runtime, set to 9 hours +# poll: 0 # Seconds between polls, use 0 to run Ansible Tasks concurrently # Monitor sapinst process (i.e. ps aux | grep sapinst) and wait for exit -- name: SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds - community.general.pids: - name: sapinst +# - name: SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds +# community.general.pids: +# name: sapinst # shell: ps -ef | awk '/sapinst/&&!/awk/&&!/ansible/{print}' - register: pids_sapinst - until: "pids_sapinst.pids | length == 0" +# register: pids_sapinst +# until: "pids_sapinst.pids | length == 0" # until: "pids_sapinst.stdout | length == 0" - retries: 1000 - delay: 60 - -- name: SAP SWPM - Verify if sapinst process finished successfully - ansible.builtin.async_status: - jid: "{{ sap_swpm_async_job.ansible_job_id }}" - register: sap_swpm_stdout_register - failed_when: sap_swpm_stdout_register.finished != 1 or sap_swpm_stdout_register.rc != 0 - #until: sap_swpm_stdout_register.finished - #retries: 1000 - #delay: 60 - -#- name: SAP SWPM - debug SAP SWPM return/exit code -# debug: -# msg: "{{ sap_swpm_stdout_register.rc }}" +# retries: 1000 +# delay: 60 + +# - name: SAP SWPM - Verify if sapinst process finished successfully +# ansible.builtin.async_status: +# jid: "{{ __sap_swpm_register_sapinst_async_job.ansible_job_id }}" +# register: __sap_swpm_register_sapinst +# failed_when: __sap_swpm_register_sapinst.finished != 1 or __sap_swpm_register_sapinst.rc != 0 +# #until: __sap_swpm_register_sapinst.finished +# #retries: 1000 +# #delay: 60 + +- name: SAP SWPM - Display the sapinst return code + ansible.builtin.debug: + msg: "{{ __sap_swpm_register_sapinst.rc }}" #- name: SAP SWPM - debug SAP SWPM stdout # debug: -# msg: "{{ sap_swpm_stdout_register.stdout_lines }}" +# msg: "{{ __sap_swpm_register_sapinst.stdout_lines }}" - name: SAP SWPM - Find last installation location ansible.builtin.command: cat /tmp/sapinst_instdir/.lastInstallationLocation From bc5cf3f57c99d1361a3ab1bc1682c933218a54ec Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 22 Jul 2022 09:02:44 +0000 Subject: [PATCH 088/375] sap_ha_install_pacemaker: improved node online check --- .../tasks/cluster_setup.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml index db661f6fe..63be2c696 100644 --- a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml +++ b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml @@ -10,18 +10,26 @@ register: __sap_ha_install_pacemaker_cluster_create changed_when: __sap_ha_install_pacemaker_cluster_create.rc == 0 -- name: "SAP Pacemaker Setup - Check cluster nodes are online" +- name: "SAP Pacemaker Setup - Get cluster node corosync status" ansible.builtin.shell: | set -e -o pipefail - pcs status nodes corosync | awk -F ':' '/Offline/{print $2}' + pcs status nodes corosync | grep "Online" args: executable: /usr/bin/bash register: __sap_ha_install_pacemaker_cluster_online - failed_when: - - __sap_ha_install_pacemaker_cluster_online.stderr|length != '0' - - __sap_ha_install_pacemaker_cluster_online.stdout|length != '0' + failed_when: false changed_when: false +- name: "SAP PAcemaker Setup - Verify that all nodes are online" + ansible.builtin.assert: + that: + - item.node_name.split('.')[0] in __sap_ha_install_pacemaker_cluster_online.stdout + quiet: true + fail_msg: "Node not found in 'Online' status!" + loop: "{{ sap_ha_install_pacemaker_cluster_nodes }}" + loop_control: + label: "Is online: {{ item.node_name.split('.')[0] }}" + #- name: "SAP Pacemaker Setup - Set Expected Votes = {{ sap_ha_install_pacemaker_cluster_nodes | length }}" # ansible.builtin.shell: | # pcs quorum expected-votes {{ sap_ha_install_pacemaker_cluster_nodes | length }} From fa26a6e592fd1c70311948610d4a2108f1b7cf6c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 22 Jul 2022 09:09:24 +0000 Subject: [PATCH 089/375] sap_ha_set_hana: linter updates --- .../tasks/cluster_constraint.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_set_hana/tasks/cluster_constraint.yml b/roles/sap_ha_set_hana/tasks/cluster_constraint.yml index 975ac3885..28949bab1 100644 --- a/roles/sap_ha_set_hana/tasks/cluster_constraint.yml +++ b/roles/sap_ha_set_hana/tasks/cluster_constraint.yml @@ -3,25 +3,32 @@ - name: "SAP Pacemaker Hana - check constraint order HANA TOPOLOGY" ansible.builtin.shell: | + set -e -o pipefail pcs constraint order --full | grep "id:"| awk -F "id:" '{ print $2 }' | \ grep order-SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone-SAPHana - register: sap_ha_set_hana_check_constraint_order_topology + args: + executable: /usr/bin/bash + register: __sap_ha_set_hana_check_constraint_order_topology failed_when: false changed_when: false - name: "SAP Pacemaker Hana - set ORDER Constraints" - ansible.builtin.shell: | + ansible.builtin.command: | pcs constraint order \ SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone then \ SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone symmetrical=false + register: __sap_ha_set_hana_order_constraint when: - - sap_ha_set_hana_check_constraint_order_topology.rc == 1 + - __sap_ha_set_hana_check_constraint_order_topology.rc == 1 - name: "SAP Pacemaker Hana - check constraint colocation VIP with MASTER HANA" ansible.builtin.shell: | + set -e -o pipefail pcs constraint colocation --full | \ grep colocation-vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER-SAPHana - register: sap_ha_set_hana_check_constraint_collocation_vip_master + args: + executable: /usr/bin/bash + register: __sap_ha_set_hana_check_constraint_collocation_vip_master failed_when: false changed_when: false when: sap_ha_set_hana_vip1 is defined @@ -37,5 +44,5 @@ then start \ vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER when: - - sap_ha_set_hana_check_constraint_collocation_vip_master.rc == 1 + - __sap_ha_set_hana_check_constraint_collocation_vip_master.rc == 1 - sap_ha_set_hana_vip1 is defined From 6127f5ea58e3b20f8082961ebb8377d38dcb9baa Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 22 Jul 2022 09:58:28 +0000 Subject: [PATCH 090/375] sap_ha_set_hana: another linter fix --- roles/sap_ha_set_hana/tasks/cluster_resources.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_set_hana/tasks/cluster_resources.yml b/roles/sap_ha_set_hana/tasks/cluster_resources.yml index d63b95129..0b5049bac 100644 --- a/roles/sap_ha_set_hana/tasks/cluster_resources.yml +++ b/roles/sap_ha_set_hana/tasks/cluster_resources.yml @@ -1,7 +1,7 @@ --- # The following tasks are only included on the primary node! -- name: "SAP Pacemaker Hana - Resource default update" +- name: "SAP Pacemaker Hana - Resource defaults update command on RHEL8.2" ansible.builtin.set_fact: sap_ha_set_hana_resource_defaults: "" when: ansible_distribution_version == "8.2" @@ -10,6 +10,7 @@ ansible.builtin.shell: | pcs resource defaults {{ sap_ha_set_hana_resource_defaults }} resource-stickiness=1000 pcs resource defaults {{ sap_ha_set_hana_resource_defaults }} migration-threshold=5000 + changed_when: true - name: "SAP Pacemaker Hana - Check SAP HANA Resources Topology" ansible.builtin.shell: | From 95533b0f318f6f1bccfb860a91c64d3d3eb73133 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 22 Jul 2022 13:11:03 +0000 Subject: [PATCH 091/375] HA roles: improved pipefail integration and removed all pointers to bash --- roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml | 8 -------- roles/sap_ha_install_hana_hsr/tasks/log_mode.yml | 6 +----- roles/sap_ha_install_hana_hsr/tasks/run_backup.yml | 4 ---- roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml | 4 +--- roles/sap_ha_install_pacemaker/tasks/main.yml | 2 -- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 2 -- roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml | 1 - roles/sap_ha_set_hana/tasks/cluster_constraint.yml | 8 ++------ roles/sap_ha_set_hana/tasks/cluster_srhook.yml | 2 -- 9 files changed, 4 insertions(+), 33 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml index 0511bc44b..688d93653 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/configure_hsr.yml @@ -4,8 +4,6 @@ source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_state - args: - executable: /bin/bash become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" register: __sap_ha_install_hana_hsr_srstate @@ -19,8 +17,6 @@ source /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/home/.sapenv.sh && \ /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/hdbnsutil \ -sr_enable --name="{{ item.hana_site }}" - args: - executable: /bin/bash become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" register: enablesr @@ -43,8 +39,6 @@ --remoteHost={{ __sap_ha_install_hana_hsr_primary_node_name }} --remoteInstance={{ sap_ha_install_hana_hsr_instance_number }} \ --replicationMode={{ sap_ha_install_hana_hsr_rep_mode }} --operationMode={{ sap_ha_install_hana_hsr_oper_mode }} \ --online - args: - executable: /bin/bash become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" register: registersr @@ -60,8 +54,6 @@ ansible.builtin.shell: | /usr/sap/{{ sap_ha_install_hana_hsr_sid | upper }}/HDB{{ sap_ha_install_hana_hsr_instance_number }}/exe/sapcontrol \ -nr {{ sap_ha_install_hana_hsr_instance_number }} -function StartSystem - args: - executable: /bin/bash become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" register: startinstance diff --git a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml index 0a9383546..0b007b2a2 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/log_mode.yml @@ -4,10 +4,8 @@ become: true become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.shell: | - set -e -o pipefail + set -o pipefail && grep "log_mode" /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/global/hdb/custom/config/global.ini | grep normal - args: - executable: /usr/bin/bash register: sap_ha_install_hana_hsr_log_mode failed_when: false changed_when: false @@ -24,7 +22,5 @@ ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('persistence', 'log_mode') = 'normal' WITH RECONFIGURE; ALTER SYSTEM ALTER CONFIGURATION('global.ini','HOST','{{ ansible_hostname }}') SET ('persistence','log_mode') = 'normal' WITH RECONFIGURE; EOF - args: - executable: /bin/bash ignore_errors: true when: sap_ha_install_hana_hsr_log_mode.rc != '0' diff --git a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml index 23f7f3d76..049c40d80 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/run_backup.yml @@ -6,8 +6,6 @@ -m < Date: Fri, 22 Jul 2022 13:20:17 +0000 Subject: [PATCH 092/375] sap_ha_install_pacemaker: fixed typo - https://github.com/sap-linuxlab/community.sap_install/pull/185#discussion_r927611077 --- roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml index 8fae0e18f..131720f55 100644 --- a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml +++ b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml @@ -18,7 +18,7 @@ failed_when: false changed_when: false -- name: "SAP PAcemaker Setup - Verify that all nodes are online" +- name: "SAP Pacemaker Setup - Verify that all nodes are online" ansible.builtin.assert: that: - item.node_name.split('.')[0] in __sap_ha_install_pacemaker_cluster_online.stdout From 3f2319844d46743760384391e9b43ea1ab72be30 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 22 Jul 2022 13:31:29 +0000 Subject: [PATCH 093/375] sap_ha_install_pacemaker: updated title - https://github.com/sap-linuxlab/community.sap_install/pull/185#discussion_r927610488 --- roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml index 131720f55..3a60e9dee 100644 --- a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml +++ b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml @@ -1,7 +1,7 @@ --- # The following tasks are only included on the primary node! -- name: "SAP Pacemaker Setup - Setup Pacemaker cluster" +- name: "SAP Pacemaker Setup - Setup and enable/start Pacemaker cluster" ansible.builtin.command: | pcs cluster setup \ {{ sap_ha_install_pacemaker_cluster_name }} {% for node in sap_ha_install_pacemaker_cluster_nodes %}{{ node.node_name }}{{ " " if not loop.last else "" }}{% endfor %} \ From 83288c8700100c5ac9bbe5b528926497df5608e3 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 29 Jul 2022 13:01:19 +0100 Subject: [PATCH 094/375] sap_swpm: increase flexibility of default mode for SAP AnyDB --- roles/sap_swpm/README.md | 66 +++- roles/sap_swpm/defaults/main.yml | 8 + .../sap_swpm/tasks/swpm/swpm_pre_install.yml | 10 +- roles/sap_swpm/templates/configfile.j2 | 373 ++++++++++++++---- 4 files changed, 383 insertions(+), 74 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index c1e2e7dff..8654f1410 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -45,6 +45,8 @@ This role has been tested and working for the following SAP products 4. SAP HANA Database MDC DB Tenant Backup (for restore) - stored on the local disk of the machine where the SAP HANA database server will reside + NOTE: Specific media requirements will use format `SAPINST.CD.PACKAGE. = `, and the media names can be discovered by using this command on the SWPM directory `grep -rwh " = +{% endif %} + +{% if 'swpm_installation_media_swpm2_hana' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm2_hana +###### +HDB_Software_Dialogs.useMediaCD = {{ sap_swpm_software_use_media }} {% endif %} +{% if 'swpm_installation_media_swpm1' in sap_swpm_inifile_list %} ###### -# installation_media_swpm1 +# swpm_installation_media_swpm1 ###### -{% if 'installation_media_swpm1' in sap_swpm_inifile_list %} SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} SAPINST.CD.PACKAGE.LANGUAGE = {{ sap_swpm_cd_language_path }} @@ -19,10 +28,61 @@ SAPINST.CD.PACKAGE.JAVA = {{ sap_swpm_cd_java_path }} SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} {% endif %} +{% if 'swpm_installation_media_swpm1_exportfiles' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_exportfiles +###### +SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} +#SAPINST.CD.PACKAGE.LOAD = +{% endif %} + +{% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_ibmdb2 +###### +# Requested package : RDBMS-DB6 +SAPINST.CD.PACKAGE.DB2 = {{ sap_swpm_cd_ibmdb2_path }} + +# Requested package : RDBMS-DB6 CLIENT +SAPINST.CD.PACKAGE.DB2CLIENT = {{ sap_swpm_cd_ibmdb2_client_path }} + +# IBM DB2 software unpack path e.g. /db2/db2x01/db2_software +db6.DB2SoftwarePath = {{ sap_swpm_ibmdb2_unpack_path }} +{% endif %} + +{% if 'swpm_installation_media_swpm1_oracle' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_oracle +###### +# Requested package : RDBMS-ORA +SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle121_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI121 = {{ sap_swpm_cd_oracle121_client_path }} +{% endif %} + +{% if 'swpm_installation_media_swpm1_sapase' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_sapase +###### +# Requested package : RDBMS-SYB +SAPINST.CD.PACKAGE.RDBMS-SYB = {{ sap_swpm_cd_sapase_path }} +SAPINST.CD.PACKAGE.RDBMS-SYB-CLIENT = {{ sap_swpm_cd_sapase_client_path }} + +{% endif %} + +{% if 'swpm_installation_media_swpm1_sapmaxdb' in sap_swpm_inifile_list %} ###### -# sum +# swpm_installation_media_swpm1_sapmaxdb +###### +# Requested package : RDBMS-ADA +SAPINST.CD.PACKAGE.RDBMS-ADA = {{ sap_swpm_cd_sapmaxdb_path }} +{% endif %} + +{% if 'sum_config' in sap_swpm_inifile_list %} +###### +# sum_config ###### -{% if 'sum' in sap_swpm_inifile_list %} NW_ABAP_Prepare_SUM.SUMBatchFile = {{ sap_swpm_sum_batch_file }} NW_ABAP_Prepare_SUM.prepareSUM = {{ sap_swpm_sum_prepare | lower }} NW_ABAP_Prepare_SUM.startSUM = {{ sap_swpm_sum_start | lower }} @@ -33,58 +93,180 @@ NW_ABAP_TMSConfig.configureTMS = {{ sap_swpm_configure_tms | lower }} NW_ABAP_TMSConfig.transportPassword = {{ sap_swpm_tmsadm_password }} {% endif %} +{% if 'credentials' in sap_swpm_inifile_list %} ###### # credentials ###### -{% if 'credentials' in sap_swpm_inifile_list %} NW_GetMasterPassword.masterPwd = {{ sap_swpm_master_password }} -HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_swpm_db_schema_password }} nwUsers.sidadmPassword = {{ sap_swpm_sap_sidadm_password }} NW_DDIC_Password.ddic000Password = {{ sap_swpm_ddic_000_password }} DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} hostAgent.sapAdmPassword = {{ sap_swpm_sapadm_password }} # NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = -# storageBasedCopy.abapSchemaPassword = +{% endif %} + +{% if 'credentials_hana' in sap_swpm_inifile_list %} +###### +# credentials_hana +###### +HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_swpm_db_schema_password }} storageBasedCopy.hdb.systemPassword = {{ sap_swpm_db_system_password }} -# storageBasedCopy.javaSchemaPassword = {% endif %} +{% if 'credentials_anydb_ibmdb2' in sap_swpm_inifile_list %} ###### -# db_hana_restore +# credentials_anydb_ibmdb2 ###### -{% if 'db_hana_restore' in sap_swpm_inifile_list %} -storageBasedCopy.hdb.instanceNumber = {{ sap_swpm_db_instance_nr }} -NW_HDB_getDBInfo.systemPasswordBackup = {{ sap_swpm_backup_system_password }} -HDB_Recovery_Dialogs.backupLocation = {{ sap_swpm_backup_location }} -HDB_Recovery_Dialogs.backupName = {{ sap_swpm_backup_prefix }} -HDB_Recovery_Dialogs.sapControlWsdlUrl = http://{{ sap_swpm_db_host }}:5{{ sap_swpm_db_instance_nr }}13/SAPControl?wsdl -HDB_Recovery_Dialogs.sidAdmName = {{ sap_swpm_db_sid|lower }}adm -HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} -# HDB_Recovery_Dialogs.backupDestinationType = File -# HDB_System_Check_Dialogs.initTopology = false -# HDB_Recovery_Dialogs.skipExistenceCheck = false -# HDB_Recovery_Dialogs.sourceDatabaseSid = -# HDB_Recovery_Dialogs.useLicenseFile = false -# NW_CreateDBandLoad.movePVCforUsagePiAndDi = -# HDB_Recovery_Dialogs.licenseFile = +nwUsers.db6.db2sidPassword = {{ sap_swpm_sap_sidadm_password }} {% endif %} +{% if 'credentials_anydb_oracledb' in sap_swpm_inifile_list %} +###### +# credentials_anydb_oracledb ###### -# db_hana_config +ora.oraclePassword = {{ sap_swpm_sap_sidadm_password }} +ora.orasidPassword = {{ sap_swpm_sap_sidadm_password }} +ora.SysPassword = {{ sap_swpm_db_system_password }} +ora.SystemPassword = {{ sap_swpm_db_system_password }} +{% endif %} + +{% if 'credentials_anydb_sapase' in sap_swpm_inifile_list %} +###### +# credentials_anydb_sapase +###### +nwUsers.syb.sybsidPassword = {{ sap_swpm_sap_sidadm_password }} +#SYB.NW_DB.encryptionMasterKeyPassword = +SYB.NW_DB.sa_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsa_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsr3_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsr3db_pass = {{ sap_swpm_db_system_password }} +#SYB.NW_DB.sapsso_pass = +#SYB.NW_DB.sslPassword = +{% endif %} + +{% if 'credentials_anydb_sapmaxdb' in sap_swpm_inifile_list %} +###### +# credentials_anydb_sapmaxdb +# +# The password of user DBUser may only consist of alphanumeric characters and the special characters #, $, @ and _ +###### +nwUsers.ada.sqdsidPassword = {{ sap_swpm_sap_sidadm_password }} +Sdb_DBUser.dbaPassword = {{ sap_swpm_db_system_password }} +Sdb_DBUser.dbmPassword = {{ sap_swpm_db_system_password }} +Sdb_Schema_Dialogs.dbSchemaPassword = {{ sap_swpm_db_schema_password }} +{% endif %} + +{% if 'db_config_hana' in sap_swpm_inifile_list %} +###### +# db_config_hana ###### -{% if 'db_hana_config' in sap_swpm_inifile_list %} # HDB_Schema_Check_Dialogs.dropSchema = false HDB_Schema_Check_Dialogs.schemaName = {{ sap_swpm_db_schema }} HDB_Schema_Check_Dialogs.validateSchemaName = false # HDB_Userstore.doNotResolveHostnames = # HDB_Userstore.useABAPSSFS = false # NW_HDB_DBClient.checkCreateUserstore = true +# hdb.create.dbacockpit.user = false +# HDB_Userstore.systemDBPort = +{% endif %} + +{% if 'db_config_anydb_all' in sap_swpm_inifile_list %} +###### +# db_config_anydb_all +###### +NW_ABAP_Import_Dialog.dbCodepage = 4103 +NW_DDIC_Password.needDDICPasswords = true +{% endif %} + +{% if 'db_config_anydb_ibmdb2' in sap_swpm_inifile_list %} +###### +# db_config_anydb_ibmdb2 +###### +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast LOAD:COMPRESS_ALL:DEF_CRT +NW_getDBInfoGeneric.dbhost = {{ sap_swpm_db_host }} +NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} +# db6.useMcod = true +# db6.useBluSettings = false +db6.allowUnsignedDatabaseSoftware = true +db6.cluster.ClusterType = HADR (High Availability Disaster Recovery) +db6.createTablespacesUsingSapinst = true +db6.minimizeDatabaseSizeCompression = true +db6.TablespacePoolSizes = SAPSID#DATA{20} +db6.useAutoStorage = true +db6.useExtraSapdataSaptmpDirLayout = false +db6.UseStandardTablespacePool = true +db6.usesLDAP = false +# nwUsers.db6.db2sidUid = +storageBasedCopy.db6.CommunicationPortNumber = 5912 +storageBasedCopy.db6.PortRangeEnd = 5917 +storageBasedCopy.db6.PortRangeStart = 5914 +{% endif %} + +{% if 'db_config_anydb_oracledb' in sap_swpm_inifile_list %} +###### +# db_config_anydb_oracledb +###### +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast +NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/121 +ora.multitenant.pdbsid = {{ sap_swpm_sid | upper }} +storageBasedCopy.ora.clientVersion = 121 +storageBasedCopy.ora.serverVersion = 121 {% endif %} +{% if 'db_config_anydb_sapase' in sap_swpm_inifile_list %} +###### +# db_config_anydb_sapase +###### +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -c 100000 -loadprocedure fast +NW_SYB_DBPostload.numberParallelStatisticJobs = 0 +SYB.NW_DB.aseSortOrder = binaryalt +SYB.NW_DB.databaseDevices = data device for SAP,/sybase/{{ sap_swpm_sid | upper }}/sapdata_1,88,,,{{ sap_swpm_sid | upper }}_data_001,log device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saplog_1,10,,,{{ sap_swpm_sid | upper }}_log_001,data device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_data_001,log device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_log_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_002,log device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,0.5,,,sybsecurity_log_001,temp device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saptemp,8,,,saptempdb_data_001, +SYB.NW_DB.databaseType = ase +SYB.NW_DB.enableGranularPermissions = true +SYB.NW_DB.enableStrongCipherSuitesForSSL = false +SYB.NW_DB.folderDatabaseSoftware = /sybase/{{ sap_swpm_sid | upper }} +SYB.NW_DB.folderDiagDevice = /sybase/{{ sap_swpm_sid | upper }}/sapdiag +SYB.NW_DB.folderSAPTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/saptemp +SYB.NW_DB.folderSecurityDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsecurity +SYB.NW_DB.folderSystemDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.folderTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/sybtemp +SYB.NW_DB.indexConsumers = 3 +SYB.NW_DB.initializeDefaultSystemEncryptionPassword = false +SYB.NW_DB.maxIndexParallelDegree = 10 +SYB.NW_DB.maxQueryParallelDegree = 10 +SYB.NW_DB.numberWorkerProcesses = 50 +SYB.NW_DB.portBackupServer = 4902 +SYB.NW_DB.portDatabaseServer = 4901 +SYB.NW_DB.portJobScheduler = 4903 +SYB.NW_DB.portXPServer = 4904 +SYB.NW_DB.sqlServerConnections = 200 +SYB.NW_DB.sqlServerHostname = {{ sap_swpm_db_host }} +SYB.NW_DB.sybmgmtdbDataDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.sybmgmtdbLogDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.userstore_hostname = {{ sap_swpm_ascs_instance_hostname }} +{% endif %} + +{% if 'db_config_anydb_sapmaxdb' in sap_swpm_inifile_list %} +###### +# db_config_anydb_sapmaxdb +###### +NW_ABAP_Import_Dialog.migmonJobNum = 90 +NW_ABAP_Import_Dialog.migmonLoadArgs = -para_cnt 90 +NW_ADA_getDBInfo.dbsid = {{ sap_swpm_db_sid }} +SdbInstanceDialogs.DB_sessions = 100 +SdbInstanceDialogs.minlogsize = 4000 +SdbInstanceDialogs.sapdataFolder = sapdata +SdbInstanceDialogs.saplogFolder = saplog +{% endif %} + +{% if 'db_connection_nw_hana' in sap_swpm_inifile_list %} ###### -# db_hana_nw_connection +# db_connection_nw_hana ###### -{% if 'db_hana_nw_connection' in sap_swpm_inifile_list %} NW_HDB_getDBInfo.dbhost = {{ sap_swpm_db_host }} NW_HDB_getDBInfo.dbsid = {{ sap_swpm_db_sid }} NW_HDB_getDBInfo.systemid = {{ sap_swpm_db_sid }} @@ -97,40 +279,70 @@ NW_HDB_DB.javaSchemaName = {{ sap_swpm_db_schema_java }} NW_HDB_DB.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ sap_swpm_db_sid }}/HDB{{ sap_swpm_db_instance_nr }}/backup/data/DB_HDB NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} -NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid|lower }}adm +NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} # NW_HDB_getDBInfo.tenantOsGroup = # NW_HDB_getDBInfo.tenantOsUser = # NW_HDB_DBClient.clientPathStrategy = LOCAL {% endif %} +{% if 'db_connection_nw_anydb_ibmdb2' in sap_swpm_inifile_list %} ###### -# nw_java_ume +# db_connection_nw_anydb_ibmdb2 ###### -{% if 'nw_java_ume' in sap_swpm_inifile_list %} -UmeConfiguration.adminName = J2EE_ADM_{{ sap_swpm_sid }} -UmeConfiguration.adminPassword = {{ sap_swpm_ume_j2ee_admin_password }} -UmeConfiguration.guestName = J2EE_GST_{{ sap_swpm_sid }} -# UmeConfiguration.sapjsfName = SAPJSF -UmeConfiguration.sapjsfPassword = {{ sap_swpm_ume_sapjsf_password }} -UmeConfiguration.umeClient = {{ sap_swpm_ume_client_nr }} -UmeConfiguration.umeHost = {{ sap_swpm_pas_instance_hostname }} -UmeConfiguration.umeInstance = {{ sap_swpm_ume_instance_nr }} -UmeConfiguration.umeType = {{ sap_swpm_ume_type }} +# db6.UseDb2SSLClientServerComm = false +# nwUsers.db6.sapsidUid = +nwUsers.db6.sapsidPassword = {{ sap_swpm_sapadm_password }} +NW_DB6_DB.db6.abap.connect.user = sap{{ sap_swpm_db_sid | lower }} +NW_DB6_DB.db6.abap.schema = sap{{ sap_swpm_db_sid | lower }} {% endif %} +{% if 'db_connection_nw_anydb_oracledb' in sap_swpm_inifile_list %} ###### -# nw_other_config +# db_connection_nw_anydb_oracledb +###### +storageBasedCopy.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} +storageBasedCopy.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} +{% endif %} + +{% if 'db_restore_hana' in sap_swpm_inifile_list %} +###### +# db_restore_hana +###### +storageBasedCopy.hdb.instanceNumber = {{ sap_swpm_db_instance_nr }} +NW_HDB_getDBInfo.systemPasswordBackup = {{ sap_swpm_backup_system_password }} +HDB_Recovery_Dialogs.backupLocation = {{ sap_swpm_backup_location }} +HDB_Recovery_Dialogs.backupName = {{ sap_swpm_backup_prefix }} +HDB_Recovery_Dialogs.sapControlWsdlUrl = http://{{ sap_swpm_db_host }}:5{{ sap_swpm_db_instance_nr }}13/SAPControl?wsdl +HDB_Recovery_Dialogs.sidAdmName = {{ sap_swpm_db_sid | lower }}adm +HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} +# HDB_Recovery_Dialogs.backupDestinationType = File +# HDB_System_Check_Dialogs.initTopology = false +# HDB_Recovery_Dialogs.skipExistenceCheck = false +# HDB_Recovery_Dialogs.sourceDatabaseSid = +# HDB_Recovery_Dialogs.useLicenseFile = false +# NW_CreateDBandLoad.movePVCforUsagePiAndDi = +# HDB_Recovery_Dialogs.licenseFile = +{% endif %} + +{% if 'nw_config_anydb' in sap_swpm_inifile_list %} +###### +# nw_config_anydb +###### +NW_CI_Instance_ABAP_Reports.executeReportsForDepooling = false +{% endif %} + +{% if 'nw_config_other' in sap_swpm_inifile_list %} +###### +# nw_config_other ###### -{% if 'nw_other_config' in sap_swpm_inifile_list %} -# hdb.create.dbacockpit.user = false # NW_Delete_Sapinst_Users.removeUsers = false NW_getFQDN.FQDN = {{ sap_swpm_fqdn }} NW_getFQDN.setFQDN = {{ sap_swpm_set_fqdn | lower }} # NW_getFQDN.resolve = true NW_getLoadType.loadType = {{ sap_swpm_load_type }} # NW_getUnicode.isUnicode = -NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid }}/profile +NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid | upper }}/profile # NW_readProfileDir.profilesAvailable = # MessageServer.configureAclInfo = false # NW_Exit_Before_Systemstart.exit = false @@ -141,36 +353,34 @@ NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} # OS4.DestinationASP = {% endif %} +{% if 'nw_config_central_instance' in sap_swpm_inifile_list %} ###### -# nw_central_instance +# nw_config_central_instance ###### -{% if 'nw_central_instance' in sap_swpm_inifile_list %} NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_CI_Instance.scsVirtualHostname = {{ sap_swpm_pas_instance_hostname }} NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_CI_Instance.ciVirtualHostname = {{ sap_swpm_pas_instance_hostname }} -nw_instance_ers.ersVirtualHostname = {{ sap_swpm_ers_instance_hostname }} {% endif %} +{% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_list %} ###### -# nw_gateway_webdisp +# nw_config_webdisp_gateway # # It is recommended to install gateway as part of ASCS # It is NOT recommended to install webdispatcher as part of ASCS. A separate Web Dispatcher instance must be installed ###### -{% if 'nw_gateway_webdisp' in sap_swpm_inifile_list %} -NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway|lower }} +NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} # NW_CI_Instance.ascsInstallGateway = false # NW_CI_Instance.ascsInstallWebDispatcher = false # NW_SCS_Instance.ascsInstallWebDispatcher = false {% endif %} +{% if 'nw_config_instance' in sap_swpm_inifile_list %} ###### -# nw_instance_config +# nw_config_instance ###### -{% if 'nw_instance_config' in sap_swpm_inifile_list %} NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} -nw_instance_ers.ersInstanceNumber = {{ sap_swpm_ers_instance_nr }} # NW_SCS_Instance.ascsInstanceNumber = NW_SCS_Instance.instanceNumber = {{ sap_swpm_ascs_instance_nr }} NW_CI_Instance.ciInstanceNumber = {{ sap_swpm_pas_instance_nr }} @@ -182,10 +392,18 @@ NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} # NW_CI_Instance.nodesNumber = defNodes {% endif %} +{% if 'nw_config_ers' in sap_swpm_inifile_list %} ###### -# nw_ports_config +# nw_config_ers +###### +nw_instance_ers.ersVirtualHostname = {{ sap_swpm_ers_instance_hostname }} +nw_instance_ers.ersInstanceNumber = {{ sap_swpm_ers_instance_nr }} +{% endif %} + +{% if 'nw_config_ports' in sap_swpm_inifile_list %} +###### +# nw_config_ports ###### -{% if 'nw_ports_config' in sap_swpm_inifile_list %} NW_CI_Instance.ciMSPort = 36{{ sap_swpm_ascs_instance_nr }} NW_checkMsgServer.abapMSPort = 36{{ sap_swpm_ascs_instance_nr }} # NW_CI_Instance.ciMSPortInternal = @@ -199,13 +417,27 @@ NW_checkMsgServer.abapMSPort = 36{{ sap_swpm_ascs_instance_nr }} # NW_CI_Instance_ABAP_Reports.enableSPAMUpdateWithoutStackXml = false # NW_CI_Instance_ABAP_Reports.enableTMSConfigWithoutStackXml = false # NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false -# HDB_Userstore.systemDBPort = {% endif %} +{% if 'nw_config_java_ume' in sap_swpm_inifile_list %} ###### -# generic_webdisp +# nw_config_java_ume +###### +UmeConfiguration.adminName = J2EE_ADM_{{ sap_swpm_sid }} +UmeConfiguration.adminPassword = {{ sap_swpm_ume_j2ee_admin_password }} +UmeConfiguration.guestName = J2EE_GST_{{ sap_swpm_sid }} +# UmeConfiguration.sapjsfName = SAPJSF +UmeConfiguration.sapjsfPassword = {{ sap_swpm_ume_sapjsf_password }} +UmeConfiguration.umeClient = {{ sap_swpm_ume_client_nr }} +UmeConfiguration.umeHost = {{ sap_swpm_pas_instance_hostname }} +UmeConfiguration.umeInstance = {{ sap_swpm_ume_instance_nr }} +UmeConfiguration.umeType = {{ sap_swpm_ume_type }} +{% endif %} + +{% if 'nw_config_webdisp_generic' in sap_swpm_inifile_list %} +###### +# nw_config_webdisp_generic ###### -{% if 'generic_webdisp' in sap_swpm_inifile_list %} NW_Webdispatcher_Instance.wdInstanceNumber = {{ sap_swpm_wd_instance_nr }} NW_webdispatcher_Instance.activateICF = {{ sap_swpm_wd_activate_icf | lower }} NW_Webdispatcher_Instance.configureSystemConnectivity = {{ sap_swpm_wd_system_connectivity | lower }} @@ -223,20 +455,19 @@ NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} {% endif %} +{% if 'nw_config_host_agent' in sap_swpm_inifile_list %} ###### -# unix_user +# nw_config_host_agent ###### -{% if 'unix_user' in sap_swpm_inifile_list %} -nwUsers.sapadmUID = {{ sap_swpm_sapadm_uid }} -nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} -nwUsers.sidAdmUID = {{ sap_swpm_sidadm_uid }} -# NW_GetSidNoProfiles.sapmnt = /sapmnt +NW_System.installSAPHostAgent = {{ sap_swpm_install_saphostagent | lower }} {% endif %} +{% if 'sap_os_nix_user' in sap_swpm_inifile_list %} ###### -# other +# sap_os_nix_user ###### -{% if 'other' in sap_swpm_inifile_list %} -NW_System.installSAPHostAgent = {{ sap_swpm_install_saphostagent | lower }} -NW_CI_Instance_ABAP_Reports.executeReportsForDepooling = false +nwUsers.sapadmUID = {{ sap_swpm_sapadm_uid }} +nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} +nwUsers.sidAdmUID = {{ sap_swpm_sidadm_uid }} +# NW_GetSidNoProfiles.sapmnt = /sapmnt {% endif %} From d769fcf7ca20258cde13c525c29361c0edffafe6 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 29 Jul 2022 13:36:15 +0100 Subject: [PATCH 095/375] sap_swpm: fix list in defaults --- roles/sap_swpm/README.md | 4 +-- roles/sap_swpm/defaults/main.yml | 42 +++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index 8654f1410..fe38bd387 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -139,9 +139,9 @@ Every SAP Software installation via SAP Software Provisioning Manager (SWPM) is - Advanced Templates (`sap_swpm_templates_product_input: advanced_templates`), optional use of templating definitions for repeated installations - Inifile Reuse (`sap_swpm_templates_product_input: inifile_reuse`), run previously-defined installations with an existing SWPM Unattended inifile.params -### Default mode variables +### Default Templates mode variables -Example using all inifile list parameters: +Example using all inifile list parameters with the Default Templates mode: ``` sap_swpm_ansible_role_mode: default_templates diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 223c59a0d..af01fbb0e 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -38,18 +38,38 @@ sap_swpm_inifile_reuse_destination: ######################################## sap_swpm_inifile_list: - - installation_media - - sum + - swpm_installation_media + - swpm_installation_media_swpm2_hana +# - swpm_installation_media_swpm1 +# - swpm_installation_media_swpm1_ibmdb2 +# - sum_config - credentials - - db_hana_config - - db_hana_restore - - db_hana_nw_connection - - nw_other_config - - nw_central_instance - - nw_gateway_webdisp - - nw_instance_config - - nw_ports_config - - unix_user + - credentials_hana +# - credentials_anydb_ibmdb2 +# - credentials_anydb_oracledb +# - credentials_anydb_sapase +# - credentials_anydb_sapmaxdb + - db_config_hana +# - db_config_anydb_all +# - db_config_anydb_ibmdb2 +# - db_config_anydb_oracledb +# - db_config_anydb_sapase +# - db_config_anydb_sapmaxdb + - db_connection_nw_hana +# - db_connection_nw_anydb_ibmdb2 +# - db_connection_nw_anydb_oracledb + - db_restore_hana +# - nw_config_anydb + - nw_config_other + - nw_config_central_instance +# - nw_config_ers +# - nw_config_webdisp_gateway + - nw_config_instance + - nw_config_ports +# - nw_config_java_ume +# - nw_config_webdisp_generic + - nw_config_host_agent + - sap_os_nix_user ######################################## From 1fc1fec28c0c0e3a394295b30fca70e4aced79a1 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sat, 30 Jul 2022 00:31:55 +0100 Subject: [PATCH 096/375] sap_swpm: fix typo --- roles/sap_swpm/templates/configfile.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 6cad3c74e..6b9ae24ad 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -50,9 +50,9 @@ SAPINST.CD.PACKAGE.DB2CLIENT = {{ sap_swpm_cd_ibmdb2_client_path }} db6.DB2SoftwarePath = {{ sap_swpm_ibmdb2_unpack_path }} {% endif %} -{% if 'swpm_installation_media_swpm1_oracle' in sap_swpm_inifile_list %} +{% if 'swpm_installation_media_swpm1_oracledb' in sap_swpm_inifile_list %} ###### -# swpm_installation_media_swpm1_oracle +# swpm_installation_media_swpm1_oracledb ###### # Requested package : RDBMS-ORA SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle121_path }} From f521889ca895841cc8eec58f02fe6e81d1a46941 Mon Sep 17 00:00:00 2001 From: Ranjith Rajaram Date: Wed, 3 Aug 2022 07:31:16 +0000 Subject: [PATCH 097/375] Cleanup of folders after SAP HANA Install --- roles/sap_hana_install/README.md | 3 +++ roles/sap_hana_install/defaults/main.yml | 7 +++++++ roles/sap_hana_install/tasks/post_install.yml | 13 +++++++++++++ 3 files changed, 23 insertions(+) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 68a7411b9..8a74e0231 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -81,6 +81,9 @@ If this role is executed on more than one host in parallel and the software extr the role will only extract the files on the first host on which the extraction has started. The role will proceed on the other hosts after the extraction of SAR files has completed. +If NFS is used for sharing the SAP HANA installation media between the nodes, then it is required to define `sap_hana_install_configfile_directory`. The default for `sap_hana_install_configfile_directory` is "{{ sap_hana_install_software_extract_directory }}/configfiles". This variable should point to a non nfs path. After installation, if a cleanup of configfile is required, then set `sap_hana_install_cleanup_configfile_directory` as true. If a cleanup of software extract directory is required then set sap_hana_install_cleanup_extract_directory as true. The default value for both these cleanup actins are false + + - Sample directory `sap_hana_install_software_extract_directory` containing extracted SAP HANA software installation files ```console [root@hanahost extracted]# ll -lrt diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 3a33797ef..4a1897507 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -11,6 +11,9 @@ sap_hana_install_software_directory: '/software/hana' # created again before the extraction starts. sap_hana_install_software_extract_directory: "{{ sap_hana_install_software_directory }}/extracted" +# If there is a requirement to cleanup "sap_hana_install_software_extract_directory" after SAP HANA Installation, then set the value to true. By default, this directory will not be removed +sap_hana_install_cleanup_extract_directory: false + # Set this variabe to `yes` if you want to copy the SAR files from `sap_hana_install_software_directory` # to `sap_hana_install_software_extract_directory/sarfiles` before extracting. # This might be useful if the SAR files are on a slow fileshare. @@ -49,6 +52,9 @@ sap_hana_install_verify_signature: no # Directory where to store the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_directory: "{{ sap_hana_install_software_extract_directory }}/configfiles" +# If a custom path for sap_hana_install_configfile_directory was defined and if there is a requirement to cleanup this directory, then set "sap_hana_install_cleanup_configfile_directory" as true. Incase if a custom path was not defined and "sap_hana_install_cleanup_extract_directory" was set as true, then the configfiles will be removed. +sap_hana_install_cleanup_configfile_directory: false + # File name prefix for the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_template_prefix: "hdblcm_configfile_template" @@ -178,3 +184,4 @@ sap_hana_install_create_initial_tenant: 'y' # The hostname is set by 'hdblcm --dump_configfile_template' during the preinstall phase but can also # be set to a different value in your playbook or hostvars: # sap_hana_install_hostname: + diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 5010877af..d1c2cd2dc 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -160,6 +160,19 @@ __sap_hana_install_fact_hana_version: "{{ __sap_hana_install_register_install_result.stdout.split(';')[0] }}" when: not ansible_check_mode + +- name: SAP HANA Post Install - Deleting software extract directory '{{ sap_hana_install_software_extract_directory }}' + ansible.builtin.file: + path: "{{ sap_hana_install_software_extract_directory }}" + state: absent + when: sap_hana_install_cleanup_extract_directory + +- name: SAP HANA Post Install - Deleting Configfile Directory '{{ sap_hana_install_configfile_directory }}' + ansible.builtin.file: + path: "{{ sap_hana_install_configfile_directory }}" + state: absent + when: sap_hana_install_cleanup_configfile_directory + - name: Set fact - HANA hosts ansible.builtin.set_fact: __sap_hana_install_fact_hana_hosts: "{{ __sap_hana_install_register_install_result.stdout.split(';')[1] }}" From eeecc9dad38d1b57da1403c091ffb0879e320a53 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 4 Aug 2022 17:38:28 +0100 Subject: [PATCH 098/375] sap_swpm: update notes --- roles/sap_swpm/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index fe38bd387..740647201 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -11,18 +11,20 @@ This role has been tested and working for the following scenarios This role has been tested and working for the following SAP products - SAP S/4HANA 1809, 1909, 2020, 2021 -- SAP B/4HANA +- SAP BW/4HANA - SAP Solution Manager 7.2 - SAP Netweaver Business Suite Applications (ECC, GRC, etc) - SAP Web Dispatcher -> The general rule is - if it runs in SWPM, this will work. +> The general rule is - if the installation uses SAP SWPM then this Ansible Role can be used. ### SAP Preconfigure -- Make sure required volumes and filesystems are configured in the host. You can use the role `sap_storage` to configure this. More info [here](/roles/sap_storage) +- Ensure the required volumes and filesystems are configured in the host. You can use the role `sap_storage` to configure this. More info [here](/roles/sap_storage) -- Please run the RHEL SAP System Role `sap_general_preconfigure` for initial host configuration +- Please run the RHEL SAP System Role `sap_general_preconfigure` for initial host configuration; as necessary, also use `sap_netweaver_preconfigure` and `sap_hana_preconfigure` + +- For further guidance on using SAP SWPM for different SAP Software installations, please see System Provisioning with Software Provisioning Manager (SWPM) - [User Guides for SAP SWPM 1.0](30839dda13b2485889466316ce5b39e9/c8ed609927fa4e45988200b153ac63d1.html?locale=en-US) and [User Guides for SAP SWPM 2.0](https://help.sap.com/docs/SOFTWARE_PROVISIONING_MANAGER/30839dda13b2485889466316ce5b39e9/6865029dacbe473fadd8eff339bfa568.html?locale=en-US) ### SAP Software Installation .SAR Files From 0b1a04d47764b337625111e4a7697d26290f4d7e Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 14 Aug 2022 10:40:27 +0100 Subject: [PATCH 099/375] sap_swpm: append SAP AnyDB parameters --- roles/sap_swpm/templates/configfile.j2 | 87 ++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 6b9ae24ad..fc52eff2c 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -50,15 +50,37 @@ SAPINST.CD.PACKAGE.DB2CLIENT = {{ sap_swpm_cd_ibmdb2_client_path }} db6.DB2SoftwarePath = {{ sap_swpm_ibmdb2_unpack_path }} {% endif %} -{% if 'swpm_installation_media_swpm1_oracledb' in sap_swpm_inifile_list %} +{% if 'swpm_installation_media_swpm1_oracledb_121' in sap_swpm_inifile_list %} ###### -# swpm_installation_media_swpm1_oracledb +# swpm_installation_media_swpm1_oracledb_121 ###### # Requested package : RDBMS-ORA -SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle121_path }} +SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle_path }} # Requested package : RDBMS-ORA CLIENT -SAPINST.CD.PACKAGE.ORACLI121 = {{ sap_swpm_cd_oracle121_client_path }} +SAPINST.CD.PACKAGE.ORACLI121 = {{ sap_swpm_cd_oracle_client_path }} +{% endif %} + +{% if 'swpm_installation_media_swpm1_oracledb_122' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_oracledb_122 +###### +# Requested package : RDBMS-ORA +SAPINST.CD.PACKAGE.RDBMS-ORA122 = {{ sap_swpm_cd_oracle_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI122 = {{ sap_swpm_cd_oracle_client_path }} +{% endif %} + +{% if 'swpm_installation_media_swpm1_oracledb_19' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_swpm1_oracledb_19 +###### +# Requested package : RDBMS-ORA +SAPINST.CD.PACKAGE.RDBMS-ORA19 = {{ sap_swpm_cd_oracle_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI19 = {{ sap_swpm_cd_oracle_client_path }} {% endif %} {% if 'swpm_installation_media_swpm1_sapase' in sap_swpm_inifile_list %} @@ -97,10 +119,15 @@ NW_ABAP_TMSConfig.transportPassword = {{ sap_swpm_tmsadm_password }} ###### # credentials ###### +# Master password NW_GetMasterPassword.masterPwd = {{ sap_swpm_master_password }} + +# 'adm' user nwUsers.sidadmPassword = {{ sap_swpm_sap_sidadm_password }} NW_DDIC_Password.ddic000Password = {{ sap_swpm_ddic_000_password }} DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} + +# 'sapadm' user of the SAP Host Agent hostAgent.sapAdmPassword = {{ sap_swpm_sapadm_password }} # NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = {% endif %} @@ -124,9 +151,16 @@ nwUsers.db6.db2sidPassword = {{ sap_swpm_sap_sidadm_password }} ###### # credentials_anydb_oracledb ###### +# Oracle database software owner ora.oraclePassword = {{ sap_swpm_sap_sidadm_password }} + +# 'ora' user ora.orasidPassword = {{ sap_swpm_sap_sidadm_password }} + +# Oracle 'SYS' password ora.SysPassword = {{ sap_swpm_db_system_password }} + +# Oracle 'SYSTEM' password ora.SystemPassword = {{ sap_swpm_db_system_password }} {% endif %} @@ -210,12 +244,55 @@ storageBasedCopy.db6.PortRangeStart = 5914 NW_ABAP_Import_Dialog.migmonJobNum = 3 NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} -ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/121 +storageBasedCopy.ora.listenerName = SAPORALISTENER +# storageBasedCopy.ora.listenerPort = +storageBasedCopy.ora.ABAPSchema = SAPSR3DB +# storageBasedCopy.ora.JavaSchema = SAPSR3DB ora.multitenant.pdbsid = {{ sap_swpm_sid | upper }} +ora.whatInstallation = isSingle +# ora.IgnoreClientVersion = false +# ora.maxDatafileSize = 2000 +# storageBasedCopy.ora.swowner = oracle + +#### Oracle Multitenant Pluggable DB: #### +#### a single Oracle Container Database (CDB) can host multiple Oracle Pluggable Databases (PDB) #### +## FALSE: no pluggable installation (default value) +## CDB_PDB: install CDB and PDB +## PDB_ONLY: install PDB only in an existing CDB. +## CDB_ONLY: install CDB only. +ora.multitenant.installMT = FALSE +{% endif %} + +{% if 'db_config_anydb_oracledb_121' in sap_swpm_inifile_list %} +###### +# db_config_anydb_oracledb_121 +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +###### +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/121 storageBasedCopy.ora.clientVersion = 121 storageBasedCopy.ora.serverVersion = 121 {% endif %} +{% if 'db_config_anydb_oracledb_122' in sap_swpm_inifile_list %} +###### +# db_config_anydb_oracledb_122 +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +###### +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/122 +storageBasedCopy.ora.clientVersion = 122 +storageBasedCopy.ora.serverVersion = 122 +{% endif %} + +{% if 'db_config_anydb_oracledb_19' in sap_swpm_inifile_list %} +###### +# db_config_anydb_oracledb_19 +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +###### +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/19 +storageBasedCopy.ora.clientVersion = 19 +storageBasedCopy.ora.serverVersion = 19 +{% endif %} + {% if 'db_config_anydb_sapase' in sap_swpm_inifile_list %} ###### # db_config_anydb_sapase From 145bf7e81a3a08425b859f1ce77bfd987ff56b41 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 14 Aug 2022 17:26:09 +0100 Subject: [PATCH 100/375] sap_swpm: amend params for ASCS and PAS --- roles/sap_swpm/templates/configfile.j2 | 53 ++++++++++++++++---------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index fc52eff2c..42f14915a 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -430,39 +430,37 @@ NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} # OS4.DestinationASP = {% endif %} -{% if 'nw_config_central_instance' in sap_swpm_inifile_list %} +{% if 'nw_config_central_services_abap' in sap_swpm_inifile_list %} ###### -# nw_config_central_instance +# nw_config_central_services_abap +# Central Services (ASCS) contains the Message server (MS) and Enqueue work processes (EN) for the ABAP Dispatcher. +# Formerly the processes were contained in the Central Instance (CI). ###### NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} -NW_CI_Instance.scsVirtualHostname = {{ sap_swpm_pas_instance_hostname }} -NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} -NW_CI_Instance.ciVirtualHostname = {{ sap_swpm_pas_instance_hostname }} +NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} +NW_SCS_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} {% endif %} -{% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_list %} +{% if 'nw_config_central_services_java' in sap_swpm_inifile_list %} ###### -# nw_config_webdisp_gateway -# -# It is recommended to install gateway as part of ASCS -# It is NOT recommended to install webdispatcher as part of ASCS. A separate Web Dispatcher instance must be installed +# nw_config_central_services_java +# SAP Java Central Services Instance (SCS) contains the Java Message server (MS), Java Enqueue server (EN), Java Gateway (GW) and Java Internal Web Dispatcher (WD). ###### -NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} -# NW_CI_Instance.ascsInstallGateway = false -# NW_CI_Instance.ascsInstallWebDispatcher = false -# NW_SCS_Instance.ascsInstallWebDispatcher = false +NW_CI_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} +NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} +NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} +# NW_SCS_Instance.scsInstanceNumber = +NW_SCS_Instance.instanceNumber = {{ sap_swpm_java_scs_instance_nr }} {% endif %} -{% if 'nw_config_instance' in sap_swpm_inifile_list %} +{% if 'nw_config_primary_application_server_instance' in sap_swpm_inifile_list %} ###### -# nw_config_instance +# nw_config_primary_application_server_instance +# Primary Application Server (PAS) contains the Internet Communication Manager (ICM), Gateway (GW), and ABAP Dispatcher (DI/WP) work processes. +# Formerly called the Central Instance (CI). ###### -NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} -# NW_SCS_Instance.ascsInstanceNumber = -NW_SCS_Instance.instanceNumber = {{ sap_swpm_ascs_instance_nr }} +NW_CI_Instance.ciVirtualHostname = {{ sap_swpm_pas_instance_hostname }} NW_CI_Instance.ciInstanceNumber = {{ sap_swpm_pas_instance_nr }} -NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} -# NW_SCS_Instance.scsInstanceNumber = # NW_WPConfiguration.ciBtcWPNumber = 6 # NW_WPConfiguration.ciDialogWPNumber = 10 # NW_CI_Instance.nodesNum = @@ -532,6 +530,19 @@ NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} {% endif %} +{% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_list %} +###### +# nw_config_webdisp_gateway +# +# It is recommended to install gateway as part of ASCS +# It is NOT recommended to install webdispatcher as part of ASCS. A separate Web Dispatcher instance must be installed +###### +NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} +# NW_CI_Instance.ascsInstallGateway = false +# NW_CI_Instance.ascsInstallWebDispatcher = false +# NW_SCS_Instance.ascsInstallWebDispatcher = false +{% endif %} + {% if 'nw_config_host_agent' in sap_swpm_inifile_list %} ###### # nw_config_host_agent From 6311dd447de0ef94295260ace7b4aa2c651c7cd5 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 14 Aug 2022 17:36:26 +0100 Subject: [PATCH 101/375] sap_swpm: skip stats --- roles/sap_swpm/templates/configfile.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 42f14915a..51dc13ba4 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -253,6 +253,8 @@ ora.whatInstallation = isSingle # ora.IgnoreClientVersion = false # ora.maxDatafileSize = 2000 # storageBasedCopy.ora.swowner = oracle +ora.createStatisticsCodeABAP = SKIP +ora.createStatisticsCodeJAVA = SKIP #### Oracle Multitenant Pluggable DB: #### #### a single Oracle Container Database (CDB) can host multiple Oracle Pluggable Databases (PDB) #### From 6f7702b1e979d46c522f571258248b993b4a4099 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 16 Aug 2022 14:18:40 +0100 Subject: [PATCH 102/375] fix: amend param injection --- roles/sap_swpm/defaults/main.yml | 2 +- roles/sap_swpm/templates/configfile.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index af01fbb0e..877ea77af 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -180,7 +180,7 @@ sap_swpm_db_system_password: sap_swpm_db_systemdb_password: sap_swpm_db_sidadm_password: -# New Install - define schema (ABAP) +# New Install - define schema (ABAP), e.g. SAP HANA = SAPHANADB, SAP on IBM Db2 = ABAP or SAPABAP1, SAP on Oracle DB = SAPSR3 (6 characters) # Restore - schema details from backup (ABAP) sap_swpm_db_schema_abap: "SAPHANADB" sap_swpm_db_schema_abap_password: diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 51dc13ba4..ae6c7da25 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -246,8 +246,8 @@ NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} storageBasedCopy.ora.listenerName = SAPORALISTENER # storageBasedCopy.ora.listenerPort = -storageBasedCopy.ora.ABAPSchema = SAPSR3DB -# storageBasedCopy.ora.JavaSchema = SAPSR3DB +storageBasedCopy.ora.ABAPSchema = {{ sap_swpm_db_schema_abap }} +# storageBasedCopy.ora.JavaSchema = {{ sap_swpm_db_schema_java }} ora.multitenant.pdbsid = {{ sap_swpm_sid | upper }} ora.whatInstallation = isSingle # ora.IgnoreClientVersion = false From 3ce79cd53ae4e7caaad3e87091119d54bcbfc092 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 16 Aug 2022 18:19:06 +0100 Subject: [PATCH 103/375] sap_swpm: amend defaults.yml with new jinja vars --- roles/sap_swpm/README.md | 27 +++++++------------------- roles/sap_swpm/defaults/main.yml | 17 +++++++++++++--- roles/sap_swpm/templates/configfile.j2 | 21 ++++++++++++++++---- 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index 740647201..61ee95f13 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -143,7 +143,7 @@ Every SAP Software installation via SAP Software Provisioning Manager (SWPM) is ### Default Templates mode variables -Example using all inifile list parameters with the Default Templates mode: +Example using all inifile list parameters with the Default Templates mode to install SAP ECC EhP8 on IBM Db2: ``` sap_swpm_ansible_role_mode: default_templates @@ -151,7 +151,7 @@ sap_swpm_templates_product_input: default_templates sap_swpm_templates_install_dictionary: - template_name: + template_name_ecc_ehp8_ibmdb2: sap_swpm_product_catalog_id: NW_ABAP_OneHost:BS2016.ERP608.DB6.PD sap_swpm_inifile_dictionary: @@ -159,36 +159,23 @@ sap_swpm_templates_install_dictionary: ... sap_swpm_inifile_list: - swpm_installation_media - - swpm_installation_media_swpm2_hana - swpm_installation_media_swpm1 + - swpm_installation_media_swpm1_exportfiles - swpm_installation_media_swpm1_ibmdb2 - sum_config - credentials - - credentials_hana - credentials_anydb_ibmdb2 - - credentials_anydb_oracledb - - credentials_anydb_sapase - - credentials_anydb_sapmaxdb - - db_config_hana - db_config_anydb_all - db_config_anydb_ibmdb2 - - db_config_anydb_oracledb - - db_config_anydb_sapase - - db_config_anydb_sapmaxdb - - db_connection_nw_hana - db_connection_nw_anydb_ibmdb2 - - db_connection_nw_anydb_oracledb - - db_restore_hana - nw_config_anydb - nw_config_other - - nw_config_central_instance - - nw_config_ers - - nw_config_webdisp_gateway - - nw_config_instance + - nw_config_central_services_abap + # - nw_config_central_services_java + - nw_config_primary_application_server_instance - nw_config_ports - - nw_config_java_ume - - nw_config_webdisp_generic - nw_config_host_agent + # - nw_config_post_abap_reports - sap_os_nix_user ``` diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 877ea77af..cb3f6c9f7 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -41,7 +41,13 @@ sap_swpm_inifile_list: - swpm_installation_media - swpm_installation_media_swpm2_hana # - swpm_installation_media_swpm1 +# - swpm_installation_media_swpm1_exportfiles # - swpm_installation_media_swpm1_ibmdb2 +# - swpm_installation_media_swpm1_oracledb_121 +# - swpm_installation_media_swpm1_oracledb_122 +# - swpm_installation_media_swpm1_oracledb_19 +# - swpm_installation_media_swpm1_sapase +# - swpm_installation_media_swpm1_sapmaxdb # - sum_config - credentials - credentials_hana @@ -53,6 +59,9 @@ sap_swpm_inifile_list: # - db_config_anydb_all # - db_config_anydb_ibmdb2 # - db_config_anydb_oracledb +# - db_config_anydb_oracledb_121 +# - db_config_anydb_oracledb_122 +# - db_config_anydb_oracledb_19 # - db_config_anydb_sapase # - db_config_anydb_sapmaxdb - db_connection_nw_hana @@ -61,14 +70,16 @@ sap_swpm_inifile_list: - db_restore_hana # - nw_config_anydb - nw_config_other - - nw_config_central_instance + - nw_config_central_services_abap +# - nw_config_central_services_java + - nw_config_primary_application_server_instance # - nw_config_ers -# - nw_config_webdisp_gateway - - nw_config_instance - nw_config_ports # - nw_config_java_ume # - nw_config_webdisp_generic +# - nw_config_webdisp_gateway - nw_config_host_agent +# - nw_config_post_abap_reports - sap_os_nix_user diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index ae6c7da25..d512c53ff 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -490,10 +490,6 @@ NW_checkMsgServer.abapMSPort = 36{{ sap_swpm_ascs_instance_nr }} # NW_SCS_Instance.createGlobalProxyInfoFile = false # NW_CI_Instance.createGlobalRegInfoFile = false # NW_SCS_Instance.createGlobalRegInfoFile = false -# NW_CI_Instance_ABAP_Reports.enableActivateICFService = false -# NW_CI_Instance_ABAP_Reports.enableSPAMUpdateWithoutStackXml = false -# NW_CI_Instance_ABAP_Reports.enableTMSConfigWithoutStackXml = false -# NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false {% endif %} {% if 'nw_config_java_ume' in sap_swpm_inifile_list %} @@ -552,6 +548,23 @@ NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} NW_System.installSAPHostAgent = {{ sap_swpm_install_saphostagent | lower }} {% endif %} +{% if 'nw_config_post_load_abap_reports' in sap_swpm_inifile_list %} +###### +# nw_config_post_abap_reports +###### +# Activate ICF node '/SAP/BC/REST/SLPROTOCOL' +NW_CI_Instance_ABAP_Reports.enableActivateICFService = true + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableSPAMUpdateWithoutStackXml = false + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableTMSConfigWithoutStackXml = false + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false +{% endif %} + {% if 'sap_os_nix_user' in sap_swpm_inifile_list %} ###### # sap_os_nix_user From 18fd329af5b7ff3a564b611637f7dd4b09d56c0c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 17 Aug 2022 13:08:28 +0100 Subject: [PATCH 104/375] sap_swpm: amend option name for linux user setup --- roles/sap_swpm/README.md | 2 +- roles/sap_swpm/defaults/main.yml | 2 +- roles/sap_swpm/templates/configfile.j2 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index 61ee95f13..e0ee4c6e5 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -176,7 +176,7 @@ sap_swpm_templates_install_dictionary: - nw_config_ports - nw_config_host_agent # - nw_config_post_abap_reports - - sap_os_nix_user + - sap_os_linux_user ``` ## License diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index cb3f6c9f7..4dec4358c 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -80,7 +80,7 @@ sap_swpm_inifile_list: # - nw_config_webdisp_gateway - nw_config_host_agent # - nw_config_post_abap_reports - - sap_os_nix_user + - sap_os_linux_user ######################################## diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index d512c53ff..13c293348 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -565,9 +565,9 @@ NW_CI_Instance_ABAP_Reports.enableActivateICFService = true # NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false {% endif %} -{% if 'sap_os_nix_user' in sap_swpm_inifile_list %} +{% if 'sap_os_linux_user' in sap_swpm_inifile_list %} ###### -# sap_os_nix_user +# sap_os_linux_user ###### nwUsers.sapadmUID = {{ sap_swpm_sapadm_uid }} nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} From 907693fa59e2d34ddeee52a23838a1af66c7c3d3 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 17 Aug 2022 15:04:28 +0200 Subject: [PATCH 105/375] sap_swpm: revert to asynchronously calling sapinst Also revert to use community.general.pids --- roles/sap_swpm/tasks/swpm.yml | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/roles/sap_swpm/tasks/swpm.yml b/roles/sap_swpm/tasks/swpm.yml index 74b11a311..62da3f757 100644 --- a/roles/sap_swpm/tasks/swpm.yml +++ b/roles/sap_swpm/tasks/swpm.yml @@ -12,7 +12,7 @@ # register: __sap_swpm_register_sapinst # args: # chdir: "{{ sap_swpm_sapinst_path }}" -# failed_when: __sap_swpm_register_sapinst.rc != 0 +# failed_when: __sap_swpm_register_sapinst is failed # changed_when: "'SAPinst build information' in __sap_swpm_register_sapinst.stdout" ## changed_when: "'instslana' in __sap_swpm_register_sapinst.stdout" @@ -48,38 +48,38 @@ # Call sapinst synchronously # Reason for noqa: This command installs software, so it will change things -- name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when - ansible.builtin.command: "{{ __sap_swpm_sapinst_command }}" - register: __sap_swpm_register_sapinst - args: - chdir: "{{ sap_swpm_sapinst_path }}" - -# Execute SAP SWPM -# Reason for noqa: This command installs software, so it will change things # - name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when # ansible.builtin.command: "{{ __sap_swpm_sapinst_command }}" -# register: __sap_swpm_register_sapinst_async_job +# register: __sap_swpm_register_sapinst # args: # chdir: "{{ sap_swpm_sapinst_path }}" -# async: 32400 # Seconds for maximum runtime, set to 9 hours -# poll: 0 # Seconds between polls, use 0 to run Ansible Tasks concurrently + +# Execute SAP SWPM +# Reason for noqa: This command installs software, so it will change things +- name: SAP SWPM - {{ sap_swpm_swpm_installation_header }} # noqa no-changed-when + ansible.builtin.command: "{{ __sap_swpm_sapinst_command }}" + register: __sap_swpm_register_sapinst_async_job + args: + chdir: "{{ sap_swpm_sapinst_path }}" + async: 32400 # Seconds for maximum runtime, set to 9 hours + poll: 0 # Seconds between polls, use 0 to run Ansible Tasks concurrently # Monitor sapinst process (i.e. ps aux | grep sapinst) and wait for exit -# - name: SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds -# community.general.pids: -# name: sapinst +- name: SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds + community.general.pids: + name: sapinst # shell: ps -ef | awk '/sapinst/&&!/awk/&&!/ansible/{print}' -# register: pids_sapinst -# until: "pids_sapinst.pids | length == 0" + register: pids_sapinst + until: "pids_sapinst.pids | length == 0" # until: "pids_sapinst.stdout | length == 0" -# retries: 1000 -# delay: 60 + retries: 1000 + delay: 60 -# - name: SAP SWPM - Verify if sapinst process finished successfully -# ansible.builtin.async_status: -# jid: "{{ __sap_swpm_register_sapinst_async_job.ansible_job_id }}" -# register: __sap_swpm_register_sapinst -# failed_when: __sap_swpm_register_sapinst.finished != 1 or __sap_swpm_register_sapinst.rc != 0 +- name: SAP SWPM - Verify if sapinst process finished successfully + ansible.builtin.async_status: + jid: "{{ __sap_swpm_register_sapinst_async_job.ansible_job_id }}" + register: __sap_swpm_register_sapinst + failed_when: __sap_swpm_register_sapinst.finished != 1 or __sap_swpm_register_sapinst.rc != 0 # #until: __sap_swpm_register_sapinst.finished # #retries: 1000 # #delay: 60 @@ -88,9 +88,9 @@ ansible.builtin.debug: msg: "{{ __sap_swpm_register_sapinst.rc }}" -#- name: SAP SWPM - debug SAP SWPM stdout -# debug: -# msg: "{{ __sap_swpm_register_sapinst.stdout_lines }}" +- name: SAP SWPM - Display the sapinst output + ansible.builtin.debug: + msg: "{{ __sap_swpm_register_sapinst.stdout_lines }}" - name: SAP SWPM - Find last installation location ansible.builtin.command: cat /tmp/sapinst_instdir/.lastInstallationLocation From 7b02db4004474eaab79cc7904582cb94fac2368c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 19 Aug 2022 15:34:19 +0200 Subject: [PATCH 106/375] sap_hana_install: revert back to rc == 0 --- roles/sap_hana_install/tasks/hana_exists.yml | 5 ++++- roles/sap_hana_install/tasks/post_install.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 00c5eb7a5..01bdc5a02 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -39,7 +39,10 @@ fail_msg: "FAIL: Group sapsys exists but with a different group ID than '{{ sap_hana_install_groupid }}', which has been specified in variable sap_hana_install_groupid. Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - when: __sap_hana_install_register_getent_group_sapsys is succeeded + when: __sap_hana_install_register_getent_group_sapsys.rc == 0 +# Note: the following will lead to "The task includes an option with an undefined variable." +# if sap_hana_install_groupid is defined and no such group is present +# when: __sap_hana_install_register_getent_group_sapsys is succeeded when: - sap_hana_install_groupid is defined diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 2014999b5..5010877af 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -22,7 +22,7 @@ executable: /bin/bash become: true register: __sap_hana_install_post_install_register_sidadm_noexpire - changed_when: __sap_hana_install_post_install_register_sidadm_noexpire is succeeded + changed_when: __sap_hana_install_post_install_register_sidadm_noexpire.rc == 0 - name: SAP HANA Post Install - Recreate the initial tenant database ansible.builtin.include_tasks: post_install/recreate_tenant_database.yml From 1d236948f30907f3624bb0412079e65d642dfd92 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 19 Aug 2022 15:38:16 +0200 Subject: [PATCH 107/375] sap_hana_install: Remove comments for "is succeeded" vs. "rc == 0" --- roles/sap_hana_install/tasks/hana_exists.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 01bdc5a02..957803c76 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -40,9 +40,6 @@ which has been specified in variable sap_hana_install_groupid. Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." when: __sap_hana_install_register_getent_group_sapsys.rc == 0 -# Note: the following will lead to "The task includes an option with an undefined variable." -# if sap_hana_install_groupid is defined and no such group is present -# when: __sap_hana_install_register_getent_group_sapsys is succeeded when: - sap_hana_install_groupid is defined From c2d87dc548bb05a2a3644a8c9f4d4c4a47c97f0b Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 8 Sep 2022 23:56:39 +0100 Subject: [PATCH 108/375] sap_storage_setup: rename role --- README.md | 2 +- playbooks/sample-sap-storage-prep.yml | 2 +- roles/sap_hana_install/README.md | 2 +- roles/{sap_storage => sap_storage_setup}/README.md | 2 +- roles/{sap_storage => sap_storage_setup}/defaults/main.yml | 0 roles/{sap_storage => sap_storage_setup}/meta/main.yml | 0 roles/{sap_storage => sap_storage_setup}/meta/runtime.yml | 0 roles/{sap_storage => sap_storage_setup}/tasks/aws_main.yml | 0 roles/{sap_storage => sap_storage_setup}/tasks/az_main.yml | 0 .../tasks/az_tasks/prepare_storage.yml | 0 .../tasks/az_tasks/remove_storage.yml | 0 .../tasks/az_tasks/vmsizes/Standard_E4as_v4.yml | 0 .../tasks/az_tasks/vmsizes/Standard_M32ls.yml | 0 .../tasks/az_tasks/vmsizes/Standard_M32ts.yml | 0 .../tasks/az_tasks/vmsizes/Standard_M64ls.yml | 0 roles/{sap_storage => sap_storage_setup}/tasks/generic_main.yml | 0 .../tasks/generic_tasks/prepare_storage.yml | 0 .../tasks/generic_tasks/remove_storage.yml | 0 roles/{sap_storage => sap_storage_setup}/tasks/main.yml | 0 roles/sap_swpm/README.md | 2 +- 20 files changed, 5 insertions(+), 5 deletions(-) rename roles/{sap_storage => sap_storage_setup}/README.md (98%) rename roles/{sap_storage => sap_storage_setup}/defaults/main.yml (100%) rename roles/{sap_storage => sap_storage_setup}/meta/main.yml (100%) rename roles/{sap_storage => sap_storage_setup}/meta/runtime.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/aws_main.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_main.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/prepare_storage.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/remove_storage.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/vmsizes/Standard_E4as_v4.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/vmsizes/Standard_M32ls.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/vmsizes/Standard_M32ts.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/az_tasks/vmsizes/Standard_M64ls.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/generic_main.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/generic_tasks/prepare_storage.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/generic_tasks/remove_storage.yml (100%) rename roles/{sap_storage => sap_storage_setup}/tasks/main.yml (100%) diff --git a/README.md b/README.md index 0be20059d..e428204bd 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An | [sap_ha_set_hana](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_hana) | configure HA/DR for SAP HANA | | [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | | [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | -| [sap_storage](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | | [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | detect and extract SAP Software installation media | **_Notes_**: diff --git a/playbooks/sample-sap-storage-prep.yml b/playbooks/sample-sap-storage-prep.yml index 1f335b8d2..d4235f842 100644 --- a/playbooks/sample-sap-storage-prep.yml +++ b/playbooks/sample-sap-storage-prep.yml @@ -12,4 +12,4 @@ sap_storage_sap_type: 'sap_onehost' sap_storage_action: 'prepare' include_role: - name: ../roles/sap_storage + name: ../roles/sap_storage_setup diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 68a7411b9..ef77c6bcf 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -7,7 +7,7 @@ Ansible role for SAP HANA Installation ### Configure your system for the installation of SAP HANA - Make sure required volumes and filesystems are configured in the host. -You can use the role `sap_storage` to configure this. More info [here](/roles/sap_storage) +You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) - Run the roles `sap_general_preconfigure` and `sap_hana_preconfigure` for installing required packages and for configuring system settings. diff --git a/roles/sap_storage/README.md b/roles/sap_storage_setup/README.md similarity index 98% rename from roles/sap_storage/README.md rename to roles/sap_storage_setup/README.md index 1a255632c..34a426f59 100644 --- a/roles/sap_storage/README.md +++ b/roles/sap_storage_setup/README.md @@ -1,4 +1,4 @@ -# sap_storage Ansible Role +# sap_storage_setup Ansible Role Ansible role for preparing the storage requirements of an SAP system prior to installation diff --git a/roles/sap_storage/defaults/main.yml b/roles/sap_storage_setup/defaults/main.yml similarity index 100% rename from roles/sap_storage/defaults/main.yml rename to roles/sap_storage_setup/defaults/main.yml diff --git a/roles/sap_storage/meta/main.yml b/roles/sap_storage_setup/meta/main.yml similarity index 100% rename from roles/sap_storage/meta/main.yml rename to roles/sap_storage_setup/meta/main.yml diff --git a/roles/sap_storage/meta/runtime.yml b/roles/sap_storage_setup/meta/runtime.yml similarity index 100% rename from roles/sap_storage/meta/runtime.yml rename to roles/sap_storage_setup/meta/runtime.yml diff --git a/roles/sap_storage/tasks/aws_main.yml b/roles/sap_storage_setup/tasks/aws_main.yml similarity index 100% rename from roles/sap_storage/tasks/aws_main.yml rename to roles/sap_storage_setup/tasks/aws_main.yml diff --git a/roles/sap_storage/tasks/az_main.yml b/roles/sap_storage_setup/tasks/az_main.yml similarity index 100% rename from roles/sap_storage/tasks/az_main.yml rename to roles/sap_storage_setup/tasks/az_main.yml diff --git a/roles/sap_storage/tasks/az_tasks/prepare_storage.yml b/roles/sap_storage_setup/tasks/az_tasks/prepare_storage.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/prepare_storage.yml rename to roles/sap_storage_setup/tasks/az_tasks/prepare_storage.yml diff --git a/roles/sap_storage/tasks/az_tasks/remove_storage.yml b/roles/sap_storage_setup/tasks/az_tasks/remove_storage.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/remove_storage.yml rename to roles/sap_storage_setup/tasks/az_tasks/remove_storage.yml diff --git a/roles/sap_storage/tasks/az_tasks/vmsizes/Standard_E4as_v4.yml b/roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_E4as_v4.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/vmsizes/Standard_E4as_v4.yml rename to roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_E4as_v4.yml diff --git a/roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M32ls.yml b/roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M32ls.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M32ls.yml rename to roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M32ls.yml diff --git a/roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M32ts.yml b/roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M32ts.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M32ts.yml rename to roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M32ts.yml diff --git a/roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M64ls.yml b/roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M64ls.yml similarity index 100% rename from roles/sap_storage/tasks/az_tasks/vmsizes/Standard_M64ls.yml rename to roles/sap_storage_setup/tasks/az_tasks/vmsizes/Standard_M64ls.yml diff --git a/roles/sap_storage/tasks/generic_main.yml b/roles/sap_storage_setup/tasks/generic_main.yml similarity index 100% rename from roles/sap_storage/tasks/generic_main.yml rename to roles/sap_storage_setup/tasks/generic_main.yml diff --git a/roles/sap_storage/tasks/generic_tasks/prepare_storage.yml b/roles/sap_storage_setup/tasks/generic_tasks/prepare_storage.yml similarity index 100% rename from roles/sap_storage/tasks/generic_tasks/prepare_storage.yml rename to roles/sap_storage_setup/tasks/generic_tasks/prepare_storage.yml diff --git a/roles/sap_storage/tasks/generic_tasks/remove_storage.yml b/roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml similarity index 100% rename from roles/sap_storage/tasks/generic_tasks/remove_storage.yml rename to roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml diff --git a/roles/sap_storage/tasks/main.yml b/roles/sap_storage_setup/tasks/main.yml similarity index 100% rename from roles/sap_storage/tasks/main.yml rename to roles/sap_storage_setup/tasks/main.yml diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index c1e2e7dff..f8972e009 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -20,7 +20,7 @@ This role has been tested and working for the following SAP products ### SAP Preconfigure -- Make sure required volumes and filesystems are configured in the host. You can use the role `sap_storage` to configure this. More info [here](/roles/sap_storage) +- Make sure required volumes and filesystems are configured in the host. You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) - Please run the RHEL SAP System Role `sap_general_preconfigure` for initial host configuration From 20c19849d2c5c7ae421ad5168e6998c7da5a7584 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 9 Sep 2022 00:01:15 +0100 Subject: [PATCH 109/375] sap_swpm: move generate inifile Python Module to sap_libs Ansible Collection --- .../swpm2_parameters_inifile_generate.py | 192 ------------------ 1 file changed, 192 deletions(-) delete mode 100755 plugins/module_utils/swpm2_parameters_inifile_generate.py diff --git a/plugins/module_utils/swpm2_parameters_inifile_generate.py b/plugins/module_utils/swpm2_parameters_inifile_generate.py deleted file mode 100755 index 35c0dd4a2..000000000 --- a/plugins/module_utils/swpm2_parameters_inifile_generate.py +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/python - -# Prerequisites: -# pip install beautifulsoup4 lxml - -import sys -import os - -from bs4 import BeautifulSoup -from lxml import etree - - -def debug_bs4(): - ### Diagnose XML file parsing errors in Beautiful Soup - # https://stackoverflow.com/questions/56942892/cannot-parse-iso-8859-15-encoded-xml-with-bs4/56947172#56947172 - from bs4.diagnose import diagnose - with open('control.xml', 'rb') as f: - diagnose(f) - - -# SWPM2 control.xml conversion to utf8 -def control_xml_utf8(filepath): - source = filepath + "/control.xml" - - ### Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser - # https://stackoverflow.com/questions/64629600/how-can-you-convert-a-xml-iso-8859-1-to-utf-8-using-python-3-7-7/64634454#64634454 - with open(source, 'rb') as source: - parser = etree.XMLParser(encoding = "iso-8859-1", strip_cdata=False) - root = etree.parse(source, parser) - - string = etree.tostring(root, xml_declaration = True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') - - with open('control_utf8.xml', 'wb') as target: - target.write(string) - - -# SWPM2 Component and Parameters extract all as CSV -def control_xml_to_csv(filepath): - - infile = open(filepath + "/control_utf8.xml","r") - contents = infile.read() - - soup = BeautifulSoup(markup=contents, features='lxml-xml') - space = soup.find('components') - - component_list = space.findChildren("component" , recursive=False) - - csv_output = open('control_output.csv', 'w') - csv_header = '"' + 'Component Name' + '","' + 'Component Display Name' + '","' + 'Parameter Name' + '","' + 'Parameter Inifile Key' + '","' + 'Parameter Access' + '","' + 'Parameter Encode' + '","' + 'Parameter Default Value' + '","' + 'Parameter Inifile description' + '"' - csv_output.write("%s\n" % csv_header) - - for component in component_list: - for parameter in component.findChildren("parameter"): - component_key=parameter.findParent("component") - component_key_name_text=component_key["name"] - for child in component_key.findChildren("display-name"): - component_key_display_name_text=child.get_text().replace('\n','') - component_parameter_key_name=parameter["name"] - component_parameter_key_inifile_name=parameter.get("defval-for-inifile-generation", "") - component_parameter_key_access=parameter.get("access", "") - component_parameter_key_encode=parameter.get("encode", "") - component_parameter_key_defval=parameter.get("defval", "") - component_parameter_contents_doclong_text=parameter.get_text().replace('\n','') - component_parameter_contents_doclong_text_quote_replacement=component_parameter_contents_doclong_text.replace('"','\'') - csv_string = '"' + component_key_name_text + '","' + component_key_display_name_text + '","' + component_parameter_key_name + '","' + component_parameter_key_inifile_name + '","' + component_parameter_key_access + '","' + component_parameter_key_encode + '","' + component_parameter_key_defval + '","' + component_parameter_contents_doclong_text_quote_replacement + '"' - csv_output.write("%s\n" % csv_string) - - csv_output.close() - - -# SWPM2 Component and Parameters extract all and generate template inifile.params -def control_xml_to_inifile_params(filepath): - infile = open(filepath + "/control_utf8.xml","r") - contents = infile.read() - - soup = BeautifulSoup(markup=contents, features='lxml-xml') - space = soup.find('components') - - component_list = space.findChildren("component" , recursive=False) - - inifile_output = open('generated_inifile_params', 'w') - - - inifile_params_header = """############ - # SWPM Unattended Parameters inifile.params generated export - # - # - # Export of all SWPM Component and the SWPM Unattended Parameters. Not all components have SWPM Unattended Parameters. - # - # All parameters are commented-out, each hash # before the parameter is removed to activate the parameter. - # When running SWPM in Unattended Mode, the activated parameters will create a new SWPM file in the sapinst directory. - # If any parameter is marked as 'encode', the plaintext value will be coverted to DES hash for this parameter in the new SWPM file (in the sapinst directory). - # - # An inifile.params is otherwise obtained after running SWPM as GUI or Unattended install, - # and will be generated for a specific Product ID (such as 'NW_ABAP_OneHost:S4HANA1809.CORE.HDB.CP'). - ############ - - - - ############ - # MANUAL - ############ - - # The folder containing all archives that have been downloaded from http://support.sap.com/swdc and are supposed to be used in this procedure - # archives.downloadBasket = - """ - - inifile_output.write(inifile_params_header) - - - for component in component_list: - component_key_name_text=component["name"] - component_key_display_name=component.find("display-name") - if component_key_display_name is not None: - component_key_display_name_text=component_key_display_name.get_text() - inifile_output.write("\n\n\n\n############\n# Component: %s\n# Component Display Name: %s\n############\n" % (component_key_name_text, component_key_display_name_text)) - for parameter in component.findChildren("parameter"): -# component_key=parameter.findParent("component") - component_parameter_key_encode=parameter.get("encode", None) - component_parameter_key_inifile_name=parameter.get("defval-for-inifile-generation", None) - component_parameter_key_defval=parameter.get("defval", "") - component_parameter_contents_doclong_text=parameter.get_text().replace('\n','') -# component_parameter_contents_doclong_text_quote_replacement=component_parameter_contents_doclong_text.replace('"','\'') - if component_parameter_key_inifile_name is not None: - inifile_output.write("\n# %s" % (component_parameter_contents_doclong_text)) - if component_parameter_key_encode == "true": - inifile_output.write("\n# Encoded parameter. Plaintext values will be coverted to DES hash") - inifile_output.write("\n# %s = %s\n" % (component_parameter_key_inifile_name, component_parameter_key_defval)) - - inifile_output.close() - -# SWPM2 product.catalog conversion to utf8 -def product_catalog_xml_utf8(filepath): - source = filepath + "/product.catalog" - - ### Convert control.xml from iso-8859-1 to UTF-8, so it can be used with Beautiful Soup lxml-xml parser - # https://stackoverflow.com/questions/64629600/how-can-you-convert-a-xml-iso-8859-1-to-utf-8-using-python-3-7-7/64634454#64634454 - with open(source, 'rb') as source: - parser = etree.XMLParser(encoding = "iso-8859-1", strip_cdata=False) - root = etree.parse(source, parser) - - string = etree.tostring(root, xml_declaration = True, encoding="UTF-8", pretty_print=True).decode('utf8').encode('iso-8859-1') - - with open('product_catalog_utf8.xml', 'wb') as target: - target.write(string) - -# SWPM2 Product Catalog entries to CSV -# Each Product Catalog entry is part of a components group, which may have attributes = output-dir, control-file, product-dir (link to SWPM directory of param file etc) -# Attributes possible for each entry = control-file, db, id, name, os, os-type, output-dir, ppms-component, ppms-component-release, product, product-dir, release, table -def product_catalog_xml_to_csv(filepath): - - infile = open(filepath + "/product_catalog_utf8.xml","r") - contents = infile.read() - - soup = BeautifulSoup(markup=contents, features='lxml-xml') - space = soup.find_all('component') - - csv_output = open('product_catalog_output.csv', 'w') - csv_header = '"' + 'Product Catalog Component Name' + '","' + 'Product Catalog Component ID' + '","' + 'Product Catalog Component Table' + '","' + 'Product Catalog Component Output Dir' + '","' + 'Product Catalog Component Display Name' + '","' + 'Product Catalog Component UserInfo' + '"' - csv_output.write("%s\n" % csv_header) - - for component in space: - component_name = component.get("name","") - component_id = component.get("id","") - component_table = component.get("table","") - component_output_dir = component.get("output-dir","") - for displayname in component.findChildren("display-name"): - component_displayname = displayname.get_text().strip() - for userinfo in component.findChildren("user-info"): - html_raw = userinfo.get_text().strip() - html_parsed = BeautifulSoup(html_raw, 'html.parser') - component_userinfo = html_parsed.get_text().replace('"','\'') - csv_string = '"' + component_name + '","' + component_id + '","' + component_table + '","' + component_output_dir + '","' + component_displayname + '","' + component_userinfo + '"' - csv_output.write("%s\n" % csv_string) - - csv_output.close() - - -# Get arguments passed to Python script session -# Define path to control.xml, else assume in /tmp directory - -if len(sys.argv) > 1: - control_xml_path = sys.argv[1] -else: - control_xml_path = "/tmp" - -if control_xml_path == "": - control_xml_path = os.getcwd() - -control_xml_utf8(control_xml_path) -control_xml_to_csv(control_xml_path) -control_xml_to_inifile_params(control_xml_path) From 95e82d837bc31717c58a65b7893b2ef263dc32d5 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 9 Sep 2022 00:54:49 +0100 Subject: [PATCH 110/375] docs: amend content placement for HA Ansible Roles --- README.md | 45 ----------------- roles/sap_ha_install_hana_hsr/README.md | 6 +++ roles/sap_ha_install_pacemaker/README.md | 6 +++ roles/sap_ha_prepare_pacemaker/README.md | 6 +++ roles/sap_ha_set_hana/README.md | 61 +++++++++++++++++++++++- 5 files changed, 77 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index e428204bd..96dee0237 100644 --- a/README.md +++ b/README.md @@ -4,30 +4,6 @@ This Ansible Collection executes various SAP Software installations and configur This can be combined with other Ansible Collections to provide end-to-end automation, from download of SAP software installation media through to technical configuration and burstable SAP NetWeaver application servers (start/stop). -## Available Scenarios and Infrastructure Platforms - -**Operating Systems (target machines)** - -- Red Hat Enterprise Linux for SAP Solutions[^rhel] - - RHEL 8.2, 8.4 and later - -| Scenario | Description | Infrastructure Platform          | -| :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **SAP HANA single node installation** | Installation of a SAP HANA Database Server to a single machine |
  • :heavy_check_mark: AWS EC2
  • :warning: GCP VM
  • :warning: IBM Cloud, Intel VS
  • :warning: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :heavy_check_mark: IBM PowerVM LPAR
  • :heavy_check_mark: OVirt VM
  • :warning: VMware vSphere VM
| -| **SAP HANA 2-node pacemaker cluster** | Installation of a SAP HANA Database Server with HANA System Replication (HSR) in a basic 2-node Pacemaker Cluster configuration |
  • :warning: AWS EC2
  • :warning: GCP VM
  • :warning: IBM Cloud, Intel VS
  • :warning: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :warning: IBM PowerVM LPAR
  • :heavy_check_mark: OVirt VM
  • :warning: VMware vSphere VM
| - -Key: - -- :heavy_check_mark: Verified compatibility -- :warning: Unverified and untested, expected to be compatible -- :x: Not compatible - -**Out of Scope** - -- AWS Classic environment -- Azure Classic environment using Azure Service Manager (ASM) -- IBM Cloud Classic Infrastructure environment - ## Functionality This Ansible Collection executes various SAP Software installations for different SAP solution scenarios, including: @@ -162,27 +138,6 @@ SAP SWPM Catalog Products which have been tested: - SAP NetWeaver applications (e.g. GRC) - SAP Web Dispatcher -## References - -- Azure: - - - [Azure Pacemaker Setup Guide](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/high-availability-guide-rhel-pacemaker) - -- AWS: - - - [Configuring SAP HANA Scale-Up System Replication with the RHEL HA Add-On on Amazon Web Services (AWS)](https://access.redhat.com/articles/3569621) - -- Google Cloud: - - - [HA cluster configuration guide for SAP HANA on RHEL](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - -- IBM Cloud: - - [IBM Cloud for SAP portfolio - IBM Cloud Docs](https://cloud.ibm.com/docs/sap) - -- RHEL: - - [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) - - [Automating SAP HANA Scale-Up System Replication using the RHEL HA Add-On](https://access.redhat.com/articles/3004101) - ## License - [Apache 2.0](./LICENSE) diff --git a/roles/sap_ha_install_hana_hsr/README.md b/roles/sap_ha_install_hana_hsr/README.md index 42efd3b38..3e1c3b408 100644 --- a/roles/sap_ha_install_hana_hsr/README.md +++ b/roles/sap_ha_install_hana_hsr/README.md @@ -50,6 +50,12 @@ The **sap_ha_install_hana_hsr** roles configures a HANA system replication relat In most cases you need to specify these variables only, if you want to use different values than the default values. +## Requirements, Dependencies and Testing + +Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) + ## Example Parameter File ```yaml diff --git a/roles/sap_ha_install_pacemaker/README.md b/roles/sap_ha_install_pacemaker/README.md index f07d2b5eb..6a2257f78 100644 --- a/roles/sap_ha_install_pacemaker/README.md +++ b/roles/sap_ha_install_pacemaker/README.md @@ -65,6 +65,12 @@ sap_pacemaker_stonith_devices: - Please also check [SAP HANA scale-up Referen ``` +## Requirements, Dependencies and Testing + +Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) + ## Example Parameter File - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) ``` diff --git a/roles/sap_ha_prepare_pacemaker/README.md b/roles/sap_ha_prepare_pacemaker/README.md index 447978268..e46471c5a 100644 --- a/roles/sap_ha_prepare_pacemaker/README.md +++ b/roles/sap_ha_prepare_pacemaker/README.md @@ -48,6 +48,12 @@ The **sap_ha_install_pacemaker** prepares all nodes of a cluster to be able to i | ------------------------------------------- | ------------------ | --------------------------- | | sap_ha_prepare_pacemaker_hacluster_password | hacluster password | sap_hana_hacluster_password | +## Requirements, Dependencies and Testing + +Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) + ## Example Parameter File ``` diff --git a/roles/sap_ha_set_hana/README.md b/roles/sap_ha_set_hana/README.md index 5f596e965..41c9bd9f1 100644 --- a/roles/sap_ha_set_hana/README.md +++ b/roles/sap_ha_set_hana/README.md @@ -46,6 +46,41 @@ SAP HANA. | sap_ha_set_hana_vip1 | Virtual IP address of primary HANA database | sap_hana_vip1 | | sap_ha_set_hana_vip2 | Virtual IP address of secondary HANA database(planned) | sap_hana_vip2 | +## Requirements, Dependencies and Testing + +### Operating System requirements + +Designed for Linux operating systems. Assumptions for executing the Ansible Roles from this Ansible Collection include: + +- Registered OS +- OS Package repositories are available (from the relevant content delivery network of the OS vendor) + +## Testing target Operating Systems + +- Red Hat Enterprise Linux for SAP Solutions[^rhel] + - RHEL4SAP 8.2 + - RHEL4SAP 8.4 + +## Testing target SAP Software solution scenarios and Infrastructure Platforms + +Each scenario tested on an Infrastructure Platform, will use the available documentation from the Infrastructure vendor - see [Reference Documentation](#reference-documentation) for more detail. + +| Scenario | Description | Infrastructure Platform          | +| :--- | :--- | :--- | +| **SAP HANA 2-node pacemaker cluster** | Installation of a SAP HANA Database Server with HANA System Replication (HSR) in a basic 2-node Pacemaker Cluster configuration |
  • :warning: AWS EC2
  • :warning: GCP VM
  • :warning: IBM Cloud, Intel VS
  • :warning: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :warning: IBM PowerVM LPAR
  • :white_check_mark: OVirt VM
  • :warning: VMware vSphere VM
| + +**Key:** + +- :white_check_mark: Verified compatibility +- :warning: Unverified and untested, expected to be compatible +- :x: Not compatible + +**Out of Scope** + +- AWS Classic environment +- Azure Classic environment using Azure Service Manager (ASM) +- IBM Cloud Classic Infrastructure environment + ## Example Parameter File ``` @@ -105,5 +140,27 @@ Apache license 2.0 ## Author Information -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, -Markus Moster +IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster + +[^rhel]: [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) + +## Reference documentation + +- Azure: + + - [Azure Pacemaker Setup Guide](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/high-availability-guide-rhel-pacemaker) + +- AWS: + + - [Configuring SAP HANA Scale-Up System Replication with the RHEL HA Add-On on Amazon Web Services (AWS)](https://access.redhat.com/articles/3569621) + +- Google Cloud: + + - [HA cluster configuration guide for SAP HANA on RHEL](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) + +- IBM Cloud: + - [IBM Cloud for SAP portfolio - IBM Cloud Docs](https://cloud.ibm.com/docs/sap) + +- RHEL: + - [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) + - [Automating SAP HANA Scale-Up System Replication using the RHEL HA Add-On](https://access.redhat.com/articles/3004101) From 82cf9ed3beb4a16f75173eba956823ceb9e30e80 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 9 Sep 2022 00:58:55 +0100 Subject: [PATCH 111/375] docs: amend dynamic url --- roles/sap_ha_install_hana_hsr/README.md | 4 ++-- roles/sap_ha_install_pacemaker/README.md | 4 ++-- roles/sap_ha_prepare_pacemaker/README.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/README.md b/roles/sap_ha_install_hana_hsr/README.md index 3e1c3b408..062b7fab8 100644 --- a/roles/sap_ha_install_hana_hsr/README.md +++ b/roles/sap_ha_install_hana_hsr/README.md @@ -53,8 +53,8 @@ In most cases you need to specify these variables only, if you want to use diffe ## Requirements, Dependencies and Testing Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) ## Example Parameter File diff --git a/roles/sap_ha_install_pacemaker/README.md b/roles/sap_ha_install_pacemaker/README.md index 6a2257f78..984418136 100644 --- a/roles/sap_ha_install_pacemaker/README.md +++ b/roles/sap_ha_install_pacemaker/README.md @@ -68,8 +68,8 @@ sap_pacemaker_stonith_devices: - Please also check [SAP HANA scale-up Referen ## Requirements, Dependencies and Testing Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) ## Example Parameter File - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) diff --git a/roles/sap_ha_prepare_pacemaker/README.md b/roles/sap_ha_prepare_pacemaker/README.md index e46471c5a..03875e92f 100644 --- a/roles/sap_ha_prepare_pacemaker/README.md +++ b/roles/sap_ha_prepare_pacemaker/README.md @@ -51,8 +51,8 @@ The **sap_ha_install_pacemaker** prepares all nodes of a cluster to be able to i ## Requirements, Dependencies and Testing Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_hana/README.md#l#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](roles/sap_ha_set_netweaver/README.md#l#requirements-dependencies-and-testing) +- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) +- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) ## Example Parameter File From 038ba59e0866055111daec24c9dada35b5cf3cbb Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 9 Sep 2022 01:02:13 +0100 Subject: [PATCH 112/375] docs: amend line --- roles/sap_swpm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index f8972e009..759c8884d 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -20,7 +20,7 @@ This role has been tested and working for the following SAP products ### SAP Preconfigure -- Make sure required volumes and filesystems are configured in the host. You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) +- Ensure the required volumes and filesystems are configured in the host. You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) - Please run the RHEL SAP System Role `sap_general_preconfigure` for initial host configuration From 1a304f5a2ff8a0a8b8326470df31626470b9f2d6 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 9 Sep 2022 23:53:41 +0200 Subject: [PATCH 113/375] sap_hana_install: Solve issue #199 --- .../sap_hana_install/meta/argument_specs.yml | 15 ++++++ .../sap_hana_install/tasks/hana_addhosts.yml | 2 +- roles/sap_hana_install/tasks/hana_exists.yml | 2 +- .../tasks/post_install/hdbuserstore.yml | 2 +- .../tasks/post_install/license.yml | 2 +- .../tasks/post_install/log_mode.yml | 2 +- .../post_install/recreate_tenant_database.yml | 4 +- .../tasks/pre_install-loop-block.yml | 10 ++++ roles/sap_hana_install/tasks/pre_install.yml | 46 ++++++++++++++++--- .../tasks/pre_install/prepare_sapcar.yml | 28 +++++------ .../tasks/pre_install/prepare_sarfiles.yml | 18 ++++---- .../tasks/pre_install/verify_checksum.yml | 2 +- roles/sap_hana_install/vars/main.yml | 3 ++ .../tasks/RedHat/installation.yml | 4 ++ 14 files changed, 103 insertions(+), 37 deletions(-) create mode 100644 roles/sap_hana_install/meta/argument_specs.yml create mode 100644 roles/sap_hana_install/tasks/pre_install-loop-block.yml create mode 100644 roles/sap_hana_install/vars/main.yml diff --git a/roles/sap_hana_install/meta/argument_specs.yml b/roles/sap_hana_install/meta/argument_specs.yml new file mode 100644 index 000000000..76a859b9d --- /dev/null +++ b/roles/sap_hana_install/meta/argument_specs.yml @@ -0,0 +1,15 @@ +--- +argument_specs: + main: + short_description: SAP HANA Installation + options: # List of variables + sap_hana_install_sid: + description: HANA SID + type: str # str, list, dict, bool, int, float, path, raw, jsonarg, json, bytes, bits + required: true + no_log: true + sap_hana_install_instance_number: + description: HANA Instance Number + type: str # str, list, dict, bool, int, float, path, raw, jsonarg, json, bytes, bits + required: true + no_log: true diff --git a/roles/sap_hana_install/tasks/hana_addhosts.yml b/roles/sap_hana_install/tasks/hana_addhosts.yml index a61736e0f..6014d2f2c 100644 --- a/roles/sap_hana_install/tasks/hana_addhosts.yml +++ b/roles/sap_hana_install/tasks/hana_addhosts.yml @@ -2,7 +2,7 @@ - name: SAP HANA Add Hosts - Fill new variable __sap_hana_install_addhosts_hosts ansible.builtin.set_fact: - __sap_hana_install_addhosts_hosts: "{{ __sap_hana_install_addhosts_hosts | d([]) + [ item.split(':')[0] ] }}" + __sap_hana_install_addhosts_hosts: "{{ __sap_hana_install_addhosts_hosts | d([]) + [item.split(':')[0]] }}" with_items: "{{ sap_hana_install_addhosts.split(',') }}" - name: SAP HANA Add Hosts - Show the contents of __sap_hana_install_addhosts_hosts diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 957803c76..e6bbec9d5 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -17,7 +17,7 @@ Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." success_msg: "PASS: User '{{ sap_hana_install_sid | lower }}adm' does not exist." - when: sap_hana_install_check_sidadm_user|d(true) + when: sap_hana_install_check_sidadm_user | d(true) # The role supports specifying the SAP HANA group id in variable `sap_hana_install_groupid`, which is the id of the sapsys group. # The SAP HANA installation will fail if there is already a group named sapsys but with a different ID. Let's better fail before. diff --git a/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml b/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml index 3dc870989..24d8ecc7a 100644 --- a/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml +++ b/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml @@ -5,7 +5,7 @@ /usr/sap/{{ sap_hana_install_sid }}/SYS/exe/hdb/hdbuserstore \ SET {{ sap_hana_install_hdbuserstore_key }} \ {{ ansible_hostname }}:3{{ sap_hana_install_number }}13 \ - SYSTEM '{{ sap_hana_install_db_system_password|d(sap_hana_install_master_password) }}' + SYSTEM '{{ sap_hana_install_db_system_password | d(sap_hana_install_master_password) }}' args: executable: /bin/bash become: true diff --git a/roles/sap_hana_install/tasks/post_install/license.yml b/roles/sap_hana_install/tasks/post_install/license.yml index 08302ead7..df4f4e56c 100644 --- a/roles/sap_hana_install/tasks/post_install/license.yml +++ b/roles/sap_hana_install/tasks/post_install/license.yml @@ -4,7 +4,7 @@ ansible.builtin.shell: | /usr/sap/{{ sap_hana_install_sid | upper }}/HDB{{ sap_hana_install_number }}/exe/hdbsql \ -i {{ sap_hana_install_number }} -u SYSTEM - -p {{ sap_hana_install_db_system_password|d(sap_hana_install_master_password) }} -m < Date: Mon, 12 Sep 2022 13:49:39 +0100 Subject: [PATCH 114/375] sap_install_media_detect: initial overhaul WIP --- roles/sap_install_media_detect/README.md | 2 +- .../defaults/main.yml | 22 ++ .../tasks/check_hana.yml | 23 -- .../tasks/check_swpm.yml | 25 -- .../tasks/detect_backup_saphana.yml | 10 + .../tasks/detect_export_sapecc.yml | 40 ++++ .../tasks/detect_export_saps4hana.yml | 1 + .../tasks/detect_sapanydb_ibmdb2.yml | 44 ++++ .../tasks/detect_sapanydb_oracledb.yml | 53 +++++ .../tasks/detect_sapanydb_sapase.yml | 58 +++++ .../tasks/detect_sapanydb_sapmaxdb.yml | 38 +++ .../tasks/detect_sapcar.yml | 21 ++ .../tasks/detect_saphana.yml | 125 ++++++++++ .../tasks/detect_saphostagent.yml | 25 ++ .../tasks/detect_sapigs.yml | 39 ++++ .../tasks/detect_sapkernel.yml | 39 ++++ .../tasks/detect_sapswpm.yml | 126 ++++++++++ .../tasks/detect_sapwebdisp.yml | 23 ++ .../sapcar_loop_handler_saphana.yml} | 14 +- .../tasks/hana/prepare_hana.yml | 88 ------- roles/sap_install_media_detect/tasks/main.yml | 101 +++++++- .../tasks/organize_hana.yml | 54 ----- .../tasks/organize_swpm.yml | 33 --- .../tasks/prepare/unrar_get.yml | 6 + .../tasks/set_global_vars.yml | 62 +++++ .../tasks/swpm/detect_swpm.yml | 220 ------------------ 26 files changed, 829 insertions(+), 463 deletions(-) delete mode 100644 roles/sap_install_media_detect/tasks/check_hana.yml delete mode 100644 roles/sap_install_media_detect/tasks/check_swpm.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_backup_saphana.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_export_sapecc.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapcar.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_saphana.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_saphostagent.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapigs.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapkernel.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapswpm.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_sapwebdisp.yml rename roles/sap_install_media_detect/tasks/{hana/extract_sar.yml => extract/sapcar_loop_handler_saphana.yml} (57%) delete mode 100644 roles/sap_install_media_detect/tasks/hana/prepare_hana.yml delete mode 100644 roles/sap_install_media_detect/tasks/organize_hana.yml delete mode 100644 roles/sap_install_media_detect/tasks/organize_swpm.yml create mode 100644 roles/sap_install_media_detect/tasks/prepare/unrar_get.yml create mode 100644 roles/sap_install_media_detect/tasks/set_global_vars.yml delete mode 100644 roles/sap_install_media_detect/tasks/swpm/detect_swpm.yml diff --git a/roles/sap_install_media_detect/README.md b/roles/sap_install_media_detect/README.md index fe717c3e7..c166680b8 100644 --- a/roles/sap_install_media_detect/README.md +++ b/roles/sap_install_media_detect/README.md @@ -9,7 +9,7 @@ Detection of installation media is available for SAP HANA and the various key in SAP Business Applications based upon SAP NetWeaver (e.g. SAP S/4HANA, SAP BW/4HANA, SAP ECC, SAP BW, SAP WebDispatcher etc). As an example, SAP HANA Client would be detected and the SAP Kernel Part I/II would be detected. -Once detection and extraction are completed, the file paths are shown and stored as variables for subsequent use by other Ansible Tasks. +Once detection (e.g. using `zipinfo -1` and `unrar lb`) and extraction are completed, the file paths are shown and stored as variables for subsequent use by other Ansible Tasks. ## Dependencies diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index acf571c33..4cd0c50f3 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -1,3 +1,25 @@ --- +# e.g. /software sap_install_media_detect_directory: + +# local_dir, nfs_mount, object_storage_cli, s3fuse +sap_install_media_detect_source: + +# saphana, sapase, sapmaxdb, oracledb, ibmdb2 +sap_install_media_detect_db: + +sap_install_media_detect_swpm: true +sap_install_media_detect_hostagent: true +sap_install_media_detect_igs: true +sap_install_media_detect_kernel: true +sap_install_media_detect_webdisp: false + +# saps4hana, sapecc +sap_install_media_detect_export: + +# e.g. /db_backup +sap_install_media_detect_backup_directory: + +# saphana +sap_install_media_detect_backup: diff --git a/roles/sap_install_media_detect/tasks/check_hana.yml b/roles/sap_install_media_detect/tasks/check_hana.yml deleted file mode 100644 index 8dc998f7b..000000000 --- a/roles/sap_install_media_detect/tasks/check_hana.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -- name: SAP Media Check - SAP HANA - Set fact for install media directory - set_fact: - sap_hana_install_directory: "{{ sap_install_media_detect_directory }}/sap_hana" - -- name: SAP Media Check - SAP HANA - Check availability of software path - {{ sap_hana_install_directory }} - stat: - path: "{{ sap_hana_install_directory }}" - register: sap_hana_install_software_path_stat - failed_when: not sap_hana_install_software_path_stat.stat.exists - -- name: SAP Media Check - SAP HANA - Change ownership of software path - {{ sap_hana_install_directory }} - ansible.builtin.file: - path: "{{ sap_hana_install_directory }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - -- name: SAP Media Check - SAP HANA - Prepare - include_tasks: hana/prepare_hana.yml diff --git a/roles/sap_install_media_detect/tasks/check_swpm.yml b/roles/sap_install_media_detect/tasks/check_swpm.yml deleted file mode 100644 index 8de363a9e..000000000 --- a/roles/sap_install_media_detect/tasks/check_swpm.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- - -- name: SAP Media Check - SAP SWPM - Set fact for install media directory - set_fact: - sap_swpm_software_path: "{{ sap_install_media_detect_directory }}" - sap_swpm_sapcar_path: "{{ sap_install_media_detect_directory }}/sap_swpm" - sap_swpm_swpm_path: "{{ sap_install_media_detect_directory }}/sap_swpm" - -- name: SAP Media Check - SAP SWPM - Check availability of software path - {{ sap_swpm_software_path }} - stat: - path: "{{ sap_swpm_software_path }}" - register: sap_swpm_software_path_stat - failed_when: not sap_swpm_software_path_stat.stat.exists - -- name: SAP Media Check - SAP SWPM - Change ownership of software path - {{ sap_swpm_software_path }} - ansible.builtin.file: - path: "{{ sap_swpm_software_path }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - -- name: SAP Media Check - SAP SWPM - Detect Installation Software - include_tasks: swpm/detect_swpm.yml diff --git a/roles/sap_install_media_detect/tasks/detect_backup_saphana.yml b/roles/sap_install_media_detect/tasks/detect_backup_saphana.yml new file mode 100644 index 000000000..0258688e0 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_backup_saphana.yml @@ -0,0 +1,10 @@ +--- + +- name: Identify SAP HANA Backup files + ansible.builtin.find: + paths: "{{ sap_install_media_detect_backup_directory }}" + recurse: yes + file_type: directory + patterns: '.*COMPLETE.*' + use_regex: yes + register: backup_saphana_find_dir diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml new file mode 100644 index 000000000..d1f18cf54 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -0,0 +1,40 @@ +--- + +#- name: Identify SAP ECC Installation Export files +# ansible.builtin.find: +# paths: "{{ oracledb_client_install_directory }}" +# recurse: yes +# file_type: directory +# patterns: '.*OCL_LINUX_X86_64.*' +# use_regex: yes +# register: oracledb_client_find_dir + +- name: List files in directory of SAP ECC Installation Export + ansible.builtin.shell: ls -1 + args: + chdir: "{{ sap_swpm_ecc_export_path }}" + register: ecc_export_files + +- name: If any ZIP, then extract the SAP ECC Installation Export file (legacy, before EHP8) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }}; fi + args: + chdir: "{{ sap_swpm_ecc_export_path }}" + with_items: + - "{{ ecc_export_files.stdout_lines }}" + +- name: If any RAR without file extension, then add file extension + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi + args: + chdir: "{{ sap_swpm_ecc_export_path }}" + with_items: + - "{{ ecc_export_files.stdout_lines }}" + +- name: Get unrar binary for extraction + ansible.builtin.shell: curl https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz | tar -xvz --strip-components=1 rar/unrar + args: + chdir: "{{ sap_swpm_ecc_export_path }}" + +- name: Extract SAP ECC Installation Export files (unrar x) + ansible.builtin.shell: ./unrar x "{{ softwarecenter_search_list_ecc_export[0] }}" + args: + chdir: "{{ sap_swpm_ecc_export_path }}" diff --git a/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml @@ -0,0 +1 @@ +--- diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml new file mode 100644 index 000000000..319462232 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml @@ -0,0 +1,44 @@ +--- + +- name: SAP Install Media Detect - IBM Db2 - Set fact for install media directory + set_fact: + ibmdb2_install_directory: "{{ sap_install_media_detect_directory }}/ibmdb2" + ibmdb2_client_install_directory: "{{ sap_install_media_detect_directory }}/ibmdb2_client" + +- name: SAP Install Media Detect - IBM Db2 - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ ibmdb2_install_directory }}" + - "{{ ibmdb2_client_install_directory }}" + + +- name: List files in directory of IBM DB2 installation media + ansible.builtin.shell: ls -1 + args: + chdir: "{{ ibmdb2_install_directory }}" + register: ibm_db2_install_files + +- name: Extract ZIP files of IBM DB2 installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ ibmdb2_install_directory }}" + with_items: + - "{{ ibm_db2_install_files.stdout_lines }}" + +- name: List files in directory of IBM DB2 Client + ansible.builtin.shell: ls -1 + args: + chdir: "{{ ibmdb2_client_install_directory }}" + register: ibm_db2_client_files + +- name: Extract ZIP files of IBM DB2 Client + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ ibmdb2_client_install_directory }}" + with_items: + - "{{ ibm_db2_client_files.stdout_lines }}" diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml new file mode 100644 index 000000000..d1d564cbb --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml @@ -0,0 +1,53 @@ +--- + +- name: SAP Install Media Detect - Oracle DB - Set fact for install media directory + set_fact: + oracledb_install_directory: "{{ sap_install_media_detect_directory }}/oracledb" + oracledb_client_install_directory: "{{ sap_install_media_detect_directory }}/oracledb_client" + +- name: SAP Install Media Detect - Oracle DB - Create Directory - {{ oracledb_install_directory }} + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ oracledb_install_directory }}" + - "{{ oracledb_client_install_directory }}" + + +- name: List files in directory of Oracle DB installation media + ansible.builtin.shell: ls -1 + args: + chdir: "{{ oracledb_install_directory }}" + register: oracledb_install_files + +- name: Extract ZIP files of Oracle DB installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ oracledb_install_directory }}" + with_items: + - "{{ oracledb_install_files.stdout_lines }}" + +- name: List files in directory of Oracle DB Client + ansible.builtin.shell: ls -1 + args: + chdir: "{{ oracledb_client_install_directory }}" + register: oracledb_client_files + +- name: Extract ZIP files of Oracle DB Client + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ oracledb_client_install_directory }}" + with_items: + - "{{ oracledb_client_files.stdout_lines }}" + +- name: Identify Oracle DB Client unpack path + ansible.builtin.find: + paths: "{{ oracledb_client_install_directory }}" + recurse: yes + file_type: directory + patterns: '.*OCL_LINUX_X86_64.*' + use_regex: yes + register: oracledb_client_find_dir diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml new file mode 100644 index 000000000..0ab2ae946 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -0,0 +1,58 @@ +--- + +- name: SAP Install Media Detect - SAP ASE - Set fact for install media directory + set_fact: + sapase_install_directory: "{{ sap_install_media_detect_directory }}/sapase" + sapase_client_install_directory: "{{ sap_install_media_detect_directory }}/sapase_client" + +- name: SAP Install Media Detect - SAP ASE - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sapase_install_directory }}" + - "{{ sapase_client_install_directory }}" + + +- name: List files in directory of SAP ASE 16.0 installation media + ansible.builtin.shell: ls -1 + args: + chdir: "{{ sapase_install_directory }}" + register: sapase_install_files + +- name: Extract ZIP files of SAP ASE 16.0 installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ sapase_install_directory }}" + with_items: + - "{{ sapase_install_files.stdout_lines }}" + +- name: List files in directory of SAP ASE 16.0 Client + ansible.builtin.shell: ls -1 + args: + chdir: "{{ sapase_client_install_directory }}" + register: sapase_client_files + +- name: Extract SAP ASE 16.0 Client with SAPCAR + ansible.builtin.shell: | + chmod +x {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} + {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} \ + -xvf {{ item }} \ + -manifest SIGNATURE.SMF + register: sap_swpm_extractswpm + args: + chdir: "{{ sapase_client_install_directory }}" + with_items: + - "{{ sapase_client_files.stdout_lines }}" + +- name: Identify SAP ASE unpack path + ansible.builtin.find: + paths: "{{ sapase_install_directory }}" + recurse: yes + file_type: directory + patterns: '.*BD_SYBASE_ASE_16.*' + use_regex: yes + register: sapase_find_dir diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml new file mode 100644 index 000000000..1ec560869 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml @@ -0,0 +1,38 @@ +--- + +- name: SAP Install Media Detect - SAP MaxDB - Set fact for install media directory + set_fact: + sapmaxdb_install_directory: "{{ sap_install_media_detect_directory }}/sapmaxdb" + +- name: SAP Install Media Detect - SAP MaxDB - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sapmaxdb_install_directory }}" + + +- name: List files in directory of SAP MaxDB installation media + ansible.builtin.shell: ls -1 + args: + chdir: "{{ sapmaxdb_install_directory }}" + register: sapmaxdb_install_files + +- name: Extract ZIP files of SAP MaxDB installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi + args: + chdir: "{{ sapmaxdb_install_directory }}" + with_items: + - "{{ sapmaxdb_install_files.stdout_lines }}" + +- name: Identify SAP MaxDB unpack path + ansible.builtin.find: + paths: "{{ sapmaxdb_install_directory }}" + recurse: yes + file_type: directory + patterns: '.*MaxDB_7.9.*' + use_regex: yes + register: sapmaxdb_find_dir diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml new file mode 100644 index 000000000..2976c6081 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -0,0 +1,21 @@ +--- + +- name: SAP Install Media Detect - SAPCAR - Get SAPCAR executable file from folder - {{ sap_install_media_detect_directory }} + ansible.builtin.shell: ls SAPCAR*.EXE + args: + chdir: "{{ sap_install_media_detect_directory }}" + register: sap_swpm_sapcar_file_name_get + changed_when: false + +- name: SAP Install Media Detect - SAPCAR - Set fact + ansible.builtin.set_fact: + sap_swpm_sapcar_file_name: "{{ sap_swpm_sapcar_file_name_get.stdout }}" + +- name: SAP Install Media Detect - SAPCAR - Change ownership of SAPCAR + ansible.builtin.file: + path: "{{ sap_swpm_sapcar_file_name_get.stdout }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root diff --git a/roles/sap_install_media_detect/tasks/detect_saphana.yml b/roles/sap_install_media_detect/tasks/detect_saphana.yml new file mode 100644 index 000000000..610942815 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_saphana.yml @@ -0,0 +1,125 @@ +--- + +- name: SAP Install Media Detect - SAP HANA - Set fact for install media directory + set_fact: + sap_hana_install_directory: "{{ sap_install_media_detect_directory }}/sap_hana" + +- name: SAP Install Media Detect - SAP HANA - Create Directory - {{ sap_hana_install_directory }} + file: + path: "{{ sap_hana_install_directory }}" + state: directory + mode: '0755' + owner: root + group: root + +- name: SAP Install Media Detect - SAP HANA - Copy SAPCAR file + ansible.builtin.shell: | + cp {{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }} {{ sap_hana_install_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }} + + +# IMDB SAR Files +- name: SAP Install Media Detect - SAP HANA - Get all IMDB SAR files in folder - {{ sap_install_media_detect_directory }} + ansible.builtin.shell: | + ls IMDB*.SAR + args: + chdir: "{{ sap_install_media_detect_directory }}" + register: imdb_sarfiles_list + +- name: SAP Install Media Detect - SAP HANA - Set fact list of SAR files + set_fact: + sap_hana_install_imdb_sar: "{{ imdb_sarfiles_list.stdout.split() }}" + when: + - not( imdb_sarfiles_list.stdout == '' ) + +- name: SAP Install Media Detect - SAP HANA - Copy SAP HANA files + ansible.builtin.shell: | + cp {{ sap_install_media_detect_directory }}/{{ item }} {{ sap_install_media_detect_directory }}/sap_hana/{{ item }} + loop: "{{ sap_hana_install_imdb_sar }}" + when: + - not( imdb_sarfiles_list.stdout == '' ) + + +- name: SAP Install Media Detect - SAP HANA - Check availability of software path - {{ sap_hana_install_directory }} + stat: + path: "{{ sap_hana_install_directory }}" + register: sap_hana_install_software_path_stat + failed_when: not sap_hana_install_software_path_stat.stat.exists + +- name: SAP Install Media Detect - SAP HANA - Change ownership of software path - {{ sap_hana_install_directory }} + ansible.builtin.file: + path: "{{ sap_hana_install_directory }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root + + +# Create directory {{ sap_hana_install_directory }}/extracted +# This is where all extracted .SAR files will be stored +- name: SAP Install Media Detect - SAP HANA - Remove directory - {{ sap_hana_install_directory }}/extracted + ansible.builtin.file: + path: "{{ sap_hana_install_directory }}/extracted" + state: absent + +- name: SAP Install Media Detect - SAP HANA - Create directory - {{ sap_hana_install_directory }}/extracted + ansible.builtin.file: + path: "{{ sap_hana_install_directory }}/extracted" + state: directory + +- name: SAP Install Media Detect - SAP HANA - Change ownership of deployment directory - {{ sap_hana_install_directory }} + ansible.builtin.file: + path: "{{ sap_hana_install_directory }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root + +- name: SAP Install Media Detect - SAP HANA - Get all SAR files in folder - {{ sap_hana_install_directory }} + ansible.builtin.shell: | + ls *.SAR + args: + chdir: "{{ sap_hana_install_directory }}" + register: sarfiles_list + +- name: SAP Install Media Detect - SAP HANA - Set fact for list of SAR files + set_fact: + sap_hana_install_components_sar: "{{ sarfiles_list.stdout.split() }}" + when: + - not( sarfiles_list.stdout == '' ) + +- name: SAP Install Media Detect - SAP HANA - Extract all SAR files in folder - {{ sap_hana_install_directory }} + include_tasks: ./extract/sapcar_loop_handler_saphana.yml + register: extract_all_sar_files + loop: "{{ sap_hana_install_components_sar }}" + loop_control: + loop_var: passed_sap_hana_install_components_sar + when: + - not( sarfiles_list.stdout == '' ) + +- name: SAP Install Media Detect - SAP HANA - Change ownership of software path - {{ sap_hana_install_directory }} + ansible.builtin.file: + path: "{{ sap_hana_install_directory }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root + +- name: SAP Install Media Detect - SAP HANA - Find SAP_HANA_DATABASE + find: + paths: "{{ sap_hana_install_directory }}" + recurse: yes + file_type: directory + contains: "SAP_HANA_DATABASE" + register: sap_hana_database + +- name: SAP Install Media Detect - SAP HANA - Find SAP_HANA_CLIENT for SAP SWPM + find: + paths: "{{ sap_hana_install_directory }}" + recurse: yes + file_type: directory + patterns: "SAP_HANA_CLIENT" + register: sap_hana_client_path + ignore_errors: true diff --git a/roles/sap_install_media_detect/tasks/detect_saphostagent.yml b/roles/sap_install_media_detect/tasks/detect_saphostagent.yml new file mode 100644 index 000000000..f23328fdc --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_saphostagent.yml @@ -0,0 +1,25 @@ +--- + +- name: SAP Install Media Detect - SAP Host Agent - Set fact for install media directory + set_fact: + sap_hostagent_install_directory: "{{ sap_install_media_detect_directory }}/sap_hostagent" + +- name: SAP Install Media Detect - SAP Host Agent - Create Directory - {{ sap_hostagent_install_directory }} + file: + path: "{{ sap_hostagent_install_directory }}" + state: directory + mode: '0755' + owner: root + group: root + +# SAPHOSTAGENT +- name: SAP Install Media Detect - SAP Host Agent - Get SAPHOSTAGENT SAR file from folder - {{ sap_install_media_detect_directory }} + ansible.builtin.shell: | + ls SAPHOSTAGENT*SAR + args: + chdir: "{{ sap_install_media_detect_directory }}" + register: saphostagent_sarfile + +- name: SAP Install Media Detect - SAP Host Agent - Copy SAPHOSTAGENT SAR file + ansible.builtin.shell: | + cp {{ sap_install_media_detect_directory }}/{{ saphostagent_sarfile.stdout }} {{ sap_hostagent_install_directory }}/{{ saphostagent_sarfile.stdout }} diff --git a/roles/sap_install_media_detect/tasks/detect_sapigs.yml b/roles/sap_install_media_detect/tasks/detect_sapigs.yml new file mode 100644 index 000000000..924c21041 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapigs.yml @@ -0,0 +1,39 @@ +--- + +- name: SAP Install Media Detect - SAP IGS - Get IGS from software path + ansible.builtin.shell: | + ls igsexe*.sar + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_igs_file_name_get + +- name: SAP Install Media Detect - SAP IGS - Set fact for IGS + set_fact: + sap_swpm_igs_path: "{{ sap_swpm_software_path }}" + sap_swpm_igs_file_name: "{{ sap_swpm_igs_file_name_get.stdout }}" + +# failed_when will trigger if more than 1 igsexe is identified and added to the register +- name: SAP Install Media Detect - SAP IGS - Check availability of IGS - {{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }} + stat: + path: "{{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }}" + register: sap_swpm_igs_file_name_stat + failed_when: not sap_swpm_igs_file_name_stat.stat.exists + +# 4. IGS Helper +- name: SAP Install Media Detect - SAP IGS - Get IGS Helper from software path + ansible.builtin.shell: | + ls igshelper*.sar + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_igs_helper_file_name_get + +- name: SAP Install Media Detect - SAP IGS - Set fact for IGS + set_fact: + sap_swpm_igs_helper_path: "{{ sap_swpm_software_path }}" + sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}" + +- name: SAP Install Media Detect - SAP IGS - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} + stat: + path: "{{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }}" + register: sap_swpm_igs_helper_file_name_stat + failed_when: not sap_swpm_igs_helper_file_name_stat.stat.exists diff --git a/roles/sap_install_media_detect/tasks/detect_sapkernel.yml b/roles/sap_install_media_detect/tasks/detect_sapkernel.yml new file mode 100644 index 000000000..daf5805f4 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapkernel.yml @@ -0,0 +1,39 @@ +--- + +# 5. SAPEXEDB +- name: SAP Install Media Detect - SAP Kernel - Get SAPEXEDB from software path + ansible.builtin.shell: | + ls SAPEXEDB_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_kernel_dependent_file_name_get + +- name: SAP Install Media Detect - SAP Kernel - Set fact for SAPEXEDB + set_fact: + sap_swpm_kernel_dependent_path: "{{ sap_swpm_software_path }}" + sap_swpm_kernel_dependent_file_name: "{{ sap_swpm_kernel_dependent_file_name_get.stdout }}" + +- name: SAP Install Media Detect - SAP Kernel - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} + stat: + path: "{{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }}" + register: sap_swpm_kernel_dependent_file_name_stat + failed_when: not sap_swpm_kernel_dependent_file_name_stat.stat.exists + +# 6. SAPEXE +- name: SAP Install Media Detect - SAP Kernel - Get SAPEXE from software path + ansible.builtin.shell: | + ls SAPEXE_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_kernel_independent_file_name_get + +- name: SAP Install Media Detect - SAP Kernel - Set fact for SAPEXE + set_fact: + sap_swpm_kernel_independent_path: "{{ sap_swpm_software_path }}" + sap_swpm_kernel_independent_file_name: "{{ sap_swpm_kernel_independent_file_name_get.stdout }}" + +- name: SAP Install Media Detect - SAP Kernel - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} + stat: + path: "{{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }}" + register: sap_swpm_kernel_independent_file_name_stat + failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists diff --git a/roles/sap_install_media_detect/tasks/detect_sapswpm.yml b/roles/sap_install_media_detect/tasks/detect_sapswpm.yml new file mode 100644 index 000000000..cd144822b --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapswpm.yml @@ -0,0 +1,126 @@ +--- + +- name: SAP Install Media Detect - SAP SWPM - Set fact for install media directory + set_fact: + sap_swpm_install_directory: "{{ sap_install_media_detect_directory }}/sap_swpm" + sap_swpm_software_path: "{{ sap_install_media_detect_directory }}" + sap_swpm_swpm_path: "{{ sap_install_media_detect_directory }}/sap_swpm" + +- name: SAP Install Media Detect - SAP SWPM - Create Directory - {{ sap_swpm_install_directory }} + file: + path: "{{ sap_swpm_install_directory }}" + state: directory + mode: '0755' + owner: root + group: root + +- name: SAP Install Media Detect - SAP SWPM - Copy SAPCAR file + ansible.builtin.shell: | + cp {{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }} {{ sap_swpm_install_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }} + + +# SWPM +- name: SAP Install Media Detect - SAP SWPM - Get SWPM from {{ sap_install_media_detect_directory }} + ansible.builtin.shell: | + ls SWPM*.SAR + args: + chdir: "{{ sap_install_media_detect_directory }}" + register: sap_swpm_swpm_sar_file_name_get + +- name: SAP Install Media Detect - SAP SWPM - Copy SWPM file + ansible.builtin.shell: | + cp {{ sap_install_media_detect_directory }}/{{ sap_swpm_swpm_sar_file_name_get.stdout }} {{ sap_install_media_detect_directory }}/sap_swpm/{{ sap_swpm_swpm_sar_file_name_get.stdout }} + + +- name: SAP Install Media Detect - SAP SWPM - Check availability of software path - {{ sap_swpm_software_path }} + stat: + path: "{{ sap_swpm_software_path }}" + register: sap_swpm_software_path_stat + failed_when: not sap_swpm_software_path_stat.stat.exists + +- name: SAP Install Media Detect - SAP SWPM - Change ownership of software path - {{ sap_swpm_software_path }} + ansible.builtin.file: + path: "{{ sap_swpm_software_path }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root + + +################ +# Prepare software path +################ + +# Software Path + +# Backup Location - this is moved to install_type/restore_install.yml + +# - name: SAP SWPM Pre Install - Check backup location + +# block: + +# - name: SAP Install Media Detect - SAP SWPM - Check availability backup location - {{ sap_swpm_backup_location }} +# stat: +# path: "{{ sap_swpm_backup_location }}" +# register: sap_swpm_backup_location_stat +# failed_when: not sap_swpm_backup_location_stat.stat.exists and '.CP' in sap_swpm_product_catalog_id + +# - name: SAP Install Media Detect - SAP SWPM - Change ownership of backup location - {{ sap_swpm_backup_location }} +# ansible.builtin.file: +# path: "{{ sap_swpm_backup_location }}" +# state: directory +# recurse: yes +# mode: '0755' +# owner: root +# group: root +# when: +# - sap_swpm_backup_location_stat.stat.exists and sap_swpm_backup_location_stat.stat.isdir + +# when: +# - "'restore' in sap_swpm_swpm_installation_type" + + + + + +# SWPM Path + +- name: SAP Install Media Detect - SAP SWPM - Check availability of SWPM path - {{ sap_swpm_swpm_path }} + stat: + path: "{{ sap_swpm_swpm_path }}" + register: sap_swpm_swpm_path_stat + failed_when: not sap_swpm_swpm_path_stat.stat.exists + +- name: SAP Install Media Detect - SAP SWPM - Change ownership of SWPM path - {{ sap_swpm_swpm_path }} + ansible.builtin.file: + path: "{{ sap_swpm_swpm_path }}" + state: directory + recurse: yes + mode: '0755' + owner: root + group: root + + +################ +# Get software files from software paths +################ + +# 2. SWPM + +- name: SAP Install Media Detect - SAP SWPM - Get SWPM from {{ sap_swpm_swpm_path }} + ansible.builtin.shell: | + ls SWPM*.SAR + args: + chdir: "{{ sap_swpm_swpm_path }}" + register: sap_swpm_swpm_sar_file_name_get + +- name: SAP Install Media Detect - SAP SWPM - Set fact for SWPM + set_fact: + sap_swpm_swpm_sar_file_name: "{{ sap_swpm_swpm_sar_file_name_get.stdout }}" + +- name: SAP Install Media Detect - SAP SWPM - Check availability of SWPM - {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} + stat: + path: "{{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }}" + register: sap_swpm_swpm_sar_file_name_stat + failed_when: not sap_swpm_swpm_sar_file_name_stat.stat.exists diff --git a/roles/sap_install_media_detect/tasks/detect_sapwebdisp.yml b/roles/sap_install_media_detect/tasks/detect_sapwebdisp.yml new file mode 100644 index 000000000..6f6e613df --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_sapwebdisp.yml @@ -0,0 +1,23 @@ +--- + +# 7. Web Dispatcher +- name: SAP Install Media Detect - SAP WebDisp - Get WEBDISP from software path + ansible.builtin.shell: | + ls SAPWEBDISP_*.SAR + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_web_dispatcher_file_name_get + ignore_errors: true + +- name: SAP Install Media Detect - SAP WebDisp - Set fact for WEBDISP + set_fact: + sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}" + sap_swpm_web_dispatcher_file_name: "{{ sap_swpm_web_dispatcher_file_name_get.stdout }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP WebDisp - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} + stat: + path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" + register: sap_swpm_web_dispatcher_file_name_stat + failed_when: not sap_swpm_web_dispatcher_file_name_stat.stat.exists + ignore_errors: true diff --git a/roles/sap_install_media_detect/tasks/hana/extract_sar.yml b/roles/sap_install_media_detect/tasks/extract/sapcar_loop_handler_saphana.yml similarity index 57% rename from roles/sap_install_media_detect/tasks/hana/extract_sar.yml rename to roles/sap_install_media_detect/tasks/extract/sapcar_loop_handler_saphana.yml index ef731f78d..172ceb9da 100644 --- a/roles/sap_install_media_detect/tasks/hana/extract_sar.yml +++ b/roles/sap_install_media_detect/tasks/extract/sapcar_loop_handler_saphana.yml @@ -1,13 +1,13 @@ --- -- name: SAP Media Organize - SAP HANA - Create temp dir - {{ sap_hana_install_directory }}/tmp +- name: SAP Install Media Detect - SAP HANA - SAPCAR Extract Loop - Create temp dir - {{ sap_hana_install_directory }}/tmp file: path: "{{ sap_hana_install_directory }}/tmp" state: directory -- name: SAP Media Organize - SAP HANA - Extracting {{ passed_sap_hana_install_components_sar }} +- name: SAP Install Media Detect - SAP HANA - SAPCAR Extract Loop - Extracting {{ passed_sap_hana_install_components_sar }} command: >- - {{ sap_hana_install_directory }}/{{ sap_hana_install_sapcar_file_name }} \ + {{ sap_hana_install_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }} \ -R {{ sap_hana_install_directory }}/tmp -xvf {{ sap_hana_install_directory }}/{{ passed_sap_hana_install_components_sar }} \ -manifest SIGNATURE.SMF @@ -16,7 +16,7 @@ chdir: "{{ sap_hana_install_directory }}" changed_when: "'SAPCAR: processing archive' in sap_hana_install_extract.stdout" -- name: SAP Media Organize - SAP HANA - Create directory if SAP Host Agent +- name: SAP Install Media Detect - SAP HANA - SAPCAR Extract Loop - Create directory if SAP Host Agent file: path: "{{ sap_hana_install_directory }}/tmp/SAP_HOST_AGENT" state: directory @@ -25,15 +25,15 @@ group: root when: "'SAPHOST' in passed_sap_hana_install_components_sar" -- name: SAP Media Organize - SAP HANA - Prepare extracted dir - shell: | +- name: SAP Install Media Detect - SAP HANA - SAPCAR Extract Loop - Prepare extracted dir + ansible.builtin.shell: | extracted_dir=$(ls -d */) cp SIGNATURE.SMF $extracted_dir cp -R $extracted_dir ../extracted/$extracted_dir args: chdir: "{{ sap_hana_install_directory }}/tmp" -- name: SAP Media Organize - SAP HANA - Remove temp dir - {{ sap_hana_install_directory }}/tmp +- name: SAP Install Media Detect - SAP HANA - SAPCAR Extract Loop - Remove temp dir - {{ sap_hana_install_directory }}/tmp file: path: "{{ sap_hana_install_directory }}/tmp" state: absent diff --git a/roles/sap_install_media_detect/tasks/hana/prepare_hana.yml b/roles/sap_install_media_detect/tasks/hana/prepare_hana.yml deleted file mode 100644 index 4f25fcbc6..000000000 --- a/roles/sap_install_media_detect/tasks/hana/prepare_hana.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -# hdblcm prepare - -# Create directory {{ sap_hana_install_directory }}/extracted -# This is where all extracted .SAR files will be stored - -- name: SAP Media Organize - SAP HANA - Remove directory - {{ sap_hana_install_directory }}/extracted - ansible.builtin.file: - path: "{{ sap_hana_install_directory }}/extracted" - state: absent - -- name: SAP Media Organize - SAP HANA - Create directory - {{ sap_hana_install_directory }}/extracted - ansible.builtin.file: - path: "{{ sap_hana_install_directory }}/extracted" - state: directory - -- name: SAP Media Organize - SAP HANA - Change ownership of deployment directory - {{ sap_hana_install_directory }} - ansible.builtin.file: - path: "{{ sap_hana_install_directory }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - -- name: SAP Media Organize - SAP HANA - Get SAPCAR executable file from folder - {{ sap_hana_install_directory }} - shell: | - ls SAPCAR*EXE - args: - chdir: "{{ sap_hana_install_directory }}" - register: sapcar_executable - -- name: SAP Media Organize - SAP HANA - Set fact for SAPCAR executable - set_fact: - sap_hana_install_sapcar_file_name: "{{ sapcar_executable.stdout }}" - -- name: SAP Media Organize - SAP HANA - Get all SAR files in folder - {{ sap_hana_install_directory }} - shell: | - ls *.SAR - args: - chdir: "{{ sap_hana_install_directory }}" - register: sarfiles_list - -- name: SAP Media Organize - SAP HANA - Set fact list of SAR files - set_fact: - sap_hana_install_components_sar: "{{ sarfiles_list.stdout.split() }}" - when: - - not( sarfiles_list.stdout == '' ) - -- name: SAP Media Organize - SAP HANA - Extract all SAR files in folder - {{ sap_hana_install_directory }} - include_tasks: extract_sar.yml - register: extract_all_sar_files - loop: "{{ sap_hana_install_components_sar }}" - loop_control: - loop_var: passed_sap_hana_install_components_sar - when: - - not( sarfiles_list.stdout == '' ) - -- name: SAP Media Organize - SAP HANA - Change ownership of software path - {{ sap_hana_install_directory }} - ansible.builtin.file: - path: "{{ sap_hana_install_directory }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - -- name: SAP Media Organize - SAP HANA - Find SAP_HANA_DATABASE - find: - paths: "{{ sap_hana_install_directory }}" - recurse: yes - file_type: directory - contains: "SAP_HANA_DATABASE" - register: sap_hana_database - -- name: SAP Media Organize - SAP HANA - Find SAP_HANA_CLIENT for SAP SWPM - find: - paths: "{{ sap_hana_install_directory }}" - recurse: yes - file_type: directory - patterns: "SAP_HANA_CLIENT" - register: sap_hana_client_path - ignore_errors: yes - -- name: SAP Media Organize - SAP HANA - Set fact for hdblcm installer path for SAP SWPM 1 - set_fact: - sap_swpm_cd_rdms_path: "{{ sap_hana_client_path.files[0].path }}" - ignore_errors: yes diff --git a/roles/sap_install_media_detect/tasks/main.yml b/roles/sap_install_media_detect/tasks/main.yml index 4522ba477..7930289f9 100644 --- a/roles/sap_install_media_detect/tasks/main.yml +++ b/roles/sap_install_media_detect/tasks/main.yml @@ -1,21 +1,98 @@ --- -- name: SAP Media Detect - Organize HANA - include_tasks: "organize_hana.yml" +- name: SAP Install Media Detect - Prepare - Get unrar + include_tasks: "prepare/unrar_get.yml" -- name: SAP Media Detect - Organize SWPM - include_tasks: "organize_swpm.yml" +- name: SAP Install Media Detect - Organize SAPCAR + include_tasks: "detect_sapcar.yml" -- name: SAP Media Detect - Check HANA - include_tasks: "check_hana.yml" +- name: SAP Install Media Detect - Organize SAP HANA installation media files + include_tasks: "detect_saphana.yml" + when: + - sap_install_media_detect_db == "saphana" -- name: SAP Media Detect - Check SWPM - include_tasks: "check_swpm.yml" +- name: SAP Install Media Detect - Organize SAP ASE installation media files + include_tasks: "detect_sapanydb_sapase.yml" + when: + - sap_install_media_detect_db == "sapase" -- name: SAP Media Detect - Display Paths +- name: SAP Install Media Detect - Organize SAP MaxDB installation media files + include_tasks: "detect_sapanydb_sapmaxdb.yml" + when: + - sap_install_media_detect_db == "sapmaxdb" + +- name: SAP Install Media Detect - Organize Oracle DB installation media files + include_tasks: "detect_sapanydb_oracledb.yml" + when: + - sap_install_media_detect_db == "oracledb" + +- name: SAP Install Media Detect - Organize IBM Db2 installation media files + include_tasks: "detect_sapanydb_ibmdb2.yml" + when: + - sap_install_media_detect_db == "ibmdb2" + + +- name: SAP Install Media Detect - Organize SAP SWPM installation media files + include_tasks: "detect_sapswpm.yml" + when: + - sap_install_media_detect_swpm == true + +- name: SAP Install Media Detect - Organize SAP Host Agent installation media files + include_tasks: "detect_saphostagent.yml" + when: + - sap_install_media_detect_hostagent == true + +- name: SAP Install Media Detect - Organize SAP IGS installation media files + include_tasks: "detect_sapigs.yml" + when: + - sap_install_media_detect_igs == true + +- name: SAP Install Media Detect - Organize SAP Kernel installation media files + include_tasks: "detect_sapkernel.yml" + when: + - sap_install_media_detect_kernel == true + +- name: SAP Install Media Detect - Organize SAP Web Dispatcher installation media files + include_tasks: "detect_sapwebdisp.yml" + when: + - sap_install_media_detect_webdisp == true + + +- name: SAP Backups Detect - SAP HANA + include_tasks: "detect_backup_saphana.yml" + when: + - sap_install_media_detect_backup == "saphana" + + +- name: SAP Export Detect - SAP ECC + include_tasks: "detect_export_sapecc.yml" + when: + - sap_install_media_detect_export == "sapecc" + +- name: SAP Export Detect - SAP S/4HANA + include_tasks: "detect_export_saps4hana.yml" + when: + - sap_install_media_detect_export == "saps4hana" + + +- name: SAP Install Media Detection Completed - set global vars for subsequent Ansible Tasks + include_tasks: "set_global_vars.yml" + + +# Output of detected SAP Software + +- name: SAP Install Media Detection Completed - Display Paths for SAP HANA debug: msg: - - "SWPM Software Path - {{ sap_swpm_software_path }}" - - "SWPM SAPCAR Path - {{ sap_swpm_sapcar_path }}" - - "SWPM Path - {{ sap_swpm_swpm_path }}" - "SAP HANA Path - {{ sap_hana_install_directory }}" + when: + - sap_install_media_detect_db == "saphana" + +- name: SAP Install Media Detection Completed - Display Paths for SAP SWPM + debug: + msg: + - "SAP SWPM Software Path - {{ sap_swpm_software_path }}" + - "SAP SWPM SAPCAR Path - {{ sap_swpm_sapcar_path }}" + - "SAP SWPM Path - {{ sap_swpm_swpm_path }}" + when: + - sap_install_media_detect_swpm == true diff --git a/roles/sap_install_media_detect/tasks/organize_hana.yml b/roles/sap_install_media_detect/tasks/organize_hana.yml deleted file mode 100644 index 309aa9c9a..000000000 --- a/roles/sap_install_media_detect/tasks/organize_hana.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -- name: SAP Media Organize - SAP HANA - Create Directory - {{ sap_install_media_detect_directory }}/sap_hana - file: - path: "{{ sap_install_media_detect_directory }}/sap_hana" - state: directory - mode: '0755' - owner: root - group: root - -# IMDB SAR Files -- name: SAP Media Organize - SAP HANA - Get all IMDB SAR files in folder - {{ sap_install_media_detect_directory }} - shell: | - ls IMDB*.SAR - args: - chdir: "{{ sap_install_media_detect_directory }}" - register: imdb_sarfiles_list - -- name: SAP Media Organize - SAP HANA - Set fact list of SAR files - set_fact: - sap_hana_install_imdb_sar: "{{ imdb_sarfiles_list.stdout.split() }}" - when: - - not( imdb_sarfiles_list.stdout == '' ) - -- name: SAP Media Organize - SAP HANA - Copy SAP HANA files - shell: | - cp {{ sap_install_media_detect_directory }}/{{ item }} {{ sap_install_media_detect_directory }}/sap_hana/{{ item }} - loop: "{{ sap_hana_install_imdb_sar }}" - when: - - not( imdb_sarfiles_list.stdout == '' ) - -# SAPCAR -- name: SAP Media Organize - SAP HANA - Get SAPCAR executable file from folder - {{ sap_install_media_detect_directory }} - shell: | - ls SAPCAR*.EXE - args: - chdir: "{{ sap_install_media_detect_directory }}" - register: sapcar_executable - -- name: SAP Media Organize - SAP HANA - Copy SAPCAR file - shell: | - cp {{ sap_install_media_detect_directory }}/{{ sapcar_executable.stdout }} {{ sap_install_media_detect_directory }}/sap_hana/{{ sapcar_executable.stdout }} - -# SAPHOSTAGENT -- name: SAP Media Organize - SAP HANA - Get SAPHOSTAGENT SAR file from folder - {{ sap_install_media_detect_directory }} - shell: | - ls SAPHOSTAGENT*SAR - args: - chdir: "{{ sap_install_media_detect_directory }}" - register: saphostagent_sarfile - -- name: SAP Media Organize - SAP HANA - Copy SAPHOSTAGENT SAR file - shell: | - cp {{ sap_install_media_detect_directory }}/{{ saphostagent_sarfile.stdout }} {{ sap_install_media_detect_directory }}/sap_hana/{{ saphostagent_sarfile.stdout }} diff --git a/roles/sap_install_media_detect/tasks/organize_swpm.yml b/roles/sap_install_media_detect/tasks/organize_swpm.yml deleted file mode 100644 index bf08a0124..000000000 --- a/roles/sap_install_media_detect/tasks/organize_swpm.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- - -- name: SAP Media Organize - SAP SWPM - Create Directory - {{ sap_install_media_detect_directory }}/sap_swpm - file: - path: "{{ sap_install_media_detect_directory }}/sap_swpm" - state: directory - mode: '0755' - owner: root - group: root - -# SAPCAR -- name: SAP Media Organize - SAP SWPM - Get SAPCAR executable file from folder - {{ sap_install_media_detect_directory }} - shell: | - ls SAPCAR*EXE - args: - chdir: "{{ sap_install_media_detect_directory }}" - register: sapcar_executable - -- name: SAP Media Organize - SAP SWPM - Copy SAPCAR file - shell: | - cp {{ sap_install_media_detect_directory }}/{{ sapcar_executable.stdout }} {{ sap_install_media_detect_directory }}/sap_swpm/{{ sapcar_executable.stdout }} - -# SWPM -- name: SAP Media Organize - SAP SWPM - Get SWPM from {{ sap_install_media_detect_directory }} - shell: | - ls SWPM*.SAR - args: - chdir: "{{ sap_install_media_detect_directory }}" - register: sap_swpm_swpm_sar_file_name_get - -- name: SAP Media Organize - SAP SWPM - Copy SWPM file - shell: | - cp {{ sap_install_media_detect_directory }}/{{ sap_swpm_swpm_sar_file_name_get.stdout }} {{ sap_install_media_detect_directory }}/sap_swpm/{{ sap_swpm_swpm_sar_file_name_get.stdout }} diff --git a/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml b/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml new file mode 100644 index 000000000..bf8b62cd4 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml @@ -0,0 +1,6 @@ +--- + +- name: Get unrar binary for extraction + ansible.builtin.shell: curl https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz | tar -xvz --strip-components=1 rar/unrar + args: + chdir: "{{ sap_install_media_detect_directory }}" diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml new file mode 100644 index 000000000..96c7109e0 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -0,0 +1,62 @@ +--- + +- name: SAP Install Media Detection Completed - set facts for SAP HANA + ansible.builtin.set_fact: + sap_hana_install_software_directory: "{{ sap_hana_install_directory }}" # for sap_hana_install Ansible Role + sap_hana_install_software_extract_directory: "{{ sap_hana_install_directory }}/extracted" # for sap_hana_install Ansible Role + sap_swpm_cd_rdms_path: "{{ sap_hana_client_path.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_db == "saphana" + +- name: SAP Install Media Detection Completed - set facts for IBM Db2 + ansible.builtin.set_fact: + sap_swpm_cd_ibmdb2_path: "{{ ibmdb2_install_directory }}/{{ softwarecenter_search_list_ecc_ibmdb2[0] }}_extracted" # for sap_swpm Ansible Role + sap_swpm_cd_ibmdb2_client_path: "{{ ibmdb2_client_install_directory }}/{{ softwarecenter_search_list_ecc_ibmdb2_client[0] }}_extracted" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_db == "ibmdb2" + +- name: SAP Install Media Detection Completed - set facts for Oracle DB + ansible.builtin.set_fact: + sap_swpm_cd_oracle_path: "{{ oracledb_install_directory }}/{{ softwarecenter_search_list_ecc_oracledb[0] }}_extracted" # for sap_swpm Ansible Role + sap_swpm_cd_oracle_client_path: "{{ oracledb_client_find_dir.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_db == "oracledb" + +- name: SAP Install Media Detection Completed - set facts for SAP ASE + ansible.builtin.set_fact: + sap_swpm_cd_sapase_path: "{{ sapase_find_dir.files[0].path }}" # for sap_swpm Ansible Role + sap_swpm_cd_sapase_client_path: "{{ sapase_client_install_directory }}/{{ softwarecenter_search_list_ecc_sapase_client[0] }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_db == "sapase" + +- name: SAP Install Media Detection Completed - set facts for SAP MaxDB + ansible.builtin.set_fact: + sap_swpm_cd_sapmaxdb_path: "{{ sapmaxdb_find_dir.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_db == "sapmaxdb" + +- name: SAP Install Media Detection Completed - set facts for Export of SAP ECC + ansible.builtin.set_fact: + sap_swpm_cd_export_path: "{{ sap_swpm_ecc_export_path }}/{{ softwarecenter_search_list_ecc_export[0] | regex_replace('_.*', '') }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_export == "ecc" + +- name: SAP Install Media Detection Completed - set facts for Export of SAP S/4HANA + ansible.builtin.set_fact: + sap_swpm_cd_export_path: "{{ sap_swpm_s4hana_export_path }}/{{ softwarecenter_search_list_s4hana_export[0] | regex_replace('_.*', '') }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_export == "s4hana" + +- name: SAP Install Media Detection Completed - set facts for SAP SWPM + ansible.builtin.set_fact: + sap_swpm_sapcar_path: "{{ sap_install_media_detect_directory }}/sap_swpm" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_swpm == true diff --git a/roles/sap_install_media_detect/tasks/swpm/detect_swpm.yml b/roles/sap_install_media_detect/tasks/swpm/detect_swpm.yml deleted file mode 100644 index a07a3da3d..000000000 --- a/roles/sap_install_media_detect/tasks/swpm/detect_swpm.yml +++ /dev/null @@ -1,220 +0,0 @@ ---- - -################ -# Prepare software path -################ - -# Software Path - -# Backup Location - this is moved to install_type/restore_install.yml - -# - name: SAP SWPM Pre Install - Check backup location - -# block: - -# - name: SAP Media Check - SAP SWPM - Check availability backup location - {{ sap_swpm_backup_location }} -# stat: -# path: "{{ sap_swpm_backup_location }}" -# register: sap_swpm_backup_location_stat -# failed_when: not sap_swpm_backup_location_stat.stat.exists and '.CP' in sap_swpm_product_catalog_id - -# - name: SAP Media Check - SAP SWPM - Change ownership of backup location - {{ sap_swpm_backup_location }} -# ansible.builtin.file: -# path: "{{ sap_swpm_backup_location }}" -# state: directory -# recurse: yes -# mode: '0755' -# owner: root -# group: root -# when: -# - sap_swpm_backup_location_stat.stat.exists and sap_swpm_backup_location_stat.stat.isdir - -# when: -# - "'restore' in sap_swpm_swpm_installation_type" - -# SAPCAR Path - -- name: SAP Media Check - SAP SWPM - Check availability of SAPCAR path - {{ sap_swpm_sapcar_path }} - stat: - path: "{{ sap_swpm_sapcar_path }}" - register: sap_swpm_sapcar_path_stat - failed_when: not sap_swpm_sapcar_path_stat.stat.exists - -- name: SAP Media Check - SAP SWPM - Change ownership of SAPCAR path - {{ sap_swpm_sapcar_path }} - ansible.builtin.file: - path: "{{ sap_swpm_sapcar_path }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - -# SWPM Path - -- name: SAP Media Check - SAP SWPM - Check availability of SWPM path - {{ sap_swpm_swpm_path }} - stat: - path: "{{ sap_swpm_swpm_path }}" - register: sap_swpm_swpm_path_stat - failed_when: not sap_swpm_swpm_path_stat.stat.exists - -- name: SAP Media Check - SAP SWPM - Change ownership of SWPM path - {{ sap_swpm_swpm_path }} - ansible.builtin.file: - path: "{{ sap_swpm_swpm_path }}" - state: directory - recurse: yes - mode: '0755' - owner: root - group: root - - -################ -# Get software files from software paths -################ - -# 1. SAPCAR - -- name: SAP Media Check - SAP SWPM - Get SAPCAR from {{ sap_swpm_sapcar_path }} - shell: | - ls SAPCAR*.EXE - args: - chdir: "{{ sap_swpm_sapcar_path }}" - register: sap_swpm_sapcar_file_name_get - -- name: SAP Media Check - SAP SWPM - Set fact for SAPCAR - set_fact: - sap_swpm_sapcar_file_name: "{{ sap_swpm_sapcar_file_name_get.stdout }}" - -- name: SAP Media Check - SAP SWPM - Check availability of SAPCAR - {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} - stat: - path: "{{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }}" - register: sap_swpm_sapcar_file_name_stat - failed_when: not sap_swpm_sapcar_file_name_stat.stat.exists - -# 2. SWPM - -- name: SAP Media Check - SAP SWPM - Get SWPM from {{ sap_swpm_swpm_path }} - shell: | - ls SWPM*.SAR - args: - chdir: "{{ sap_swpm_swpm_path }}" - register: sap_swpm_swpm_sar_file_name_get - -- name: SAP Media Check - SAP SWPM - Set fact for SWPM - set_fact: - sap_swpm_swpm_sar_file_name: "{{ sap_swpm_swpm_sar_file_name_get.stdout }}" - -- name: SAP Media Check - SAP SWPM - Check availability of SWPM - {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} - stat: - path: "{{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }}" - register: sap_swpm_swpm_sar_file_name_stat - failed_when: not sap_swpm_swpm_sar_file_name_stat.stat.exists - -- name: SAP Media Check - SAP SWPM - Full SAP System - block: - -# 3. IGS - - name: SAP Media Check - SAP SWPM - Get IGS from software path - shell: | - ls igsexe*.sar - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_igs_file_name_get - - - name: SAP Media Check - SAP SWPM - Set fact for IGS - set_fact: - sap_swpm_igs_path: "{{ sap_swpm_software_path }}" - sap_swpm_igs_file_name: "{{ sap_swpm_igs_file_name_get.stdout }}" - -# failed_when will trigger if more than 1 igsexe is identified and added to the register - - name: SAP Media Check - SAP SWPM - Check availability of IGS - {{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }} - stat: - path: "{{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }}" - register: sap_swpm_igs_file_name_stat - failed_when: not sap_swpm_igs_file_name_stat.stat.exists - -# 4. IGS Helper - - name: SAP Media Check - SAP SWPM - Get IGS Helper from software path - shell: | - ls igshelper*.sar - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_igs_helper_file_name_get - - - name: SAP Media Check - SAP SWPM - Set fact for IGS - set_fact: - sap_swpm_igs_helper_path: "{{ sap_swpm_software_path }}" - sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}" - - - name: SAP Media Check - SAP SWPM - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} - stat: - path: "{{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }}" - register: sap_swpm_igs_helper_file_name_stat - failed_when: not sap_swpm_igs_helper_file_name_stat.stat.exists - -# 5. SAPEXEDB - - name: SAP Media Check - SAP SWPM - Get SAPEXEDB from software path - shell: | - ls SAPEXEDB_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_kernel_dependent_file_name_get - - - name: SAP Media Check - SAP SWPM - Set fact for SAPEXEDB - set_fact: - sap_swpm_kernel_dependent_path: "{{ sap_swpm_software_path }}" - sap_swpm_kernel_dependent_file_name: "{{ sap_swpm_kernel_dependent_file_name_get.stdout }}" - - - name: SAP Media Check - SAP SWPM - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} - stat: - path: "{{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }}" - register: sap_swpm_kernel_dependent_file_name_stat - failed_when: not sap_swpm_kernel_dependent_file_name_stat.stat.exists - -# 6. SAPEXE - - name: SAP Media Check - SAP SWPM - Get SAPEXE from software path - shell: | - ls SAPEXE_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_kernel_independent_file_name_get - - - name: SAP Media Check - SAP SWPM - Set fact for SAPEXE - set_fact: - sap_swpm_kernel_independent_path: "{{ sap_swpm_software_path }}" - sap_swpm_kernel_independent_file_name: "{{ sap_swpm_kernel_independent_file_name_get.stdout }}" - - - name: SAP Media Check - SAP SWPM - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} - stat: - path: "{{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }}" - register: sap_swpm_kernel_independent_file_name_stat - failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists - - -- name: SAP Media Check - SAP SWPM - Webdispatcher - block: - -# 7. Web Dispatcher - - - name: SAP Media Check - SAP SWPM - Get WEBDISP from software path - shell: | - ls SAPWEBDISP_*.SAR - args: - chdir: "{{ sap_swpm_software_path }}" - register: sap_swpm_web_dispatcher_file_name_get - ignore_errors: yes - - - name: SAP Media Check - SAP SWPM - Set fact for WEBDISP - set_fact: - sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}" - sap_swpm_web_dispatcher_file_name: "{{ sap_swpm_web_dispatcher_file_name_get.stdout }}" - ignore_errors: yes - - - name: SAP Media Check - SAP SWPM - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} - stat: - path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" - register: sap_swpm_web_dispatcher_file_name_stat - failed_when: not sap_swpm_web_dispatcher_file_name_stat.stat.exists - ignore_errors: yes - - when: - - "'Webdispatcher' in sap_swpm_product_catalog_id" From 7e0b33a5545257a11d24d1514605a1ac8cb15f2d Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 12 Sep 2022 18:32:13 +0100 Subject: [PATCH 115/375] sap_install_media_detect: parity fix with existing role functionality --- roles/sap_install_media_detect/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index 4cd0c50f3..cb1b45b51 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -7,7 +7,7 @@ sap_install_media_detect_directory: sap_install_media_detect_source: # saphana, sapase, sapmaxdb, oracledb, ibmdb2 -sap_install_media_detect_db: +sap_install_media_detect_db: "saphana" sap_install_media_detect_swpm: true sap_install_media_detect_hostagent: true From 7a277aba46d19350d23bddbe3a6e8ecd28b73f26 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 12 Sep 2022 18:37:18 +0100 Subject: [PATCH 116/375] sap_install_media_detect: remove mistake creating dir in HOME --- roles/sap_install_media_detect/tasks/detect_sapcar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml index 2976c6081..0efbe957e 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapcar.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -14,7 +14,7 @@ - name: SAP Install Media Detect - SAPCAR - Change ownership of SAPCAR ansible.builtin.file: path: "{{ sap_swpm_sapcar_file_name_get.stdout }}" - state: directory + state: file recurse: yes mode: '0755' owner: root From 2256577a184a4e69c6fe5fb79d178f14abfa9684 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 12 Sep 2022 18:38:28 +0100 Subject: [PATCH 117/375] sap_install_media_detect: add chdir --- roles/sap_install_media_detect/tasks/detect_sapcar.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml index 0efbe957e..9017b7b18 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapcar.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -19,3 +19,5 @@ mode: '0755' owner: root group: root + args: + chdir: "{{ sap_install_media_detect_directory }}" From c03976b46d89f07e5e60d1474f1ce1eb636f5d58 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 12 Sep 2022 23:15:15 +0100 Subject: [PATCH 118/375] sap_install_media_detect: remove chdir and append to path --- roles/sap_install_media_detect/tasks/detect_sapcar.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml index 9017b7b18..1c2a32bcd 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapcar.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -13,11 +13,10 @@ - name: SAP Install Media Detect - SAPCAR - Change ownership of SAPCAR ansible.builtin.file: - path: "{{ sap_swpm_sapcar_file_name_get.stdout }}" + path: "{{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }}" state: file recurse: yes mode: '0755' owner: root group: root - args: - chdir: "{{ sap_install_media_detect_directory }}" + From 3ad066a0beb85c693187124b5363fe22fb2c97ab Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 12 Sep 2022 23:21:02 +0100 Subject: [PATCH 119/375] sap_install_media_detect: remove recurse --- roles/sap_install_media_detect/tasks/detect_sapcar.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml index 1c2a32bcd..4c48c1eb3 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapcar.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -15,7 +15,6 @@ ansible.builtin.file: path: "{{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }}" state: file - recurse: yes mode: '0755' owner: root group: root From a23fa089acdd28e671bbbd2c3cbaffbb34a3dc8e Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 13 Sep 2022 11:06:05 +0200 Subject: [PATCH 120/375] sap_hana_install: Enhancements to Solution for #199 --- .../tasks/pre_install-loop-block.yml | 26 +++++++-- roles/sap_hana_install/tasks/pre_install.yml | 57 ++++++++++--------- 2 files changed, 50 insertions(+), 33 deletions(-) diff --git a/roles/sap_hana_install/tasks/pre_install-loop-block.yml b/roles/sap_hana_install/tasks/pre_install-loop-block.yml index 1f987d272..cf756e017 100644 --- a/roles/sap_hana_install/tasks/pre_install-loop-block.yml +++ b/roles/sap_hana_install/tasks/pre_install-loop-block.yml @@ -1,10 +1,26 @@ --- -# This loop block is necessary because setting the two variables in one set_fact task leads to incorrect list contents. -- name: Set __sap_hana_install_fact_tmp_dirname +- name: SAP HANA Pre Install - Set __sap_hana_install_fact_tmp_dirname ansible.builtin.set_fact: __sap_hana_install_fact_tmp_dirname: "{{ (__sap_hana_install_fact_tmp_dirname + '/' + __sap_hana_install_fact_software_directory.split(\"/\")[line_item | int]) | string }}" -- name: Set __sap_hana_install_fact_software_directories - ansible.builtin.set_fact: - __sap_hana_install_fact_software_directories: "{{ __sap_hana_install_fact_software_directories | d([]) + [__sap_hana_install_fact_tmp_dirname] }}" +- name: SAP HANA Pre Install - Get directory info + ansible.builtin.stat: + path: "{{ __sap_hana_install_fact_tmp_dirname }}" + register: __sap_hana_install_register_stat_dirname + +- name: SAP HANA Pre Install - Display all users permissions for the directory + ansible.builtin.debug: + msg: "'{{ __sap_hana_install_fact_tmp_dirname }}' has all users permissions '{{ __sap_hana_install_register_stat_dirname.stat.mode[-1] }}'." + +- name: SAP HANA Pre Install - Assert that the directory is world executable + ansible.builtin.assert: + that: __sap_hana_install_register_stat_dirname.stat.mode[-1] == '1' or + __sap_hana_install_register_stat_dirname.stat.mode[-1] == '5' or + __sap_hana_install_register_stat_dirname.stat.mode[-1] == '7' + fail_msg: "FAIL: The directory {{ __sap_hana_install_fact_tmp_dirname }} has all users permission '{{ __sap_hana_install_register_stat_dirname.stat.mode[-1] }}' but needs to be world executable! Either change the all users execute permissions or use a separate directory for 'sap_hana_install_software_extract_directory'." + success_msg: "PASS: The directory {{ __sap_hana_install_fact_tmp_dirname }} is world executable." + +#- name: SAP HANA Pre Install - Set __sap_hana_install_fact_software_directories +# ansible.builtin.set_fact: +# __sap_hana_install_fact_software_directories: "{{ __sap_hana_install_fact_software_directories | d([]) + [__sap_hana_install_fact_tmp_dirname] }}" diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 072811ea8..d349c892b 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -38,35 +38,36 @@ fail_msg: "FAIL: The software directory '{{ __sap_hana_install_fact_software_directory }}' does not exist!" success_msg: "PASS: The software directory '{{ __sap_hana_install_fact_software_directory }}' exist." - - name: SAP HANA Pre Install - Set fact for number of directory levels of the software directory - ansible.builtin.set_fact: - __sap_hana_install_fact_software_directory_levels: "{{ __sap_hana_install_fact_software_directory | regex_findall('/') | length }}" - - - name: Display number of directory levels - ansible.builtin.debug: - var: __sap_hana_install_fact_software_directory_levels - - - name: Set fact for list of software directories - ansible.builtin.include_tasks: ./pre_install-loop-block.yml - loop: "{{ range(1, __sap_hana_install_fact_software_directory_levels | int + 1, 1) | list }}" - loop_control: - loop_var: line_item - - - name: Display __sap_hana_install_fact_software_directories - ansible.builtin.debug: - var: __sap_hana_install_fact_software_directories + - name: SAP HANA Pre Install - Assert directory permissions in case `sap_hana_install_software_extract_directory` is below `sap_hana_install_software_extract_directory` + block: - - name: SAP HANA Pre Install - Change permissions of the top level directory tree of the software directory - ansible.builtin.file: - path: "{{ line_item }}" - state: directory - mode: '0755' - owner: root - group: root - recurse: no - loop: "{{ __sap_hana_install_fact_software_directories }}" - loop_control: - loop_var: line_item + - name: SAP HANA Pre Install - Set fact for number of directory levels of the software directory + ansible.builtin.set_fact: + __sap_hana_install_fact_software_directory_levels: "{{ __sap_hana_install_fact_software_directory | regex_findall('/') | length }}" + + - name: SAP HANA Pre Install - Assert directory permissions + ansible.builtin.include_tasks: ./pre_install-loop-block.yml + loop: "{{ range(1, __sap_hana_install_fact_software_directory_levels | int + 1, 1) | list }}" + loop_control: + loop_var: line_item + +# - name: SAP HANA Pre Install - Display __sap_hana_install_fact_software_directories +# ansible.builtin.debug: +# var: __sap_hana_install_fact_software_directories + +# - name: SAP HANA Pre Install - Change permissions of all directories above the software directory +# ansible.builtin.file: +# path: "{{ line_item }}" +# state: directory +# mode: '0755' +# owner: root +# group: root +# recurse: no +# loop: "{{ __sap_hana_install_fact_software_directories }}" +# loop_control: +# loop_var: line_item + + when: sap_hana_install_software_extract_directory is search(sap_hana_install_software_directory) - name: SAP HANA Pre Install - Change ownership of HANA directories ansible.builtin.file: From d33e2544cc0ecc9edfd23e062b6a144846ad9e0e Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 15:00:39 +0100 Subject: [PATCH 121/375] feat: sap_anydb_install_oracle --- .../defaults/main.yml | 16 + roles/sap_anydb_install_oracle/meta/main.yml | 13 + roles/sap_anydb_install_oracle/tasks/main.yml | 10 + .../tasks/oracledb_install_post_mopatch.yml | 1 + .../tasks/oracledb_install_pre.yml | 119 + .../tasks/oracledb_installer_minimal.yml | 91 + .../tasks/oracledb_installer_responsefile.yml | 51 + .../templates/oracledb_rsp_assistants_dbca.j2 | 605 +++++ .../oracledb_rsp_assistants_netca.j2 | 134 ++ .../oracledb_rsp_install_dbinstall.j2 | 364 +++ .../oracledb_rsp_inventory_oracleserver_ee.j2 | 1949 +++++++++++++++++ 11 files changed, 3353 insertions(+) create mode 100644 roles/sap_anydb_install_oracle/defaults/main.yml create mode 100644 roles/sap_anydb_install_oracle/meta/main.yml create mode 100644 roles/sap_anydb_install_oracle/tasks/main.yml create mode 100644 roles/sap_anydb_install_oracle/tasks/oracledb_install_post_mopatch.yml create mode 100644 roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml create mode 100644 roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml create mode 100644 roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml create mode 100644 roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 create mode 100644 roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 create mode 100644 roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 create mode 100644 roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml new file mode 100644 index 000000000..7e3d01c24 --- /dev/null +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -0,0 +1,16 @@ +--- + +# minimal, responsefile +sap_anydb_install_oracle_method: minimal + +oracledb_sid: OR1 + +oracledb_base: /oracle + +oracledb_filesystem_storage: /oradata + +oracledb_inventory_central: /oraInventory + +oracledb_system_password: + +oracledb_installer_extract_path: diff --git a/roles/sap_anydb_install_oracle/meta/main.yml b/roles/sap_anydb_install_oracle/meta/main.yml new file mode 100644 index 000000000..447bb830f --- /dev/null +++ b/roles/sap_anydb_install_oracle/meta/main.yml @@ -0,0 +1,13 @@ +--- +galaxy_info: + namespace: community + author: Sean Freeman + description: Installation of SAP AnyDB - OracleDB + company: Red Hat, Inc. + license: Apache-2.0 + min_ansible_version: 2.9 + platforms: + - name: EL + versions: [ 8, 9 ] + galaxy_tags: [ 'sap', 'anydb', 'oracle', 'oracledb', 'rhel', 'redhat', 'sles', 'suse' ] +dependencies: [] diff --git a/roles/sap_anydb_install_oracle/tasks/main.yml b/roles/sap_anydb_install_oracle/tasks/main.yml new file mode 100644 index 000000000..1c0ddb78d --- /dev/null +++ b/roles/sap_anydb_install_oracle/tasks/main.yml @@ -0,0 +1,10 @@ +--- + +- name: Oracle DB - Pre installation + ansible.builtin.include_tasks: "oracledb_install_pre.yml" + +- name: Oracle DB - Installation + ansible.builtin.include_tasks: "oracledb_installer_{{ sap_anydb_install_oracle_method }}.yml" + +#- name: Oracle DB - Post installation MOPatch +# ansible.builtin.include_tasks: "oracledb_install_post_mopatch.yml" diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_post_mopatch.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_post_mopatch.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_post_mopatch.yml @@ -0,0 +1 @@ +--- diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml new file mode 100644 index 000000000..847b4cd0c --- /dev/null +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -0,0 +1,119 @@ +--- + +# See further: +## oracle-database-preinstall-12cr1.rpm +## oracle-database-preinstall-12cr2.rpm +## oracle-database-preinstall-19c.rpm >> https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm +- name: Install Korn Shell (KSH) and other dependencies for Oracle DB + ansible.builtin.package: + name: + - ksh + - mksh + - bc + - bind-utils + - gcc + - gcc-c++ + - glibc-devel + - libcap + - libaio + - libaio-devel + - libgcc + - libstdc++ + - libstdc++-devel + - make + - psmisc + - rdma-core-devel + - smartmontools + - sysstat + - unzip + - xorg-x11-utils + - xorg-x11-xauth + - unixODBC + - unixODBC-devel + state: present + +# Removed Packages from RHEL 8.x +# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages +# - compat-libcap1 +# - compat-libstdc++-33 + + +- name: Oracle DB - Create Linux User Groups + become_user: root + ansible.builtin.group: + name: "{{ item.group }}" + gid: "{{ item.gid }}" + state: present + loop: + - { group: oinstall, gid: '1001' } + - { group: dba, gid: '1002' } + - { group: oper, gid: '1003' } + - { group: oracle, gid: '1004' } + +- name: Oracle DB - Create Linux Users + become_user: root + ansible.builtin.user: + name: "{{ item.name }}" + uid: "{{ item.uid }}" + groups: "{{ item.groups }}" + shell: "{{ item.shell }}" + comment: "{{ item.comment }}" + append: yes + state: present + with_items: + - { name: 'oracle', uid: '1003', groups: 'oinstall,dba,oper', shell: '/bin/csh', comment: 'Oracle System Administrator' } + +- name: Oracle DB - Create directories, from root user + become_user: root + file: + state: directory + path: "{{ item.path }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" + mode: '0774' + loop: + - { path: "{{ oracledb_base }}", owner: oracle, group: oinstall } # Oracle Base directory + - { path: "{{ oracledb_base }}/dvd/19.0.0", owner: oracle, group: oinstall } # Oracle home image file path + - { path: "{{ oracledb_base }}/{{ oracledb_sid }}/19.0.0", owner: oracle, group: oinstall } # Oracle Home installation directory + - { path: "{{ oracledb_inventory_central }}", owner: oracle, group: oracle } # Oracle Central Inventory + - { path: "{{ oracledb_base }}{{ oracledb_inventory_central }}", owner: oracle, group: oinstall } # Oracle Inventory + - { path: "{{ oracledb_filesystem_storage }}", owner: oracle, group: oinstall } + - { path: /rman, owner: oracle, group: oinstall } + - { path: /archivelog, owner: oracle, group: oinstall } + +- name: Oracle DB - Copy installation media + ansible.builtin.copy: + remote_src: true + directory_mode: true + src: "{{ oracledb_installer_extract_path }}/LINUX_X86_64/" + dest: "{{ oracledb_base }}/dvd/19.0.0" + owner: oracle + group: oinstall + mode: '0774' + +# Requires change directory to Oracle RDBMS installation media directory +- name: Oracle DB - check installation prerequisites for Oracle DB + become: true + become_user: oracle + args: + executable: /bin/csh + chdir: "{{ oracledb_base }}/dvd/19.0.0/" + register: oracledb_precheck + changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_precheck.stdout" + failed_when: "oracledb_precheck.rc not in [ 0, 1 ]" + ansible.builtin.shell: | + setenv CV_ASSUME_DISTID "OL7" + setenv DISPLAY + setenv DB_SID "{{ oracledb_sid }}" + setenv ORACLE_BASE "{{ oracledb_base }}" + setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" + setenv ORACLE_HOME_NAME "OraDb19c_1" + setenv IHRDBMS "$ORACLE_HOME" + setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" + setenv ORA_GOLD_IMAGE_FILE_L "{{ oracledb_base }}/dvd/19.0.0/db_home" + setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" + $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohcheck + +#- name: Oracle DB - debug output +# ansible.builtin.debug: +# msg: oracledb_precheck.stdout_lines diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml new file mode 100644 index 000000000..c943b3976 --- /dev/null +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml @@ -0,0 +1,91 @@ +--- + +# Linux User 'oracle' uses C Shell, use setvar +## CV_ASSUME_DISTID env var, special preparation: only for installation of Oracle Database 19c on Linux versions Red Hat Enterprise Linux 8 / Oracle Linux 8. SAP Note 2660017 - Oracle Database Software Installation on Unix +## DISPLAY env var, not required for when Silent installation (-silent operator for RUNINSTALLER) +## DB_SID env var / -db_sid option. If unset then error "[FATAL] [INS-35072] The SID cannot be left blank." +## ORACLE_BASE env var / -oracle_base option, Oracle Base /oracle. If unset then error "[FATAL] [INS-32013] The Oracle base location is empty." If option -oracle_base unused, may cause "Using new ORACLE_BASE=/oracle/ instead of ORACLE_BASE=/oracle" which will cause directory lookup failure and error "[FATAL] [INS-35072] The SID cannot be left blank." +## ORACLE_HOME env var / -install_home opiton, Oracle Home - Installation +## ORACLE_HOME_NAME env var / -oracle_home_name option, Oracle Home - Installation name in Oracle Inventory. Uses a naming convention - see https://docs.oracle.com/cd/E26854_01/em.121/e37799/ch2_manage_oh.htm#OUICG137 +## OHRDBMS env var / -runtime_home, Oracle Home - Runtime +## ORA_GOLD_IMAGE_FILE_L env var / -oracle_stage option, Oracle home image file path. If unset then error "(ERROR ) - Error during unzip occurred" where no file is given to extract +## INVENTORY_LOCATION env var, Oracle Central Inventory path (must not be within ORACLE_BASE path) + +# Response file as env vars +## oracle.install.db.config.starterdb.globalDBName env var. If unset then error "[FATAL] [INS-35071] Global database name cannot be left blank." +## oracle.install.db.config.starterdb.SID env var. If unset then error "[FATAL] [INS-35072] The SID cannot be left blank." +## oracle.install.db.config.starterdb.memoryLimit env var. If unset then error "[FATAL] [INS-35175] No value given for the allocated memory of the database." +## oracle.install.db.config.starterdb.storageType env var. If unset then error "[FATAL] [INS-30501] Automatic Storage Management software is not configured on this system." +## oracle.install.db.config.starterdb.fileSystemStorage.dataLocation env var. If unset then error "[FATAL] [INS-32013] The File Location is empty." +## oracle.install.db.config.starterdb.password.ALL env var. +## oracle.install.db.config.starterdb.password.SYS env var. If unset then error "[FATAL] [INS-30001] The SYS password is empty." +## oracle.install.db.config.starterdb.password.SYSTEM env var. If unset then error "[FATAL] [INS-30001] The SYSTEM password is empty." +## oracle.install.db.DBA_GROUP env var. If unset then error "[FATAL] [INS-35344] The value is not specified for Database Administrator (OSDBA) group." +## oracle.install.db.BACKUPDBA_GROUP env var. If unset then error "[FATAL] [INS-35344] The value is not specified for Database Backup and Recovery (OSBACKUPDBA) group." +## oracle.install.db.DGDBA_GROUP env var. If unset then error "[FATAL] [INS-35344] The value is not specified for Data Guard administrative (OSDGDBA) group." +## oracle.install.db.KMDBA_GROUP env var. If unset then error "[FATAL] [INS-35344] The value is not specified for Encryption Key Management administrative (OSKMDBA) group." +## oracle.install.db.OSRACDBA_GROUP env var. If unset then error "[FATAL] [INS-35344] The value is not specified for Real Application Cluster administrative (OSRACDBA) group."" + +# Installation requires change directory to Oracle RDBMS installation media directory +- name: Oracle DB - Install Oracle DB + become: true + become_user: oracle + args: + executable: /bin/csh + chdir: "{{ oracledb_base }}/dvd/19.0.0/" + register: oracledb_install + changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_install.stdout" + failed_when: "oracledb_install.rc not in [ 0, 1 ]" + ansible.builtin.shell: | + setenv CV_ASSUME_DISTID "OL7" + setenv DISPLAY + setenv DB_SID "{{ oracledb_sid }}" + setenv ORACLE_BASE "{{ oracledb_base }}" + setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" + setenv ORACLE_HOME_NAME "OraDb19c_1" + setenv IHRDBMS "$ORACLE_HOME" + setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" + setenv ORA_GOLD_IMAGE_FILE_L "{{ oracledb_base }}/dvd/19.0.0/db_home" + setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" + setenv oracle.install.db.config.starterdb.globalDBName "{{ oracledb_sid }}" + setenv oracle.install.db.config.starterdb.SID "{{ oracledb_sid }}" + setenv oracle.install.db.config.starterdb.memoryLimit "{{ (ansible_memtotal_mb*0.95) | int }}" + setenv oracle.install.db.config.starterdb.storageType "FILE_SYSTEM_STORAGE" + setenv oracle.install.db.config.starterdb.fileSystemStorage.dataLocation "{{ oracledb_filesystem_storage }}" + setenv oracle.install.db.config.starterdb.password.ALL "{{ oracledb_system_password }}" + setenv oracle.install.db.config.starterdb.password.SYS "{{ oracledb_system_password }}" + setenv oracle.install.db.config.starterdb.password.SYSTEM "{{ oracledb_system_password }}" + setenv oracle.install.db.DBA_GROUP "dba" + setenv oracle.install.db.BACKUPDBA_GROUP "dba" + setenv oracle.install.db.DGDBA_GROUP "dba" + setenv oracle.install.db.KMDBA_GROUP "dba" + setenv oracle.install.db.OSRACDBA_GROUP "dba" + $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohinstall -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L" +# $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohinstall -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -install_home "$ORACLE_HOME" -oracle_home_name "$ORACLE_HOME_NAME" -runtime_home "$OHRDBMS" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L" + +- name: Oracle DB - Root command scripts for Oracle DB Inventory and Oracle DB Home, from root user + become_user: root + ansible.builtin.shell: | + export DB_SID="OR1" + export ORACLE_BASE="{{ oracledb_base }}" + export ORACLE_HOME="$ORACLE_BASE/$DB_SID/19.0.0" + export INVENTORY_LOCATION="{{ oracledb_inventory_central }}" + $INVENTORY_LOCATION/orainstRoot.sh + $ORACLE_HOME/root.sh + +- name: Oracle DB - Complete configuration of Oracle DB + become: true + become_user: oracle + args: + executable: /bin/csh + register: oracledb_config + changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_config.stdout" + failed_when: "oracledb_config.rc not in [ 0, 1 ]" + ignore_errors: true + ansible.builtin.shell: | + setenv DB_SID "{{ oracledb_sid }}" + export ORACLE_BASE="{{ oracledb_base }}" + setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" + set CURRENT_DATE_ISO=`date +%Y-%m-%d` + set ORACLEDB_RESP_GENERATED_FILE=`find $ORACLE_BASE -iname "db_$CURRENT_DATE_ISO*"` + $ORACLE_HOME/runInstaller -silent -executeConfigTools -responseFile $ORACLEDB_RESP_GENERATED_FILE diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml new file mode 100644 index 000000000..b7a4fd628 --- /dev/null +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml @@ -0,0 +1,51 @@ +--- + +- name: Oracle DB - Process Oracle Response File jina template and create file {{ oracledb_base }}/dvd/19.0.0/oracledb_installer.rsp + ansible.builtin.template: + src: "{{ role_path }}/templates/oracledb_rsp_install_dbinstall.j2" + dest: "{{ oracledb_base }}/dvd/19.0.0/generated_db_install.rsp" + mode: '0640' + register: oracledb_resp_db_install + +# Installation requires change directory to Oracle RDBMS installation media directory +- name: Oracle DB - Install Oracle DB, using Response File + become: true + become_user: oracle + args: + executable: /bin/csh + chdir: "{{ oracledb_base }}/dvd/19.0.0/" + register: oracledb_install + changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_install.stdout" + failed_when: "oracledb_install.rc not in [ 0, 1 ]" + ansible.builtin.shell: | + setenv CV_ASSUME_DISTID "OL7" + setenv DISPLAY + setenv DB_SID "{{ oracledb_sid }}" + {{ oracledb_base }}/dvd/19.0.0/db_home/SAP/19cinstall.sh -silent -ohinstall -responseFile {{ oracledb_base }}/dvd/19.0.0/generated_db_install.rsp + +- name: Oracle DB - Root command scripts for Oracle DB Inventory and Oracle DB Home, from root user + become_user: root + ansible.builtin.shell: | + export DB_SID="OR1" + export ORACLE_BASE="{{ oracledb_base }}" + export ORACLE_HOME="$ORACLE_BASE/$DB_SID/19.0.0" + export INVENTORY_LOCATION="{{ oracledb_inventory_central }}" + $INVENTORY_LOCATION/orainstRoot.sh + $ORACLE_HOME/root.sh + +- name: Oracle DB - Complete configuration of Oracle DB + become: true + become_user: oracle + args: + executable: /bin/csh + register: oracledb_config + changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_config.stdout" + failed_when: "oracledb_config.rc not in [ 0, 1 ]" + ignore_errors: true + ansible.builtin.shell: | + setenv DB_SID "{{ oracledb_sid }}" + export ORACLE_BASE="{{ oracledb_base }}" + setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" + set CURRENT_DATE_ISO=`date +%Y-%m-%d` + set ORACLEDB_RESP_GENERATED_FILE=`find $ORACLE_BASE -iname "db_$CURRENT_DATE_ISO*"` + $ORACLE_HOME/runInstaller -silent -executeConfigTools -responseFile $ORACLEDB_RESP_GENERATED_FILE diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 new file mode 100644 index 000000000..0b8e4445b --- /dev/null +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 @@ -0,0 +1,605 @@ +#/assistants/dbca/dbca.rsp +############################################################################## +## ## +## DBCA response file ## +## ------------------ ## +## Copyright(c) Oracle Corporation 1998,2019. All rights reserved. ## +## ## +## Specify values for the variables listed below to customize ## +## your installation. ## +## ## +## Each variable is associated with a comment. The comment ## +## can help to populate the variables with the appropriate ## +## values. ## +## ## +## IMPORTANT NOTE: This file contains plain text passwords and ## +## should be secured to have read permission only by oracle user ## +## or db administrator who owns this installation. ## +############################################################################## +#------------------------------------------------------------------------------- +# Do not change the following system generated value. +#------------------------------------------------------------------------------- +responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0 + +#----------------------------------------------------------------------------- +# Name : gdbName +# Datatype : String +# Description : Global database name of the database +# Valid values : . - when database domain isn't NULL +# - when database domain is NULL +# Default value : None +# Mandatory : Yes +#----------------------------------------------------------------------------- +gdbName= + +#----------------------------------------------------------------------------- +# Name : sid +# Datatype : String +# Description : System identifier (SID) of the database +# Valid values : Check Oracle19c Administrator's Guide +# Default value : specified in GDBNAME +# Mandatory : No +#----------------------------------------------------------------------------- +sid= + +#----------------------------------------------------------------------------- +# Name : databaseConfigType +# Datatype : String +# Description : database conf type as Single Instance, Real Application Cluster or Real Application Cluster One Nodes database +# Valid values : SI\RAC\RACONENODE +# Default value : SI +# Mandatory : No +#----------------------------------------------------------------------------- +databaseConfigType= + +#----------------------------------------------------------------------------- +# Name : RACOneNodeServiceName +# Datatype : String +# Description : Service is required by application to connect to RAC One +# Node Database +# Valid values : Service Name +# Default value : None +# Mandatory : No [required in case DATABASECONFTYPE is set to RACONENODE ] +#----------------------------------------------------------------------------- +RACOneNodeServiceName= + +#----------------------------------------------------------------------------- +# Name : policyManaged +# Datatype : Boolean +# Description : Set to true if Database is policy managed and +# set to false if Database is admin managed +# Valid values : TRUE\FALSE +# Default value : FALSE +# Mandatory : No +#----------------------------------------------------------------------------- +policyManaged= + + +#----------------------------------------------------------------------------- +# Name : createServerPool +# Datatype : Boolean +# Description : Set to true if new server pool need to be created for database +# if this option is specified then the newly created database +# will use this newly created serverpool. +# Multiple serverpoolname can not be specified for database +# Valid values : TRUE\FALSE +# Default value : FALSE +# Mandatory : No +#----------------------------------------------------------------------------- +createServerPool= + +#----------------------------------------------------------------------------- +# Name : serverPoolName +# Datatype : String +# Description : Only one serverpool name need to be specified +# if Create Server Pool option is specified. +# Comma-separated list of Serverpool names if db need to use +# multiple Server pool +# Valid values : ServerPool name + +# Default value : None +# Mandatory : No [required in case of RAC service centric database] +#----------------------------------------------------------------------------- +serverPoolName= + +#----------------------------------------------------------------------------- +# Name : cardinality +# Datatype : Number +# Description : Specify Cardinality for create server pool operation + +# Valid values : any positive Integer value +# Default value : Number of qualified nodes on cluster +# Mandatory : No [Required when a new serverpool need to be created] +#----------------------------------------------------------------------------- +cardinality= + +#----------------------------------------------------------------------------- +# Name : force +# Datatype : Boolean +# Description : Set to true if new server pool need to be created by force +# if this option is specified then the newly created serverpool +# will be assigned server even if no free servers are available. +# This may affect already running database. +# This flag can be specified for Admin managed as well as policy managed db. +# Valid values : TRUE\FALSE +# Default value : FALSE +# Mandatory : No +#----------------------------------------------------------------------------- +force= + +#----------------------------------------------------------------------------- +# Name : pqPoolName +# Datatype : String +# Description : Only one serverpool name needs to be specified +# if create server pool option is specified. +# Comma-separated list of serverpool names if use +# server pool. This is required to +# create Parallel Query (PQ) database. Applicable to Big Cluster +# Valid values : Parallel Query (PQ) pool name +# Default value : None +# Mandatory : No [required in case of RAC service centric database] +#----------------------------------------------------------------------------- +pqPoolName= + +#----------------------------------------------------------------------------- +# Name : pqCardinality +# Datatype : Number +# Description : Specify Cardinality for create server pool operation. +# Applicable to Big Cluster +# Valid values : any positive Integer value +# Default value : Number of qualified nodes on cluster +# Mandatory : No [Required when a new serverpool need to be created] +#----------------------------------------------------------------------------- +pqCardinality= + +#----------------------------------------------------------------------------- +# Name : createAsContainerDatabase +# Datatype : boolean +# Description : flag to create database as container database +# Valid values : Check Oracle19c Administrator's Guide +# Default value : false +# Mandatory : No +#----------------------------------------------------------------------------- +createAsContainerDatabase= + +#----------------------------------------------------------------------------- +# Name : numberOfPDBs +# Datatype : Number +# Description : Specify the number of pdb to be created +# Valid values : 0 to 4094 +# Default value : 0 +# Mandatory : No +#----------------------------------------------------------------------------- +numberOfPDBs= + +#----------------------------------------------------------------------------- +# Name : pdbName +# Datatype : String +# Description : Specify the pdbname/pdbanme prefix if one or more pdb need to be created +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- +pdbName= + +#----------------------------------------------------------------------------- +# Name : useLocalUndoForPDBs +# Datatype : boolean +# Description : Flag to create local undo tablespace for all PDB's. +# Valid values : TRUE\FALSE +# Default value : TRUE +# Mandatory : No +#----------------------------------------------------------------------------- +useLocalUndoForPDBs= + +#----------------------------------------------------------------------------- +# Name : pdbAdminPassword +# Datatype : String +# Description : PDB Administrator user password +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- + +pdbAdminPassword= + +#----------------------------------------------------------------------------- +# Name : nodelist +# Datatype : String +# Description : Comma-separated list of cluster nodes +# Valid values : Cluster node names +# Default value : None +# Mandatory : No (Yes for RAC database-centric database ) +#----------------------------------------------------------------------------- +nodelist= + +#----------------------------------------------------------------------------- +# Name : templateName +# Datatype : String +# Description : Name of the template +# Valid values : Template file name +# Default value : None +# Mandatory : Yes +#----------------------------------------------------------------------------- +templateName= + +#----------------------------------------------------------------------------- +# Name : sysPassword +# Datatype : String +# Description : Password for SYS user +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : Yes +#----------------------------------------------------------------------------- +sysPassword= + +#----------------------------------------------------------------------------- +# Name : systemPassword +# Datatype : String +# Description : Password for SYSTEM user +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : Yes +#----------------------------------------------------------------------------- +systemPassword= + +#----------------------------------------------------------------------------- +# Name : oracleHomeUserPassword +# Datatype : String +# Description : Password for Windows Service user +# Default value : None +# Mandatory : If Oracle home is installed with windows service user +#----------------------------------------------------------------------------- +oracleHomeUserPassword= + +#----------------------------------------------------------------------------- +# Name : emConfiguration +# Datatype : String +# Description : Enterprise Manager Configuration Type +# Valid values : CENTRAL|DBEXPRESS|BOTH|NONE +# Default value : NONE +# Mandatory : No +#----------------------------------------------------------------------------- +emConfiguration= + +#----------------------------------------------------------------------------- +# Name : emExpressPort +# Datatype : Number +# Description : Enterprise Manager Configuration Type +# Valid values : Check Oracle19c Administrator's Guide +# Default value : NONE +# Mandatory : No, will be picked up from DBEXPRESS_HTTPS_PORT env variable +# or auto generates a free port between 5500 and 5599 +#----------------------------------------------------------------------------- +emExpressPort=5500 + +#----------------------------------------------------------------------------- +# Name : runCVUChecks +# Datatype : Boolean +# Description : Specify whether to run Cluster Verification Utility checks +# periodically in Cluster environment +# Valid values : TRUE\FALSE +# Default value : FALSE +# Mandatory : No +#----------------------------------------------------------------------------- +runCVUChecks= + +#----------------------------------------------------------------------------- +# Name : dbsnmpPassword +# Datatype : String +# Description : Password for DBSNMP user +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : Yes, if emConfiguration is specified or +# the value of runCVUChecks is TRUE +#----------------------------------------------------------------------------- +dbsnmpPassword= + +#----------------------------------------------------------------------------- +# Name : omsHost +# Datatype : String +# Description : EM management server host name +# Default value : None +# Mandatory : Yes, if CENTRAL is specified for emConfiguration +#----------------------------------------------------------------------------- +omsHost= + +#----------------------------------------------------------------------------- +# Name : omsPort +# Datatype : Number +# Description : EM management server port number +# Default value : None +# Mandatory : Yes, if CENTRAL is specified for emConfiguration +#----------------------------------------------------------------------------- +omsPort= + +#----------------------------------------------------------------------------- +# Name : emUser +# Datatype : String +# Description : EM Admin username to add or modify targets +# Default value : None +# Mandatory : Yes, if CENTRAL is specified for emConfiguration +#----------------------------------------------------------------------------- +emUser= + +#----------------------------------------------------------------------------- +# Name : emPassword +# Datatype : String +# Description : EM Admin user password +# Default value : None +# Mandatory : Yes, if CENTRAL is specified for emConfiguration +#----------------------------------------------------------------------------- +emPassword= + +#----------------------------------------------------------------------------- +# Name : dvConfiguration +# Datatype : Boolean +# Description : Specify "True" to configure and enable Oracle Database vault +# Valid values : True/False +# Default value : False +# Mandatory : No +#----------------------------------------------------------------------------- +dvConfiguration= + +#----------------------------------------------------------------------------- +# Name : dvUserName +# Datatype : String +# Description : DataVault Owner +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : Yes, if DataVault option is chosen +#----------------------------------------------------------------------------- +dvUserName= + +#----------------------------------------------------------------------------- +# Name : dvUserPassword +# Datatype : String +# Description : Password for DataVault Owner +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : Yes, if DataVault option is chosen +#----------------------------------------------------------------------------- +dvUserPassword= + +#----------------------------------------------------------------------------- +# Name : dvAccountManagerName +# Datatype : String +# Description : DataVault Account Manager +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- +dvAccountManagerName= + +#----------------------------------------------------------------------------- +# Name : dvAccountManagerPassword +# Datatype : String +# Description : Password for DataVault Account Manager +# Valid values : Check Oracle19c Administrator's Guide +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- +dvAccountManagerPassword= + +#----------------------------------------------------------------------------- +# Name : olsConfiguration +# Datatype : Boolean +# Description : Specify "True" to configure and enable Oracle Label Security +# Valid values : True/False +# Default value : False +# Mandatory : No +#----------------------------------------------------------------------------- +olsConfiguration= + +#----------------------------------------------------------------------------- +# Name : datafileJarLocation +# Datatype : String +# Description : Location of the data file jar +# Valid values : Directory containing compressed datafile jar +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- +datafileJarLocation= + +#----------------------------------------------------------------------------- +# Name : datafileDestination +# Datatype : String +# Description : Location of the data file's +# Valid values : Directory for all the database files +# Default value : $ORACLE_BASE/oradata +# Mandatory : No +#----------------------------------------------------------------------------- +datafileDestination= + +#----------------------------------------------------------------------------- +# Name : recoveryAreaDestination +# Datatype : String +# Description : Location of the data file's +# Valid values : Recovery Area location +# Default value : $ORACLE_BASE/flash_recovery_area +# Mandatory : No +#----------------------------------------------------------------------------- +recoveryAreaDestination= + +#----------------------------------------------------------------------------- +# Name : storageType +# Datatype : String +# Description : Specifies the storage on which the database is to be created +# Valid values : FS (CFS for RAC), ASM +# Default value : FS +# Mandatory : No +#----------------------------------------------------------------------------- +storageType= + +#----------------------------------------------------------------------------- +# Name : diskGroupName +# Datatype : String +# Description : Specifies the disk group name for the storage +# Default value : DATA +# Mandatory : No +#----------------------------------------------------------------------------- +diskGroupName= + +#----------------------------------------------------------------------------- +# Name : asmsnmpPassword +# Datatype : String +# Description : Password for ASM Monitoring +# Default value : None +# Mandatory : No +#----------------------------------------------------------------------------- +asmsnmpPassword= + +#----------------------------------------------------------------------------- +# Name : recoveryGroupName +# Datatype : String +# Description : Specifies the disk group name for the recovery area +# Default value : RECOVERY +# Mandatory : No +#----------------------------------------------------------------------------- +recoveryGroupName= + +#----------------------------------------------------------------------------- +# Name : characterSet +# Datatype : String +# Description : Character set of the database +# Valid values : Check Oracle19c National Language Support Guide +# Default value : "US7ASCII" +# Mandatory : NO +#----------------------------------------------------------------------------- +characterSet= + +#----------------------------------------------------------------------------- +# Name : nationalCharacterSet +# Datatype : String +# Description : National Character set of the database +# Valid values : "UTF8" or "AL16UTF16". For details, check Oracle19c National Language Support Guide +# Default value : "AL16UTF16" +# Mandatory : No +#----------------------------------------------------------------------------- +nationalCharacterSet= + +#----------------------------------------------------------------------------- +# Name : registerWithDirService +# Datatype : Boolean +# Description : Specifies whether to register with Directory Service. +# Valid values : TRUE \ FALSE +# Default value : FALSE +# Mandatory : No +#----------------------------------------------------------------------------- +registerWithDirService= + + +#----------------------------------------------------------------------------- +# Name : dirServiceUserName +# Datatype : String +# Description : Specifies the name of the directory service user +# Mandatory : YES, if the value of registerWithDirService is TRUE +#----------------------------------------------------------------------------- +dirServiceUserName= + +#----------------------------------------------------------------------------- +# Name : dirServicePassword +# Datatype : String +# Description : The password of the directory service user. +# You can also specify the password at the command prompt instead of here. +# Mandatory : YES, if the value of registerWithDirService is TRUE +#----------------------------------------------------------------------------- +dirServicePassword= + +#----------------------------------------------------------------------------- +# Name : walletPassword +# Datatype : String +# Description : The password for wallet to created or modified. +# You can also specify the password at the command prompt instead of here. +# Mandatory : YES, if the value of registerWithDirService is TRUE +#----------------------------------------------------------------------------- +walletPassword= + +#----------------------------------------------------------------------------- +# Name : listeners +# Datatype : String +# Description : Specifies list of listeners to register the database with. +# By default the database is configured for all the listeners specified in the +# $ORACLE_HOME/network/admin/listener.ora +# Valid values : The list should be comma separated like "listener1,listener2". +# Mandatory : NO +#----------------------------------------------------------------------------- +listeners= + +#----------------------------------------------------------------------------- +# Name : variablesFile +# Datatype : String +# Description : Location of the file containing variable value pair +# Valid values : A valid file-system file. The variable value pair format in this file +# is =. Each pair should be in a new line. +# Default value : None +# Mandatory : NO +#----------------------------------------------------------------------------- +variablesFile= + +#----------------------------------------------------------------------------- +# Name : variables +# Datatype : String +# Description : comma separated list of name=value pairs. Overrides variables defined in variablefile and templates +# Default value : None +# Mandatory : NO +#----------------------------------------------------------------------------- +variables= + +#----------------------------------------------------------------------------- +# Name : initParams +# Datatype : String +# Description : comma separated list of name=value pairs. Overrides initialization parameters defined in templates +# Default value : None +# Mandatory : NO +#----------------------------------------------------------------------------- +initParams= + +#----------------------------------------------------------------------------- +# Name : sampleSchema +# Datatype : Boolean +# Description : Specifies whether or not to add the Sample Schemas to your database +# Valid values : TRUE \ FALSE +# Default value : FASLE +# Mandatory : No +#----------------------------------------------------------------------------- +sampleSchema= + +#----------------------------------------------------------------------------- +# Name : memoryPercentage +# Datatype : String +# Description : percentage of physical memory for Oracle +# Default value : None +# Mandatory : NO +#----------------------------------------------------------------------------- +memoryPercentage= + +#----------------------------------------------------------------------------- +# Name : databaseType +# Datatype : String +# Description : used for memory distribution when memoryPercentage specified +# Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP +# Default value : MULTIPURPOSE +# Mandatory : NO +#----------------------------------------------------------------------------- +databaseType= + +#----------------------------------------------------------------------------- +# Name : automaticMemoryManagement +# Datatype : Boolean +# Description : flag to indicate Automatic Memory Management is used +# Valid values : TRUE/FALSE +# Default value : TRUE +# Mandatory : NO +#----------------------------------------------------------------------------- +automaticMemoryManagement= + +#----------------------------------------------------------------------------- +# Name : totalMemory +# Datatype : String +# Description : total memory in MB to allocate to Oracle +# Valid values : +# Default value : +# Mandatory : NO +#----------------------------------------------------------------------------- +totalMemory= diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 new file mode 100644 index 000000000..f221de04b --- /dev/null +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 @@ -0,0 +1,134 @@ +#/assistants/netca/netca.rsp +###################################################################### +## Copyright(c) 1998, 2018 Oracle Corporation. All rights reserved. ## +## ## +## Specify values for the variables listed below to customize your ## +## installation. ## +## ## +## Each variable is associated with a comment. The comment ## +## identifies the variable type. ## +## ## +## Please specify the values in the following format: ## +## ## +## Type Example ## +## String "Sample Value" ## +## Boolean True or False ## +## Number 1000 ## +## StringList {"String value 1","String Value 2"} ## +## ## +###################################################################### +## ## +## This sample response file causes the Oracle Net Configuration ## +## Assistant (NetCA) to complete an Oracle Net configuration during ## +## a custom install of the Oracle12c server which is similar to ## +## what would be created by the NetCA during typical Oracle12c ## +## install. It also documents all of the NetCA response file ## +## variables so you can create your own response file to configure ## +## Oracle Net during an install the way you wish. ## +## ## +###################################################################### + +[GENERAL] +RESPONSEFILE_VERSION="19.0" +CREATE_TYPE="CUSTOM" + +#------------------------------------------------------------------------------- +# Name : SHOW_GUI +# Datatype : Boolean +# Description: This variable controls appearance/suppression of the NetCA GUI, +# Pre-req : N/A +# Default : TRUE +# Note: +# This must be set to false in order to run NetCA in silent mode. +# This is a substitute of "/silent" flag in the NetCA command line. +# The command line flag has precedence over the one in this response file. +# This feature is present since 10.1.0.3. +#------------------------------------------------------------------------------- +#SHOW_GUI=false + +#------------------------------------------------------------------------------- +# Name : LOG_FILE +# Datatype : String +# Description: If present, NetCA will log output to this file in addition to the +# standard out. +# Pre-req : N/A +# Default : NONE +# Note: +# This is a substitute of "/log" in the NetCA command line. +# The command line argument has precedence over the one in this response file. +# This feature is present since 10.1.0.3. +#------------------------------------------------------------------------------- +#LOG_FILE=""$ORACLE_BASE/cfgtoollogs/netca/netca.log"" + +[oracle.net.ca] +#INSTALLED_COMPONENTS;StringList;list of installed components +# The possible values for installed components are: +# "net8","server","client","aso", "cman", "javavm" +INSTALLED_COMPONENTS={"server","net8","javavm"} + +#INSTALL_TYPE;String;type of install +# The possible values for install type are: +# "typical","minimal" or "custom" +INSTALL_TYPE=""typical"" + +#LISTENER_NUMBER;Number;Number of Listeners +# A typical install sets one listener +LISTENER_NUMBER=1 + +#LISTENER_NAMES;StringList;list of listener names +# The values for listener are: +# "LISTENER","LISTENER1","LISTENER2","LISTENER3", ... +# A typical install sets only "LISTENER" +LISTENER_NAMES={"LISTENER"} + +#LISTENER_PROTOCOLS;StringList;list of listener addresses (protocols and parameters separated by semicolons) +# The possible values for listener protocols are: +# "TCP;1521","TCPS;2484","NMP;ORAPIPE","IPC;IPCKEY","VI;1521" +# For multiple listeners, separate them with commas ex "TCP;1521","TCPS;2484" +# For multiple protocols in single listener, separate them with "&" ex "TCP;1521&TCPS;2484" +# A typical install sets only "TCP;1521" +LISTENER_PROTOCOLS={"TCP;1521"} + +#LISTENER_START;String;name of the listener to start, in double quotes +LISTENER_START=""LISTENER"" + +#NAMING_METHODS;StringList;list of naming methods +# The possible values for naming methods are: +# LDAP, TNSNAMES, ONAMES, HOSTNAME, NOVELL, NIS, DCE +# A typical install sets only: "TNSNAMES","ONAMES","HOSTNAMES" +# or "LDAP","TNSNAMES","ONAMES","HOSTNAMES" for LDAP +NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"} + +#NOVELL_NAMECONTEXT;String;Novell Directory Service name context, in double quotes +# A typical install does not use this variable. +#NOVELL_NAMECONTEXT = ""NAMCONTEXT"" + +#SUN_METAMAP;String; SUN meta map, in double quotes +# A typical install does not use this variable. +#SUN_METAMAP = ""MAP"" + +#DCE_CELLNAME;String;DCE cell name, in double quotes +# A typical install does not use this variable. +#DCE_CELLNAME = ""CELL"" + +#NSN_NUMBER;Number;Number of NetService Names +# A typical install sets one net service name +NSN_NUMBER=1 + +#NSN_NAMES;StringList;list of Net Service names +# A typical install sets net service name to "EXTPROC_CONNECTION_DATA" +NSN_NAMES={"EXTPROC_CONNECTION_DATA"} + +#NSN_SERVICE;StringList;Oracle12c database's service name +# A typical install sets Oracle12c database's service name to "PLSExtProc" +NSN_SERVICE={"PLSExtProc"} + +#NSN_PROTOCOLS;StringList;list of coma separated strings of Net Service Name protocol parameters +# The possible values for net service name protocol parameters are: +# "TCP;HOSTNAME;1521","TCPS;HOSTNAME;2484","NMP;COMPUTERNAME;ORAPIPE","VI;HOSTNAME;1521","IPC;IPCKEY" +# A typical install sets parameters to "IPC;EXTPROC" +NSN_PROTOCOLS={"TCP;HOSTNAME;1521"} + +#SERVICEUSERPASSWORD;String;Windows service user password +# If the oracle home is installed as secure user, supply the password +#SERVICEUSERPASSWORD=""svcpassword"" diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 new file mode 100644 index 000000000..55256bf72 --- /dev/null +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 @@ -0,0 +1,364 @@ +#/install/response/db_install.rsp +#################################################################### +## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.## +## ## +## Specify values for the variables listed below to customize ## +## your installation. ## +## ## +## Each variable is associated with a comment. The comment ## +## can help to populate the variables with the appropriate ## +## values. ## +## ## +## IMPORTANT NOTE: This file contains plain text passwords and ## +## should be secured to have read permission only by oracle user ## +## or db administrator who owns this installation. ## +## ## +#################################################################### + + +#------------------------------------------------------------------------------ +# Do not change the following system generated value. +#------------------------------------------------------------------------------ +oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0 + +#------------------------------------------------------------------------------- +# Specify the installation option. +# It can be one of the following: +# - INSTALL_DB_SWONLY +# - INSTALL_DB_AND_CONFIG +#------------------------------------------------------------------------------- +oracle.install.option=INSTALL_DB_AND_CONFIG + +#------------------------------------------------------------------------------- +# Specify the Unix group to be set for the inventory directory. +#------------------------------------------------------------------------------- +UNIX_GROUP_NAME=oinstall + +#------------------------------------------------------------------------------- +# Specify the location which holds the inventory files. +# This is an optional parameter if installing on +# Windows based Operating System. +#------------------------------------------------------------------------------- +INVENTORY_LOCATION={{ oracledb_inventory_central }} + +#------------------------------------------------------------------------------- +# Specify the complete path of the Oracle Home. +#------------------------------------------------------------------------------- +ORACLE_HOME={{ oracledb_base }}/{{ oracledb_sid }}/19 + +#------------------------------------------------------------------------------- +# Specify the complete path of the Oracle Base. +#------------------------------------------------------------------------------- +ORACLE_BASE=/oracle + +#------------------------------------------------------------------------------- +# Specify the installation edition of the component. +# +# The value should contain only one of these choices. +# - EE : Enterprise Edition +# - SE2 : Standard Edition 2 +#------------------------------------------------------------------------------- +oracle.install.db.InstallEdition=EE + + +############################################################################### +# # +# PRIVILEGED OPERATING SYSTEM GROUPS # +# ------------------------------------------ # +# Provide values for the OS groups to which SYSDBA and SYSOPER privileges # +# needs to be granted. If the install is being performed as a member of the # +# group "dba", then that will be used unless specified otherwise below. # +# # +# The value to be specified for OSDBA and OSOPER group is only for UNIX based # +# Operating System. # +# # +############################################################################### + +#------------------------------------------------------------------------------ +# The OSDBA_GROUP is the OS group which is to be granted SYSDBA privileges. +#------------------------------------------------------------------------------- +oracle.install.db.OSDBA_GROUP=dba + +#------------------------------------------------------------------------------ +# The OSOPER_GROUP is the OS group which is to be granted SYSOPER privileges. +# The value to be specified for OSOPER group is optional. +#------------------------------------------------------------------------------ +oracle.install.db.OSOPER_GROUP= + +#------------------------------------------------------------------------------ +# The OSBACKUPDBA_GROUP is the OS group which is to be granted SYSBACKUP privileges. +#------------------------------------------------------------------------------ +oracle.install.db.OSBACKUPDBA_GROUP=dba + +#------------------------------------------------------------------------------ +# The OSDGDBA_GROUP is the OS group which is to be granted SYSDG privileges. +#------------------------------------------------------------------------------ +oracle.install.db.OSDGDBA_GROUP=dba + +#------------------------------------------------------------------------------ +# The OSKMDBA_GROUP is the OS group which is to be granted SYSKM privileges. +#------------------------------------------------------------------------------ +oracle.install.db.OSKMDBA_GROUP=dba + +#------------------------------------------------------------------------------ +# The OSRACDBA_GROUP is the OS group which is to be granted SYSRAC privileges. +#------------------------------------------------------------------------------ +oracle.install.db.OSRACDBA_GROUP=dba + + +################################################################################ +# # +# Root script execution configuration # +# # +################################################################################ + +#------------------------------------------------------------------------------------------------------- +# Specify the root script execution mode. +# +# - true : To execute the root script automatically by using the appropriate configuration methods. +# - false : To execute the root script manually. +# +# If this option is selected, password should be specified on the console. +#------------------------------------------------------------------------------------------------------- +oracle.install.db.rootconfig.executeRootScript=false + +#-------------------------------------------------------------------------------------- +# Specify the configuration method to be used for automatic root script execution. +# +# Following are the possible choices: +# - ROOT +# - SUDO +#-------------------------------------------------------------------------------------- +oracle.install.db.rootconfig.configMethod= + +#-------------------------------------------------------------------------------------- +# Specify the absolute path of the sudo program. +# +# Applicable only when SUDO configuration method was chosen. +#-------------------------------------------------------------------------------------- +oracle.install.db.rootconfig.sudoPath= + +#-------------------------------------------------------------------------------------- +# Specify the name of the user who is in the sudoers list. +# Applicable only when SUDO configuration method was chosen. +# Note:For Single Instance database installations,the sudo user name must be the username of the user installing the database. +#-------------------------------------------------------------------------------------- +oracle.install.db.rootconfig.sudoUserName= + + +############################################################################### +# # +# Grid Options # +# # +############################################################################### + +#------------------------------------------------------------------------------ +# Value is required only if the specified install option is INSTALL_DB_SWONLY +# +# Specify the cluster node names selected during the installation. +# +# Example : oracle.install.db.CLUSTER_NODES=node1,node2 +#------------------------------------------------------------------------------ +oracle.install.db.CLUSTER_NODES= + + +############################################################################### +# # +# Database Configuration Options # +# # +############################################################################### + +#------------------------------------------------------------------------------- +# Specify the type of database to create. +# It can be one of the following: +# - GENERAL_PURPOSE +# - DATA_WAREHOUSE +# GENERAL_PURPOSE: A starter database designed for general purpose use or transaction-heavy applications. +# DATA_WAREHOUSE : A starter database optimized for data warehousing applications. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.type=GENERAL_PURPOSE + +#------------------------------------------------------------------------------- +# Specify the Starter Database Global Database Name. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.globalDBName={{ oracledb_sid }} + +#------------------------------------------------------------------------------- +# Specify the Starter Database SID. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.SID={{ oracledb_sid }} + +#------------------------------------------------------------------------------- +# Specify whether the database should be configured as a Container database. +# The value can be either "true" or "false". If left blank it will be assumed +# to be "false". +#------------------------------------------------------------------------------- +oracle.install.db.ConfigureAsContainerDB=false + +#------------------------------------------------------------------------------- +# Specify the Pluggable Database name for the pluggable database in Container Database. +#------------------------------------------------------------------------------- +oracle.install.db.config.PDBName= + +#------------------------------------------------------------------------------- +# Specify the Starter Database character set. +# +# One of the following +# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2, +# EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257, +# BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6, +# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8, +# IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, +# KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950, +# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258 +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.characterSet=AL32UTF8 + +#------------------------------------------------------------------------------ +# This variable should be set to true if Automatic Memory Management +# in Database is desired. +# If Automatic Memory Management is not desired, and memory allocation +# is to be done manually, then set it to false. +#------------------------------------------------------------------------------ +oracle.install.db.config.starterdb.memoryOption=false + +#------------------------------------------------------------------------------- +# Specify the total memory allocation for the database. Value(in MB) should be +# at least 256 MB, and should not exceed the total physical memory available +# on the system. +# Example: oracle.install.db.config.starterdb.memoryLimit=512 +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.memoryLimit={{ (ansible_memtotal_mb*0.95) | int }} + +#------------------------------------------------------------------------------- +# This variable controls whether to load Example Schemas onto +# the starter database or not. +# The value can be either "true" or "false". If left blank it will be assumed +# to be "false". +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.installExampleSchemas=false + + +############################################################################### +# # +# Passwords can be supplied for the following four schemas in the # +# starter database: # +# SYS # +# SYSTEM # +# DBSNMP (used by Enterprise Manager) # +# # +# Same password can be used for all accounts (not recommended) # +# or different passwords for each account can be provided (recommended) # +# # +############################################################################### + +#------------------------------------------------------------------------------ +# This variable holds the password that is to be used for all schemas in the +# starter database. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.password.ALL={{ oracledb_system_password }} + +#------------------------------------------------------------------------------- +# Specify the SYS password for the starter database. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.password.SYS={{ oracledb_system_password }} + +#------------------------------------------------------------------------------- +# Specify the SYSTEM password for the starter database. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.password.SYSTEM={{ oracledb_system_password }} + +#------------------------------------------------------------------------------- +# Specify the DBSNMP password for the starter database. +# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.password.DBSNMP= + +#------------------------------------------------------------------------------- +# Specify the PDBADMIN password required for creation of Pluggable Database in the Container Database. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.password.PDBADMIN= + +#------------------------------------------------------------------------------- +# Specify the management option to use for managing the database. +# Options are: +# 1. CLOUD_CONTROL - If you want to manage your database with Enterprise Manager Cloud Control along with Database Express. +# 2. DEFAULT -If you want to manage your database using the default Database Express option. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.managementOption=DEFAULT + +#------------------------------------------------------------------------------- +# Specify the OMS host to connect to Cloud Control. +# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.omsHost= + +#------------------------------------------------------------------------------- +# Specify the OMS port to connect to Cloud Control. +# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.omsPort= + +#------------------------------------------------------------------------------- +# Specify the EM Admin user name to use to connect to Cloud Control. +# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.emAdminUser= + +#------------------------------------------------------------------------------- +# Specify the EM Admin password to use to connect to Cloud Control. +# Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.emAdminPassword= + + +############################################################################### +# # +# SPECIFY RECOVERY OPTIONS # +# ------------------------------------ # +# Recovery options for the database can be mentioned using the entries below # +# # +############################################################################### + +#------------------------------------------------------------------------------ +# This variable is to be set to false if database recovery is not required. Else +# this can be set to true. +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.enableRecovery=false + +#------------------------------------------------------------------------------- +# Specify the type of storage to use for the database. +# It can be one of the following: +# - FILE_SYSTEM_STORAGE +# - ASM_STORAGE +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE + +#------------------------------------------------------------------------------- +# Specify the database file location which is a directory for datafiles, control +# files, redo logs. +# +# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.fileSystemStorage.dataLocation={{ oracledb_filesystem_storage }} + +#------------------------------------------------------------------------------- +# Specify the recovery location. +# +# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE +#------------------------------------------------------------------------------- +oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation= + +#------------------------------------------------------------------------------- +# Specify the existing ASM disk groups to be used for storage. +# +# Applicable only when oracle.install.db.config.starterdb.storageType=ASM_STORAGE +#------------------------------------------------------------------------------- +oracle.install.db.config.asm.diskGroup= + +#------------------------------------------------------------------------------- +# Specify the password for ASMSNMP user of the ASM instance. +# +# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE +#------------------------------------------------------------------------------- +oracle.install.db.config.asm.ASMSNMPPassword= diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 new file mode 100644 index 000000000..956e11b92 --- /dev/null +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 @@ -0,0 +1,1949 @@ +#/inventory/response/oracle.server_EE.rsp +#################################################################### +## Copyright (c) 1999, 2019 Oracle. All rights reserved. ## +## ## +## Specify values for the variables listed below to customize ## +## your installation. ## +## ## +## Each variable is associated with a comment. The comment ## +## identifies the variable type. ## +## ## +## Please specify the values in the following format: ## +## ## +## Type Example ## +## String "Sample Value" ## +## Boolean True or False ## +## Number 1000 ## +## StringList {"String value 1","String Value 2"} ## +## ## +## The values that are given as need to be ## +## specified for a silent installation to be successful. ## +## ## +## ## +## This response file is generated by Oracle Software ## +## Packager. ## +#################################################################### + + +RESPONSEFILE_VERSION=2.2.1.0.0 + +#------------------------------------------------------------------------------- +#Name : UNIX_GROUP_NAME +#Datatype : String +#Description: Unix group to be set for the inventory directory. Valid only in Unix platforms. +#Example: UNIX_GROUP_NAME = "install" +#------------------------------------------------------------------------------- +UNIX_GROUP_NAME="svrtech" + +#------------------------------------------------------------------------------- +#Name : FROM_LOCATION +#Datatype : String +#Description: Complete path to the products.xml. +#Example: FROM_LOCATION = "../stage/products.xml" +#------------------------------------------------------------------------------- +FROM_LOCATION="/scratch/app/shiphome/database/Disk1/install/../stage/products.xml" + +#------------------------------------------------------------------------------- +#Name : FROM_LOCATION_CD_LABEL +#Datatype : String +#Description: This variable should only be used in multi-CD installations. It includes the label of the compact disk where the file "products.xml" exists. The label can be found in the file "disk.label" in the same directory as products.xml. +#Example: FROM_LOCATION_CD_LABEL = "CD Label" +#------------------------------------------------------------------------------- +FROM_LOCATION_CD_LABEL= + +#------------------------------------------------------------------------------- +#Name : ORACLE_HOME +#Datatype : String +#Description: Complete path of the Oracle Home. +#Example: ORACLE_HOME = "C:\OHOME1" +#------------------------------------------------------------------------------- +ORACLE_HOME="/scratch/app/user/product/19.0.0/dbhome_1" + +#------------------------------------------------------------------------------- +#Name : ORACLE_BASE +#Datatype : String +#Description: Complete path of the Oracle Base. +#Example: ORACLE_BASE = "C:\app" +#------------------------------------------------------------------------------- +ORACLE_BASE="/scratch/app/user" + +#------------------------------------------------------------------------------- +#Name : ORACLE_HOME_NAME +#Datatype : String +#Description: Oracle Home Name. Used in creating folders and services. +#Example: ORACLE_HOME_NAME = "OHOME1" +#------------------------------------------------------------------------------- +ORACLE_HOME_NAME="OraDB19Home1" + +#------------------------------------------------------------------------------- +#Name : SHOW_WELCOME_PAGE +#Datatype : Boolean +#Description: Set to true if the Welcome page in OUI needs to be shown. +#Example: SHOW_WELCOME_PAGE = false +#------------------------------------------------------------------------------- +SHOW_WELCOME_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_CUSTOM_TREE_PAGE +#Datatype : Boolean +#Description: Set to true if the custom tree page in OUI needs to be shown. +#Use this page to select or de-select dependencies. This page appears only in a custom install type. +#Example: SHOW_CUSTOM_TREE_PAGE = false +#------------------------------------------------------------------------------- +SHOW_CUSTOM_TREE_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_COMPONENT_LOCATIONS_PAGE +#Datatype : Boolean +#Description: Set to true if the component locations page in OUI needs to be shown. +#This page only appears if there are products whose installed directory can be changed. +#If you set this to false you will prevent the user from being able to specify alternate directories. +#Example: SHOW_COMPONENT_LOCATIONS_PAGE = false +#------------------------------------------------------------------------------- +SHOW_COMPONENT_LOCATIONS_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_SUMMARY_PAGE +#Datatype : Boolean +#Description: Set to true if the summary page in OUI needs to be shown. +#The summary page shows the list of components that will be installed in this session. +#Example: SHOW_SUMMARY_PAGE = true +#------------------------------------------------------------------------------- +SHOW_SUMMARY_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_INSTALL_PROGRESS_PAGE +#Datatype : Boolean +#Description: Set to true if the install progress page in OUI needs to be shown. +#This page shows the current status in the installation. The current status includes the product being installed and the file being copied. +#Example: SHOW_INSTALL_PROGRESS_PAGE = true +#------------------------------------------------------------------------------- +SHOW_INSTALL_PROGRESS_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_REQUIRED_CONFIG_TOOL_PAGE +#Datatype : Boolean +#Description: Set to true if the required config assistants page in OUI needs to be shown. +#This page shows the list of required configuration assistants that are part of this installation. +#It shows the status of each assistant, including any failures with detailed information on why it failed. +#Example: SHOW_REQUIRED_CONFIG_TOOL_PAGE = true +#------------------------------------------------------------------------------- +SHOW_REQUIRED_CONFIG_TOOL_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_CONFIG_TOOL_PAGE +#Datatype : Boolean +#Description: Set to true if the config assistants page in OUI needs to be shown. +#This page shows the list of configuration assistants that are part of this installation and are configured to launch automatically. +#It shows the status of each assistant, including any failures with detailed information on why it failed. +#Example: SHOW_CONFIG_TOOL_PAGE = true +#------------------------------------------------------------------------------- +SHOW_CONFIG_TOOL_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_RELEASE_NOTES +#Datatype : Boolean +#Description: Set to true if the release notes of this installation need to be shown at the end of installation. +#This dialog is launchable from the End of Installation page and shows the list of release notes available for the products just installed. +# This also requires the variable SHOW_END_SESSION_PAGE variable to be set to true. +#Example: SHOW_RELEASE_NOTES = true +#------------------------------------------------------------------------------- +SHOW_RELEASE_NOTES=true + +#------------------------------------------------------------------------------- +#Name : SHOW_ROOTSH_CONFIRMATION +#Datatype : Boolean +#Description: Set to true if the Confirmation dialog asking to run the root.sh script in OUI needs to be shown. +#Valid only for Unix platforms. +#Example: SHOW_ROOTSH_CONFIRMATION = true +#------------------------------------------------------------------------------- +SHOW_ROOTSH_CONFIRMATION=true + +#------------------------------------------------------------------------------- +#Name : SHOW_END_SESSION_PAGE +#Datatype : Boolean +#Description: Set to true if the end of session page in OUI needs to be shown. +#This page shows if the installation is successful or not. +#Example: SHOW_END_SESSION_PAGE = true +#------------------------------------------------------------------------------- +SHOW_END_SESSION_PAGE=true + +#------------------------------------------------------------------------------- +#Name : SHOW_EXIT_CONFIRMATION +#Datatype : Boolean +#Description: Set to true if the confirmation when exiting OUI needs to be shown. +#Example: SHOW_EXIT_CONFIRMATION = true +#------------------------------------------------------------------------------- +SHOW_EXIT_CONFIRMATION=true + +#------------------------------------------------------------------------------- +#Name : NEXT_SESSION +#Datatype : Boolean +#Description: Set to true to allow users to go back to the File Locations page for another installation. This flag also needs to be set to true in order to process another response file (see NEXT_SESSION_RESPONSE). +#Example: NEXT_SESSION = true +#------------------------------------------------------------------------------- +NEXT_SESSION=false + +#------------------------------------------------------------------------------- +#Name : NEXT_SESSION_ON_FAIL +#Datatype : Boolean +#Description: Set to true to allow users to invoke another session even if current install session has failed. This flag is only relevant if NEXT_SESSION is set to true. +#Example: NEXT_SESSION_ON_FAIL = true +#------------------------------------------------------------------------------- +NEXT_SESSION_ON_FAIL=true + +#------------------------------------------------------------------------------- +#Name : NEXT_SESSION_RESPONSE +#Datatype : String +#Description: Set to true to allow users to go back to the File Locations page for another installation. This flag also needs to be set to true in order to process another response file (see NEXT_SESSION_RESPONSE). +#Example: NEXT_SESSION_RESPONSE = "nextinstall.rsp" +#------------------------------------------------------------------------------- +NEXT_SESSION_RESPONSE= + +#------------------------------------------------------------------------------- +#Name : DEINSTALL_LIST +#Datatype : StringList +#Description: List of components to be deinstalled during a deinstall session. +#Example: DEINSTALL_LIST = {"oracle.server","19.0.0.0.0"} +#------------------------------------------------------------------------------- +DEINSTALL_LIST={"oracle.server","19.0.0.0.0"} + +#------------------------------------------------------------------------------- +#Name : SHOW_DEINSTALL_CONFIRMATION +#Datatype : Boolean +#Description: Set to true if deinstall confimation is needed during a deinstall session. +#Example: SHOW_DEINSTALL_CONFIRMATION = true +#------------------------------------------------------------------------------- +SHOW_DEINSTALL_CONFIRMATION=true + +#------------------------------------------------------------------------------- +#Name : SHOW_DEINSTALL_PROGRESS +#Datatype : Boolean +#Description: Set to true if deinstall progress is needed during a deinstall session. +#Example: SHOW_DEINSTALL_PROGRESS = true +#------------------------------------------------------------------------------- +SHOW_DEINSTALL_PROGRESS=true + +#------------------------------------------------------------------------------- +#Name : CLUSTER_NODES +#Datatype : StringList +#Description: This variable represents the cluster node names selected by the user for installation. +#Example: CLUSTER_NODES = {"node1","node2"} +#------------------------------------------------------------------------------- +CLUSTER_NODES={} + +#------------------------------------------------------------------------------- +#Name : ACCEPT_LICENSE_AGREEMENT +#Datatype : Boolean +#Description: By setting this variable to true, you are accepting the license agreement. This variable is used only for silent installations. +#Example: ACCEPT_LICENSE_AGREEMENT = true +#------------------------------------------------------------------------------- +ACCEPT_LICENSE_AGREEMENT=false + +#------------------------------------------------------------------------------- +#Name : METALINK_LOCATION +#Datatype : String +#Description: This variable represents the Oracle metalink location. +#------------------------------------------------------------------------------- +METALINK_LOCATION= + +#------------------------------------------------------------------------------- +#Name : METALINK_USERNAME +#Datatype : String +#Description: This variable represents the Oracle metalink user name. +#------------------------------------------------------------------------------- +METALINK_USERNAME= + +#------------------------------------------------------------------------------- +#Name : METALINK_PASSWORD +#Datatype : String +#Description: This variable represents the corresponding Oracle metalink password. +#------------------------------------------------------------------------------- +METALINK_PASSWORD= + +#------------------------------------------------------------------------------- +#Name : PROXY_HOST +#Datatype : String +#Description: The proxy host used to connect to Oracle metalink. +#Example: PROXY_HOST = +#------------------------------------------------------------------------------- +PROXY_HOST= + +#------------------------------------------------------------------------------- +#Name : PROXY_PORT +#Datatype : String +#Description: The proxy port used to connect to Oracle metalink. +#Example: PROXY_PORT = +#------------------------------------------------------------------------------- +PROXY_PORT= + +#------------------------------------------------------------------------------- +#Name : PROXY_REALM +#Datatype : String +#Description: The realm for the proxy used to connect to Oracle metalink. +#Example: PROXY_REALM = +#------------------------------------------------------------------------------- +PROXY_REALM= + +#------------------------------------------------------------------------------- +#Name : PROXY_USER +#Datatype : String +#Description: The username for the proxy used to connect to Oracle metalink. +#Example: PROXY_USER = +#------------------------------------------------------------------------------- +PROXY_USER= + +#------------------------------------------------------------------------------- +#Name : PROXY_PWD +#Datatype : String +#Description: The password for the proxy used to connect to Oracle metalink. +#Example: PROXY_PWD = +#------------------------------------------------------------------------------- +PROXY_PWD= + +#------------------------------------------------------------------------------- +#Name : DONT_PROXY_FOR +#Datatype : String +#Description: The dont proxy for list. +#Example: DONT_PROXY_FOR = +#------------------------------------------------------------------------------- +DONT_PROXY_FOR= + +#------------------------------------------------------------------------------- +#Name : TOPLEVEL_COMPONENT +#Datatype : StringList +#Description: The top level component to be installed in the current session. +#Example: TOPLEVEL_COMPONENT = {"oracle.server","19.0.0.0.0"} +#------------------------------------------------------------------------------- +TOPLEVEL_COMPONENT={"oracle.server","19.0.0.0.0"} + +#------------------------------------------------------------------------------- +#Name : SHOW_SPLASH_SCREEN +#Datatype : Boolean +#Description: Set to true if the initial splash screen in OUI needs to be shown. +#Example: SHOW_SPLASH_SCREEN = true +#------------------------------------------------------------------------------- +SHOW_SPLASH_SCREEN=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_ProductName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_ProductName="db" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_SID +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_SID="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_RACInstall +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_RACInstall=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsOracleHomeShared +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsOracleHomeShared=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsOracleBaseShared +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsOracleBaseShared=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSDBA +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSDBA="dba" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSOPER +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSOPER="oper" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSBKP +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSBKP="backupdba" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSDGD +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSDGD="dgdba" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSKMT +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSKMT="kmdba" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSASM +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSASM="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OSRAC +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OSRAC="racdba" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_SkipPathUpdate +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_SkipPathUpdate=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsOracleServiceUserExists +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsOracleServiceUserExists=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsBuiltInAccount +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsBuiltInAccount=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsVirtualAccount +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsVirtualAccount=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_skip_winSecurity +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_skip_winSecurity=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_isExistingBase +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_isExistingBase=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_isExistingHome +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_isExistingHome=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_OracleHomeUserName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OracleHomeUserName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_OracleHomeUserPassword +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OracleHomeUserPassword= + +#------------------------------------------------------------------------------- +#Name : oracle_install_OracleSVCUserPWDReq +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OracleSVCUserPWDReq="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_LocalSystem +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_LocalSystem="NT AUTHORITY\SYSTEM" + +#------------------------------------------------------------------------------- +#Name : oracle_install_DirectoryStorageType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_DirectoryStorageType="Directory" + +#------------------------------------------------------------------------------- +#Name : oracle_install_FileStorageType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_FileStorageType="File" + +#------------------------------------------------------------------------------- +#Name : oracle_install_RegistryStorageType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_RegistryStorageType="Registry" + +#------------------------------------------------------------------------------- +#Name : oracle_install_RawDiskStorageType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_RawDiskStorageType="RawDisk" + +#------------------------------------------------------------------------------- +#Name : oracle_install_RegistryPermissionType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_RegistryPermissionType="Registry" + +#------------------------------------------------------------------------------- +#Name : oracle_install_HomeType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_HomeType="1" + +#------------------------------------------------------------------------------- +#Name : oracle_install_ClientHomeType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_ClientHomeType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_GIHomeType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_GIHomeType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_UsersGroup +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_UsersGroup="USERS" + +#------------------------------------------------------------------------------- +#Name : oracle_install_client_ic_FlattenOracleHome +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_client_ic_FlattenOracleHome=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_architecture +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_architecture="64" + +#------------------------------------------------------------------------------- +#Name : oracle_install_client_upgrading +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_client_upgrading=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_client_internalInstallType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_client_internalInstallType="Custom" + +#------------------------------------------------------------------------------- +#Name : oracle_install_client_skipAclForFoldersUnderOB +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_client_skipAclForFoldersUnderOB={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_clrintg_ode_net_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_clrintg_ode_net_Selected=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_clrintg_ode_net_2_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_clrintg_ode_net_2_Selected=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_rdbms_partitioning_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_rdbms_partitioning_Selected=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_rdbms_dm_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_rdbms_dm_Selected=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_rdbms_rat_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_rdbms_rat_Selected=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_comp_oraolap_Selected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_comp_oraolap_Selected=true + +#------------------------------------------------------------------------------- +#Name : b_schedulerAgentSelected +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +b_schedulerAgentSelected=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_LaunchDBCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_LaunchDBCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_LaunchODMA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_LaunchODMA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_dbcaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_dbcaCmd="bin/dbca" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_dbuaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_dbuaCmd="bin/dbua" + +#------------------------------------------------------------------------------- +#Name : oracle_install_LaunchNetCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_LaunchNetCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchNETCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchNETCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_LaunchNETCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_LaunchNETCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_client_LaunchNETCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_client_LaunchNETCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_gsm_LaunchNETCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_gsm_LaunchNETCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_tg_LaunchNETCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_tg_LaunchNETCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_LaunchSchedulerAgent +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_LaunchSchedulerAgent=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_netcaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_netcaCmd="bin/netca" + +#------------------------------------------------------------------------------- +#Name : oracle_install_netcaDeinstCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_netcaDeinstCmd="bin/netca_deinst.sh" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GIUpgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GIUpgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_isHAOrCRSConfigured +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_isHAOrCRSConfigured=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchASMCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchASMCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchOifcfg +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchOifcfg=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchCluvfy +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchCluvfy=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchEmca +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchEmca=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchRootBat +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchRootBat=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_crsInstCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_crsInstCmd="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_crsDeinstCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_crsDeinstCmd="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_crsUpgrdCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_crsUpgrdCmd="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_cluvfyCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_cluvfyCmd="bin/cluvfy" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_cluvfyargs +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_cluvfyargs="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_asmcaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_asmcaCmd="asmca" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_emcaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_emcaCmd="emca" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_configuredCRSHome +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_configuredCRSHome="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_NoMigration +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_NoMigration=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_RDBMSInstalling +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_RDBMSInstalling=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_UseDBControl +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_UseDBControl=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_InstallOption +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_InstallOption="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_InstallOption +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_InstallOption="INSTALL_DB_SWONLY" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_InstallEdition +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_InstallEdition="EE" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_ConfigurationType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_ConfigurationType="Software Only" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OCRPartitionLocation +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OCRPartitionLocation="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_InstallType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_InstallType="EE" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_StorageOption +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_StorageOption=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_DiskGroupName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_DiskGroupName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_DiskDiscoveryString +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_DiskDiscoveryString="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_Disks +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_Disks={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_DiskGroupRedundancy +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_DiskGroupRedundancy="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_DiskGroupAUSize +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_DiskGroupAUSize=1 + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_UseExistingDG +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_UseExistingDG=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_prereq_Ignored +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_prereq_Ignored=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OCRRedundancy +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OCRRedundancy=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_VotingDiskRedundancy +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_VotingDiskRedundancy=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ClusterName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ClusterName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_CommaSeparatedNodes +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_CommaSeparatedNodes="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OCRMirrorLocation +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OCRMirrorLocation="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OCRMirrorLocation2 +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OCRMirrorLocation2="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_DiskDriveMapping +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_DiskDriveMapping={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OCRDeviceList +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OCRDeviceList="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_VotingDiskList +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_VotingDiskList="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_VDSKMirror1Location1 +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_VDSKMirror1Location1="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_VDSKMirror1Location2 +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_VDSKMirror1Location2="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_VDSKLocation +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_VDSKLocation="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SWOnly +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SWOnly=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SwitchGIHome +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SwitchGIHome=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_PatchGIHome +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_PatchGIHome=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_swonly_multinode +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_swonly_multinode=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SwitchGIHome_transparent +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SwitchGIHome_transparent=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_LanguageID +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_LanguageID="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_mgmtcaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_mgmtcaCmd="bin/mgmtca" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ConfigureMgmtDB +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ConfigureMgmtDB=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_MgmtDB_CDB +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_MgmtDB_CDB=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_MgmtDB_Spfile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_MgmtDB_Spfile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchMGMTCA +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchMGMTCA=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_Upgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_Upgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ConfigureGNS +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ConfigureGNS=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GNSType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GNSType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GNSSubDomain +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GNSSubDomain="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GNSVIPAddress +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GNSVIPAddress="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SCANName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SCANName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SCANPortNumber +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SCANPortNumber=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_FinalInterfaceList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_FinalInterfaceList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_NodeVips +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_NodeVips="" + +#------------------------------------------------------------------------------- +#Name : s_windowsSystemDirectory +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +s_windowsSystemDirectory="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_UseIPMI +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_UseIPMI=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_PublicNodeListWithoutDomain +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_PublicNodeListWithoutDomain={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_IsGridInstall +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_IsGridInstall=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_isRolling +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_isRolling=true + +#------------------------------------------------------------------------------- +#Name : oracle_install_LaunchInvUpdate +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_LaunchInvUpdate=false + +#------------------------------------------------------------------------------- +#Name : s_args +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +s_args="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_IsBigCluster +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_IsBigCluster=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_IsFlexCluster +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_IsFlexCluster=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_ConfigurationType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_ConfigurationType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GNSClientDataFile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GNSClientDataFile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_ClientDataFile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_ClientDataFile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_TargetHubSize +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_TargetHubSize=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_HUBNodesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_HUBNodesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_AUTONodesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_AUTONodesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RIMNodesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RIMNodesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LEAFNodesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LEAFNodesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_HUBVipList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_HUBVipList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_AUTOVipList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_AUTOVipList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RIMVipList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RIMVipList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LEAFVipList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LEAFVipList={} + +#------------------------------------------------------------------------------- +#Name : ASM_INSTCOUNT +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +ASM_INSTCOUNT=3 + +#------------------------------------------------------------------------------- +#Name : IOSERVER_INSTCOUNT +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +IOSERVER_INSTCOUNT=3 + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_MigrateASM +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_MigrateASM=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_OraMTSPortNumber +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_OraMTSPortNumber="2030" + +#------------------------------------------------------------------------------- +#Name : oracle_install_9iRACPresent +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_9iRACPresent=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_UnixMakePath +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_UnixMakePath="/usr/bin/make" + +#------------------------------------------------------------------------------- +#Name : oracle_install_installerCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_installerCmd="runInstaller" + +#------------------------------------------------------------------------------- +#Name : oracle_install_windowsCommandLine +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_windowsCommandLine="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_db_SkipHARegistration +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_db_SkipHARegistration=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_IsVendorClusterware +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_IsVendorClusterware=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_Timezone +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_Timezone="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_classpath_separator +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_classpath_separator=":" + +#------------------------------------------------------------------------------- +#Name : oracle_install_PlatformDirectoryName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_PlatformDirectoryName="linux64" + +#------------------------------------------------------------------------------- +#Name : oracle_install_rootConfiguration_ExecuteRootScript +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_rootConfiguration_ExecuteRootScript=false + +#------------------------------------------------------------------------------- +#Name : oracle_addnode_crs_NewNodeRoles +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_addnode_crs_NewNodeRoles="" + +#------------------------------------------------------------------------------- +#Name : CLUSTER_NEW_VIRTUAL_HOSTNAMES +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +CLUSTER_NEW_VIRTUAL_HOSTNAMES="" + +#------------------------------------------------------------------------------- +#Name : CLUSTER_NEW_HOST_NAMES +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +CLUSTER_NEW_HOST_NAMES="" + +#------------------------------------------------------------------------------- +#Name : CRS_DHCP_ENABLED +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +CRS_DHCP_ENABLED=false + +#------------------------------------------------------------------------------- +#Name : CRS_ADDNODE +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +CRS_ADDNODE=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_NodeListenerUser +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_NodeListenerUser="" + +#------------------------------------------------------------------------------- +#Name : oracle_addnode_crs_NewNodeSites +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_addnode_crs_NewNodeSites="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_tg_drdaasConnDesc +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_tg_drdaasConnDesc="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_tg_drdaasHostName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_tg_drdaasHostName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_tg_drdaasMapName +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_tg_drdaasMapName="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_tg_drdaasPortNumber +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_tg_drdaasPortNumber=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_user +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_user="user" + +#------------------------------------------------------------------------------- +#Name : oracle_install_isHostExadata +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_isHostExadata=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_linkRDS +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_linkRDS=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_installUser +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_installUser= + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_rootUpgradeMessage +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_rootUpgradeMessage="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_customRootShMessage +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_customRootShMessage="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_Ping_Targets +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_Ping_Targets="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_MgmtDB_DropDB +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_MgmtDB_DropDB=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_oldGIHome +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_oldGIHome="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_dropDBCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_dropDBCmd="crs/install/dropdb" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asmca_additionalArgs +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asmca_additionalArgs="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ClusterType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ClusterType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ClusterClass +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ClusterClass="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_app_VIPAddress +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_app_VIPAddress="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_GIMRType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_GIMRType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RemoteGIMRDataFile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RemoteGIMRDataFile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_MemberClusterDataFile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_MemberClusterDataFile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_FailureGroups +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_FailureGroups={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_QuorumFailureGroups +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_QuorumFailureGroups={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_Name +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_Name="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_Disks +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_Disks={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_Redundancy +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_Redundancy="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_FailureGroups +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_FailureGroups={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_QuorumFailureGroups +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_QuorumFailureGroups={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_UseIOService +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_UseIOService=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_IsExtendedCluster +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_IsExtendedCluster=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_Sites +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_Sites={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_SitesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_SitesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_SitesList +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_SitesList={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_asm_backupDG_AUSize +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_asm_backupDG_AUSize=1 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ConfigureAFD +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ConfigureAFD="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_AFD_DiskString +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_AFD_DiskString="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ConfigureRHPS +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ConfigureRHPS=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_UpgradeRHP +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_UpgradeRHP=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RHPUpgradeCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RHPUpgradeCmd="bin/rhprepos" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RHPUpgrade_args +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RHPUpgrade_args="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OPC_Cluster_Type +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OPC_Cluster_Type="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_OPC_NAT_Address +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_OPC_NAT_Address="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ODA_Config +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ODA_Config="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_ODA_SCAN_IPs +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_ODA_SCAN_IPs="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_srvctlCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_srvctlCmd="bin/srvctl" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_RHPS_args +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_RHPS_args="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_asmOnNAS_ocrDGSize +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_asmOnNAS_ocrDGSize=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_asmOnNAS_gimrDGSize +#Datatype : Number +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_asmOnNAS_gimrDGSize=0 + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SCANType +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SCANType="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SCANClientDataFile +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SCANClientDataFile="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchMgmtDBUpgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchMgmtDBUpgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_MgmtDB_UpgradeArgs +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_MgmtDB_UpgradeArgs="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_mgmtuaCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_mgmtuaCmd="bin/mgmtua" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_mgmtua_args +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_mgmtua_args="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_SiteGUIDs +#Datatype : StringList +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_SiteGUIDs={} + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_LaunchPostGIMRUpgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_LaunchPostGIMRUpgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_post_GIMR_upgrade_args +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_post_GIMR_upgrade_args="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_srvmhelperCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_srvmhelperCmd="srvm/admin/srvmhelper" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_launchCHAModelUpgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_launchCHAModelUpgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_CHAmodel_upgradeArgs +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_CHAmodel_upgradeArgs="" + +#------------------------------------------------------------------------------- +#Name : oracle_install_perlCommandLine +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_perlCommandLine="perl/bin/perl " + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_CHAmodel_upgradeCmd +#Datatype : String +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_CHAmodel_upgradeCmd="crs/install/post_gimr_ugdg.pl" + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_DryRunForGIUpgrade +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_DryRunForGIUpgrade=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_Wizard +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_Wizard=false + +#------------------------------------------------------------------------------- +#Name : oracle_install_crs_HAConfig +#Datatype : Boolean +#Description: +#------------------------------------------------------------------------------- +oracle_install_crs_HAConfig=false + +#------------------------------------------------------------------------------- +#Name : SELECTED_LANGUAGES +#Datatype : StringList +#Description: Languages in which the components will be installed. +#Component : oracle.server +#------------------------------------------------------------------------------- + +SELECTED_LANGUAGES={"ar","bn","pt_BR","bg","fr_CA","ca","hr","cs","da","nl","ar_EG","en","en_GB","et","fi","fr","de","el","iw","hu","is","in","it","ja","ko","lv","lt","ms","es_MX","no","pl","pt","ro","ru","zh_CN","sk","sl","es","sv","th","zh_TW","tr","uk","vi","es_ES"} + +#------------------------------------------------------------------------------- +#Name : COMPONENT_LANGUAGES +#Datatype : StringList +#Description: Languages supported by this component.List of supported languages : {"en","fr","ar","bn","pt_BR","bg","fr_CA","ca","hr","cs","da","nl","ar_EG","en_GB","et","fi","de","el","iw","hu","is","in","it","ja","ko","es","lv","lt","ms","es_MX","no","pl","pt","ro","ru","zh_CN","sk","sl","es_ES","sv","th","zh_TW","tr","uk","vi"} +#Component : oracle.server +#------------------------------------------------------------------------------- + +COMPONENT_LANGUAGES={"ar","bn","pt_BR","bg","fr_CA","ca","hr","cs","da","nl","ar_EG","en","en_GB","et","fi","fr","de","el","iw","hu","is","in","it","ja","ko","lv","lt","ms","es_MX","no","pl","pt","ro","ru","zh_CN","sk","sl","es","sv","th","zh_TW","tr","uk","vi","es_ES"} + +#------------------------------------------------------------------------------- +#Name : INSTALL_TYPE +#Datatype : String +#Description: Installation type of the component. +#Component : oracle.server +#------------------------------------------------------------------------------- + +INSTALL_TYPE="Enterprise Edition" From 8966cd290ce92661e4cbeb6805c3929bb0656c12 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 17:30:28 +0100 Subject: [PATCH 122/375] sap_anydb_install_oracle: add reboot handler --- .../defaults/main.yml | 5 ++++ .../handlers/main.yml | 25 +++++++++++++++++++ .../tasks/oracledb_install_pre.yml | 1 + 3 files changed, 31 insertions(+) create mode 100644 roles/sap_anydb_install_oracle/handlers/main.yml diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml index 7e3d01c24..4b650e520 100644 --- a/roles/sap_anydb_install_oracle/defaults/main.yml +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -1,5 +1,10 @@ --- +# Default set to yes, otherwise C Shell not available +oracledb_prep_reboot_ok: yes + +oracledb_prep_fail_if_reboot_required: yes + # minimal, responsefile sap_anydb_install_oracle_method: minimal diff --git a/roles/sap_anydb_install_oracle/handlers/main.yml b/roles/sap_anydb_install_oracle/handlers/main.yml new file mode 100644 index 000000000..42237ea8b --- /dev/null +++ b/roles/sap_anydb_install_oracle/handlers/main.yml @@ -0,0 +1,25 @@ +--- +# handlers file for sap_anydb_install_oracle + +- name: Reboot the managed node + ansible.builtin.reboot: + test_command: /bin/true + listen: __oracledb_prep_reboot_handler + when: + - oracledb_prep_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + ansible.builtin.fail: + msg: Reboot is required! + listen: __oracledb_prep_reboot_handler + when: + - oracledb_prep_fail_if_reboot_required|d(true) + - not oracledb_prep_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + ansible.builtin.debug: + msg: "WARN: Reboot is required!" + listen: __oracledb_prep_reboot_handler + when: + - not oracledb_prep_fail_if_reboot_required|d(true) + - not oracledb_prep_reboot_ok|d(false) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 847b4cd0c..7a547debb 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -31,6 +31,7 @@ - unixODBC - unixODBC-devel state: present + notify: __sap_general_preconfigure_reboot_handler # Removed Packages from RHEL 8.x # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages From c99a674d55d030b18f289ae24727f9435ab5111c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 17:50:49 +0100 Subject: [PATCH 123/375] sap_anydb_install_oracle: fix C Shell missing package --- .../sap_anydb_install_oracle/tasks/oracledb_install_pre.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 7a547debb..60a4d9c26 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -4,9 +4,10 @@ ## oracle-database-preinstall-12cr1.rpm ## oracle-database-preinstall-12cr2.rpm ## oracle-database-preinstall-19c.rpm >> https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm -- name: Install Korn Shell (KSH) and other dependencies for Oracle DB +- name: Install C Shell (CSH), Korn Shell (KSH) and other dependencies for Oracle DB ansible.builtin.package: - name: + name: + - csh - ksh - mksh - bc From 8514925aa561cba5ee14bc046cd4d81666491543 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 18:54:05 +0100 Subject: [PATCH 124/375] sap_anydb_install_oracle: fix precheck --- .../sap_anydb_install_oracle/defaults/main.yml | 2 ++ .../tasks/oracledb_install_pre.yml | 17 ++++++++++++++--- .../tasks/oracledb_installer_minimal.yml | 6 +++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml index 4b650e520..f95448ca8 100644 --- a/roles/sap_anydb_install_oracle/defaults/main.yml +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -5,6 +5,8 @@ oracledb_prep_reboot_ok: yes oracledb_prep_fail_if_reboot_required: yes +oracledb_prep_precheck: no + # minimal, responsefile sap_anydb_install_oracle_method: minimal diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 60a4d9c26..93b467c59 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -94,6 +94,7 @@ mode: '0774' # Requires change directory to Oracle RDBMS installation media directory +# Must extract to run the precheck - name: Oracle DB - check installation prerequisites for Oracle DB become: true become_user: oracle @@ -105,17 +106,27 @@ failed_when: "oracledb_precheck.rc not in [ 0, 1 ]" ansible.builtin.shell: | setenv CV_ASSUME_DISTID "OL7" - setenv DISPLAY + setenv DISPLAY setenv DB_SID "{{ oracledb_sid }}" setenv ORACLE_BASE "{{ oracledb_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" setenv ORACLE_HOME_NAME "OraDb19c_1" setenv IHRDBMS "$ORACLE_HOME" setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" - setenv ORA_GOLD_IMAGE_FILE_L "{{ oracledb_base }}/dvd/19.0.0/db_home" + setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home" setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" - $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohcheck + $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohextract -ohcheck -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L" + when: + - oracledb_prep_precheck == yes + +# Avoid built-in file Ansible Module with absent, this would remove directory too +- name: Ansible delete file wildcard example + shell: rm -rf "{{ oracledb_base }}/dvd/19.0.0/*" + when: + - oracledb_prep_precheck == yes #- name: Oracle DB - debug output # ansible.builtin.debug: # msg: oracledb_precheck.stdout_lines +# when: +# - oracledb_prep_precheck == yes diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml index c943b3976..0c38a442b 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml @@ -38,14 +38,14 @@ failed_when: "oracledb_install.rc not in [ 0, 1 ]" ansible.builtin.shell: | setenv CV_ASSUME_DISTID "OL7" - setenv DISPLAY + setenv DISPLAY setenv DB_SID "{{ oracledb_sid }}" setenv ORACLE_BASE "{{ oracledb_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" setenv ORACLE_HOME_NAME "OraDb19c_1" setenv IHRDBMS "$ORACLE_HOME" setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" - setenv ORA_GOLD_IMAGE_FILE_L "{{ oracledb_base }}/dvd/19.0.0/db_home" + setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home" setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" setenv oracle.install.db.config.starterdb.globalDBName "{{ oracledb_sid }}" setenv oracle.install.db.config.starterdb.SID "{{ oracledb_sid }}" @@ -66,7 +66,7 @@ - name: Oracle DB - Root command scripts for Oracle DB Inventory and Oracle DB Home, from root user become_user: root ansible.builtin.shell: | - export DB_SID="OR1" + export DB_SID="{{ oracledb_sid }}" export ORACLE_BASE="{{ oracledb_base }}" export ORACLE_HOME="$ORACLE_BASE/$DB_SID/19.0.0" export INVENTORY_LOCATION="{{ oracledb_inventory_central }}" From 0d48c3eedb02930ca559a34dad0de0ded4d1584d Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 18:59:29 +0100 Subject: [PATCH 125/375] sap_anydb_install_oracle: fix reboot after prep --- roles/sap_anydb_install_oracle/defaults/main.yml | 3 +-- roles/sap_anydb_install_oracle/tasks/main.yml | 6 +++++- .../sap_anydb_install_oracle/tasks/oracledb_install_pre.yml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml index f95448ca8..64befd292 100644 --- a/roles/sap_anydb_install_oracle/defaults/main.yml +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -1,9 +1,8 @@ --- -# Default set to yes, otherwise C Shell not available oracledb_prep_reboot_ok: yes -oracledb_prep_fail_if_reboot_required: yes +oracledb_prep_fail_if_reboot_required: no oracledb_prep_precheck: no diff --git a/roles/sap_anydb_install_oracle/tasks/main.yml b/roles/sap_anydb_install_oracle/tasks/main.yml index 1c0ddb78d..e10f4c8c7 100644 --- a/roles/sap_anydb_install_oracle/tasks/main.yml +++ b/roles/sap_anydb_install_oracle/tasks/main.yml @@ -1,8 +1,12 @@ --- -- name: Oracle DB - Pre installation +- name: Oracle DB - Pre-installation ansible.builtin.include_tasks: "oracledb_install_pre.yml" +# Allow reboot after pre-installation activities +- name: Flush handlers for reboot + ansible.builtin.meta: flush_handlers + - name: Oracle DB - Installation ansible.builtin.include_tasks: "oracledb_installer_{{ sap_anydb_install_oracle_method }}.yml" diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 93b467c59..968d11e56 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -32,7 +32,7 @@ - unixODBC - unixODBC-devel state: present - notify: __sap_general_preconfigure_reboot_handler + notify: __oracledb_prep_reboot_handler # Removed Packages from RHEL 8.x # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages From 5e8d307f0197bdbd7bf0f87f89411b7fbe89ccda Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 19:20:02 +0100 Subject: [PATCH 126/375] sap_anydb_install_oracle: yes bool fix --- .../sap_anydb_install_oracle/tasks/oracledb_install_pre.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 968d11e56..eb18e4d06 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -117,16 +117,16 @@ setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohextract -ohcheck -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L" when: - - oracledb_prep_precheck == yes + - oracledb_prep_precheck # Avoid built-in file Ansible Module with absent, this would remove directory too - name: Ansible delete file wildcard example shell: rm -rf "{{ oracledb_base }}/dvd/19.0.0/*" when: - - oracledb_prep_precheck == yes + - oracledb_prep_precheck #- name: Oracle DB - debug output # ansible.builtin.debug: # msg: oracledb_precheck.stdout_lines # when: -# - oracledb_prep_precheck == yes +# - oracledb_prep_precheck From 6c000e8fc7c0c420a84c9d6a33748780ff9dbd51 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 19:48:56 +0100 Subject: [PATCH 127/375] sap_anydb_install_oracle: missing libnsl fix --- roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index eb18e4d06..c8172d8c5 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -31,6 +31,7 @@ - xorg-x11-xauth - unixODBC - unixODBC-devel + - libnsl state: present notify: __oracledb_prep_reboot_handler From 467b1f8fa2849e2cfc1e7ba8ab8e57f6a5b17779 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 13 Sep 2022 23:20:44 +0100 Subject: [PATCH 128/375] sap_anydb_install_oracle: add log file path display --- .../tasks/oracledb_install_pre.yml | 6 +++--- .../tasks/oracledb_installer_minimal.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index c8172d8c5..9ae73b677 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -68,7 +68,7 @@ - name: Oracle DB - Create directories, from root user become_user: root - file: + ansible.builtin.file: state: directory path: "{{ item.path }}" owner: "{{ item.owner }}" @@ -121,8 +121,8 @@ - oracledb_prep_precheck # Avoid built-in file Ansible Module with absent, this would remove directory too -- name: Ansible delete file wildcard example - shell: rm -rf "{{ oracledb_base }}/dvd/19.0.0/*" +- name: Oracle DB - remove extracted directory after precheck + ansible.builtin.shell: rm -rf "{{ oracledb_base }}/dvd/19.0.0/*" when: - oracledb_prep_precheck diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml index 0c38a442b..6747ef6f1 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml @@ -89,3 +89,13 @@ set CURRENT_DATE_ISO=`date +%Y-%m-%d` set ORACLEDB_RESP_GENERATED_FILE=`find $ORACLE_BASE -iname "db_$CURRENT_DATE_ISO*"` $ORACLE_HOME/runInstaller -silent -executeConfigTools -responseFile $ORACLEDB_RESP_GENERATED_FILE + +- name: Oracle DB - Find log files + become_user: root + ansible.builtin.shell: | + ls -1 /oraInventory/logs/InstallActions*/installActions* + register: oracledb_logs + +- name: Oracle DB - View the following Oracle DB installation log files + ansible.builtin.debug: + msg: oracledb_logs.stdout_lines From 7b9e6a1b8be833e8893ba4de5f34b8e8af74f714 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 14 Sep 2022 01:31:42 +0100 Subject: [PATCH 129/375] sap_anydb_install_oracle: fix debug output --- roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml | 2 +- .../tasks/oracledb_installer_minimal.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 9ae73b677..1b4e408aa 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -128,6 +128,6 @@ #- name: Oracle DB - debug output # ansible.builtin.debug: -# msg: oracledb_precheck.stdout_lines +# var: oracledb_precheck.stdout_lines # when: # - oracledb_prep_precheck diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml index 6747ef6f1..d4980b97a 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml @@ -98,4 +98,4 @@ - name: Oracle DB - View the following Oracle DB installation log files ansible.builtin.debug: - msg: oracledb_logs.stdout_lines + var: oracledb_logs.stdout_lines From e912d8f374cc6d285531f73f7c2eb635ee40ef67 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 14 Sep 2022 16:53:57 +0000 Subject: [PATCH 130/375] sap_ha_cluster: save initial work --- roles/sap_ha_cluster/defaults/main.yml | 21 +++ roles/sap_ha_cluster/meta/argument_specs.yml | 53 ++++++ roles/sap_ha_cluster/meta/main.yml | 27 ++++ .../tasks/ascertain_sap_landscape.yml | 13 ++ .../sap_ha_cluster/tasks/configure_srhook.yml | 48 ++++++ .../tasks/construct_vars_common.yml | 17 ++ .../tasks/construct_vars_hana_scaleout.yml | 152 ++++++++++++++++++ .../tasks/construct_vars_hana_scaleup.yml | 152 ++++++++++++++++++ .../tasks/construct_vars_stonith.yml | 13 ++ roles/sap_ha_cluster/tasks/main.yml | 152 ++++++++++++++++++ roles/sap_ha_cluster/templates/20-saphana.j2 | 15 ++ roles/sap_ha_cluster/vars/RedHat_8.yml | 6 + roles/sap_ha_cluster/vars/RedHat_9.yml | 1 + .../sap_ha_cluster/vars/SAPHana_scaleout.yml | 8 + roles/sap_ha_cluster/vars/SAPHana_scaleup.yml | 8 + roles/sap_ha_cluster/vars/main.yml | 4 + 16 files changed, 690 insertions(+) create mode 100644 roles/sap_ha_cluster/defaults/main.yml create mode 100644 roles/sap_ha_cluster/meta/argument_specs.yml create mode 100644 roles/sap_ha_cluster/meta/main.yml create mode 100644 roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml create mode 100644 roles/sap_ha_cluster/tasks/configure_srhook.yml create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_common.yml create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_stonith.yml create mode 100644 roles/sap_ha_cluster/tasks/main.yml create mode 100644 roles/sap_ha_cluster/templates/20-saphana.j2 create mode 100644 roles/sap_ha_cluster/vars/RedHat_8.yml create mode 120000 roles/sap_ha_cluster/vars/RedHat_9.yml create mode 100644 roles/sap_ha_cluster/vars/SAPHana_scaleout.yml create mode 100644 roles/sap_ha_cluster/vars/SAPHana_scaleup.yml create mode 100644 roles/sap_ha_cluster/vars/main.yml diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml new file mode 100644 index 000000000..98d2f95a3 --- /dev/null +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -0,0 +1,21 @@ +--- +# task name prefix +__tname: "SAP HA Cluster -" + +# TODO: +# Potentially make this role a wrapper for any SAP solution role to be configured +# in a pacemaker cluster. + +# Variables for the cluster setup must be constructed by dedicated tasks! +# The included 'ha_cluster' role will not work with the role variables set +# in this role. + +sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" +sap_ha_cluster_hana_sid: "{{ sap_hana_sid }}" +sap_ha_cluster_instance_number: "{{ sap_hana_instance_number }}" +sap_ha_cluster_hacluster_password: "{{ sap_hana_hacluster_password }}" +sap_ha_cluster_instance_vip: "{{ sap_hana_vip }}" + +# The type of SAP landscape and multi-node replication +#sap_ha_cluster_sap_type: "" +sap_ha_cluster_replication_type: "" diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml new file mode 100644 index 000000000..ab6ce1282 --- /dev/null +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -0,0 +1,53 @@ +--- +# Requires: ansible 2.11 +# Argument specifications in this separate file maintain backwards compatibility. +argument_specs: + + main: + short_description: SAP HA requirements +# description: + options: + sap_ha_cluster_hana_sid: + description: The SAP System ID of the instance that will be configured in the cluster. + type: str + required: true + alias: sap_hana_sid + + sap_ha_cluster_instance_number: + description: The instance number of the SAP HANA database which is role will configure in the cluster. + type: str + required: true + alias: sap_hana_instance_number + + sap_ha_cluster_hacluster_password: + description: The password of the `hacluster` user which is created during pacemaker installation. + type: str + required: true + no_log: true + alias: sap_hana_hacluster_password + + sap_hana_vip: + description: + - Virtual floating IP for SAP HANA DB connections. + - This IP always will always run on the promoted HANA node. + type: str + required: true + + sap_ha_cluster_sap_type: + description: The SAP landscape to be installed. + type: str + required: false + default: "" + choices: + - scaleup + - scaleout + - "" + + sap_ha_cluster_replication_type: + description: The type of SAP HANA site replication across multiple hosts. + type: str + required: false + default: "" + choices: + - mtr + - "" diff --git a/roles/sap_ha_cluster/meta/main.yml b/roles/sap_ha_cluster/meta/main.yml new file mode 100644 index 000000000..4171de5a9 --- /dev/null +++ b/roles/sap_ha_cluster/meta/main.yml @@ -0,0 +1,27 @@ +--- +galaxy_info: + namespace: community + author: Red Hat for SAP Community of Practice, Janine Fuchs + description: Ansible role for installation and configuration of Pacemaker Cluster for SAP solutions + company: Red Hat, Inc. + + license: Apache-2.0 + + min_ansible_version: 2.9 + + platforms: + - name: EL + versions: + - 8 + - 9 + + galaxy_tags: + - sap + - hana + - rhel + - redhat + +# Not defining ha_cluster as dependency here, but using role include tasks +# because this role defines a lot of variables and functions as a wrapper +# to deploy the cluster for SAP environments +dependencies: [] diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml new file mode 100644 index 000000000..566e8770a --- /dev/null +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -0,0 +1,13 @@ +--- +# The following tasks will check which SAP landscape can be configured with +# the provided parameters. +# It will validate if requirements are met for the cluster configuration. +- name: "{{ __tname }} Set landscape to scale-up if there are only 2 nodes" + ansible.builtin.set_fact: + sap_ha_cluster_sap_type: scaleup + when: + - ansible_play_hosts|length == 2 + - sap_ha_cluster_sap_type is not defined + +# TODO: validate the value of sap_ha_cluster_sap_type to +# be a supported key diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml new file mode 100644 index 000000000..661d21971 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -0,0 +1,48 @@ +--- +- name: "{{ __tname }} Create srHook shared directory" + ansible.builtin.file: + path: "{{ sap_ha_cluster_hadr_provider_path }}" + state: directory + mode: "0755" + owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" + group: sapsys + +- name: "{{ __tname }} Copy srHook to shared directory" + ansible.builtin.copy: + remote_src: true + src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py + dest: "{{ sap_ha_cluster_hadr_provider_path }}/{{ sap_ha_cluster_hadr_provider_name }}.py" + mode: "0755" + owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" + group: sapsys + +- name: "{{ __tname }} Check global.ini for 'ha_dr_saphanasr'" + ansible.builtin.shell: | + grep ha_dr_saphanasr /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini + register: trace_global + failed_when: false + changed_when: false + +- name: "{{ __tname }} Update srHook in global.ini" + ansible.builtin.blockinfile: + path: /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini + marker: "" + block: | + [ha_dr_provider_{{ sap_ha_cluster_hadr_provider_name }}] + provider = {{ sap_ha_cluster_hadr_provider_name }} + path = {{ sap_ha_cluster_hadr_provider_path }} + execution_order = 1 + + [trace] + ha_dr_saphanasr = info + when: trace_global.rc == 1 + +- name: "{{ __tname }} Add srHook sudo entries" + ansible.builtin.template: + backup: yes + dest: /etc/sudoers.d/20-saphana + mode: "0440" + owner: root + group: root + src: templates/20-saphana.j2 + validate: visudo -cf %s diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml new file mode 100644 index 000000000..b4d5d0b28 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -0,0 +1,17 @@ +--- +# Variables containing variables must be constructed with values +# to be fed into an included role +- name: "{{ __tname }} Construct definitions for cluster setup" + ansible.builtin.set_fact: + # Include generic cluster name + sap_ha_cluster_cluster_name: "{{ sap_hana_cluster_name }}" + # Enable STONITH + sap_ha_cluster_cluster_properties: + - attrs: + - name: stonith-enabled + value: true + +- name: "{{ __tname }} Register the 'hacluster' user password" + ansible.builtin.set_fact: + sap_ha_cluster_hacluster_password: "{{ sap_hana_hacluster_password }}" + no_log: true diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml new file mode 100644 index 000000000..38a4ce6de --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -0,0 +1,152 @@ +--- +# Variables containing variables must be constructed with values +# to be fed into an included role +- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" + ansible.builtin.set_fact: + + # Extra packages for scale-up resource agents + sap_ha_cluster_extra_packages: + - resource-agents-sap-hana + + # SAP HANA Scale-up cluster resource definitions + sap_ha_cluster_resource_primitives: + # Resource: SAPHanaTopology + - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHanaTopology" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + operations: + - action: start + attrs: + - name: timeout + value: 600 + - action: stop + attrs: + - name: timeout + value: 600 + - action: monitor + attrs: + - name: interval + value: 10 + - name: timeout + value: 600 + + # Resource: SAPHana + - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHana" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + - name: PREFER_SITE_TAKEOVER + value: true + - name: DUPLICATE_PRIMARY_TIMEOUT + value: 900 + - name: AUTOMATED_REGISTER + value: true + operations: + - action: start + attrs: + - name: timeout + value: 3600 + - action: stop + attrs: + - name: timeout + value: 3600 + - action: monitor + attrs: + - name: interval + value: 121 + - name: role + value: Slave + - name: timeout + value: 700 + - action: monitor + attrs: + - name: interval + value: 119 + - name: role + value: Master + - name: timeout + value: 700 + - action: promote + attrs: + - name: timeout + value: 3600 + - action: demote + attrs: + - name: timeout + value: 3600 + + # Resource: HANA VIP + - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + agent: "ocf:heartbeat:IPaddr2" + instance_attrs: + - attrs: + - name: ip + value: "{{ sap_ha_cluster_instance_vip }}" + + # Resource CLONE configuration + sap_ha_cluster_resource_clones: + + # Clone of SAPHanaTopology + - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: no + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + # Clone of SAPHana + - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: yes + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + + # ORDER constraints + sap_ha_cluster_constraints_order: + # First start Topology, then HANA (automatically stops in reverse order) + - resource_first: + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + resource_then: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + options: + - name: symmetrical + value: "false" + + # Start the VIP only after the HANA resource has been promoted + - resource_first: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: promote + resource_then: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + action: start + + # COLOCATION constaints + sap_ha_cluster_constraints_colocation: + # The VIP runs where HANA is promoted + - resource_leader: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + role: promoted + resource_follower: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml new file mode 100644 index 000000000..38a4ce6de --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -0,0 +1,152 @@ +--- +# Variables containing variables must be constructed with values +# to be fed into an included role +- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" + ansible.builtin.set_fact: + + # Extra packages for scale-up resource agents + sap_ha_cluster_extra_packages: + - resource-agents-sap-hana + + # SAP HANA Scale-up cluster resource definitions + sap_ha_cluster_resource_primitives: + # Resource: SAPHanaTopology + - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHanaTopology" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + operations: + - action: start + attrs: + - name: timeout + value: 600 + - action: stop + attrs: + - name: timeout + value: 600 + - action: monitor + attrs: + - name: interval + value: 10 + - name: timeout + value: 600 + + # Resource: SAPHana + - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHana" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + - name: PREFER_SITE_TAKEOVER + value: true + - name: DUPLICATE_PRIMARY_TIMEOUT + value: 900 + - name: AUTOMATED_REGISTER + value: true + operations: + - action: start + attrs: + - name: timeout + value: 3600 + - action: stop + attrs: + - name: timeout + value: 3600 + - action: monitor + attrs: + - name: interval + value: 121 + - name: role + value: Slave + - name: timeout + value: 700 + - action: monitor + attrs: + - name: interval + value: 119 + - name: role + value: Master + - name: timeout + value: 700 + - action: promote + attrs: + - name: timeout + value: 3600 + - action: demote + attrs: + - name: timeout + value: 3600 + + # Resource: HANA VIP + - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + agent: "ocf:heartbeat:IPaddr2" + instance_attrs: + - attrs: + - name: ip + value: "{{ sap_ha_cluster_instance_vip }}" + + # Resource CLONE configuration + sap_ha_cluster_resource_clones: + + # Clone of SAPHanaTopology + - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: no + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + # Clone of SAPHana + - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: yes + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + + # ORDER constraints + sap_ha_cluster_constraints_order: + # First start Topology, then HANA (automatically stops in reverse order) + - resource_first: + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + resource_then: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + options: + - name: symmetrical + value: "false" + + # Start the VIP only after the HANA resource has been promoted + - resource_first: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: promote + resource_then: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + action: start + + # COLOCATION constaints + sap_ha_cluster_constraints_colocation: + # The VIP runs where HANA is promoted + - resource_leader: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + role: promoted + resource_follower: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml new file mode 100644 index 000000000..b70944156 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -0,0 +1,13 @@ +--- +# The following variables are constructed here in order to be provided as +# input for the included 'ha_cluster' system role. +# +- name: "{{ __tname }} Construct stonith resources definition " + ansible.builtin.set_fact: + # STONITH resource definition + # This will be added to the cluster resources list + +# workaround / placeholder until modular fencing resource logic +# has been invented + sap_ha_cluster_stonith_resource_primitives: "{{ sap_ha_cluster_stonith_resources }}" # from groupvars + no_log: true diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml new file mode 100644 index 000000000..6cc3a831e --- /dev/null +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -0,0 +1,152 @@ +--- +# TODO: Build all resource/constraint configuration variables based on +# simpler user input. +# - Make resources configuration modular, allowing additional VIPs for instance + +# 1. This role's arguments are validated through meta/arguments_spec.yml +# 2. Detect SAP solution to be configured (scale-up, scale-out, etc.) +# * Play hosts must have SAP installed and landscape information discoverable ?! +# * Certain parameters must match the solution (networking, IDs ) +# 3. Include tasks for parameter validation for the selected solution +# 4. Include tasks for building the ha_cluster arguments for the selected solution +# 5. Include ha_cluster role with the constructed parameters as vars arguments +# 6. Add solution specific config, like srhook + + +# Determine which SAP landscape we are going to configure in the cluster +# This is needed to include the landscape specific parameter values. +# The result will be parameters: +# - sap_ha_cluster_sap_type (values: scaleup, scaleout +- name: "{{ __tname }} Include tasks for SAP landscape calculation" + ansible.builtin.include_tasks: + file: ascertain_sap_landscape.yml + apply: + tags: check_sap + tags: check_sap + +# copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml +- name: "{{ __tname }} Set platform/version specific variables" + ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + loop: + - "{{ ansible_facts['os_family'] }}.yml" + - "{{ ansible_facts['distribution'] }}.yml" + - >- + {{ ansible_facts['distribution'] ~ '_' ~ + ansible_facts['distribution_major_version'] }}.yml + - >- + {{ ansible_facts['distribution'] ~ '_' ~ + ansible_facts['distribution_version'] }}.yml + - "SAPHana-{{ sap_ha_cluster_sap_type }}.yml" + - "SAPHana-{{ sap_ha_cluster_replication_type }}.yml" + vars: + __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + when: __sap_ha_cluster_vars_file is file + +- name: "{{ __tname }} Include common variable construction tasks" + ansible.builtin.import_tasks: construct_vars_common.yml + +- name: "{{ __tname }} Include variable construction for STONITH resources" + ansible.builtin.import_tasks: construct_vars_stonith.yml + +- name: "{{ __tname }} Include variable construction for SAP HANA Scale-up" + ansible.builtin.include_tasks: + file: construct_vars_hana_scaleup.yml + when: sap_ha_cluster_sap_type == 'scaleup' + +- name: "{{ __tname }} Include variable construction for SAP HANA Scale-out" + ansible.builtin.include_tasks: + file: construct_vars_hana_scaleout.yml + when: sap_ha_cluster_sap_type == 'scaleout' + +- name: "Fail here for now..." + ansible.builtin.fail: + +#- name: "fail 1" +# fail: +# ignore_errors: "{{ ansible_check_mode }}" + +#- debug: +# msg: "{{ hostvars[node]. +# vars: +# blahvar: "{{ sap_ha_cluster_ha_cluster }}" + +# verify input variables - if argument specifications are not strict enough +# make this smarter, maybe in better include files +# +# safeguard: check if a cluster exists and save config first +# +- name: "{{ __tname }} Verify that cluster variables are defined" + ansible.builtin.assert: + that: + # The SAP ID must follow a strict format and not use reserved special values + - sap_ha_cluster_hana_sid is defined + - sap_ha_cluster_hana_sid|length == 3 + - sap_ha_cluster_hana_sid not in __sap_sid_prohibited + # `ha_cluster` must be a dictionary +# - hostvars[node].ha_cluster is defined +# - lookup('vars', role_name + '_ha_cluster') is not string +# - lookup('vars', role_name + '_ha_cluster') is mapping + # `ha_cluster_cluster_properties` must be a list + - sap_ha_cluster_cluster_properties is defined + - sap_ha_cluster_extra_packages is defined + - sap_ha_cluster_resource_primitives is defined + - sap_ha_cluster_resource_clones is defined + - sap_ha_cluster_constraints_order is defined + - sap_ha_cluster_constraints_colocation is defined + - sap_ha_cluster_repos is defined + tags: always + +#- fail: + +# include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) +- name: "{{ __tname }} Include System Role 'ha_cluster'" + ansible.builtin.import_role: + name: linux-system-roles.ha_cluster + vars: + ha_cluster_cluster_name: "{{ sap_ha_cluster_cluster_name }}" + ha_cluster_hacluster_password: "{{ sap_ha_cluster_hacluster_password }}" + ha_cluster_cluster_properties: "{{ sap_ha_cluster_cluster_properties }}" + __ha_cluster_repos: "{{ sap_ha_cluster_repos }}" + ha_cluster_properties: "{{ sap_ha_cluster_cluster_properties }}" + ha_cluster_extra_packages: "{{ sap_ha_cluster_extra_packages }}" + ha_cluster_resource_primitives: "{{ sap_ha_cluster_resource_primitives + sap_ha_cluster_stonith_resource_primitives }}" + ha_cluster_resource_clones: "{{ sap_ha_cluster_resource_clones }}" + ha_cluster_constraints_order: "{{ sap_ha_cluster_constraints_order }}" + ha_cluster_constraints_colocation: "{{ sap_ha_cluster_constraints_colocation }}" +# ha_cluster: "{{ sap_ha_cluster }}" + tags: + - ha_cluster + +#### from old ha role + +- name: "{{ __tname }} Get current properties" + ansible.builtin.shell: | + pcs property list + register: __sap_ha_cluster_pcs_properties + changed_when: false + failed_when: false + +- name: "{{ __tname }} Allow concurrent fence actions" + ansible.builtin.shell: | + pcs property set concurrent-fencing=true + when: + - "'concurrent-fencing: true' not in __sap_ha_cluster_pcs_properties.stdout" + +- name: "{{ __tname }} Update STONITH timeout" + ansible.builtin.shell: | + pcs property set stonith-timeout=900 + when: + - '"stonith-timeout: 900" not in __sap_ha_cluster_pcs_properties.stdout' + +- name: "{{ __tname }} Update resource default values" + ansible.builtin.shell: | + pcs resource defaults update resource-stickiness=1000 + pcs resource defaults update migration-threshold=5000 + changed_when: true + +- name: "{{ __tname }} Include srHook configuration" + ansible.builtin.include_tasks: + file: configure_srhook.yml + apply: + tags: srhook + tags: srhook diff --git a/roles/sap_ha_cluster/templates/20-saphana.j2 b/roles/sap_ha_cluster/templates/20-saphana.j2 new file mode 100644 index 000000000..19b3597fa --- /dev/null +++ b/roles/sap_ha_cluster/templates/20-saphana.j2 @@ -0,0 +1,15 @@ +# Managed by Ansible +# Role: {{ ansible_role_name }} +# +# Description: +# The following are sudo entries which are required for the pacemaker cluster +# to update the SAP HANA cluster resource status. + +{% for node in sap_ha_cluster_cluster_nodes %} +Cmnd_Alias {{ node.hana_site }}_SOK = /usr/sbin/crm_attribute -n hana_{{ sap_ha_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SOK -t crm_config -s {{ sap_ha_cluster_hadr_provider_name }} +Cmnd_Alias {{ node.hana_site }}_SFAIL = /usr/sbin/crm_attribute -n hana_{{ sap_ha_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SFAIL -t crm_config -s {{ sap_ha_cluster_hadr_provider_name }} +{% endfor %} + +{{ sap_hana_cluster_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} + +Defaults!{% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} !requiretty diff --git a/roles/sap_ha_cluster/vars/RedHat_8.yml b/roles/sap_ha_cluster/vars/RedHat_8.yml new file mode 100644 index 000000000..dc06c7ee1 --- /dev/null +++ b/roles/sap_ha_cluster/vars/RedHat_8.yml @@ -0,0 +1,6 @@ +--- +# Overwrite HA_CLUSTER repository ID to use E4S repository +# - an alternative logic could be to enable the repo before running ha_cluster +sap_ha_cluster_repos: + - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" + name: High Availability diff --git a/roles/sap_ha_cluster/vars/RedHat_9.yml b/roles/sap_ha_cluster/vars/RedHat_9.yml new file mode 120000 index 000000000..ad7713d66 --- /dev/null +++ b/roles/sap_ha_cluster/vars/RedHat_9.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml new file mode 100644 index 000000000..227a08a5d --- /dev/null +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml @@ -0,0 +1,8 @@ +--- +# SAP HANA Scale-Out specific parameter values +sap_ha_cluster_extra_repos: + - resource-agents-sap-hana-scaleout + +sap_ha_cluster_ra_hana: SAPHanaController +sap_ha_cluster_hadr_provider_name: SAPHanaSR +sap_ha_cluster_hadr_provider_path: /hana/shared/myhooks diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml new file mode 100644 index 000000000..ced897b1d --- /dev/null +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml @@ -0,0 +1,8 @@ +--- +# SAP HANA Scale-Up specific parameter values +sap_ha_cluster_extra_repos: + - resource-agents-sap-hana + +sap_ha_cluster_ra_hana: SAPHana +sap_ha_cluster_hadr_provider_name: SAPHanaSR +sap_ha_cluster_hadr_provider_path: /hana/shared/myhooks diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml new file mode 100644 index 000000000..371a1e516 --- /dev/null +++ b/roles/sap_ha_cluster/vars/main.yml @@ -0,0 +1,4 @@ +--- +# SAP System IDs that are reserved and must not be used +# Reference: SAP Note 1979280 +__sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'AUX', 'AVG', 'BIN', 'BIT', 'CDC', 'COM', 'CON', 'DAA', 'DBA', 'DBM', 'DBO', 'DTD', 'ECO', 'END', 'EPS', 'EXE', 'FOR', 'GET', 'GID', 'IBM', 'INT', 'KEY', 'LIB', 'LOG', 'LPT', 'MAP', 'MAX', 'MEM', 'MIG', 'MIN', 'MON', 'NET', 'NIX', 'NOT', 'NUL', 'OFF', 'OLD', 'OMS', 'OUT', 'PAD', 'PRN', 'RAW', 'REF', 'ROW', 'SAP', 'SET', 'SGA', 'SHG', 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', 'USE', 'USR', 'VAR'] From b9b95e1241d6c63755055f11bd65ba62ad99eee9 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 14 Sep 2022 17:12:00 +0000 Subject: [PATCH 131/375] sap_ha_cluster: construct SAP HANA common vars before scaleup/scaleout --- .../tasks/construct_vars_hana_common.yml | 153 ++++++++++++++++++ .../tasks/construct_vars_hana_scaleout.yml | 6 +- roles/sap_ha_cluster/tasks/main.yml | 8 +- 3 files changed, 162 insertions(+), 5 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml new file mode 100644 index 000000000..58e850132 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -0,0 +1,153 @@ +--- +# Variables containing variables must be constructed with values +# to be fed into the included ha_cluster role + +# TODO: +# - put here all scale-up and scale-out common resources +# - certain differences like ra agent names are provided through +# type specific variables + +- name: "{{ __tname }} Construct cluster vars for SAP HANA common" + ansible.builtin.set_fact: + # SAP HANA common cluster resource definitions + sap_ha_cluster_resource_primitives: + # Resource: SAPHanaTopology + - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHanaTopology" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + operations: + - action: start + attrs: + - name: timeout + value: 600 + - action: stop + attrs: + - name: timeout + value: 600 + - action: monitor + attrs: + - name: interval + value: 10 + - name: timeout + value: 600 + + # Resource: SAPHana + - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_hana_instance_number }}" + - name: PREFER_SITE_TAKEOVER + value: true + - name: DUPLICATE_PRIMARY_TIMEOUT + value: 900 + - name: AUTOMATED_REGISTER + value: true + operations: + - action: start + attrs: + - name: timeout + value: 3600 + - action: stop + attrs: + - name: timeout + value: 3600 + - action: monitor + attrs: + - name: interval + value: 121 + - name: role + value: Slave + - name: timeout + value: 700 + - action: monitor + attrs: + - name: interval + value: 119 + - name: role + value: Master + - name: timeout + value: 700 + - action: promote + attrs: + - name: timeout + value: 3600 + - action: demote + attrs: + - name: timeout + value: 3600 + + # Resource: HANA VIP + - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + agent: "ocf:heartbeat:IPaddr2" + instance_attrs: + - attrs: + - name: ip + value: "{{ sap_ha_cluster_instance_vip }}" + + # Resource CLONE configuration + sap_ha_cluster_resource_clones: + + # Clone of SAPHanaTopology + - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: no + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + # Clone of SAPHana + - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + promotable: yes + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" + + # ORDER constraints + sap_ha_cluster_constraints_order: + # First start Topology, then HANA (automatically stops in reverse order) + - resource_first: + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + resource_then: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: start + options: + - name: symmetrical + value: "false" + + # Start the VIP only after the HANA resource has been promoted + - resource_first: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + action: promote + resource_then: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + action: start + + # COLOCATION constaints + sap_ha_cluster_constraints_colocation: + # The VIP runs where HANA is promoted + - resource_leader: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + role: promoted + resource_follower: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index 38a4ce6de..4731fbd58 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -1,12 +1,12 @@ --- # Variables containing variables must be constructed with values # to be fed into an included role -- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" +- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" ansible.builtin.set_fact: # Extra packages for scale-up resource agents sap_ha_cluster_extra_packages: - - resource-agents-sap-hana + - resource-agents-sap-hana-scaleout # SAP HANA Scale-up cluster resource definitions sap_ha_cluster_resource_primitives: @@ -37,7 +37,7 @@ # Resource: SAPHana - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHana" + agent: "ocf:heartbeat:SAPHanaController" instance_attrs: - attrs: - name: SID diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 6cc3a831e..f4484405c 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -36,8 +36,8 @@ - >- {{ ansible_facts['distribution'] ~ '_' ~ ansible_facts['distribution_version'] }}.yml - - "SAPHana-{{ sap_ha_cluster_sap_type }}.yml" - - "SAPHana-{{ sap_ha_cluster_replication_type }}.yml" + - "SAPHana_{{ sap_ha_cluster_sap_type }}.yml" + - "SAPHana_{{ sap_ha_cluster_replication_type }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" when: __sap_ha_cluster_vars_file is file @@ -48,6 +48,10 @@ - name: "{{ __tname }} Include variable construction for STONITH resources" ansible.builtin.import_tasks: construct_vars_stonith.yml +- name: "{{ __tname }} Include variable construction for SAP HANA common" + ansible.builtin.include_tasks: + file: construct_vars_hana_common.yml + - name: "{{ __tname }} Include variable construction for SAP HANA Scale-up" ansible.builtin.include_tasks: file: construct_vars_hana_scaleup.yml From 276a5bba5f8b37569fa430e8d9fc6b9ffd3c4567 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 14 Sep 2022 17:16:52 +0000 Subject: [PATCH 132/375] sap_ha_cluster: renamed template file for easier identification --- roles/sap_ha_cluster/tasks/configure_srhook.yml | 2 +- .../templates/{20-saphana.j2 => sudofile_20-saphana.j2} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename roles/sap_ha_cluster/templates/{20-saphana.j2 => sudofile_20-saphana.j2} (100%) diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml index 661d21971..643b9d115 100644 --- a/roles/sap_ha_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -44,5 +44,5 @@ mode: "0440" owner: root group: root - src: templates/20-saphana.j2 + src: templates/sudofile_20-saphana.j2 validate: visudo -cf %s diff --git a/roles/sap_ha_cluster/templates/20-saphana.j2 b/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 similarity index 100% rename from roles/sap_ha_cluster/templates/20-saphana.j2 rename to roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 From cf1a4e48375dd2fc38e2ec27868fc4a6172cb0e8 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 14 Sep 2022 23:11:42 +0100 Subject: [PATCH 133/375] sap_anydb_install_oracle: updates to ECC Export detection --- .../defaults/main.yml | 4 +- .../tasks/detect_export_sapecc.yml | 87 +++++++++++++------ .../tasks/detect_export_saps4hana.yml | 15 ++++ roles/sap_install_media_detect/tasks/main.yml | 50 ++++++----- .../tasks/prepare/unrar_get.yml | 6 +- .../tasks/set_global_vars.yml | 2 +- 6 files changed, 110 insertions(+), 54 deletions(-) diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index cb1b45b51..7e56337fd 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -3,8 +3,8 @@ # e.g. /software sap_install_media_detect_directory: -# local_dir, nfs_mount, object_storage_cli, s3fuse -sap_install_media_detect_source: +# local_dir, remote_dir (e.g. NFS, s3fuse) +sap_install_media_detect_source: local_dir # saphana, sapase, sapmaxdb, oracledb, ibmdb2 sap_install_media_detect_db: "saphana" diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml index d1f18cf54..9b51ca2c6 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -1,40 +1,75 @@ --- -#- name: Identify SAP ECC Installation Export files -# ansible.builtin.find: -# paths: "{{ oracledb_client_install_directory }}" -# recurse: yes -# file_type: directory -# patterns: '.*OCL_LINUX_X86_64.*' -# use_regex: yes -# register: oracledb_client_find_dir - -- name: List files in directory of SAP ECC Installation Export +- name: List files in directory ansible.builtin.shell: ls -1 + register: detect_directory_files args: - chdir: "{{ sap_swpm_ecc_export_path }}" - register: ecc_export_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: If any ZIP, then extract the SAP ECC Installation Export file (legacy, before EHP8) - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }}; fi +- name: Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" args: - chdir: "{{ sap_swpm_ecc_export_path }}" + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: Detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar +# changed_when: "item.stdout | length > 0" with_items: - - "{{ ecc_export_files.stdout_lines }}" + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true -- name: If any RAR without file extension, then add file extension - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi +- name: Identify SAP ECC EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if ../unrar lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_ecc_export + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ sap_swpm_ecc_export_path }}" + chdir: "{{ sap_install_media_detect_directory }}" + +- name: If any ZIP, then extract the SAP ECC Installation Export file (unzip) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }}; fi with_items: - - "{{ ecc_export_files.stdout_lines }}" + - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" -- name: Get unrar binary for extraction - ansible.builtin.shell: curl https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz | tar -xvz --strip-components=1 rar/unrar +- name: If any RAR without file extension, then add file extension (for use with unrar binary) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi + with_items: + - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ sap_swpm_ecc_export_path }}" + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract SAP ECC Installation Export files (unrar x) - ansible.builtin.shell: ./unrar x "{{ softwarecenter_search_list_ecc_export[0] }}" +- name: Find self-extracting RAR EXE (parent RAR file) and extract SAP ECC Installation Export files (unrar x) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR self-extracting archive')" ]; then "{{ sap_install_media_detect_unrar_binary }}" x "{{ item }}" sapecc_export_extracted/ ; fi + with_items: + - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ sap_swpm_ecc_export_path }}" + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP HANA - Find SAP_HANA_DATABASE + find: + paths: "{{ sap_install_media_detect_directory }}/sapecc_export_extracted" + recurse: yes + file_type: directory + contains: "DATA_UNITS" + register: detect_directory_export_extracted + +- name: Local Directory source - move SAP ECC EXPORT compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapecc_export/{{ item }}" + with_items: + - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml index ed97d539c..45eacc592 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml @@ -1 +1,16 @@ --- + +- name: Identify SAP S/4HANA EXPORT files + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}" + recurse: yes + file_type: file + patterns: '.*S4.*EXPORT.*' + use_regex: yes + register: s4hana_export_files + +- name: Local Directory source - move SAP S/4HANA EXPORT files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/saps4hana_export/{{ item }}" + with_items: "{{ s4hana_export_files.files }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/main.yml b/roles/sap_install_media_detect/tasks/main.yml index 7930289f9..e8b682ad1 100644 --- a/roles/sap_install_media_detect/tasks/main.yml +++ b/roles/sap_install_media_detect/tasks/main.yml @@ -11,27 +11,6 @@ when: - sap_install_media_detect_db == "saphana" -- name: SAP Install Media Detect - Organize SAP ASE installation media files - include_tasks: "detect_sapanydb_sapase.yml" - when: - - sap_install_media_detect_db == "sapase" - -- name: SAP Install Media Detect - Organize SAP MaxDB installation media files - include_tasks: "detect_sapanydb_sapmaxdb.yml" - when: - - sap_install_media_detect_db == "sapmaxdb" - -- name: SAP Install Media Detect - Organize Oracle DB installation media files - include_tasks: "detect_sapanydb_oracledb.yml" - when: - - sap_install_media_detect_db == "oracledb" - -- name: SAP Install Media Detect - Organize IBM Db2 installation media files - include_tasks: "detect_sapanydb_ibmdb2.yml" - when: - - sap_install_media_detect_db == "ibmdb2" - - - name: SAP Install Media Detect - Organize SAP SWPM installation media files include_tasks: "detect_sapswpm.yml" when: @@ -58,18 +37,41 @@ - sap_install_media_detect_webdisp == true -- name: SAP Backups Detect - SAP HANA +- name: SAP Install Media Detect - Complete Data Backup files for SAP HANA include_tasks: "detect_backup_saphana.yml" when: - sap_install_media_detect_backup == "saphana" -- name: SAP Export Detect - SAP ECC +# Detect files which (historically) have filenames which are Numbered IDs only (e.g. 51054410_2 for SAP MaxDB 7.9) +# Leave to last so directory has less files to scan + +- name: SAP Install Media Detect - Organize SAP ASE installation media files + include_tasks: "detect_sapanydb_sapase.yml" + when: + - sap_install_media_detect_db == "sapase" + +- name: SAP Install Media Detect - Organize SAP MaxDB installation media files + include_tasks: "detect_sapanydb_sapmaxdb.yml" + when: + - sap_install_media_detect_db == "sapmaxdb" + +- name: SAP Install Media Detect - Organize Oracle DB installation media files + include_tasks: "detect_sapanydb_oracledb.yml" + when: + - sap_install_media_detect_db == "oracledb" + +- name: SAP Install Media Detect - Organize IBM Db2 installation media files + include_tasks: "detect_sapanydb_ibmdb2.yml" + when: + - sap_install_media_detect_db == "ibmdb2" + +- name: SAP Install Media Detect - EXPORT files for SAP ECC include_tasks: "detect_export_sapecc.yml" when: - sap_install_media_detect_export == "sapecc" -- name: SAP Export Detect - SAP S/4HANA +- name: SAP Install Media Detect - EXPORT files for SAP S/4HANA include_tasks: "detect_export_saps4hana.yml" when: - sap_install_media_detect_export == "saps4hana" diff --git a/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml b/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml index bf8b62cd4..9d9fe0d93 100644 --- a/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml +++ b/roles/sap_install_media_detect/tasks/prepare/unrar_get.yml @@ -1,6 +1,10 @@ --- -- name: Get unrar binary for extraction +- name: SAP Install Media Detect - Prepare - Get unrar binary ansible.builtin.shell: curl https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz | tar -xvz --strip-components=1 rar/unrar args: chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - Prepare - set facts for unrar path + ansible.builtin.set_fact: + sap_install_media_detect_unrar_binary: "{{ sap_install_media_detect_directory }}/unrar" diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index 96c7109e0..16f8ecc8f 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -42,7 +42,7 @@ - name: SAP Install Media Detection Completed - set facts for Export of SAP ECC ansible.builtin.set_fact: - sap_swpm_cd_export_path: "{{ sap_swpm_ecc_export_path }}/{{ softwarecenter_search_list_ecc_export[0] | regex_replace('_.*', '') }}" # for sap_swpm Ansible Role + sap_swpm_cd_export_path: "{{ detect_directory_export_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_export == "ecc" From d30604808e7b7791051e074164f93097394d1d6f Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 14 Sep 2022 23:16:33 +0100 Subject: [PATCH 134/375] sap_anydb_install_oracle: change task name --- roles/sap_install_media_detect/tasks/detect_export_sapecc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml index 9b51ca2c6..ceffbc204 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -59,7 +59,7 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: SAP Install Media Detect - SAP HANA - Find SAP_HANA_DATABASE +- name: Identify SAP ECC Export extracted find: paths: "{{ sap_install_media_detect_directory }}/sapecc_export_extracted" recurse: yes From a079b5be60e223250ca01aa6ebde09ae92791ad7 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 15 Sep 2022 01:02:07 +0100 Subject: [PATCH 135/375] sap_anydb_install_oracle: ibm db2 checks --- .../tasks/detect_export_sapecc.yml | 2 +- .../tasks/detect_sapanydb_ibmdb2.yml | 72 ++++++++++++++----- 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml index ceffbc204..82dc77c4f 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -39,7 +39,7 @@ chdir: "{{ sap_install_media_detect_directory }}" - name: If any ZIP, then extract the SAP ECC Installation Export file (unzip) - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }}; fi + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./sapecc_export_extracted ; fi with_items: - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml index 319462232..4ad59ad55 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml @@ -16,29 +16,69 @@ - "{{ ibmdb2_install_directory }}" - "{{ ibmdb2_client_install_directory }}" - -- name: List files in directory of IBM DB2 installation media +- name: List files in directory ansible.builtin.shell: ls -1 + register: detect_directory_files args: - chdir: "{{ ibmdb2_install_directory }}" - register: ibm_db2_install_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of IBM DB2 installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" args: - chdir: "{{ ibmdb2_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: Identify IBM Db2 installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db2setup' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_ibmdb2 + changed_when: "item | length > 0" with_items: - - "{{ ibm_db2_install_files.stdout_lines }}" + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" -- name: List files in directory of IBM DB2 Client - ansible.builtin.shell: ls -1 +- name: Identify IBM Db2 Client installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db6_update_client.sh' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_ibmdb2_client + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ ibmdb2_client_install_directory }}" - register: ibm_db2_client_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of IBM DB2 Client - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: Identify IBM Db2 OEM license file + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db2aese_c.lic' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_ibmdb2_license + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ ibmdb2_client_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + +- name: Extract ZIP files of IBM DB2 installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi + with_items: + - "{{ detect_directory_files_ibmdb2.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: Extract ZIP files of IBM DB2 Client installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi with_items: - - "{{ ibm_db2_client_files.stdout_lines }}" + - "{{ detect_directory_files_ibmdb2_client.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: Extract ZIP files of IBM DB2 OEM license file + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi + with_items: + - "{{ detect_directory_files_ibmdb2_license.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" From 14fff5972333c29359d329a61d22a426c24c3efb Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 15 Sep 2022 01:07:11 +0100 Subject: [PATCH 136/375] sap_anydb_install_oracle: oracle db checks --- .../tasks/detect_sapanydb_oracledb.yml | 66 +++++++++++-------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml index d1d564cbb..efe515118 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml @@ -5,7 +5,7 @@ oracledb_install_directory: "{{ sap_install_media_detect_directory }}/oracledb" oracledb_client_install_directory: "{{ sap_install_media_detect_directory }}/oracledb_client" -- name: SAP Install Media Detect - Oracle DB - Create Directory - {{ oracledb_install_directory }} +- name: SAP Install Media Detect - Oracle DB - Create Directories ansible.builtin.file: path: "{{ item }}" state: directory @@ -16,38 +16,52 @@ - "{{ oracledb_install_directory }}" - "{{ oracledb_client_install_directory }}" - -- name: List files in directory of Oracle DB installation media +- name: List files in directory ansible.builtin.shell: ls -1 + register: detect_directory_files args: - chdir: "{{ oracledb_install_directory }}" - register: oracledb_install_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of Oracle DB installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" args: - chdir: "{{ oracledb_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: Identify Oracle DB installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q '19cinstall.sh' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_oracledb + changed_when: "item | length > 0" with_items: - - "{{ oracledb_install_files.stdout_lines }}" + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" -- name: List files in directory of Oracle DB Client - ansible.builtin.shell: ls -1 +- name: Identify Oracle DB Client installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'OCL_LINUX_X86_64' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_oracledb_client + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ oracledb_client_install_directory }}" - register: oracledb_client_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of Oracle DB Client - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: Extract ZIP files of Oracle DB installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ oracledb_install_directory }}/{{ item }}_extracted; fi + with_items: + - "{{ detect_directory_files_oracledb.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ oracledb_client_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + +- name: Extract ZIP files of Oracle DB Client installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ oracledb_install_directory }}/{{ item }}_extracted; fi with_items: - - "{{ oracledb_client_files.stdout_lines }}" - -- name: Identify Oracle DB Client unpack path - ansible.builtin.find: - paths: "{{ oracledb_client_install_directory }}" - recurse: yes - file_type: directory - patterns: '.*OCL_LINUX_X86_64.*' - use_regex: yes - register: oracledb_client_find_dir + - "{{ detect_directory_files_oracledb_client.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" From b76805d3dbd5ccfbabc7f84a33cf3e5bd9a2cfa8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 15 Sep 2022 10:36:07 +0000 Subject: [PATCH 137/375] sap_ha_cluster: major todo to use existing ha_cluster role definitions if existing --- roles/sap_ha_cluster/defaults/main.yml | 15 +- roles/sap_ha_cluster/meta/argument_specs.yml | 27 +++- .../tasks/ascertain_platform_type.yml | 7 + .../tasks/construct_vars_common.yml | 12 +- .../tasks/construct_vars_hana_common.yml | 28 ++-- .../tasks/construct_vars_hana_scaleout.yml | 151 +----------------- .../tasks/construct_vars_hana_scaleup.yml | 151 +----------------- .../tasks/construct_vars_stonith.yml | 2 + roles/sap_ha_cluster/tasks/main.yml | 18 ++- .../sap_ha_cluster/vars/Platform_ibmcloud.yml | 7 + .../sap_ha_cluster/vars/Platform_ibmpower.yml | 6 + .../sap_ha_cluster/vars/SAPHana_scaleout.yml | 3 + roles/sap_ha_cluster/vars/SAPHana_scaleup.yml | 3 + 13 files changed, 102 insertions(+), 328 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/ascertain_platform_type.yml create mode 100644 roles/sap_ha_cluster/vars/Platform_ibmcloud.yml create mode 100644 roles/sap_ha_cluster/vars/Platform_ibmpower.yml diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 98d2f95a3..2384d5599 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -2,19 +2,24 @@ # task name prefix __tname: "SAP HA Cluster -" -# TODO: -# Potentially make this role a wrapper for any SAP solution role to be configured +# TODO: Potentially make this role a wrapper for any SAP solution role to be configured # in a pacemaker cluster. # Variables for the cluster setup must be constructed by dedicated tasks! # The included 'ha_cluster' role will not work with the role variables set # in this role. +# TODO: make sure to first respect 'ha_cluster' native variables + sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" sap_ha_cluster_hana_sid: "{{ sap_hana_sid }}" -sap_ha_cluster_instance_number: "{{ sap_hana_instance_number }}" -sap_ha_cluster_hacluster_password: "{{ sap_hana_hacluster_password }}" -sap_ha_cluster_instance_vip: "{{ sap_hana_vip }}" +sap_ha_cluster_hana_instance_number: "{{ sap_hana_instance_number }}" +sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" + +# make sure that there is always the default fed into the included role +sap_ha_cluster_fence_agent_packages: + - fence-agents-all + # The type of SAP landscape and multi-node replication #sap_ha_cluster_sap_type: "" diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index ab6ce1282..34d8b513c 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -3,23 +3,38 @@ # Argument specifications in this separate file maintain backwards compatibility. argument_specs: +# TODO: +# - add 'ha_cluster' native role variables that are supported by this +# sap_ha_cluster wrapper role (meaning, that are input parameters when +# including 'ha_cluster' +# - make 'ha_cluster' role variables the primary names, but allow +# alias variable names in the current role namespace + main: short_description: SAP HA requirements # description: options: - sap_ha_cluster_hana_sid: - description: The SAP System ID of the instance that will be configured in the cluster. + sap_hana_sid: + description: + - The SAP System ID of the instance that will be configured in the cluster. + - The SAP SID must follow SAP specifications - see SAP Note 1979280. type: str required: true - alias: sap_hana_sid + alias: sap_ha_cluster_hana_sid - sap_ha_cluster_instance_number: + sap_hana_instance_number: description: The instance number of the SAP HANA database which is role will configure in the cluster. type: str required: true - alias: sap_hana_instance_number + alias: sap_ha_cluster_hana_instance_number + + ha_cluster_cluster_name: + description: The name of the pacemaker cluster. + type: str + required: false + default: my-cluster - sap_ha_cluster_hacluster_password: + ha_cluster_hacluster_password: description: The password of the `hacluster` user which is created during pacemaker installation. type: str required: true diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml new file mode 100644 index 000000000..5f199914f --- /dev/null +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -0,0 +1,7 @@ +--- +# Platform detection for cloud platforms. +# Potentially also useful for other virtual or hardware platforms. + +- name: "{{ __tname }} Set platform type based on Ansible facts" + ansible.builtin.set_fact: + __sap_ha_cluster_vm_asset_tag: "{{ ansible_facts.node.ansible_chassis_asset_tag | default('NA') }}" diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index b4d5d0b28..64ca1d3da 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -1,10 +1,16 @@ --- # Variables containing variables must be constructed with values # to be fed into an included role +# +# TODO: make sure to first respect 'ha_cluster' native variables +# - name: "{{ __tname }} Construct definitions for cluster setup" ansible.builtin.set_fact: - # Include generic cluster name - sap_ha_cluster_cluster_name: "{{ sap_hana_cluster_name }}" + # Set cluster name: first read 'ha_cluster' native role variable + # This ensures that users could also use 'ha_cluster' system role + # directly for the same target cluster + sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" + # Enable STONITH sap_ha_cluster_cluster_properties: - attrs: @@ -13,5 +19,5 @@ - name: "{{ __tname }} Register the 'hacluster' user password" ansible.builtin.set_fact: - sap_ha_cluster_hacluster_password: "{{ sap_hana_hacluster_password }}" + sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" no_log: true diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 58e850132..cbfaae97b 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -12,14 +12,14 @@ # SAP HANA common cluster resource definitions sap_ha_cluster_resource_primitives: # Resource: SAPHanaTopology - - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" agent: "ocf:heartbeat:SAPHanaTopology" instance_attrs: - attrs: - name: SID value: "{{ sap_ha_cluster_hana_sid }}" - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" + value: "{{ sap_ha_cluster_hana_instance_number }}" operations: - action: start attrs: @@ -37,14 +37,14 @@ value: 600 # Resource: SAPHana - - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" instance_attrs: - attrs: - name: SID value: "{{ sap_ha_cluster_hana_sid }}" - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" + value: "{{ sap_ha_cluster_hana_instance_number }}" - name: PREFER_SITE_TAKEOVER value: true - name: DUPLICATE_PRIMARY_TIMEOUT @@ -86,18 +86,18 @@ value: 3600 # Resource: HANA VIP - - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" agent: "ocf:heartbeat:IPaddr2" instance_attrs: - attrs: - name: ip - value: "{{ sap_ha_cluster_instance_vip }}" + value: "{{ sap_ha_cluster_hana_instance_vip }}" # Resource CLONE configuration sap_ha_cluster_resource_clones: # Clone of SAPHanaTopology - - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" promotable: no meta_attrs: - attrs: @@ -108,7 +108,7 @@ - name: interleave value: "true" # Clone of SAPHana - - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" + - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" promotable: yes meta_attrs: - attrs: @@ -123,10 +123,10 @@ sap_ha_cluster_constraints_order: # First start Topology, then HANA (automatically stops in reverse order) - resource_first: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" action: start resource_then: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" action: start options: - name: symmetrical @@ -134,20 +134,20 @@ # Start the VIP only after the HANA resource has been promoted - resource_first: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" action: promote resource_then: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" action: start # COLOCATION constaints sap_ha_cluster_constraints_colocation: # The VIP runs where HANA is promoted - resource_leader: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" role: promoted resource_follower: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" options: - name: score value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index 4731fbd58..7c91de690 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -1,152 +1,9 @@ --- # Variables containing variables must be constructed with values # to be fed into an included role -- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" - ansible.builtin.set_fact: - # Extra packages for scale-up resource agents - sap_ha_cluster_extra_packages: - - resource-agents-sap-hana-scaleout +# TODO: add here any scale-out special variable constructions +# TODO: make sure to first respect 'ha_cluster' native variables - # SAP HANA Scale-up cluster resource definitions - sap_ha_cluster_resource_primitives: - # Resource: SAPHanaTopology - - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHanaTopology" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" - operations: - - action: start - attrs: - - name: timeout - value: 600 - - action: stop - attrs: - - name: timeout - value: 600 - - action: monitor - attrs: - - name: interval - value: 10 - - name: timeout - value: 600 - - # Resource: SAPHana - - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHanaController" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" - - name: PREFER_SITE_TAKEOVER - value: true - - name: DUPLICATE_PRIMARY_TIMEOUT - value: 900 - - name: AUTOMATED_REGISTER - value: true - operations: - - action: start - attrs: - - name: timeout - value: 3600 - - action: stop - attrs: - - name: timeout - value: 3600 - - action: monitor - attrs: - - name: interval - value: 121 - - name: role - value: Slave - - name: timeout - value: 700 - - action: monitor - attrs: - - name: interval - value: 119 - - name: role - value: Master - - name: timeout - value: 700 - - action: promote - attrs: - - name: timeout - value: 3600 - - action: demote - attrs: - - name: timeout - value: 3600 - - # Resource: HANA VIP - - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - agent: "ocf:heartbeat:IPaddr2" - instance_attrs: - - attrs: - - name: ip - value: "{{ sap_ha_cluster_instance_vip }}" - - # Resource CLONE configuration - sap_ha_cluster_resource_clones: - - # Clone of SAPHanaTopology - - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - promotable: no - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" - # Clone of SAPHana - - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - promotable: yes - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" - - # ORDER constraints - sap_ha_cluster_constraints_order: - # First start Topology, then HANA (automatically stops in reverse order) - - resource_first: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: start - resource_then: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: start - options: - - name: symmetrical - value: "false" - - # Start the VIP only after the HANA resource has been promoted - - resource_first: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: promote - resource_then: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - action: start - - # COLOCATION constaints - sap_ha_cluster_constraints_colocation: - # The VIP runs where HANA is promoted - - resource_leader: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - role: promoted - resource_follower: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - options: - - name: score - value: 2000 +#- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" +# ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml index 38a4ce6de..3db25de82 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -1,152 +1,9 @@ --- # Variables containing variables must be constructed with values # to be fed into an included role -- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" - ansible.builtin.set_fact: - # Extra packages for scale-up resource agents - sap_ha_cluster_extra_packages: - - resource-agents-sap-hana +# TODO: add here any scale-up special variable constructions +# TODO: make sure to first respect 'ha_cluster' native variables - # SAP HANA Scale-up cluster resource definitions - sap_ha_cluster_resource_primitives: - # Resource: SAPHanaTopology - - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHanaTopology" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" - operations: - - action: start - attrs: - - name: timeout - value: 600 - - action: stop - attrs: - - name: timeout - value: 600 - - action: monitor - attrs: - - name: interval - value: 10 - - name: timeout - value: 600 - - # Resource: SAPHana - - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHana" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_hana_instance_number }}" - - name: PREFER_SITE_TAKEOVER - value: true - - name: DUPLICATE_PRIMARY_TIMEOUT - value: 900 - - name: AUTOMATED_REGISTER - value: true - operations: - - action: start - attrs: - - name: timeout - value: 3600 - - action: stop - attrs: - - name: timeout - value: 3600 - - action: monitor - attrs: - - name: interval - value: 121 - - name: role - value: Slave - - name: timeout - value: 700 - - action: monitor - attrs: - - name: interval - value: 119 - - name: role - value: Master - - name: timeout - value: 700 - - action: promote - attrs: - - name: timeout - value: 3600 - - action: demote - attrs: - - name: timeout - value: 3600 - - # Resource: HANA VIP - - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - agent: "ocf:heartbeat:IPaddr2" - instance_attrs: - - attrs: - - name: ip - value: "{{ sap_ha_cluster_instance_vip }}" - - # Resource CLONE configuration - sap_ha_cluster_resource_clones: - - # Clone of SAPHanaTopology - - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - promotable: no - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" - # Clone of SAPHana - - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}" - promotable: yes - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" - - # ORDER constraints - sap_ha_cluster_constraints_order: - # First start Topology, then HANA (automatically stops in reverse order) - - resource_first: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: start - resource_then: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: start - options: - - name: symmetrical - value: "false" - - # Start the VIP only after the HANA resource has been promoted - - resource_first: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - action: promote - resource_then: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - action: start - - # COLOCATION constaints - sap_ha_cluster_constraints_colocation: - # The VIP runs where HANA is promoted - - resource_leader: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}-clone" - role: promoted - resource_follower: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_hana_instance_number }}_MASTER" - options: - - name: score - value: 2000 +#- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" +# ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index b70944156..1c59b1c2d 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -2,6 +2,8 @@ # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. # +# TODO: make sure to first respect 'ha_cluster' native variables + - name: "{{ __tname }} Construct stonith resources definition " ansible.builtin.set_fact: # STONITH resource definition diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index f4484405c..8b4b4a5e3 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -12,6 +12,7 @@ # 5. Include ha_cluster role with the constructed parameters as vars arguments # 6. Add solution specific config, like srhook +# TODO: make sure to first respect 'ha_cluster' native variables # Determine which SAP landscape we are going to configure in the cluster # This is needed to include the landscape specific parameter values. @@ -24,6 +25,15 @@ tags: check_sap tags: check_sap +# Determine if we are on a cloud platform +- name: "{{ __tname }} Include tasks for platform detection" + ansible.builtin.include_tasks: + file: ascertain_platform_type.yml + apply: + tags: check_cloud + tags: check_cloud + + # copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml - name: "{{ __tname }} Set platform/version specific variables" ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" @@ -38,6 +48,7 @@ ansible_facts['distribution_version'] }}.yml - "SAPHana_{{ sap_ha_cluster_sap_type }}.yml" - "SAPHana_{{ sap_ha_cluster_replication_type }}.yml" + - "Platform_{{ __sap_ha_cluster_vm_asset_tag }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" when: __sap_ha_cluster_vars_file is file @@ -86,11 +97,6 @@ - sap_ha_cluster_hana_sid is defined - sap_ha_cluster_hana_sid|length == 3 - sap_ha_cluster_hana_sid not in __sap_sid_prohibited - # `ha_cluster` must be a dictionary -# - hostvars[node].ha_cluster is defined -# - lookup('vars', role_name + '_ha_cluster') is not string -# - lookup('vars', role_name + '_ha_cluster') is mapping - # `ha_cluster_cluster_properties` must be a list - sap_ha_cluster_cluster_properties is defined - sap_ha_cluster_extra_packages is defined - sap_ha_cluster_resource_primitives is defined @@ -117,7 +123,7 @@ ha_cluster_resource_clones: "{{ sap_ha_cluster_resource_clones }}" ha_cluster_constraints_order: "{{ sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ sap_ha_cluster_constraints_colocation }}" -# ha_cluster: "{{ sap_ha_cluster }}" + ha_cluster_fence_agent_packages: "{{ sap_ha_cluster_fence_agent_packages }}" tags: - ha_cluster diff --git a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml new file mode 100644 index 000000000..b7af211a1 --- /dev/null +++ b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml @@ -0,0 +1,7 @@ +--- +# Variables specific on IBM VPC platforms +# +# TODO: make sure to first respect 'ha_cluster' native variables +# +sap_ha_cluster_fence_agent_packages: + - fence-agents-ibm-vpc diff --git a/roles/sap_ha_cluster/vars/Platform_ibmpower.yml b/roles/sap_ha_cluster/vars/Platform_ibmpower.yml new file mode 100644 index 000000000..647403bc3 --- /dev/null +++ b/roles/sap_ha_cluster/vars/Platform_ibmpower.yml @@ -0,0 +1,6 @@ +--- +# Variables specific on IBM Power platforms +# TODO: rename this file to match the actual "chassis_asset_tag" output +# TODO: make sure to first respect 'ha_cluster' native variables +sap_ha_cluster_fence_agent_packages: + - fence-agents-ibm-powervs diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml index 227a08a5d..19801ec41 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml @@ -1,5 +1,8 @@ --- # SAP HANA Scale-Out specific parameter values +# +# TODO: make sure to first respect 'ha_cluster' native variables + sap_ha_cluster_extra_repos: - resource-agents-sap-hana-scaleout diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml index ced897b1d..df78b1d7a 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml @@ -1,5 +1,8 @@ --- # SAP HANA Scale-Up specific parameter values +# +# TODO: make sure to first respect 'ha_cluster' native variables + sap_ha_cluster_extra_repos: - resource-agents-sap-hana From 724782b7ff2958d3ef46e066e5fadcf4925a50fe Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 15 Sep 2022 17:13:01 +0000 Subject: [PATCH 138/375] sap_ha_cluster: cluster definition lists are now constructed in flexible segments --- roles/sap_ha_cluster/defaults/main.yml | 18 +- roles/sap_ha_cluster/meta/argument_specs.yml | 2 +- .../tasks/construct_vars_common.yml | 12 +- .../tasks/construct_vars_hana_common.yml | 297 ++++++++++-------- .../tasks/construct_vars_stonith.yml | 29 +- roles/sap_ha_cluster/tasks/main.yml | 52 ++- 6 files changed, 240 insertions(+), 170 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 2384d5599..6273b8061 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -20,7 +20,23 @@ sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" sap_ha_cluster_fence_agent_packages: - fence-agents-all - # The type of SAP landscape and multi-node replication #sap_ha_cluster_sap_type: "" sap_ha_cluster_replication_type: "" + +# Define empty parameters to avoid undefined input variables. +# The arguments_spec check complains. +# The actual values are set by various tasks. +# +__sap_ha_cluster_cluster_name: +__sap_ha_cluster_hacluster_password: +__sap_ha_cluster_cluster_properties: [] +__sap_ha_cluster_fence_agent_packages: [] +__sap_ha_cluster_extra_packages: [] +__sap_ha_cluster_resource_primitives: [] +__sap_ha_cluster_resource_groups: [] +__sap_ha_cluster_resource_clones: [] +__sap_ha_cluster_constraints_location: [] +__sap_ha_cluster_constraints_colocation: [] +__sap_ha_cluster_constraints_order: [] +__sap_ha_cluster_repos: [] diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 34d8b513c..e0b7b19e3 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -12,7 +12,6 @@ argument_specs: main: short_description: SAP HA requirements -# description: options: sap_hana_sid: description: @@ -33,6 +32,7 @@ argument_specs: type: str required: false default: my-cluster + alias: sap_ha_cluster_cluster_name ha_cluster_hacluster_password: description: The password of the `hacluster` user which is created during pacemaker installation. diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 64ca1d3da..460d6213d 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -4,20 +4,14 @@ # # TODO: make sure to first respect 'ha_cluster' native variables # -- name: "{{ __tname }} Construct definitions for cluster setup" +- name: "{{ __tname }} Set cluster name" ansible.builtin.set_fact: # Set cluster name: first read 'ha_cluster' native role variable # This ensures that users could also use 'ha_cluster' system role # directly for the same target cluster - sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" - - # Enable STONITH - sap_ha_cluster_cluster_properties: - - attrs: - - name: stonith-enabled - value: true + __sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" - name: "{{ __tname }} Register the 'hacluster' user password" ansible.builtin.set_fact: - sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" + __sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" no_log: true diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index cbfaae97b..805b49884 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -7,147 +7,172 @@ # - certain differences like ra agent names are provided through # type specific variables -- name: "{{ __tname }} Construct cluster vars for SAP HANA common" +- name: "{{ __tname }} Add resource: SAP HANA Topology" ansible.builtin.set_fact: - # SAP HANA common cluster resource definitions - sap_ha_cluster_resource_primitives: - # Resource: SAPHanaTopology - - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - agent: "ocf:heartbeat:SAPHanaTopology" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_ha_cluster_hana_instance_number }}" - operations: - - action: start - attrs: - - name: timeout - value: 600 - - action: stop - attrs: - - name: timeout - value: 600 - - action: monitor - attrs: - - name: interval - value: 10 - - name: timeout - value: 600 + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_topology ] }}" + vars: + __resource_topology: + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + agent: "ocf:heartbeat:SAPHanaTopology" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_ha_cluster_hana_instance_number }}" + operations: + - action: start + attrs: + - name: timeout + value: 600 + - action: stop + attrs: + - name: timeout + value: 600 + - action: monitor + attrs: + - name: interval + value: 10 + - name: timeout + value: 600 - # Resource: SAPHana - - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" - instance_attrs: - - attrs: - - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" - - name: InstanceNumber - value: "{{ sap_ha_cluster_hana_instance_number }}" - - name: PREFER_SITE_TAKEOVER - value: true - - name: DUPLICATE_PRIMARY_TIMEOUT - value: 900 - - name: AUTOMATED_REGISTER - value: true - operations: - - action: start - attrs: - - name: timeout - value: 3600 - - action: stop - attrs: - - name: timeout - value: 3600 - - action: monitor - attrs: - - name: interval - value: 121 - - name: role - value: Slave - - name: timeout - value: 700 - - action: monitor - attrs: - - name: interval - value: 119 - - name: role - value: Master - - name: timeout - value: 700 - - action: promote - attrs: - - name: timeout - value: 3600 - - action: demote - attrs: - - name: timeout - value: 3600 +- name: "{{ __tname }} Add resource: SAP HANA DB" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_hana ] }}" + vars: + __resource_hana: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" + instance_attrs: + - attrs: + - name: SID + value: "{{ sap_ha_cluster_hana_sid }}" + - name: InstanceNumber + value: "{{ sap_ha_cluster_hana_instance_number }}" + - name: PREFER_SITE_TAKEOVER + value: true + - name: DUPLICATE_PRIMARY_TIMEOUT + value: 900 + - name: AUTOMATED_REGISTER + value: true + operations: + - action: start + attrs: + - name: timeout + value: 3600 + - action: stop + attrs: + - name: timeout + value: 3600 + - action: monitor + attrs: + - name: interval + value: 121 + - name: role + value: Slave + - name: timeout + value: 700 + - action: monitor + attrs: + - name: interval + value: 119 + - name: role + value: Master + - name: timeout + value: 700 + - action: promote + attrs: + - name: timeout + value: 3600 + - action: demote + attrs: + - name: timeout + value: 3600 - # Resource: HANA VIP - - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - agent: "ocf:heartbeat:IPaddr2" - instance_attrs: - - attrs: - - name: ip - value: "{{ sap_ha_cluster_hana_instance_vip }}" +- name: "{{ __tname }} Add resource: SAP HANA VIP" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_vip ] }}" + vars: + __resource_vip: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" + agent: "ocf:heartbeat:IPaddr2" + instance_attrs: + - attrs: + - name: ip + value: "{{ sap_ha_cluster_hana_instance_vip }}" - # Resource CLONE configuration - sap_ha_cluster_resource_clones: +- name: "{{ __tname }} Add resource clone: SAP HANA Topology" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_topology ] }}" + vars: + __clone_topology: + resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + promotable: no + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" - # Clone of SAPHanaTopology - - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - promotable: no - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" - # Clone of SAPHana - - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - promotable: yes - meta_attrs: - - attrs: - - name: clone-max - value: 2 - - name: clone-node-max - value: 1 - - name: interleave - value: "true" +- name: "{{ __tname }} Add resource clone: SAP HANA DB" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_hana ] }}" + vars: + __clone_hana: + resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + promotable: yes + meta_attrs: + - attrs: + - name: clone-max + value: 2 + - name: clone-node-max + value: 1 + - name: interleave + value: "true" - # ORDER constraints - sap_ha_cluster_constraints_order: - # First start Topology, then HANA (automatically stops in reverse order) - - resource_first: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - action: start - resource_then: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - action: start - options: - - name: symmetrical - value: "false" +# First start Topology, then HANA (automatically stops in reverse order) +- name: "{{ __tname }} Add order constraint: Topology before HANA" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_topology ] }}" + vars: + __constraint_order_topology: + resource_first: + id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + action: start + resource_then: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + action: start + options: + - name: symmetrical + value: "false" - # Start the VIP only after the HANA resource has been promoted - - resource_first: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - action: promote - resource_then: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - action: start +# Start the VIP only after the HANA resource has been promoted +- name: "{{ __tname }} Add order constraint: VIP after HANA promoted" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_vip ] }}" + vars: + __constraint_order_vip: + resource_first: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + action: promote + resource_then: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" + action: start - # COLOCATION constaints - sap_ha_cluster_constraints_colocation: - # The VIP runs where HANA is promoted - - resource_leader: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - role: promoted - resource_follower: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - options: - - name: score - value: 2000 +# The VIP only runs where HANA is promoted +- name: "{{ __tname }} Add colocation constraint: VIP runs where HANA promoted" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [ __constraint_colo_vip ] }}" + vars: + __constraint_colo_vip: + resource_leader: + id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + role: promoted + resource_follower: + id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 1c59b1c2d..d89c81431 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -4,12 +4,27 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -- name: "{{ __tname }} Construct stonith resources definition " +- name: "{{ __tname }} Set add to cluster properties: stonith-enabled" ansible.builtin.set_fact: - # STONITH resource definition - # This will be added to the cluster resources list + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_enabled }] }}" + vars: + __stonith_enabled: + - name: stonith-enabled + value: true -# workaround / placeholder until modular fencing resource logic -# has been invented - sap_ha_cluster_stonith_resource_primitives: "{{ sap_ha_cluster_stonith_resources }}" # from groupvars - no_log: true +- name: "{{ __tname }} Set add to cluster properties: concurrent-fencing" + ansible.builtin.set_fact: + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __concurrent_fencing }] }}" + vars: + __concurrent_fencing: + - name: concurrent-fencing + value: true + + +# The STONITH resource is an element in the cluster_resource_primitives list +- name: "{{ __tname }} Construct stonith resources definition" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + __stonith_resources }}" + vars: + __stonith_resources: "{{ sap_ha_cluster_stonith_resources }}" # defined in group_vars + no_log: true # stonith resources usually contain secrets diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 8b4b4a5e3..9327a29d4 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -1,7 +1,7 @@ --- # TODO: Build all resource/constraint configuration variables based on # simpler user input. -# - Make resources configuration modular, allowing additional VIPs for instance +# - Make resources configuration modular, allowing additional VIPs, for example # 1. This role's arguments are validated through meta/arguments_spec.yml # 2. Detect SAP solution to be configured (scale-up, scale-out, etc.) @@ -14,10 +14,11 @@ # TODO: make sure to first respect 'ha_cluster' native variables -# Determine which SAP landscape we are going to configure in the cluster +# Determine which SAP landscape we are going to configure in the cluster. # This is needed to include the landscape specific parameter values. # The result will be parameters: -# - sap_ha_cluster_sap_type (values: scaleup, scaleout +# - sap_ha_cluster_sap_type (values: scaleup, scaleout) +# - sap_ha_cluster_replication_type (values: mtr, ?) - name: "{{ __tname }} Include tasks for SAP landscape calculation" ansible.builtin.include_tasks: file: ascertain_sap_landscape.yml @@ -30,9 +31,8 @@ ansible.builtin.include_tasks: file: ascertain_platform_type.yml apply: - tags: check_cloud - tags: check_cloud - + tags: check_platform + tags: check_platform # copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml - name: "{{ __tname }} Set platform/version specific variables" @@ -68,11 +68,21 @@ file: construct_vars_hana_scaleup.yml when: sap_ha_cluster_sap_type == 'scaleup' +#- debug: +# var: item.id +# loop: "{{ __sap_ha_cluster_resource_primitives }}" + +- name: "Fail here for now..." + ansible.builtin.fail: + - name: "{{ __tname }} Include variable construction for SAP HANA Scale-out" ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' +#- debug: +# var: ha_cluster_cluster_name + - name: "Fail here for now..." ansible.builtin.fail: @@ -104,23 +114,33 @@ - sap_ha_cluster_constraints_order is defined - sap_ha_cluster_constraints_colocation is defined - sap_ha_cluster_repos is defined - tags: always +# tags: always + + +# TODO: combine various definitions into one parameter for role include input +# For example, multiple resource primitives are defined in different places for +# different purpose. The result shall be a complete list of all the constructed +# resources. + #- fail: # include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) - name: "{{ __tname }} Include System Role 'ha_cluster'" - ansible.builtin.import_role: +# ansible.builtin.import_role: +# name: linux-system-roles.ha_cluster + ansible.builtin.include_role: name: linux-system-roles.ha_cluster + vars: - ha_cluster_cluster_name: "{{ sap_ha_cluster_cluster_name }}" - ha_cluster_hacluster_password: "{{ sap_ha_cluster_hacluster_password }}" - ha_cluster_cluster_properties: "{{ sap_ha_cluster_cluster_properties }}" - __ha_cluster_repos: "{{ sap_ha_cluster_repos }}" - ha_cluster_properties: "{{ sap_ha_cluster_cluster_properties }}" - ha_cluster_extra_packages: "{{ sap_ha_cluster_extra_packages }}" - ha_cluster_resource_primitives: "{{ sap_ha_cluster_resource_primitives + sap_ha_cluster_stonith_resource_primitives }}" - ha_cluster_resource_clones: "{{ sap_ha_cluster_resource_clones }}" + ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" + ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" + ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" + ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" + ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" + ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" ha_cluster_constraints_order: "{{ sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ sap_ha_cluster_constraints_colocation }}" ha_cluster_fence_agent_packages: "{{ sap_ha_cluster_fence_agent_packages }}" From 694dbe57b45945a8b5049ed5f58a80c83c5d016c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 15 Sep 2022 18:16:31 +0100 Subject: [PATCH 139/375] sap_install_media_detect: mass updates after test runs --- .../tasks/detect_export_sapbw4hana.yml | 26 +++++ .../tasks/detect_export_sapecc.yml | 79 +++++++++++++--- .../tasks/detect_export_saps4hana.yml | 16 +++- .../tasks/detect_sapanydb_ibmdb2.yml | 58 ++++++++---- .../tasks/detect_sapanydb_oracledb.yml | 50 +++++++--- .../tasks/detect_sapanydb_sapase.yml | 94 +++++++++++++------ .../tasks/detect_sapanydb_sapmaxdb.yml | 58 ++++++++---- .../tasks/detect_sapcar.yml | 2 +- .../tasks/set_global_vars.yml | 16 ++-- 9 files changed, 294 insertions(+), 105 deletions(-) create mode 100644 roles/sap_install_media_detect/tasks/detect_export_sapbw4hana.yml diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapbw4hana.yml b/roles/sap_install_media_detect/tasks/detect_export_sapbw4hana.yml new file mode 100644 index 000000000..abb0ccdb3 --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_export_sapbw4hana.yml @@ -0,0 +1,26 @@ +--- + +- name: SAP Install Media Detect - SAP BW/4HANA EXPORT - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sap_install_media_detect_directory }}/sapbw4hana_export/" + +- name: SAP Install Media Detect - SAP BW/4HANA EXPORT - Identify SAP BW/4HANA EXPORT files + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}" + recurse: yes + file_type: file + patterns: '.*BW4.*EXPORT.*' + use_regex: yes + register: bw4hana_export_files + +- name: SAP Install Media Detect - SAP BW/4HANA EXPORT - Local Directory source - move SAP BW/4HANA EXPORT files + command: mv "{{ item.path }}" "{{ sap_install_media_detect_directory }}/sapbw4hana_export/{{ item.path | basename }}" + with_items: "{{ bw4hana_export_files.files }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml index 82dc77c4f..2de4d961b 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -1,12 +1,23 @@ --- -- name: List files in directory +- name: SAP Install Media Detect - SAP ECC EXPORT - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sap_install_media_detect_directory }}/sapecc_export/" + - "{{ sap_install_media_detect_directory }}/sapecc_export_extracted/" + +- name: SAP Install Media Detect - SAP ECC EXPORT - List files in directory ansible.builtin.shell: ls -1 register: detect_directory_files args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Detect ZIP files (including no file extensions), ignore errors +- name: SAP Install Media Detect - SAP ECC EXPORT - Detect ZIP files (including no file extensions), ignore errors ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi register: detect_directory_files_zip # changed_when: "item.stdout | length > 0" @@ -16,7 +27,7 @@ chdir: "{{ sap_install_media_detect_directory }}" ignore_errors: true -- name: Detect RAR files (including no file extensions), ignore errors +- name: SAP Install Media Detect - SAP ECC EXPORT - Detect RAR files (including no file extensions), ignore errors ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi register: detect_directory_files_rar # changed_when: "item.stdout | length > 0" @@ -26,7 +37,7 @@ chdir: "{{ sap_install_media_detect_directory }}" ignore_errors: true -- name: Identify SAP ECC EXPORT files +- name: SAP Install Media Detect - SAP ECC EXPORT - Identify SAP ECC EXPORT files ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if ../unrar lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi @@ -38,38 +49,84 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: If any ZIP, then extract the SAP ECC Installation Export file (unzip) +- name: SAP Install Media Detect - SAP ECC EXPORT - If any ZIP, then extract the SAP ECC Installation Export file (unzip) ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./sapecc_export_extracted ; fi with_items: - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: If any RAR without file extension, then add file extension (for use with unrar binary) +- name: SAP Install Media Detect - SAP ECC EXPORT - If any RAR without file extension, then add file extension (for use with unrar binary) ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi with_items: - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Find self-extracting RAR EXE (parent RAR file) and extract SAP ECC Installation Export files (unrar x) +- name: SAP Install Media Detect - SAP ECC EXPORT - Find self-extracting RAR EXE (parent RAR file) and extract SAP ECC Installation Export files (unrar x) ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR self-extracting archive')" ]; then "{{ sap_install_media_detect_unrar_binary }}" x "{{ item }}" sapecc_export_extracted/ ; fi with_items: - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Identify SAP ECC Export extracted - find: +- name: SAP Install Media Detect - SAP ECC EXPORT - Identify SAP ECC Export extracted + ansible.builtin.find: paths: "{{ sap_install_media_detect_directory }}/sapecc_export_extracted" recurse: yes file_type: directory contains: "DATA_UNITS" register: detect_directory_export_extracted -- name: Local Directory source - move SAP ECC EXPORT compressed archive files +- name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-list files in directory + ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-identify SAP ECC EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if ../unrar lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_ecc_export_repeated + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip_repeated.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar_repeated.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - move SAP ECC EXPORT compressed archive files command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapecc_export/{{ item }}" with_items: - - "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_ecc_export_repeated.results | map(attribute='stdout') | select() }}" when: - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml index 45eacc592..50dbc007a 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_saps4hana.yml @@ -1,6 +1,16 @@ --- -- name: Identify SAP S/4HANA EXPORT files +- name: SAP Install Media Detect - SAP S/4HANA EXPORT - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sap_install_media_detect_directory }}/saps4hana_export/" + +- name: SAP Install Media Detect - SAP S/4HANA EXPORT - Identify SAP S/4HANA EXPORT files ansible.builtin.find: paths: "{{ sap_install_media_detect_directory }}" recurse: yes @@ -9,8 +19,8 @@ use_regex: yes register: s4hana_export_files -- name: Local Directory source - move SAP S/4HANA EXPORT files - command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/saps4hana_export/{{ item }}" +- name: SAP Install Media Detect - SAP S/4HANA EXPORT - Local Directory source - move SAP S/4HANA EXPORT files + command: mv "{{ item.path }}" "{{ sap_install_media_detect_directory }}/saps4hana_export/{{ item.path | basename }}" with_items: "{{ s4hana_export_files.files }}" when: - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml index 4ad59ad55..9d7bba958 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_ibmdb2.yml @@ -1,10 +1,5 @@ --- -- name: SAP Install Media Detect - IBM Db2 - Set fact for install media directory - set_fact: - ibmdb2_install_directory: "{{ sap_install_media_detect_directory }}/ibmdb2" - ibmdb2_client_install_directory: "{{ sap_install_media_detect_directory }}/ibmdb2_client" - - name: SAP Install Media Detect - IBM Db2 - Create Directories ansible.builtin.file: path: "{{ item }}" @@ -13,16 +8,18 @@ owner: root group: root with_items: - - "{{ ibmdb2_install_directory }}" - - "{{ ibmdb2_client_install_directory }}" + - "{{ sap_install_media_detect_directory }}/ibmdb2/" + - "{{ sap_install_media_detect_directory }}/ibmdb2_extracted/" + - "{{ sap_install_media_detect_directory }}/ibmdb2_client_extracted/" + - "{{ sap_install_media_detect_directory }}/ibmdb2_license_extracted/" -- name: List files in directory +- name: SAP Install Media Detect - IBM Db2 - List files in directory ansible.builtin.shell: ls -1 register: detect_directory_files args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Detect ZIP files (including no file extensions), ignore errors +- name: SAP Install Media Detect - IBM Db2 - Detect ZIP files (including no file extensions), ignore errors ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi register: detect_directory_files_zip # changed_when: "item.stdout | length > 0" @@ -32,7 +29,7 @@ chdir: "{{ sap_install_media_detect_directory }}" ignore_errors: true -- name: Identify IBM Db2 installation media +- name: SAP Install Media Detect - IBM Db2 - Identify IBM Db2 installation media ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db2setup' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_ibmdb2 @@ -42,7 +39,7 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Identify IBM Db2 Client installation media +- name: SAP Install Media Detect - IBM Db2 - Identify IBM Db2 Client installation media ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db6_update_client.sh' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_ibmdb2_client @@ -52,7 +49,7 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Identify IBM Db2 OEM license file +- name: SAP Install Media Detect - IBM Db2 - Identify IBM Db2 OEM license file ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'db2aese_c.lic' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_ibmdb2_license @@ -62,23 +59,48 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of IBM DB2 installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi +- name: SAP Install Media Detect - IBM Db2 - Extract ZIP files of IBM DB2 installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/ibmdb2_extracted/{{ item }}_extracted; fi with_items: - "{{ detect_directory_files_ibmdb2.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of IBM DB2 Client installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi +- name: SAP Install Media Detect - IBM Db2 - Extract ZIP files of IBM DB2 Client installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/ibmdb2_client_extracted/{{ item }}_extracted; fi with_items: - "{{ detect_directory_files_ibmdb2_client.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of IBM DB2 OEM license file - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ ibmdb2_install_directory }}/{{ item }}_extracted; fi +- name: SAP Install Media Detect - IBM Db2 - Extract ZIP files of IBM DB2 OEM license file + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/ibmdb2_license_extracted/{{ item }}_extracted; fi with_items: - "{{ detect_directory_files_ibmdb2_license.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - IBM Db2 - Identify IBM Db2 extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/ibmdb2_extracted" + recurse: yes + file_type: directory + contains: "LINUXX86_64" + register: detect_directory_ibmdb2_extracted + +- name: SAP Install Media Detect - IBM Db2 - Identify IBM Db2 Client extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/ibmdb2_client_extracted" + recurse: yes + file_type: directory + contains: "DATA_UNITS" + register: detect_directory_ibmdb2_client_extracted + +- name: SAP Install Media Detect - IBM Db2 - Local Directory source - move IBM Db2 compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/ibmdb2/{{ item }}" + with_items: + - "{{ detect_directory_files_ibmdb2.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_ibmdb2_client.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_ibmdb2_license.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml index efe515118..5a49a08a0 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_oracledb.yml @@ -1,10 +1,5 @@ --- -- name: SAP Install Media Detect - Oracle DB - Set fact for install media directory - set_fact: - oracledb_install_directory: "{{ sap_install_media_detect_directory }}/oracledb" - oracledb_client_install_directory: "{{ sap_install_media_detect_directory }}/oracledb_client" - - name: SAP Install Media Detect - Oracle DB - Create Directories ansible.builtin.file: path: "{{ item }}" @@ -13,16 +8,17 @@ owner: root group: root with_items: - - "{{ oracledb_install_directory }}" - - "{{ oracledb_client_install_directory }}" + - "{{ sap_install_media_detect_directory }}/oracledb/" + - "{{ sap_install_media_detect_directory }}/oracledb_extracted/" + - "{{ sap_install_media_detect_directory }}/oracledb_client_extracted/" -- name: List files in directory +- name: SAP Install Media Detect - Oracle DB - List files in directory ansible.builtin.shell: ls -1 register: detect_directory_files args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Detect ZIP files (including no file extensions), ignore errors +- name: SAP Install Media Detect - Oracle DB - Detect ZIP files (including no file extensions), ignore errors ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi register: detect_directory_files_zip # changed_when: "item.stdout | length > 0" @@ -32,7 +28,7 @@ chdir: "{{ sap_install_media_detect_directory }}" ignore_errors: true -- name: Identify Oracle DB installation media +- name: SAP Install Media Detect - Oracle DB - Identify Oracle DB installation media ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q '19cinstall.sh' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_oracledb @@ -42,7 +38,7 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Identify Oracle DB Client installation media +- name: SAP Install Media Detect - Oracle DB - Identify Oracle DB Client installation media ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'OCL_LINUX_X86_64' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_oracledb_client @@ -52,16 +48,40 @@ args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of Oracle DB installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ oracledb_install_directory }}/{{ item }}_extracted; fi +- name: SAP Install Media Detect - Oracle DB - Extract ZIP files of Oracle DB installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/oracledb_extracted/{{ item }}_extracted; fi with_items: - "{{ detect_directory_files_oracledb.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of Oracle DB Client installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ oracledb_install_directory }}/{{ item }}_extracted; fi +- name: SAP Install Media Detect - Oracle DB - Extract ZIP files of Oracle DB Client installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/oracledb_client_extracted/{{ item }}_extracted; fi with_items: - "{{ detect_directory_files_oracledb_client.results | map(attribute='stdout') | select() }}" args: chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - Oracle DB - Identify Oracle DB extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/oracledb_extracted" + recurse: yes + file_type: directory + contains: "LINUX_X86_64" + register: detect_directory_oracledb_extracted + +- name: SAP Install Media Detect - Oracle DB - Identify Oracle DB Client extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/oracledb_client_extracted" + recurse: yes + file_type: directory + contains: "OCL_LINUX_X86_64" + register: detect_directory_oracledb_client_extracted + +- name: SAP Install Media Detect - Oracle DB - Local Directory source - move Oracle DB compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/oracledb/{{ item }}" + with_items: + - "{{ detect_directory_files_oracledb.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_oracledb_client.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml index 0ab2ae946..dca35f20c 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -1,10 +1,5 @@ --- -- name: SAP Install Media Detect - SAP ASE - Set fact for install media directory - set_fact: - sapase_install_directory: "{{ sap_install_media_detect_directory }}/sapase" - sapase_client_install_directory: "{{ sap_install_media_detect_directory }}/sapase_client" - - name: SAP Install Media Detect - SAP ASE - Create Directories ansible.builtin.file: path: "{{ item }}" @@ -13,46 +8,83 @@ owner: root group: root with_items: - - "{{ sapase_install_directory }}" - - "{{ sapase_client_install_directory }}" - + - "{{ sap_install_media_detect_directory }}/sapase/" + - "{{ sap_install_media_detect_directory }}/sapase_extracted/" + - "{{ sap_install_media_detect_directory }}/sapase_client_extracted/" -- name: List files in directory of SAP ASE 16.0 installation media +- name: SAP Install Media Detect - SAP ASE - List files in directory ansible.builtin.shell: ls -1 + register: detect_directory_files args: - chdir: "{{ sapase_install_directory }}" - register: sapase_install_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract ZIP files of SAP ASE 16.0 installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: SAP Install Media Detect - SAP ASE - Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" args: - chdir: "{{ sapase_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP ASE - Identify SAP ASE installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'BD_SYBASE_ASE' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_sapase + changed_when: "item | length > 0" with_items: - - "{{ sapase_install_files.stdout_lines }}" + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" -- name: List files in directory of SAP ASE 16.0 Client - ansible.builtin.shell: ls -1 +- name: SAP Install Media Detect - SAP ASE - Identify SAP ASE Client installation media + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}" + recurse: yes + file_type: file + patterns: '.*ASEBC.*' + use_regex: yes + register: detect_directory_files_sapase_client + +- name: SAP Install Media Detect - SAP ASE - Extract ZIP files of SAP ASE installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/sapase_extracted/{{ item }}_extracted; fi + with_items: + - "{{ detect_directory_files_sapase.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ sapase_client_install_directory }}" - register: sapase_client_files + chdir: "{{ sap_install_media_detect_directory }}" -- name: Extract SAP ASE 16.0 Client with SAPCAR +- name: SAP Install Media Detect - SAP ASE - Extract SAP ASE 16.0 Client with SAPCAR ansible.builtin.shell: | - chmod +x {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} - {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} \ + chmod +x {{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name }} + {{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name }} \ -xvf {{ item }} \ - -manifest SIGNATURE.SMF - register: sap_swpm_extractswpm + -manifest SIGNATURE.SMF \ + -R "{{ sap_install_media_detect_directory }}/sapase_extracted" args: - chdir: "{{ sapase_client_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" with_items: - - "{{ sapase_client_files.stdout_lines }}" + - "{{ detect_directory_files_sapase_client.files[0].path }}" -- name: Identify SAP ASE unpack path +- name: SAP Install Media Detect - SAP ASE - Identify SAP ASE extracted ansible.builtin.find: - paths: "{{ sapase_install_directory }}" + paths: "{{ sap_install_media_detect_directory }}/sapase_extracted" recurse: yes file_type: directory - patterns: '.*BD_SYBASE_ASE_16.*' - use_regex: yes - register: sapase_find_dir + contains: "BD_SYBASE_ASE" + register: detect_directory_sapase_extracted + +- name: SAP Install Media Detect - SAP ASE - Identify SAP ASE Client extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/sapase_client_extracted" + recurse: yes + file_type: directory + contains: "sybodbc" + register: detect_directory_sapase_client_extracted + +- name: SAP Install Media Detect - SAP ASE - Local Directory source - move SAP ASE compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapase/{{ item }}" + with_items: + - "{{ detect_directory_files_sapase.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml index 1ec560869..4de384d32 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml @@ -1,9 +1,5 @@ --- -- name: SAP Install Media Detect - SAP MaxDB - Set fact for install media directory - set_fact: - sapmaxdb_install_directory: "{{ sap_install_media_detect_directory }}/sapmaxdb" - - name: SAP Install Media Detect - SAP MaxDB - Create Directories ansible.builtin.file: path: "{{ item }}" @@ -12,27 +8,53 @@ owner: root group: root with_items: - - "{{ sapmaxdb_install_directory }}" - + - "{{ sap_install_media_detect_directory }}/sapmaxdb/" + - "{{ sap_install_media_detect_directory }}/sapmaxdb_extracted/" -- name: List files in directory of SAP MaxDB installation media +- name: SAP Install Media Detect - SAP MaxDB - List files in directory ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP MaxDB - Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" args: - chdir: "{{ sapmaxdb_install_directory }}" - register: sapmaxdb_install_files + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true -- name: Extract ZIP files of SAP MaxDB installation media - ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./{{ item }}_extracted; fi +- name: SAP Install Media Detect - SAP MaxDB - Identify SAP MaxDB installation media + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'MaxDB_7.9' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_sapmaxdb + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" args: - chdir: "{{ sapmaxdb_install_directory }}" + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP MaxDB - Extract ZIP files of SAP MaxDB installation media + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d {{ sap_install_media_detect_directory }}/sapmaxdb_extracted/{{ item }}_extracted; fi with_items: - - "{{ sapmaxdb_install_files.stdout_lines }}" + - "{{ detect_directory_files_sapmaxdb.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" -- name: Identify SAP MaxDB unpack path +- name: SAP Install Media Detect - SAP MaxDB - Identify SAP MaxDB extracted ansible.builtin.find: - paths: "{{ sapmaxdb_install_directory }}" + paths: "{{ sap_install_media_detect_directory }}/sapmaxdb_extracted/" recurse: yes file_type: directory - patterns: '.*MaxDB_7.9.*' - use_regex: yes - register: sapmaxdb_find_dir + contains: "MaxDB_7.9" + register: detect_directory_sapmaxdb_extracted + +- name: SAP Install Media Detect - SAP MaxDB - Local Directory source - move SAP MaxDB compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapmaxdb/{{ item }}" + with_items: + - "{{ detect_directory_files_sapmaxdb.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_sapcar.yml b/roles/sap_install_media_detect/tasks/detect_sapcar.yml index 4c48c1eb3..daa219629 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapcar.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapcar.yml @@ -13,7 +13,7 @@ - name: SAP Install Media Detect - SAPCAR - Change ownership of SAPCAR ansible.builtin.file: - path: "{{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name_get.stdout }}" + path: "{{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name }}" state: file mode: '0755' owner: root diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index 16f8ecc8f..cdf6d870e 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -11,31 +11,31 @@ - name: SAP Install Media Detection Completed - set facts for IBM Db2 ansible.builtin.set_fact: - sap_swpm_cd_ibmdb2_path: "{{ ibmdb2_install_directory }}/{{ softwarecenter_search_list_ecc_ibmdb2[0] }}_extracted" # for sap_swpm Ansible Role - sap_swpm_cd_ibmdb2_client_path: "{{ ibmdb2_client_install_directory }}/{{ softwarecenter_search_list_ecc_ibmdb2_client[0] }}_extracted" # for sap_swpm Ansible Role + sap_swpm_cd_ibmdb2_path: "{{ detect_directory_ibmdb2_extracted.files[0].path }}" # for sap_swpm Ansible Role # for sap_swpm Ansible Role + sap_swpm_cd_ibmdb2_client_path: "{{ detect_directory_ibmdb2_client_extracted.files[0].path }}" # for sap_swpm Ansible Role # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_db == "ibmdb2" - name: SAP Install Media Detection Completed - set facts for Oracle DB ansible.builtin.set_fact: - sap_swpm_cd_oracle_path: "{{ oracledb_install_directory }}/{{ softwarecenter_search_list_ecc_oracledb[0] }}_extracted" # for sap_swpm Ansible Role - sap_swpm_cd_oracle_client_path: "{{ oracledb_client_find_dir.files[0].path }}" # for sap_swpm Ansible Role + sap_swpm_cd_oracle_path: "{{ detect_directory_oracledb_extracted.files[0].path }}" # for sap_swpm Ansible Role + sap_swpm_cd_oracle_client_path: "{{ detect_directory_oracledb_client_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_db == "oracledb" - name: SAP Install Media Detection Completed - set facts for SAP ASE ansible.builtin.set_fact: - sap_swpm_cd_sapase_path: "{{ sapase_find_dir.files[0].path }}" # for sap_swpm Ansible Role - sap_swpm_cd_sapase_client_path: "{{ sapase_client_install_directory }}/{{ softwarecenter_search_list_ecc_sapase_client[0] }}" # for sap_swpm Ansible Role + sap_swpm_cd_sapase_path: "{{ detect_directory_sapase_extracted.files[0].path }}" # for sap_swpm Ansible Role + sap_swpm_cd_sapase_client_path: "{{ detect_directory_sapase_client_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_db == "sapase" - name: SAP Install Media Detection Completed - set facts for SAP MaxDB ansible.builtin.set_fact: - sap_swpm_cd_sapmaxdb_path: "{{ sapmaxdb_find_dir.files[0].path }}" # for sap_swpm Ansible Role + sap_swpm_cd_sapmaxdb_path: "{{ detect_directory_sapmaxdb_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_db == "sapmaxdb" @@ -49,7 +49,7 @@ - name: SAP Install Media Detection Completed - set facts for Export of SAP S/4HANA ansible.builtin.set_fact: - sap_swpm_cd_export_path: "{{ sap_swpm_s4hana_export_path }}/{{ softwarecenter_search_list_s4hana_export[0] | regex_replace('_.*', '') }}" # for sap_swpm Ansible Role + sap_swpm_cd_export_path: "{{ s4hana_export_files.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_export == "s4hana" From e803682c627facfc869406800b0e1b58116166ca Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 16 Sep 2022 09:07:42 +0000 Subject: [PATCH 140/375] sap_ha_cluster: integrated stonith-timeout into property update construction and separated parameter assertation tasks --- .../tasks/construct_vars_stonith.yml | 12 ++- roles/sap_ha_cluster/tasks/main.yml | 101 ++++++------------ 2 files changed, 44 insertions(+), 69 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index d89c81431..747892c2b 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -4,7 +4,7 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -- name: "{{ __tname }} Set add to cluster properties: stonith-enabled" +- name: "{{ __tname }} Add to cluster properties: stonith-enabled" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_enabled }] }}" vars: @@ -12,7 +12,15 @@ - name: stonith-enabled value: true -- name: "{{ __tname }} Set add to cluster properties: concurrent-fencing" +- name: "{{ __tname }} Add to cluster properties: stonith-timeout" + ansible.builtin.set_fact: + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_timeout }] }}" + vars: + __stonith_timeout: + - name: stonith-timeout + value: 900 + +- name: "{{ __tname }} Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __concurrent_fencing }] }}" vars: diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 9327a29d4..afe0c1a8d 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -14,6 +14,17 @@ # TODO: make sure to first respect 'ha_cluster' native variables + +# The SAP ID must follow a strict format and not use reserved special values +# TODO: This check may be better placed in a SAP role earlier in the chain... +- name: "{{ __tname }} Validate SAP System ID" + ansible.builtin.assert: + that: + - sap_ha_cluster_hana_sid is defined + - sap_ha_cluster_hana_sid|length == 3 + - sap_ha_cluster_hana_sid not in __sap_sid_prohibited + tags: always + # Determine which SAP landscape we are going to configure in the cluster. # This is needed to include the landscape specific parameter values. # The result will be parameters: @@ -68,62 +79,37 @@ file: construct_vars_hana_scaleup.yml when: sap_ha_cluster_sap_type == 'scaleup' -#- debug: -# var: item.id -# loop: "{{ __sap_ha_cluster_resource_primitives }}" - -- name: "Fail here for now..." - ansible.builtin.fail: - - name: "{{ __tname }} Include variable construction for SAP HANA Scale-out" ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' -#- debug: -# var: ha_cluster_cluster_name - -- name: "Fail here for now..." - ansible.builtin.fail: - -#- name: "fail 1" -# fail: -# ignore_errors: "{{ ansible_check_mode }}" - -#- debug: -# msg: "{{ hostvars[node]. -# vars: -# blahvar: "{{ sap_ha_cluster_ha_cluster }}" - -# verify input variables - if argument specifications are not strict enough -# make this smarter, maybe in better include files -# -# safeguard: check if a cluster exists and save config first -# -- name: "{{ __tname }} Verify that cluster variables are defined" - ansible.builtin.assert: - that: - # The SAP ID must follow a strict format and not use reserved special values - - sap_ha_cluster_hana_sid is defined - - sap_ha_cluster_hana_sid|length == 3 - - sap_ha_cluster_hana_sid not in __sap_sid_prohibited - - sap_ha_cluster_cluster_properties is defined - - sap_ha_cluster_extra_packages is defined - - sap_ha_cluster_resource_primitives is defined - - sap_ha_cluster_resource_clones is defined - - sap_ha_cluster_constraints_order is defined - - sap_ha_cluster_constraints_colocation is defined - - sap_ha_cluster_repos is defined -# tags: always - - # TODO: combine various definitions into one parameter for role include input # For example, multiple resource primitives are defined in different places for # different purpose. The result shall be a complete list of all the constructed # resources. -#- fail: +# Before we are ready to call the ha_cluster role, we want to validate +# that the minimum required parameters are defined and not empty. +- name: "{{ __tname }} Validate parameters for 'ha_cluster' role input" + ansible.builtin.assert: + that: + - __sap_ha_cluster_cluster_properties is defined + - __sap_ha_cluster_extra_packages is defined + - __sap_ha_cluster_resource_primitives is defined + - __sap_ha_cluster_resource_clones is defined + - __sap_ha_cluster_constraints_order is defined + - __sap_ha_cluster_constraints_colocation is defined +# - blahtest is defined + fail_msg: "Cluster build parameter construction has failed for this parameter." + +#### for debugging +- name: "Fail here for now..." + ansible.builtin.fail: + +### Up to here there has been NO changes, only environment validations and +### parameter constructions! # include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) - name: "{{ __tname }} Include System Role 'ha_cluster'" @@ -131,7 +117,8 @@ # name: linux-system-roles.ha_cluster ansible.builtin.include_role: name: linux-system-roles.ha_cluster - + apply: + tags: ha_cluster vars: ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" @@ -144,30 +131,10 @@ ha_cluster_constraints_order: "{{ sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ sap_ha_cluster_constraints_colocation }}" ha_cluster_fence_agent_packages: "{{ sap_ha_cluster_fence_agent_packages }}" - tags: - - ha_cluster + tags: ha_cluster #### from old ha role -- name: "{{ __tname }} Get current properties" - ansible.builtin.shell: | - pcs property list - register: __sap_ha_cluster_pcs_properties - changed_when: false - failed_when: false - -- name: "{{ __tname }} Allow concurrent fence actions" - ansible.builtin.shell: | - pcs property set concurrent-fencing=true - when: - - "'concurrent-fencing: true' not in __sap_ha_cluster_pcs_properties.stdout" - -- name: "{{ __tname }} Update STONITH timeout" - ansible.builtin.shell: | - pcs property set stonith-timeout=900 - when: - - '"stonith-timeout: 900" not in __sap_ha_cluster_pcs_properties.stdout' - - name: "{{ __tname }} Update resource default values" ansible.builtin.shell: | pcs resource defaults update resource-stickiness=1000 From 0a9915b340a9c037400f5206793a44839b49e803 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 16 Sep 2022 14:44:46 +0200 Subject: [PATCH 141/375] sap_hana_install: Solve issue #205 Uses the 'selinux' Linux System Role --- ...p_general_preconfigure-test-idempotency.py | 121 ++++++++++++++++++ roles/sap_hana_install/defaults/main.yml | 5 + roles/sap_hana_install/requirements.yml | 5 + roles/sap_hana_install/tasks/post_install.yml | 10 ++ roles/sap_hana_install/tasks/pre_install.yml | 10 ++ 5 files changed, 151 insertions(+) create mode 100755 roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py create mode 100644 roles/sap_hana_install/requirements.yml diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py new file mode 100755 index 000000000..7fcb09ccb --- /dev/null +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python + +""" +Tests for role sap_general_preconfigure +""" + +import os +import sys +import subprocess + +# output field delimiter for displaying the results: +# FIELD_DELIMITER = ';' +FIELD_DELIMITER = '\t' + +if len(sys.argv) == 1: + _managed_node = input("Provide name of managed node: ") +else: + _managed_node = sys.argv[1] + +print('Running tests for role sap_general_preconfigure...\n') +print('Managed node: ' + _managed_node) + +_mn_rhel_release = subprocess.getoutput( + "ssh root@" + + _managed_node + + " cat /etc/redhat-release | \ + awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") +print('Managed node Red Hat release: ' + _mn_rhel_release) +_mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") +print('Managed node HW architecture: ' + _mn_hw_arch) + +__tests = [ + { + 'number': '1', + 'name': 'Run in normal mode on new system, allow reboot.', + 'command_line_parameter': '', + 'ignore_error_final': False, + 'compact_assert_output': False, + 'rc': '99', + 'role_vars': [ + { + 'sap_general_preconfigure_fail_if_reboot_required': False + 'sap_general_preconfigure_reboot_ok': True + } + ] + }, + { + 'number': '2', + 'name': 'Run in normal mode on new system the second time, allow reboot.', + 'command_line_parameter': '', + 'ignore_error_final': False, + 'compact_assert_output': False, + 'rc': '99', + 'role_vars': [ + { + 'sap_general_preconfigure_fail_if_reboot_required': False + 'sap_general_preconfigure_reboot_ok': True + } + ] + }, +] + +for par1 in __tests: + print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) + command = ( + 'ansible-playbook sap_general_preconfigure-default-settings.yml ' + + par1['command_line_parameter'] + + '-l ' + + _managed_node + + ' ' + + '-e "' + ) + for par2 in par1['role_vars']: + command += str(par2) + command += '"' + if par1['compact_assert_output']: + command += ' | ../tools/beautify-assert-output.sh' + print("command: " + command) + _py_rc = os.system(command) + par1['rc'] = str(int(_py_rc / 256)) + if _py_rc != 0: + if par1['ignore_error_final']: + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '. Continuing with the next test') + else: + print('Test ' + + par1['number'] + + ' finished with return code ' + + par1['rc'] + '.') + sys.exit(_py_rc) + else: + print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') + +print('\nResults for role sap_general_preconfigure: ' + + _managed_node + + ' - RHEL ' + + _mn_rhel_release + + ' - ' + + _mn_hw_arch + ':') + +print('\n#' + + FIELD_DELIMITER + + 'RC' + FIELD_DELIMITER + + 'name' + FIELD_DELIMITER + + 'argument' + FIELD_DELIMITER + + 'compact' + FIELD_DELIMITER + + 'role_vars') + +for par1 in __tests: + print(par1['number'] + FIELD_DELIMITER + + par1['rc'] + FIELD_DELIMITER + + par1['name'] + FIELD_DELIMITER + + par1['command_line_parameter'] + FIELD_DELIMITER + + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') + if len(par1['role_vars']) == 0: + print("") + else: + for par2 in par1['role_vars']: + print(str(par2)) diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 3a33797ef..5fbd8c363 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -78,6 +78,11 @@ sap_hana_install_new_system: yes # In case this is not desired, you can set the following parameter to `yes` to recreate the initial tenant database. sap_hana_install_recreate_tenant_database: no +# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively relabel directories and files +# in `/hana` before the installation starts and in `/usr/sap` after the installation has finished. +# If relabeling not desired, set the following variable to `no`. +sap_hana_install_modify_selinux_labels: yes + ################ # Parameters for hdblcm: ################ diff --git a/roles/sap_hana_install/requirements.yml b/roles/sap_hana_install/requirements.yml new file mode 100644 index 000000000..6e8517d05 --- /dev/null +++ b/roles/sap_hana_install/requirements.yml @@ -0,0 +1,5 @@ +--- +roles: + - name: https://github.com/linux-system-roles/selinux + type: git + version: main diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 5010877af..c855a251c 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -155,6 +155,16 @@ changed_when: no when: not ansible_check_mode +- name: Configure '/usr/sap' SELinux file contexts + include_role: + name: selinux + vars: + selinux_fcontexts: + - { target: '/usr/sap(/.*)?', setype: 'usr_t' } + selinux_restore_dirs: + - /usr/sap + when: sap_hana_install_modify_selinux_labels + - name: Set fact - HANA version ansible.builtin.set_fact: __sap_hana_install_fact_hana_version: "{{ __sap_hana_install_register_install_result.stdout.split(';')[0] }}" diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index d349c892b..9683fc4d0 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -83,6 +83,16 @@ - '/hana/data' tags: sap_hana_install_chown_hana_directories + - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts + include_role: + name: selinux + vars: + selinux_fcontexts: + - { target: '/hana(/.*)?', setype: 'usr_t' } + selinux_restore_dirs: + - /hana + when: sap_hana_install_modify_selinux_labels + - name: SAP HANA Pre Install - Get info about software extract directory '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.stat: path: "{{ sap_hana_install_software_extract_directory }}" From eb7e29f69578ba7dd1baa2407847056310120683 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 16 Sep 2022 15:55:31 +0000 Subject: [PATCH 142/375] sap_ha_cluster: user ha_cluster parameters are inherited and take precedence --- .../ascertain_ha_cluster_in_inventory.yml | 73 +++++++++++++++++++ .../tasks/ascertain_sap_landscape.yml | 5 ++ .../sap_ha_cluster/tasks/configure_srhook.yml | 9 ++- .../tasks/construct_vars_common.yml | 4 +- .../tasks/construct_vars_hana_common.yml | 12 +-- .../tasks/construct_vars_hana_scaleout.yml | 4 + .../tasks/construct_vars_hana_scaleup.yml | 4 + .../tasks/construct_vars_stonith.yml | 14 +++- roles/sap_ha_cluster/tasks/main.yml | 48 ++++++++---- .../templates/sudofile_20-saphana.j2 | 2 +- 10 files changed, 146 insertions(+), 29 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml new file mode 100644 index 000000000..9c6b2892f --- /dev/null +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -0,0 +1,73 @@ +--- +# If there are 'ha_cluster" role parameters are already defined in the +# inventory, we will use these custom specifications. + +- name: "{{ __tname }} Register ha_cluster_cluster_properties" + ansible.builtin.set_fact: + __sap_ha_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" + when: ha_cluster_cluster_properties is defined + +- name: "{{ __tname }} Register ha_cluster_fence_agent_packages" + ansible.builtin.set_fact: + __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" + when: ha_cluster_fence_agent_packages is defined + +- name: "{{ __tname }} Register ha_cluster_extra_packages" + ansible.builtin.set_fact: + __sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages }}" + when: ha_cluster_extra_packages is defined + +- name: "{{ __tname }} Register ha_cluster_resource_primitives" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" + when: ha_cluster_resource_primitives is defined + +- name: "{{ __tname }} Register ha_cluster_resource_groups" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" + when: ha_cluster_resource_groups is defined + +- name: "{{ __tname }} Register ha_cluster_resource_clones" + ansible.builtin.set_fact: + __sap_ha_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" + when: ha_cluster_resource_clones is defined + +- name: "{{ __tname }} Register ha_cluster_constraints_location" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" + when: ha_cluster_constraints_location is defined + +- name: "{{ __tname }} Register ha_cluster_constraints_colocation" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" + when: ha_cluster_constraints_colocation is defined + +- name: "{{ __tname }} Register ha_cluster_constraints_order" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" + when: ha_cluster_constraints_order is defined + +- name: "{{ __tname }} Register ha_cluster_repos" + ansible.builtin.set_fact: + __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" + when: ha_cluster_repos is defined + +#- name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_}}" +# when: ha_cluster_is defined +# +#- name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_}}" +# when: ha_cluster_is defined +# +#- name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_}}" +# when: ha_cluster_is defined +# +#- name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_}}" +# when: ha_cluster_is defined diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml index 566e8770a..8904eb235 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -2,6 +2,11 @@ # The following tasks will check which SAP landscape can be configured with # the provided parameters. # It will validate if requirements are met for the cluster configuration. + +# TODO: fail if there is only one host in the play? +# TODO: check play hosts against cluster nodes definition - there should be no +# hosts in the play that are undefined? + - name: "{{ __tname }} Set landscape to scale-up if there are only 2 nodes" ansible.builtin.set_fact: sap_ha_cluster_sap_type: scaleup diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml index 643b9d115..ed6510727 100644 --- a/roles/sap_ha_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -15,12 +15,17 @@ mode: "0755" owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" group: sapsys + # Do not run in check mode because the path is created in the previous step + when: not ansible_check_mode - name: "{{ __tname }} Check global.ini for 'ha_dr_saphanasr'" ansible.builtin.shell: | grep ha_dr_saphanasr /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini - register: trace_global + register: __sap_ha_cluster_srhook_trace_global failed_when: false + # This command should always run, even in check mode. + # It never does a change, but the return code is required for the next task. + check_mode: no changed_when: false - name: "{{ __tname }} Update srHook in global.ini" @@ -35,7 +40,7 @@ [trace] ha_dr_saphanasr = info - when: trace_global.rc == 1 + when: __sap_ha_cluster_srhook_trace_global.rc == 1 - name: "{{ __tname }} Add srHook sudo entries" ansible.builtin.template: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 460d6213d..590563060 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -1,9 +1,7 @@ --- # Variables containing variables must be constructed with values # to be fed into an included role -# -# TODO: make sure to first respect 'ha_cluster' native variables -# + - name: "{{ __tname }} Set cluster name" ansible.builtin.set_fact: # Set cluster name: first read 'ha_cluster' native role variable diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 805b49884..99fbd3252 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -2,10 +2,12 @@ # Variables containing variables must be constructed with values # to be fed into the included ha_cluster role -# TODO: # - put here all scale-up and scale-out common resources # - certain differences like ra agent names are provided through -# type specific variables +# type specific variables + +# TODO: add conditionals to verify that the same resource agent is not already +# defined in user input variables. Conflicting user input should take precedence. - name: "{{ __tname }} Add resource: SAP HANA Topology" ansible.builtin.set_fact: @@ -134,7 +136,7 @@ value: "true" # First start Topology, then HANA (automatically stops in reverse order) -- name: "{{ __tname }} Add order constraint: Topology before HANA" +- name: "{{ __tname }} Add order constraint: Topology starts before DB" ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_topology ] }}" vars: @@ -150,7 +152,7 @@ value: "false" # Start the VIP only after the HANA resource has been promoted -- name: "{{ __tname }} Add order constraint: VIP after HANA promoted" +- name: "{{ __tname }} Add order constraint: VIP starts after DB is promoted" ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_vip ] }}" vars: @@ -163,7 +165,7 @@ action: start # The VIP only runs where HANA is promoted -- name: "{{ __tname }} Add colocation constraint: VIP runs where HANA promoted" +- name: "{{ __tname }} Add colocation constraint: VIP runs where HANA is promoted" ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [ __constraint_colo_vip ] }}" vars: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index 7c91de690..da4bf7739 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -7,3 +7,7 @@ #- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" # ansible.builtin.set_fact: + +- name: "{{ __tname }} Info" + ansible.builtin.debug: + msg: "INFO: There is currently no Scale-out specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml index 3db25de82..517c95e3d 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -7,3 +7,7 @@ #- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" # ansible.builtin.set_fact: +# +- name: "{{ __tname }} Info" + ansible.builtin.debug: + msg: "INFO: There is currently no Scale-up specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 747892c2b..d61d3384c 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -11,6 +11,8 @@ __stonith_enabled: - name: stonith-enabled value: true + when: + - (__stonith_enabled | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - name: "{{ __tname }} Add to cluster properties: stonith-timeout" ansible.builtin.set_fact: @@ -19,6 +21,8 @@ __stonith_timeout: - name: stonith-timeout value: 900 + when: + - (__stonith_timeout | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - name: "{{ __tname }} Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: @@ -27,12 +31,18 @@ __concurrent_fencing: - name: concurrent-fencing value: true - + when: + - (__concurrent_fencing | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) # The STONITH resource is an element in the cluster_resource_primitives list - name: "{{ __tname }} Construct stonith resources definition" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + __stonith_resources }}" vars: - __stonith_resources: "{{ sap_ha_cluster_stonith_resources }}" # defined in group_vars + # Take from SAP role list parameter in inventory for custom stonith resource config. + # There is no separate stonith resource parameter in the 'ha_cluster' role. + __stonith_resources: "{{ sap_ha_cluster_stonith_resources }}" no_log: true # stonith resources usually contain secrets + when: + - sap_ha_cluster_stonith_resources is defined + - sap_ha_cluster_stonith_resources is iterable diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index afe0c1a8d..3a5dd6322 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -1,19 +1,22 @@ --- -# TODO: Build all resource/constraint configuration variables based on -# simpler user input. -# - Make resources configuration modular, allowing additional VIPs, for example - -# 1. This role's arguments are validated through meta/arguments_spec.yml +# 1. Role arguments are validated through meta/arguments_spec.yml (ansible >= 2.11) # 2. Detect SAP solution to be configured (scale-up, scale-out, etc.) # * Play hosts must have SAP installed and landscape information discoverable ?! -# * Certain parameters must match the solution (networking, IDs ) # 3. Include tasks for parameter validation for the selected solution +# * Certain parameters must match the target solution +# (networking, IDs, number of nodes) # 4. Include tasks for building the ha_cluster arguments for the selected solution -# 5. Include ha_cluster role with the constructed parameters as vars arguments -# 6. Add solution specific config, like srhook +# * scale-up, scale-out, scale-up + mtr, scale-out + mtr +# 5. Include ha_cluster role with the constructed parameters as role arguments +# 6. Add solution specific config +# * srhook -# TODO: make sure to first respect 'ha_cluster' native variables +# DONE: make sure to first respect 'ha_cluster' native variables +# Users can define 'ha_cluster' role parameters in their inventory +# TODO: Build all resource/constraint configuration variables based on +# simpler user input. +# - Make resources configuration modular, allowing additional VIPs, for example # The SAP ID must follow a strict format and not use reserved special values # TODO: This check may be better placed in a SAP role earlier in the chain... @@ -25,6 +28,16 @@ - sap_ha_cluster_hana_sid not in __sap_sid_prohibited tags: always +# Make sure that all parameters already set for 'ha_cluster' are also inherited. +# Add to the include file a task for each parameter which this SAP cluster role +# supports. +- name: "{{ __tname }} Include tasks for checking 'ha_cluster' predefinitions" + ansible.builtin.include_tasks: + file: ascertain_ha_cluster_in_inventory.yml + apply: + tags: always + tags: always + # Determine which SAP landscape we are going to configure in the cluster. # This is needed to include the landscape specific parameter values. # The result will be parameters: @@ -45,7 +58,8 @@ tags: check_platform tags: check_platform -# copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml +# Copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml and enhanced +# for additional environment settings. - name: "{{ __tname }} Set platform/version specific variables" ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: @@ -105,8 +119,8 @@ fail_msg: "Cluster build parameter construction has failed for this parameter." #### for debugging -- name: "Fail here for now..." - ansible.builtin.fail: +#- name: "Fail here for now..." +# ansible.builtin.fail: ### Up to here there has been NO changes, only environment validations and ### parameter constructions! @@ -119,6 +133,7 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster + no_log: true vars: ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" @@ -128,9 +143,10 @@ ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" - ha_cluster_constraints_order: "{{ sap_ha_cluster_constraints_order }}" - ha_cluster_constraints_colocation: "{{ sap_ha_cluster_constraints_colocation }}" - ha_cluster_fence_agent_packages: "{{ sap_ha_cluster_fence_agent_packages }}" + ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" + ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" + ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" +# no_log: true # some parameters contain secrets tags: ha_cluster #### from old ha role @@ -139,7 +155,7 @@ ansible.builtin.shell: | pcs resource defaults update resource-stickiness=1000 pcs resource defaults update migration-threshold=5000 - changed_when: true + changed_when: not ansible_check_mode - name: "{{ __tname }} Include srHook configuration" ansible.builtin.include_tasks: diff --git a/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 b/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 index 19b3597fa..ed917e91a 100644 --- a/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 +++ b/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 @@ -10,6 +10,6 @@ Cmnd_Alias {{ node.hana_site }}_SOK = /usr/sbin/crm_attribute -n hana_{{ sap_ha_ Cmnd_Alias {{ node.hana_site }}_SFAIL = /usr/sbin/crm_attribute -n hana_{{ sap_ha_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SFAIL -t crm_config -s {{ sap_ha_cluster_hadr_provider_name }} {% endfor %} -{{ sap_hana_cluster_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} +{{ sap_ha_cluster_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} Defaults!{% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} !requiretty From 89bb1fe2996eb6367ecead95aeba5b3449a82ebe Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Sat, 17 Sep 2022 00:31:24 +0200 Subject: [PATCH 143/375] sap_hana_install: issue #205: Add RHEL setsebool command for RHEL 9 --- roles/sap_hana_install/requirements.yml | 9 +++++---- roles/sap_hana_install/tasks/post_install.yml | 4 ++-- roles/sap_hana_install/tasks/pre_install.yml | 11 +++++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/roles/sap_hana_install/requirements.yml b/roles/sap_hana_install/requirements.yml index 6e8517d05..1e2525558 100644 --- a/roles/sap_hana_install/requirements.yml +++ b/roles/sap_hana_install/requirements.yml @@ -1,5 +1,6 @@ --- -roles: - - name: https://github.com/linux-system-roles/selinux - type: git - version: main + +collections: + - name: fedora.linux_system_roles + version: latest + type: galaxy diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index c855a251c..3b81387a8 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -156,8 +156,8 @@ when: not ansible_check_mode - name: Configure '/usr/sap' SELinux file contexts - include_role: - name: selinux + ansible.builtin.include_role: + name: linux-system-roles.selinux vars: selinux_fcontexts: - { target: '/usr/sap(/.*)?', setype: 'usr_t' } diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 9683fc4d0..13466a750 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -83,9 +83,16 @@ - '/hana/data' tags: sap_hana_install_chown_hana_directories + - name: Set selinux_execmod boolean for RHEL 9 + ansible.builtin.command: setsebool -P selinuxuser_execmod 1 + when: + - ansible_os_family == 'RedHat' + - ansible_distribution_major_version == '9' + - sap_hana_install_modify_selinux_labels + - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts - include_role: - name: selinux + ansible.builtin.include_role: + name: linux-system-roles.selinux vars: selinux_fcontexts: - { target: '/hana(/.*)?', setype: 'usr_t' } From 04e9293d67a2ea4beeadb1c9d4ba899635aea67c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Sep 2022 16:52:45 +0200 Subject: [PATCH 144/375] sap_hana_install: move file requirements.yml to the collection root --- roles/sap_hana_install/requirements.yml => requirements.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename roles/sap_hana_install/requirements.yml => requirements.yml (100%) diff --git a/roles/sap_hana_install/requirements.yml b/requirements.yml similarity index 100% rename from roles/sap_hana_install/requirements.yml rename to requirements.yml From a09fbce8a73ffb9ff57b89ebfed96614dab15c16 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Sep 2022 16:57:48 +0200 Subject: [PATCH 145/375] sap_general_preconfigure: syntax error in test script --- .../tests/run-sap_general_preconfigure-test-idempotency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py index 7fcb09ccb..8e249e8ea 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py @@ -39,7 +39,7 @@ 'rc': '99', 'role_vars': [ { - 'sap_general_preconfigure_fail_if_reboot_required': False + 'sap_general_preconfigure_fail_if_reboot_required': False, 'sap_general_preconfigure_reboot_ok': True } ] @@ -53,7 +53,7 @@ 'rc': '99', 'role_vars': [ { - 'sap_general_preconfigure_fail_if_reboot_required': False + 'sap_general_preconfigure_fail_if_reboot_required': False, 'sap_general_preconfigure_reboot_ok': True } ] From 18269590787f5eb54c44e7c24c854bc06099c5d4 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 19 Sep 2022 16:02:32 +0000 Subject: [PATCH 146/375] sap_ha_cluster: made some ra parameters customizable --- roles/sap_ha_cluster/defaults/main.yml | 11 +++++- roles/sap_ha_cluster/meta/argument_specs.yml | 34 ++++++++++++++++--- .../tasks/construct_vars_hana_common.yml | 6 ++-- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 6273b8061..9ed8be82f 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -21,8 +21,17 @@ sap_ha_cluster_fence_agent_packages: - fence-agents-all # The type of SAP landscape and multi-node replication +# TODO: variable name update, depending on feedback #sap_ha_cluster_sap_type: "" -sap_ha_cluster_replication_type: "" +sap_ha_cluster_replication_type: none + +# Optional parameters to customize resource parameters +# PREFER_SITE_TAKEOVER +sap_ha_cluster_prefer_site_takeover: true +# AUTOMATED_REGISTER +sap_ha_cluster_automated_register: true +# DUPLICATE_PRIMARY_TIMEOUT +sap_ha_cluster_duplicate_primary_timeout: 900 # Define empty parameters to avoid undefined input variables. # The arguments_spec check complains. diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index e0b7b19e3..0f1439288 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -52,17 +52,43 @@ argument_specs: description: The SAP landscape to be installed. type: str required: false - default: "" + default: scaleup choices: - scaleup - scaleout - - "" sap_ha_cluster_replication_type: description: The type of SAP HANA site replication across multiple hosts. type: str required: false - default: "" + default: none choices: - mtr - - "" + - none + + sap_ha_cluster_prefer_site_takeover: + description: Set to "false" if the cluster should first attempt to restart the instance on the same node. When set to "true" (default) a failover to secondary will be initiated on resource failure. + type: bool + required: false + default: true + choices: + - true + - false + + sap_ha_cluster_automated_register: + description: Define if a former primary should be re-registered automatically as secondary. + type: bool + required: false + default: true + + sap_ha_cluster_duplicate_primary_timeout: + description: Time difference needed between to primary time stamps, if a dual-primary situation occurs. If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. After this registration to the new primary all data will be overwritten by the system replication. + type: int + required: false + default: 900 + +# sap_ha_cluster_ +# description: +# type: +# required: false +# default: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 99fbd3252..4a5fabb50 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -52,11 +52,11 @@ - name: InstanceNumber value: "{{ sap_ha_cluster_hana_instance_number }}" - name: PREFER_SITE_TAKEOVER - value: true + value: "{{ sap_ha_cluster_prefer_site_takeover | string }}" - name: DUPLICATE_PRIMARY_TIMEOUT - value: 900 + value: "{{ sap_ha_cluster_duplicate_primary_timeout | string }}" - name: AUTOMATED_REGISTER - value: true + value: "{{ sap_ha_cluster_automated_register | string }}" operations: - action: start attrs: From 12bce130baffd83f164bc142e1df068a8b8cc6df Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 19 Sep 2022 17:59:52 +0100 Subject: [PATCH 147/375] sap_swpm: minor appendment --- roles/sap_swpm/templates/configfile.j2 | 58 +++++++++++++++++++++----- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 13c293348..78b6a227f 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -33,7 +33,8 @@ SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} # swpm_installation_media_swpm1_exportfiles ###### SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} -#SAPINST.CD.PACKAGE.LOAD = +# SAPINST.CD.PACKAGE.LOAD = +# installation_export.archivesFolder = {{ sap_swpm_cd_export_path }} {% endif %} {% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_list %} @@ -169,13 +170,13 @@ ora.SystemPassword = {{ sap_swpm_db_system_password }} # credentials_anydb_sapase ###### nwUsers.syb.sybsidPassword = {{ sap_swpm_sap_sidadm_password }} -#SYB.NW_DB.encryptionMasterKeyPassword = +# SYB.NW_DB.encryptionMasterKeyPassword = SYB.NW_DB.sa_pass = {{ sap_swpm_master_password }} SYB.NW_DB.sapsa_pass = {{ sap_swpm_master_password }} SYB.NW_DB.sapsr3_pass = {{ sap_swpm_master_password }} SYB.NW_DB.sapsr3db_pass = {{ sap_swpm_db_system_password }} -#SYB.NW_DB.sapsso_pass = -#SYB.NW_DB.sslPassword = +# SYB.NW_DB.sapsso_pass = +# SYB.NW_DB.sslPassword = {% endif %} {% if 'credentials_anydb_sapmaxdb' in sap_swpm_inifile_list %} @@ -202,6 +203,7 @@ HDB_Schema_Check_Dialogs.validateSchemaName = false # NW_HDB_DBClient.checkCreateUserstore = true # hdb.create.dbacockpit.user = false # HDB_Userstore.systemDBPort = +# HDB_Userstore.HDB_USE_IDENT = {% endif %} {% if 'db_config_anydb_all' in sap_swpm_inifile_list %} @@ -360,8 +362,10 @@ NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ sap_swpm_db_sid }}/HDB{{ s NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} +# NW_HDB_getDBInfo.dbadmin = SYSTEM # NW_HDB_getDBInfo.tenantOsGroup = # NW_HDB_getDBInfo.tenantOsUser = +# NW_HDB_getDBInfo.tenantPort = # NW_HDB_DBClient.clientPathStrategy = LOCAL {% endif %} @@ -402,6 +406,10 @@ HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} # HDB_Recovery_Dialogs.useLicenseFile = false # NW_CreateDBandLoad.movePVCforUsagePiAndDi = # HDB_Recovery_Dialogs.licenseFile = +# NW_Recovery_Install_HDB.checkIntegrity = false +# NW_Recovery_Install_HDB.backupLocationHANA = +# NW_Recovery_Install_HDB.backupLocationSAP = +# NW_Recovery_Install_HDB.loadOrMount = load {% endif %} {% if 'nw_config_anydb' in sap_swpm_inifile_list %} @@ -512,20 +520,24 @@ UmeConfiguration.umeType = {{ sap_swpm_ume_type }} # nw_config_webdisp_generic ###### NW_Webdispatcher_Instance.wdInstanceNumber = {{ sap_swpm_wd_instance_nr }} -NW_webdispatcher_Instance.activateICF = {{ sap_swpm_wd_activate_icf | lower }} +# NW_webdispatcher_Instance.encryptionMode = Always +# NW_webdispatcher_Instance.useWdHTTPPort = false +NW_webdispatcher_Instance.wdHTTPPort = 80{{ sap_swpm_wd_instance_nr }} +NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} +NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} + NW_Webdispatcher_Instance.configureSystemConnectivity = {{ sap_swpm_wd_system_connectivity | lower }} NW_webdispatcher_Instance.backEndSID = {{ sap_swpm_wd_backend_sid }} NW_webdispatcher_Instance.msHTTPPort = {{ sap_swpm_wd_backend_ms_http_port }} NW_webdispatcher_Instance.msHost = {{ sap_swpm_wd_backend_ms_host }} +NW_webdispatcher_Instance.scenarioSize = {{ sap_swpm_wd_backend_scenario_size }} + +NW_webdispatcher_Instance.activateICF = {{ sap_swpm_wd_activate_icf | lower }} NW_webdispatcher_Instance.rfcHost = {{ sap_swpm_wd_backend_rfc_host }} NW_webdispatcher_Instance.rfcInstance = {{ sap_swpm_wd_backend_rfc_instance_nr }} NW_webdispatcher_Instance.rfcPassword = {{ sap_swpm_wd_backend_rfc_ddic_000_password }} -NW_webdispatcher_Instance.scenarioSize = {{ sap_swpm_wd_backend_scenario_size }} -# NW_webdispatcher_Instance.encryptionMode = Always -# NW_webdispatcher_Instance.useWdHTTPPort = false -NW_webdispatcher_Instance.wdHTTPPort = 80{{ sap_swpm_wd_instance_nr }} -NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} -NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} +# NW_webdispatcher_Instance.rfcClient = 000 +# NW_webdispatcher_Instance.rfcUser = DDIC {% endif %} {% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_list %} @@ -565,6 +577,30 @@ NW_CI_Instance_ABAP_Reports.enableActivateICFService = true # NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false {% endif %} +{% if 'nw_config_livecache' in sap_swpm_inifile_list %} +###### +# nw_config_livecache +###### +NW_liveCache.controlUserPwd = +NW_liveCache.liveCacheHost = +NW_liveCache.liveCacheID = +NW_liveCache.liveCacheUser = +NW_liveCache.liveCacheUserPwd = +NW_liveCache.useLiveCache = +{% endif %} + +{% if 'nw_config_sld' in sap_swpm_inifile_list %} +###### +# nw_config_sld +###### +NW_SLD_Configuration.configureSld = +NW_SLD_Configuration.sldHost = +NW_SLD_Configuration.sldPort = +NW_SLD_Configuration.sldUseHttps = +NW_SLD_Configuration.sldUser = +NW_SLD_Configuration.sldUserPassword = +{% endif %} + {% if 'sap_os_linux_user' in sap_swpm_inifile_list %} ###### # sap_os_linux_user From 3300ed080a5db494cf57086ce6139838610ccf4c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Sep 2022 21:45:22 +0200 Subject: [PATCH 148/375] sap_general_preconfigure: Ansible-lint cleanup to the latest level --- .../sap_general_preconfigure/defaults/main.yml | 2 +- .../tasks/RedHat/assert-installation.yml | 4 ++-- .../tasks/RedHat/installation.yml | 8 ++++---- .../tasks/SLES/installation.yml | 4 ++-- .../sap_general_preconfigure/vars/RedHat_7.yml | 18 +++++++++--------- .../vars/RedHat_8.0.yml | 4 ++-- .../vars/RedHat_8.1.yml | 6 +++--- .../sap_general_preconfigure/vars/RedHat_8.yml | 8 ++++---- .../sap_general_preconfigure/vars/RedHat_9.yml | 8 ++++---- roles/sap_hana_install/tasks/pre_install.yml | 9 ++------- 10 files changed, 33 insertions(+), 38 deletions(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index f43c0782c..d635a7d73 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -69,7 +69,7 @@ sap_general_preconfigure_fail_if_reboot_required: yes sap_general_preconfigure_selinux_state: disabled -sap_general_preconfigure_size_of_tmpfs_gb: "{{ ((0.75 * ( ansible_memtotal_mb + ansible_swaptotal_mb )) / 1024) | round | int }}" +sap_general_preconfigure_size_of_tmpfs_gb: "{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}" sap_general_preconfigure_locale: en_US.UTF-8 diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index f9b6f520f..470375344 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -92,7 +92,7 @@ # Reason for noqa: A double brace might also occur in an awk command sequence. - name: Check RHEL 7 package groups block: - - name: Set yum group list installed command # noqa var-spacing + - name: Set yum group list installed command # noqa jinja[spacing] ansible.builtin.set_fact: __sap_general_preconfigure_fact_yum_group_list_installed_command_assert: "yum group list installed hidden ids | awk '/Installed Groups:/{a=1}/Done/{a=0}{if (a==1&&!/:/){print $NF}}' | @@ -123,7 +123,7 @@ # Reason for noqa: A double brace might also occur in an awk command sequence. - name: Check RHEL 8 environment groups block: - - name: Set yum envgroup list installed command # noqa var-spacing + - name: Set yum envgroup list installed command # noqa jinja[spacing] ansible.builtin.set_fact: __sap_general_preconfigure_fact_yum_envgroup_list_installed_command_assert: "yum group list installed -v | awk '/Installed Environment Groups:/{a=1}/Installed Groups:/{a=0}{if (a==1&&!/:/){print $NF}}' | diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 79757d999..808f462e6 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -107,7 +107,7 @@ - __sap_general_preconfigure_register_subscription_manager_release.stdout != ansible_distribution_version - name: Ensure that the required package groups are installed, RHEL 7 - ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups|join(' ') }} -y" + ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} -y" args: warn: false register: __sap_general_preconfigure_register_yum_group_install @@ -120,7 +120,7 @@ - name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 # Note: We want to avoid unwanted package upgrades, see bug 1983749. - ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups|join(' ') }} --nobest --exclude=kernel* -y" + ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} --nobest --exclude=kernel* -y" args: warn: false register: __sap_general_preconfigure_register_yum_group_install @@ -243,12 +243,12 @@ ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: false -- name: needs-restarting - Set the flag that reboot is needed to apply changes +- name: For needs-restarting - Set the flag that reboot is needed to apply changes ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: true when: __sap_general_preconfigure_register_needs_restarting is failed -- name: needs-restarting - Display the content of sap_general_preconfigure_fact_reboot_required +- name: For needs-restarting - Display the content of sap_general_preconfigure_fact_reboot_required ansible.builtin.debug: var: sap_general_preconfigure_fact_reboot_required diff --git a/roles/sap_general_preconfigure/tasks/SLES/installation.yml b/roles/sap_general_preconfigure/tasks/SLES/installation.yml index 7c10dabcc..ca0f16405 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/installation.yml @@ -88,12 +88,12 @@ ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: false -- name: needs-restarting - Set the flag that reboot is needed to apply changes +- name: For needs-restarting - Set the flag that reboot is needed to apply changes ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: true when: __sap_general_preconfigure_register_needs_restarting is failed -- name: needs-restarting - Display the content of sap_general_preconfigure_fact_reboot_required +- name: For needs-restarting - Display the content of sap_general_preconfigure_fact_reboot_required ansible.builtin.debug: var: sap_general_preconfigure_fact_reboot_required diff --git a/roles/sap_general_preconfigure/vars/RedHat_7.yml b/roles/sap_general_preconfigure/vars/RedHat_7.yml index a4121523a..345f641eb 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_7.yml @@ -19,8 +19,8 @@ __sap_general_preconfigure_rhel_7_ha_arch_string_ppc64le: 'server-for-power-le' __sap_general_preconfigure_rhel_7_ha_arch_string_ppc64: '{{ __sap_general_preconfigure_rhel_7_arch_string_ppc64 }}' __sap_general_preconfigure_rhel_7_ha_arch_string_s390x: '{{ __sap_general_preconfigure_rhel_7_arch_string_s390x }}' -__sap_general_preconfigure_rhel_7_arch_string: "{{ lookup('vars','__sap_general_preconfigure_rhel_7_arch_string_' + ansible_architecture ) }}" -__sap_general_preconfigure_rhel_7_ha_arch_string: "{{ lookup('vars','__sap_general_preconfigure_rhel_7_ha_arch_string_' + ansible_architecture ) }}" +__sap_general_preconfigure_rhel_7_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_arch_string_' + ansible_architecture) }}" +__sap_general_preconfigure_rhel_7_ha_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_ha_arch_string_' + ansible_architecture) }}" __sap_general_preconfigure_max_repo_type_x86_64: 'e4s-' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s-' @@ -32,8 +32,8 @@ __sap_general_preconfigure_max_repo_type_ha_ppc64le: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_ha_ppc64: '{{ __sap_general_preconfigure_max_repo_type_ppc64 }}' __sap_general_preconfigure_max_repo_type_ha_s390x: '' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" -__sap_general_preconfigure_max_repo_type_ha: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_ha_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type_ha: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_' + ansible_architecture) }}" # RHEL 7 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_7_6: '{{ __sap_general_preconfigure_max_repo_type }}' @@ -45,8 +45,8 @@ __sap_general_preconfigure_max_repo_type_ha_string_7_7: '{{ __sap_general_precon __sap_general_preconfigure_max_repo_type_ha_string_7_8: '' __sap_general_preconfigure_max_repo_type_ha_string_7_9: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" -__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms @@ -81,7 +81,7 @@ __sap_general_preconfigure_packagegroups_s390x: - "@network-file-system-client" - "@performance" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars','__sap_general_preconfigure_packagegroups_' + ansible_architecture ) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -114,7 +114,7 @@ __sap_general_preconfigure_packages_s390x: - tcsh - psmisc -__sap_general_preconfigure_packages: "{{ lookup('vars','__sap_general_preconfigure_packages_' + ansible_architecture ) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" __sap_general_preconfigure_min_packages_7_2: @@ -138,7 +138,7 @@ __sap_general_preconfigure_min_packages_7_8: __sap_general_preconfigure_min_packages_7_9: -__sap_general_preconfigure_min_pkgs: "{{ lookup('vars','__sap_general_preconfigure_min_packages_' + ansible_distribution_version | replace (\".\", \"_\")) }}" +__sap_general_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_general_preconfigure_min_packages_' + ansible_distribution_version | replace(\".\", \"_\")) }}" # Note: The value for vm.max_map_count of 2147483647 (previously 2000000) # is set according to SAP note 900929. diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml index 19d9d6703..822cd47b5 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml @@ -10,7 +10,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' @@ -37,7 +37,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars','__sap_general_preconfigure_packagegroups_' + ansible_architecture ) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" __sap_general_preconfigure_packages: - uuidd diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml index 4d347f9ce..319e045f4 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml @@ -10,7 +10,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' @@ -37,7 +37,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars','__sap_general_preconfigure_packagegroups_' + ansible_architecture ) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -67,7 +67,7 @@ __sap_general_preconfigure_packages_s390x: - nfs-utils - bind-utils -__sap_general_preconfigure_packages: "{{ lookup('vars','__sap_general_preconfigure_packages_' + ansible_architecture ) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" __sap_general_preconfigure_min_pkgs: - [ 'setup', '2.12.2-2.el8_1.1' ] diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 8505cb2d8..2c0b8457d 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -10,7 +10,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_8_2: '{{ __sap_general_preconfigure_max_repo_type }}-' @@ -23,7 +23,7 @@ __sap_general_preconfigure_max_repo_type_string_8_8: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_string_8_9: '' __sap_general_preconfigure_max_repo_type_string_8_10: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms @@ -47,7 +47,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars','__sap_general_preconfigure_packagegroups_' + ansible_architecture ) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -77,7 +77,7 @@ __sap_general_preconfigure_packages_s390x: - nfs-utils - bind-utils -__sap_general_preconfigure_packages: "{{ lookup('vars','__sap_general_preconfigure_packages_' + ansible_architecture ) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" __sap_general_preconfigure_kernel_parameters_default: - { name: vm.max_map_count, value: '2147483647' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index 80783a7fc..bb9d7bcee 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -11,12 +11,12 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" # RHEL 9 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_9_0: '{{ __sap_general_preconfigure_max_repo_type }}-' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars','__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace (\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms @@ -40,7 +40,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars','__sap_general_preconfigure_packagegroups_' + ansible_architecture ) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -78,7 +78,7 @@ __sap_general_preconfigure_packages_s390x: # package tuned: no longer part of package group "Core" in RHEL 9, so we have to install it - tuned -__sap_general_preconfigure_packages: "{{ lookup('vars','__sap_general_preconfigure_packages_' + ansible_architecture ) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" __sap_general_preconfigure_kernel_parameters_default: - { name: vm.max_map_count, value: '2147483647' } diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 13466a750..4aca6d2ec 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -83,17 +83,12 @@ - '/hana/data' tags: sap_hana_install_chown_hana_directories - - name: Set selinux_execmod boolean for RHEL 9 - ansible.builtin.command: setsebool -P selinuxuser_execmod 1 - when: - - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == '9' - - sap_hana_install_modify_selinux_labels - - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts ansible.builtin.include_role: name: linux-system-roles.selinux vars: + selinux_booleans: + - { name: 'selinuxuser_execmod', state: 'on' } selinux_fcontexts: - { target: '/hana(/.*)?', setype: 'usr_t' } selinux_restore_dirs: From 11439cd3f4de7f52f720f2ed56782779ae702010 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Sep 2022 21:46:46 +0200 Subject: [PATCH 149/375] sap_netweaver_preconfigure: Ansible-lint cleanup to the latest level --- roles/sap_netweaver_preconfigure/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index 3ce3b5170..f0720b02e 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -15,12 +15,12 @@ - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: assert_prefix: "" - when: not sap_netweaver_preconfigure_assert|d(false) + when: not sap_netweaver_preconfigure_assert | d(false) - name: Prepend filename with assert string if role is run in assert mode ansible.builtin.set_fact: assert_prefix: "assert-" - when: sap_netweaver_preconfigure_assert|d(false) + when: sap_netweaver_preconfigure_assert | d(false) # required for installation and configuration tasks: - name: Gather package facts From 97c1b3849e753ed983613cf63dfc3fb443472b41 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Sep 2022 22:12:58 +0200 Subject: [PATCH 150/375] sap_hana_preconfigure: Ansible-lint cleanup to the latest level --- .../tasks/RedHat/assert-installation.yml | 4 ++-- .../assert-c-states-for-lower-latency.yml | 3 +-- .../assert-cpu-governor-for-performance.yml | 3 +-- .../tasks/RedHat/generic/assert-epb.yml | 3 +-- .../tasks/RedHat/generic/assert-tuned.yml | 6 ++---- .../configure-c-states-for-lower-latency.yml | 3 +-- .../tasks/RedHat/installation.yml | 4 ++-- .../tasks/SLES/configuration.yml | 4 ++-- .../tasks/SLES/installation.yml | 4 ++-- roles/sap_hana_preconfigure/tasks/main.yml | 4 ++-- .../tasks/sapnote/2009879_7.yml | 16 ++++++++-------- .../tasks/sapnote/2055470.yml | 16 ++++++---------- .../tasks/sapnote/2292690/10-ibm-energyscale.yml | 2 +- .../tasks/sapnote/2382421.yml | 4 ++-- .../tasks/sapnote/2684254/configuration.yml | 6 +++--- .../tasks/sapnote/assert-2009879_7.yml | 2 +- roles/sap_hana_preconfigure/vars/RedHat_7.yml | 4 ++-- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 4 ++-- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 4 ++-- 19 files changed, 43 insertions(+), 53 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index ca66fa472..c760608a1 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -19,8 +19,8 @@ # repos required for SAP HANA on RHEL 7 and RHEL 8: - name: Fill the variable for the generic list of required repos ansible.builtin.set_fact: - __sap_hana_preconfigure_required_repos: "{{ lookup('vars','__sap_hana_preconfigure_req_repos_redhat_' + - ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture | string) }}" + __sap_hana_preconfigure_required_repos: "{{ lookup('vars', '__sap_hana_preconfigure_req_repos_redhat_' + + ansible_distribution_version | string | replace(\".\", \"_\") + '_' + ansible_architecture | string) }}" - name: Get info about enabled repos ansible.builtin.shell: set -o pipefail && subscription-manager repos --list-enabled | awk '/Repo ID:/{print $NF}' diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml index 9db7d71bf..40e5db1a5 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml @@ -44,5 +44,4 @@ when: ansible_architecture == 'x86_64' and (not sap_hana_preconfigure_use_tuned or sap_hana_preconfigure_modify_grub_cmdline_linux or - sap_hana_preconfigure_assert_all_config - ) + sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml index c13d32fe4..d97b79d77 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml @@ -87,5 +87,4 @@ when: ansible_architecture == 'x86_64' and (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config - ) + sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml index d54707834..70fb9fd9d 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml @@ -89,5 +89,4 @@ when: ansible_architecture == 'x86_64' and (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config - ) + sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml index 3c9363364..304c029e8 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tuned.yml @@ -5,8 +5,7 @@ msg: "INFO: The installed version of package tuned is: {{ ansible_facts.packages['tuned'][0].version }}" when: "'tuned' in ansible_facts.packages and (sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config - )" + sap_hana_preconfigure_assert_all_config)" - name: "Assert that tuned.service exists - use_tuned: yes" ansible.builtin.assert: @@ -68,8 +67,7 @@ msg: "INFO: The installed version of package 'tuned-profiles-sap-hana' is: {{ ansible_facts.packages['tuned-profiles-sap-hana'][0].version }}" when: "'tuned-profiles-sap-hana' in ansible_facts.packages and (sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config - )" + sap_hana_preconfigure_assert_all_config)" - name: Get active tuned profile ansible.builtin.shell: /usr/sbin/tuned-adm active | grep ":" | cut -d ":" -f 2 | awk '{$1=$1;print}' diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-c-states-for-lower-latency.yml index ec3d0beb5..8c1d3b55f 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-c-states-for-lower-latency.yml @@ -15,8 +15,7 @@ notify: __sap_hana_preconfigure_regenerate_grub2_conf_handler when: ansible_architecture == 'x86_64' and (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_modify_grub_cmdline_linux - ) + sap_hana_preconfigure_modify_grub_cmdline_linux) tags: grubconfig loop_control: loop_var: line_item diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml index d5e59eb75..711c7d779 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml @@ -16,8 +16,8 @@ # repos required for SAP HANA on RHEL 7 and RHEL 8: - name: Fill the variable for the generic list of required repos ansible.builtin.set_fact: - __sap_hana_preconfigure_fact_required_repos: "{{ lookup('vars','__sap_hana_preconfigure_req_repos_redhat_' + - ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" + __sap_hana_preconfigure_fact_required_repos: "{{ lookup('vars', '__sap_hana_preconfigure_req_repos_redhat_' + + ansible_distribution_version | string | replace(\".\", \"_\") + '_' + ansible_architecture) }}" - name: Construct valid argument list to the subscription-manager repos command ansible.builtin.set_fact: diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 1df42b765..0a716daba 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -4,11 +4,11 @@ # debug: # verbosity: "{{ debuglevel }}" # -- name: list of required SAP Notes +- name: List required SAP Notes ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: Include configuration actions for required sapnotes ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/configuration.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 7df3f2789..92ae29f10 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -4,10 +4,10 @@ # debug: # verbosity: "{{ debuglevel }}" # -- name: list of required SAP Notes +- name: List required SAP Notes ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: Include configuration actions for required sapnotes ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/installation.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 5d93f5407..c0f38389e 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -15,12 +15,12 @@ - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: assert_prefix: "" - when: not sap_hana_preconfigure_assert|d(false) + when: not sap_hana_preconfigure_assert | d(false) - name: Prepend filename with assert string if role is run in assert mode ansible.builtin.set_fact: assert_prefix: "assert-" - when: sap_hana_preconfigure_assert|d(false) + when: sap_hana_preconfigure_assert | d(false) - name: Examine the OS minor version ansible.builtin.set_fact: diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml index bdafb4beb..8fd9921d3 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml @@ -27,7 +27,7 @@ - { src: 'libssl.so.1.0.1e', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.1.0.1e', dest: 'libcrypto.so.1.0.1' } when: - ( ansible_distribution_version == '7.2' ) + (ansible_distribution_version == '7.2') loop_control: loop_var: line_item @@ -37,11 +37,11 @@ - { src: 'libssl.so.10', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.10', dest: 'libcrypto.so.1.0.1' } when: - ( ansible_distribution_version != '7.2' ) + (ansible_distribution_version != '7.2') loop_control: loop_var: line_item - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_9|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) ### 3.10 - THP -> SAP Note 2292690 ### 3.11 - CPU Governor for performance -> TunedProfile -> SAP Note 2292690 @@ -79,18 +79,18 @@ ### 3.14 - Disable ABRT - include_tasks: ../RedHat/generic/disable-abrtd.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_1|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_1 | d(false) - include_tasks: ../RedHat/generic/disable-abrt-ccpp.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_2|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_2 | d(false) ### 3.14 - Disable core Dumps - include_tasks: ../RedHat/generic/disable-coredumps.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_3|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_3 | d(false) ### 3.14 - Disable Kdump - include_tasks: ../RedHat/generic/disable-kdump.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_14_4|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_4 | d(false) ### 3.15 - Disable Firewalld ### Firewall Settings can only be done if SAP instance ID is known, @@ -98,7 +98,7 @@ ### NYI: Set proper firewall rules if SID/instance number is known ### - include_tasks: ../RedHat/generic/disable-firewalld.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_15|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_15 | d(false) ### Firewall Calculation for SID=xx ################################################################## diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml index 25437db48..81e0af71f 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml @@ -31,11 +31,9 @@ changed_when: __sap_hana_preconfigure_register_ibm_mtusize is success failed_when: __sap_hana_preconfigure_register_ibm_mtusize.rc > 0 and __sap_hana_preconfigure_register_ibm_mtusize.rc != 90 with_items: "{{ sap_hana_preconfigure_ppcle_mtu9000_if }}" - when: not( - (sap_hana_preconfigure_ppcle_mtu9000_if is undefined) or - (sap_hana_preconfigure_ppcle_mtu9000_if is none) or - (sap_hana_preconfigure_ppcle_mtu9000_if | trim | length == 0) - ) + when: not ((sap_hana_preconfigure_ppcle_mtu9000_if is undefined) or + (sap_hana_preconfigure_ppcle_mtu9000_if is none) or + (sap_hana_preconfigure_ppcle_mtu9000_if | trim | length == 0)) loop_control: loop_var: line_item @@ -46,11 +44,9 @@ regexp: '^ETHTOOL_OPTIONS_tso=' line: ETHTOOL_OPTIONS_tso='-K iface tso on' with_items: "{{ sap_hana_preconfigure_ppcle_tso_if }}" - when: not( - (sap_hana_preconfigure_ppcle_tso_if is undefined) or - (sap_hana_preconfigure_ppcle_tso_if is none) or - (sap_hana_preconfigure_ppcle_tso_if | trim | length == 0) - ) + when: not ((sap_hana_preconfigure_ppcle_tso_if is undefined) or + (sap_hana_preconfigure_ppcle_tso_if is none) or + (sap_hana_preconfigure_ppcle_tso_if | trim | length == 0)) loop_control: loop_var: line_item ignore_errors: true diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml index c1e155ebf..050b74220 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml @@ -5,7 +5,7 @@ ansible.builtin.debug: msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" -- name: ensure pseries-energy package is not installed +- name: Ensure pseries-energy package is not installed ansible.builtin.yum: name: pseries-energy state: absent diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml index 7cae4de24..22e533a9b 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml @@ -63,7 +63,7 @@ state: present when: - - not sap_hana_preconfigure_use_netapp_settings_nfs|d(false) + - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - not ansible_architecture == 'ppc64le' # Reason for noqa: We unconditionally reload the kernel parameters without first checking the current values @@ -75,4 +75,4 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_register_saphana_conf_sysctl_p_output.stdout_lines - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2382421|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2684254/configuration.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2684254/configuration.yml index 20cf78964..8d44d73d2 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2684254/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2684254/configuration.yml @@ -1,6 +1,6 @@ --- -- name: disable numa_balancing at boot +- name: Disable numa_balancing at boot ansible.builtin.lineinfile: path: /etc/default/grub backup: yes @@ -18,7 +18,7 @@ loop_control: loop_var: line_item -- name: disable transparent hugepages at boot +- name: Disable transparent hugepages at boot ansible.builtin.lineinfile: path: /etc/default/grub backup: yes @@ -36,7 +36,7 @@ loop_control: loop_var: line_item -- name: disable intel c states in grub config +- name: Disable intel c states in grub config ansible.builtin.lineinfile: path: /etc/default/grub backup: yes diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml index ba4a912c3..f7a7a3ed8 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml @@ -79,7 +79,7 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.exists - when: "ansible_distribution_version == '7.2'" + when: "ansible_distribution_version == '7.2'" - name: ... in case of RHEL 7.3 and above block: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_7.yml b/roles/sap_hana_preconfigure/vars/RedHat_7.yml index 907e84ca4..c84870649 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_7.yml @@ -53,7 +53,7 @@ __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } -__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars','__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" +__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" # In SAP Note 2235581, certain minimal required packages for the different RHEL 7 minor releases are listed. # The following will assign them properly to __sap_hana_preconfigure_min_pkgs. @@ -115,7 +115,7 @@ __sap_hana_preconfigure_min_packages_7_9_x86_64: __sap_hana_preconfigure_min_packages_7_9_ppc64le: - [ 'kernel', '3.10.0-1160.11.1.el7' ] -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture | string) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace(\".\", \"_\") + '_' + ansible_architecture | string) }}" __sap_hana_preconfigure_packages: # SAP note 2009879: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index c94d96638..fe2cfe96e 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -111,7 +111,7 @@ __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } -__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars','__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" +__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" # In SAP Note 2777782, certain minimal required packages for the different RHEL 8 minor releases are listed. # The following will assign them properly to __sap_hana_preconfigure_min_pkgs. @@ -164,7 +164,7 @@ __sap_hana_preconfigure_min_packages_8_8_x86_64: __sap_hana_preconfigure_min_packages_8_8_ppc64le: -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace(\".\", \"_\") + '_' + ansible_architecture) }}" __sap_hana_preconfigure_packages: # SAP NOTE 2772999: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 1e92dcb59..0fe0aa226 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -37,7 +37,7 @@ __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } -__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars','__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" +__sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" # In SAP Note XXX, certain minimal required packages for the different RHEL 9 minor releases are listed. # The following will assign them properly to __sap_hana_preconfigure_min_pkgs. @@ -83,7 +83,7 @@ __sap_hana_preconfigure_min_packages_9_8_x86_64: __sap_hana_preconfigure_min_packages_9_8_ppc64le: -__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars','__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace (\".\", \"_\") + '_' + ansible_architecture) }}" +__sap_hana_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_hana_preconfigure_min_packages_' + ansible_distribution_version | string | replace(\".\", \"_\") + '_' + ansible_architecture) }}" __sap_hana_preconfigure_packages: # SAP NOTE 2772999: From dc9cb3a435835a2f219d7d366aaa8b2da548b133 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 20 Sep 2022 13:50:27 +0100 Subject: [PATCH 151/375] sap_swpm: fixes for wd and java --- roles/sap_swpm/tasks/post_install/firewall.yml | 1 + roles/sap_swpm/templates/configfile.j2 | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/sap_swpm/tasks/post_install/firewall.yml b/roles/sap_swpm/tasks/post_install/firewall.yml index 48b359e8f..53c8e1046 100644 --- a/roles/sap_swpm/tasks/post_install/firewall.yml +++ b/roles/sap_swpm/tasks/post_install/firewall.yml @@ -27,6 +27,7 @@ - "36{{ sap_swpm_ascs_instance_nr }}" - "80{{ sap_swpm_ascs_instance_nr }}" - "443{{ sap_swpm_ascs_instance_nr }}" + - "443{{ sap_swpm_wd_instance_nr }}" - "8090" - "44390" diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 13c293348..15e0b46be 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -360,8 +360,9 @@ NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ sap_swpm_db_sid }}/HDB{{ s NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} -# NW_HDB_getDBInfo.tenantOsGroup = -# NW_HDB_getDBInfo.tenantOsUser = +# NW_HDB_getDBInfo.tenantOsGroup = {{ sap_swpm_db_sid | lower }}grp +# NW_HDB_getDBInfo.tenantOsUser = {{ sap_swpm_db_sid | lower }}usr +# NW_HDB_getDBInfo.tenantPort = # NW_HDB_DBClient.clientPathStrategy = LOCAL {% endif %} @@ -400,8 +401,8 @@ HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} # HDB_Recovery_Dialogs.skipExistenceCheck = false # HDB_Recovery_Dialogs.sourceDatabaseSid = # HDB_Recovery_Dialogs.useLicenseFile = false -# NW_CreateDBandLoad.movePVCforUsagePiAndDi = # HDB_Recovery_Dialogs.licenseFile = +# NW_CreateDBandLoad.movePVCforUsagePiAndDi = {% endif %} {% if 'nw_config_anydb' in sap_swpm_inifile_list %} @@ -453,6 +454,7 @@ NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} # NW_SCS_Instance.scsInstanceNumber = NW_SCS_Instance.instanceNumber = {{ sap_swpm_java_scs_instance_nr }} +NW_JAVA_Export.keyPhrase = {{ sap_swpm_master_password }} {% endif %} {% if 'nw_config_primary_application_server_instance' in sap_swpm_inifile_list %} From 3b9eed569ca55c2510d5b7693ef73a08a8b7163c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 20 Sep 2022 13:13:08 +0000 Subject: [PATCH 152/375] sap_ha_cluster: implemented check for matching agent or id definitions + save config into variable file --- roles/sap_ha_cluster/defaults/main.yml | 34 ++--- roles/sap_ha_cluster/meta/argument_specs.yml | 44 ++++++- .../tasks/construct_vars_hana_common.yml | 17 +++ .../tasks/construct_vars_hana_scaleout.yml | 2 +- .../tasks/construct_vars_hana_scaleup.yml | 2 +- .../tasks/construct_vars_stonith.yml | 2 - roles/sap_ha_cluster/tasks/main.yml | 119 ++++++++++++------ .../templates/cluster_create_config.j2 | 54 ++++++++ 8 files changed, 210 insertions(+), 64 deletions(-) create mode 100644 roles/sap_ha_cluster/templates/cluster_create_config.j2 diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 9ed8be82f..7c9457b94 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -2,21 +2,20 @@ # task name prefix __tname: "SAP HA Cluster -" -# TODO: Potentially make this role a wrapper for any SAP solution role to be configured -# in a pacemaker cluster. - # Variables for the cluster setup must be constructed by dedicated tasks! # The included 'ha_cluster' role will not work with the role variables set # in this role. -# TODO: make sure to first respect 'ha_cluster' native variables +sap_ha_cluster_create_config_only: false +sap_ha_cluster_create_config_dest: sap_ha_cluster_resource_config.yml +# Inherit SAP common parameters sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" sap_ha_cluster_hana_sid: "{{ sap_hana_sid }}" sap_ha_cluster_hana_instance_number: "{{ sap_hana_instance_number }}" sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" -# make sure that there is always the default fed into the included role +# Make sure that there is always the default fed into the included role sap_ha_cluster_fence_agent_packages: - fence-agents-all @@ -26,26 +25,33 @@ sap_ha_cluster_fence_agent_packages: sap_ha_cluster_replication_type: none # Optional parameters to customize resource parameters -# PREFER_SITE_TAKEOVER -sap_ha_cluster_prefer_site_takeover: true # AUTOMATED_REGISTER sap_ha_cluster_automated_register: true # DUPLICATE_PRIMARY_TIMEOUT sap_ha_cluster_duplicate_primary_timeout: 900 +# PREFER_SITE_TAKEOVER +sap_ha_cluster_prefer_site_takeover: true # Define empty parameters to avoid undefined input variables. # The arguments_spec check complains. -# The actual values are set by various tasks. +# The actual values must be empty, they are set by various tasks! +# +# ATTENTION: +# Any variables for 'ha_cluster' which this SAP role supports/inherits should also +# be added to +# - variable validations +# - conditionals (if applicable) +# - config report template # __sap_ha_cluster_cluster_name: -__sap_ha_cluster_hacluster_password: __sap_ha_cluster_cluster_properties: [] -__sap_ha_cluster_fence_agent_packages: [] +__sap_ha_cluster_constraints_colocation: [] +__sap_ha_cluster_constraints_location: [] +__sap_ha_cluster_constraints_order: [] __sap_ha_cluster_extra_packages: [] +__sap_ha_cluster_fence_agent_packages: [] +__sap_ha_cluster_hacluster_password: +__sap_ha_cluster_repos: [] __sap_ha_cluster_resource_primitives: [] __sap_ha_cluster_resource_groups: [] __sap_ha_cluster_resource_clones: [] -__sap_ha_cluster_constraints_location: [] -__sap_ha_cluster_constraints_colocation: [] -__sap_ha_cluster_constraints_order: [] -__sap_ha_cluster_repos: [] diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 0f1439288..2f860e2ef 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -3,12 +3,8 @@ # Argument specifications in this separate file maintain backwards compatibility. argument_specs: -# TODO: -# - add 'ha_cluster' native role variables that are supported by this -# sap_ha_cluster wrapper role (meaning, that are input parameters when -# including 'ha_cluster' -# - make 'ha_cluster' role variables the primary names, but allow -# alias variable names in the current role namespace +# TODO: make 'ha_cluster' role variables the primary names, but allow aliases +# in the current role namespace main: short_description: SAP HA requirements @@ -87,8 +83,44 @@ argument_specs: required: false default: 900 + sap_ha_cluster_create_config_only: + description: + - Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role. + - The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role. + - WARNING! This report may include sensitive details like secrets required for certain cluster resources! + type: bool + required: false + default: false + + sap_ha_cluster_create_config_dest: + description: + - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. + - Specify a path/filename to overwrite the default. + type: str + required: false + default: sap_ha_cluster_report_config.yml +# +# sap_ha_cluster_ +# description: +# type: +# required: false +# default: +# +# sap_ha_cluster_ +# description: +# type: +# required: false +# default: +# +# sap_ha_cluster_ +# description: +# type: +# required: false +# default: +# # sap_ha_cluster_ # description: # type: # required: false # default: +# diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 4a5fabb50..c2386abb3 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -37,6 +37,8 @@ value: 10 - name: timeout value: 600 + when: + - __resource_topology.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) - name: "{{ __tname }} Add resource: SAP HANA DB" ansible.builtin.set_fact: @@ -90,7 +92,10 @@ attrs: - name: timeout value: 3600 + when: + - __resource_hana.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) +# TODO: change logic to allow multiple VIP resources and constraints - name: "{{ __tname }} Add resource: SAP HANA VIP" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_vip ] }}" @@ -102,6 +107,8 @@ - attrs: - name: ip value: "{{ sap_ha_cluster_hana_instance_vip }}" + when: + - __resource_vip.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) - name: "{{ __tname }} Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: @@ -118,6 +125,8 @@ value: 1 - name: interleave value: "true" + when: + - __clone_topology.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) - name: "{{ __tname }} Add resource clone: SAP HANA DB" ansible.builtin.set_fact: @@ -134,6 +143,8 @@ value: 1 - name: interleave value: "true" + when: + - __clone_hana.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) # First start Topology, then HANA (automatically stops in reverse order) - name: "{{ __tname }} Add order constraint: Topology starts before DB" @@ -150,6 +161,8 @@ options: - name: symmetrical value: "false" + when: + - __constraint_order_topology.resource_then.id not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # Start the VIP only after the HANA resource has been promoted - name: "{{ __tname }} Add order constraint: VIP starts after DB is promoted" @@ -163,6 +176,8 @@ resource_then: id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" action: start + when: + - __constraint_order_vip.resource_then.id not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # The VIP only runs where HANA is promoted - name: "{{ __tname }} Add colocation constraint: VIP runs where HANA is promoted" @@ -178,3 +193,5 @@ options: - name: score value: 2000 + when: + - __constraint_colo_vip.resource_follower.id not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index da4bf7739..2268ed7b1 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -3,7 +3,7 @@ # to be fed into an included role # TODO: add here any scale-out special variable constructions -# TODO: make sure to first respect 'ha_cluster' native variables +# Make sure to first respect 'ha_cluster' native variables #- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" # ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml index 517c95e3d..2e03a3c5a 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -3,7 +3,7 @@ # to be fed into an included role # TODO: add here any scale-up special variable constructions -# TODO: make sure to first respect 'ha_cluster' native variables +# Make sure to first respect 'ha_cluster' native variables #- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" # ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index d61d3384c..bdacc6736 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -1,8 +1,6 @@ --- # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. -# -# TODO: make sure to first respect 'ha_cluster' native variables - name: "{{ __tname }} Add to cluster properties: stonith-enabled" ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 3a5dd6322..ceab3ccb4 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -10,14 +10,18 @@ # 5. Include ha_cluster role with the constructed parameters as role arguments # 6. Add solution specific config # * srhook - -# DONE: make sure to first respect 'ha_cluster' native variables -# Users can define 'ha_cluster' role parameters in their inventory +# 7. Save 'ha_cluster' input parameters in .yml file for easy re-use # TODO: Build all resource/constraint configuration variables based on -# simpler user input. +# simpler user input (think: drop-down options in a UI) # - Make resources configuration modular, allowing additional VIPs, for example +# TODO: create CIB backup before running ha_cluster + +# TODO: add parameter to just construct ha_cluster input variables and display the output +# use-case: users can extract the parameters to add them to their variable files +# and re-use ha_cluster with a complete set of configuration definitions + # The SAP ID must follow a strict format and not use reserved special values # TODO: This check may be better placed in a SAP role earlier in the chain... - name: "{{ __tname }} Validate SAP System ID" @@ -125,41 +129,76 @@ ### Up to here there has been NO changes, only environment validations and ### parameter constructions! -# include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) -- name: "{{ __tname }} Include System Role 'ha_cluster'" -# ansible.builtin.import_role: -# name: linux-system-roles.ha_cluster - ansible.builtin.include_role: - name: linux-system-roles.ha_cluster - apply: +- name: "{{ __tname }} Block that executes the actual changes" + block: + +# TODO: sanity: check if there is a cluster already and back up the CIB + + # include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) + - name: "{{ __tname }} Include System Role 'ha_cluster'" + ansible.builtin.include_role: + name: linux-system-roles.ha_cluster + apply: + tags: ha_cluster + no_log: true + vars: + ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" + ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" + ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" + ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" + ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" + ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" + ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" + ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" + ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" + # no_log: true # some parameters contain secrets tags: ha_cluster - no_log: true - vars: - ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" - ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" - ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" - __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" - ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" - ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" - ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" - ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" - ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" - ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" - ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" -# no_log: true # some parameters contain secrets - tags: ha_cluster - -#### from old ha role - -- name: "{{ __tname }} Update resource default values" - ansible.builtin.shell: | - pcs resource defaults update resource-stickiness=1000 - pcs resource defaults update migration-threshold=5000 - changed_when: not ansible_check_mode - -- name: "{{ __tname }} Include srHook configuration" - ansible.builtin.include_tasks: - file: configure_srhook.yml - apply: + + #### from old ha role + +# TODO: test if the defaults can be updated as part of other parameters + - name: "{{ __tname }} Update resource default values" + ansible.builtin.shell: | + pcs resource defaults update resource-stickiness=1000 + pcs resource defaults update migration-threshold=5000 + changed_when: not ansible_check_mode + + - name: "{{ __tname }} Include srHook configuration" + ansible.builtin.include_tasks: + file: configure_srhook.yml + apply: + tags: srhook tags: srhook - tags: srhook + + when: + - not sap_ha_cluster_create_config_only +### END OF BLOCK + +# TODO: how to deal with secrets in output? + + +- name: "{{ __tname }} Create cluster configuration parameters file" + ansible.builtin.template: + backup: true + dest: "{{ sap_ha_cluster_create_config_dest }}" + mode: 0600 + src: cluster_create_config.j2 + delegate_to: localhost + run_once: true + become: false + check_mode: no + when: + - sap_ha_cluster_create_config_dest is defined + +- name: "{{ __tname }} Display configuration parameters SAVE FILE location" + ansible.builtin.debug: + msg: | + The cluster resource configuration parameters have been saved here: + >>>>> {{ sap_ha_cluster_create_config_dest }} <<<<< + + Please include these variable definitions if you run the 'ha_cluster' + linux system role separately. + !! Secret values of resources may be included in this output !! + run_once: true diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 new file mode 100644 index 000000000..7a225589a --- /dev/null +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -0,0 +1,54 @@ +--- +# This is an input variables file automatically generated for use with the +# 'ha_cluster' linux system role. +# +# Created by: {{ ansible_role_name }} + +# The name of the cluster +ha_cluster_cluster_name: {{ __sap_ha_cluster_cluster_name }} + +# +ha_cluster_cluster_properties: +{{ __sap_ha_cluster_cluster_properties | to_nice_yaml(indent=2) }} + +# +ha_cluster_constraints_colocation: +{{ __sap_ha_cluster_constraints_colocation | to_nice_yaml(indent=2) }} + +{% if __sap_ha_cluster_constraints_location is defined and __sap_ha_cluster_constraints_location|length > 0 %} +# +ha_cluster_constraints_location: +{{ __sap_ha_cluster_constraints_location | to_nice_yaml(indent=2) }} +{% endif -%} + +# +ha_cluster_constraints_order: +{{ __sap_ha_cluster_constraints_order | to_nice_yaml(indent=2) }} + +{%- if sap_ha_cluster_extra_packages is defined and sap_ha_cluster_extra_packages|length > 0 %} +# +ha_cluster_extra_packages: +{{ sap_ha_cluster_extra_packages | to_nice_yaml(indent=2) }} +{% endif %} + +# +ha_cluster_fence_agent_packages: +{{ sap_ha_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} + +# +__ha_cluster_repos: +{{ sap_ha_cluster_repos | to_nice_yaml(indent=2) }} + +# +ha_cluster_resource_clones: +{{ __sap_ha_cluster_resource_clones | to_nice_yaml(indent=2) }} + +{%- if __sap_ha_cluster_resource_groups is defined and __sap_ha_cluster_resource_groups|length > 0 %} +# +ha_cluster_resource_groups: +{{ __sap_ha_cluster_resource_groups | to_nice_yaml(indent=2) }} +{% endif %} + +# +ha_cluster_resource_primitives: +{{ __sap_ha_cluster_resource_primitives | to_nice_yaml(indent=2) }} From b96b5d621295e48173147ad42281da1966acbcb5 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 20 Sep 2022 14:45:07 +0100 Subject: [PATCH 153/375] sap_swpm: fix empty var would set port 443 --- roles/sap_swpm/tasks/post_install/firewall.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/tasks/post_install/firewall.yml b/roles/sap_swpm/tasks/post_install/firewall.yml index 53c8e1046..9353a1333 100644 --- a/roles/sap_swpm/tasks/post_install/firewall.yml +++ b/roles/sap_swpm/tasks/post_install/firewall.yml @@ -27,9 +27,9 @@ - "36{{ sap_swpm_ascs_instance_nr }}" - "80{{ sap_swpm_ascs_instance_nr }}" - "443{{ sap_swpm_ascs_instance_nr }}" - - "443{{ sap_swpm_wd_instance_nr }}" - "8090" - "44390" + - "{{ 443{{ sap_swpm_wd_instance_nr }} if sap_swpm_wd_instance_nr is not empty }}" - name: SAP SWPM Post Install - Add Ports Based on NR - {{ sap_swpm_pas_instance_nr }} ansible.builtin.include_tasks: update_firewall.yml From fc315ecaa91870877c46a77be8109367a9a2f616 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 11:14:34 +0100 Subject: [PATCH 154/375] fix: clearer and simplified explanation in template file header --- .../templates/oracledb_rsp_assistants_dbca.j2 | 22 +++---------- .../oracledb_rsp_assistants_netca.j2 | 32 ++----------------- .../oracledb_rsp_install_dbinstall.j2 | 18 ++--------- .../oracledb_rsp_inventory_oracleserver_ee.j2 | 27 ++-------------- 4 files changed, 11 insertions(+), 88 deletions(-) diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 index 0b8e4445b..e656818e7 100644 --- a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_dbca.j2 @@ -1,21 +1,7 @@ -#/assistants/dbca/dbca.rsp -############################################################################## -## ## -## DBCA response file ## -## ------------------ ## -## Copyright(c) Oracle Corporation 1998,2019. All rights reserved. ## -## ## -## Specify values for the variables listed below to customize ## -## your installation. ## -## ## -## Each variable is associated with a comment. The comment ## -## can help to populate the variables with the appropriate ## -## values. ## -## ## -## IMPORTANT NOTE: This file contains plain text passwords and ## -## should be secured to have read permission only by oracle user ## -## or db administrator who owns this installation. ## -############################################################################## +# Default sample of automated response (config) file for Oracle Database Configuration Assistant (DBCA) +# /assistants/dbca/dbca.rsp + + #------------------------------------------------------------------------------- # Do not change the following system generated value. #------------------------------------------------------------------------------- diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 index f221de04b..db8e689f6 100644 --- a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_assistants_netca.j2 @@ -1,32 +1,6 @@ -#/assistants/netca/netca.rsp -###################################################################### -## Copyright(c) 1998, 2018 Oracle Corporation. All rights reserved. ## -## ## -## Specify values for the variables listed below to customize your ## -## installation. ## -## ## -## Each variable is associated with a comment. The comment ## -## identifies the variable type. ## -## ## -## Please specify the values in the following format: ## -## ## -## Type Example ## -## String "Sample Value" ## -## Boolean True or False ## -## Number 1000 ## -## StringList {"String value 1","String Value 2"} ## -## ## -###################################################################### -## ## -## This sample response file causes the Oracle Net Configuration ## -## Assistant (NetCA) to complete an Oracle Net configuration during ## -## a custom install of the Oracle12c server which is similar to ## -## what would be created by the NetCA during typical Oracle12c ## -## install. It also documents all of the NetCA response file ## -## variables so you can create your own response file to configure ## -## Oracle Net during an install the way you wish. ## -## ## -###################################################################### +# Default sample of automated response (config) file for Oracle Net Configuration Assistant (NetCA) +# /assistants/netca/netca.rsp + [GENERAL] RESPONSEFILE_VERSION="19.0" diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 index 55256bf72..67de06216 100644 --- a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 @@ -1,19 +1,5 @@ -#/install/response/db_install.rsp -#################################################################### -## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.## -## ## -## Specify values for the variables listed below to customize ## -## your installation. ## -## ## -## Each variable is associated with a comment. The comment ## -## can help to populate the variables with the appropriate ## -## values. ## -## ## -## IMPORTANT NOTE: This file contains plain text passwords and ## -## should be secured to have read permission only by oracle user ## -## or db administrator who owns this installation. ## -## ## -#################################################################### +# Default sample of automated response (config) file for Oracle DB Installation +# /install/response/db_install.rsp #------------------------------------------------------------------------------ diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 index 956e11b92..504164fa0 100644 --- a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_inventory_oracleserver_ee.j2 @@ -1,28 +1,5 @@ -#/inventory/response/oracle.server_EE.rsp -#################################################################### -## Copyright (c) 1999, 2019 Oracle. All rights reserved. ## -## ## -## Specify values for the variables listed below to customize ## -## your installation. ## -## ## -## Each variable is associated with a comment. The comment ## -## identifies the variable type. ## -## ## -## Please specify the values in the following format: ## -## ## -## Type Example ## -## String "Sample Value" ## -## Boolean True or False ## -## Number 1000 ## -## StringList {"String value 1","String Value 2"} ## -## ## -## The values that are given as need to be ## -## specified for a silent installation to be successful. ## -## ## -## ## -## This response file is generated by Oracle Software ## -## Packager. ## -#################################################################### +# Default sample of automated response (config) file for Oracle DB Installation Enterprise Edition (EE) +# /inventory/response/oracle.server_EE.rsp RESPONSEFILE_VERSION=2.2.1.0.0 From 054484655612af2a7ae8ab776f66ca64e3d88868 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 11:19:35 +0100 Subject: [PATCH 155/375] fix: linting --- roles/sap_anydb_install_oracle/handlers/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/sap_anydb_install_oracle/handlers/main.yml b/roles/sap_anydb_install_oracle/handlers/main.yml index 42237ea8b..4646e028f 100644 --- a/roles/sap_anydb_install_oracle/handlers/main.yml +++ b/roles/sap_anydb_install_oracle/handlers/main.yml @@ -6,20 +6,20 @@ test_command: /bin/true listen: __oracledb_prep_reboot_handler when: - - oracledb_prep_reboot_ok|d(false) + - oracledb_prep_reboot_ok | d(false) - name: Let the role fail if a reboot is required ansible.builtin.fail: msg: Reboot is required! listen: __oracledb_prep_reboot_handler when: - - oracledb_prep_fail_if_reboot_required|d(true) - - not oracledb_prep_reboot_ok|d(false) + - oracledb_prep_fail_if_reboot_required | d(true) + - not oracledb_prep_reboot_ok | d(false) - name: Show a warning message if a reboot is required ansible.builtin.debug: msg: "WARN: Reboot is required!" listen: __oracledb_prep_reboot_handler when: - - not oracledb_prep_fail_if_reboot_required|d(true) - - not oracledb_prep_reboot_ok|d(false) + - not oracledb_prep_fail_if_reboot_required | d(true) + - not oracledb_prep_reboot_ok | d(false) From 694670223579e95e37cdcf2ccdf5a7570c670a1e Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 11:44:38 +0100 Subject: [PATCH 156/375] sap_anydb_install_oracle: fixes to match style guide --- roles/sap_anydb_install_oracle/README.md | 56 +++++++++++++++++++ .../defaults/main.yml | 18 +++--- .../handlers/main.yml | 16 +++--- .../tasks/oracledb_install_pre.yml | 42 +++++++------- .../tasks/oracledb_installer_minimal.yml | 46 +++++++-------- .../tasks/oracledb_installer_responsefile.yml | 32 +++++------ .../oracledb_rsp_install_dbinstall.j2 | 16 +++--- 7 files changed, 141 insertions(+), 85 deletions(-) create mode 100644 roles/sap_anydb_install_oracle/README.md diff --git a/roles/sap_anydb_install_oracle/README.md b/roles/sap_anydb_install_oracle/README.md new file mode 100644 index 000000000..6a4cf261d --- /dev/null +++ b/roles/sap_anydb_install_oracle/README.md @@ -0,0 +1,56 @@ +# sap_anydb_install_oracle Ansible Role + +Ansible role for Oracle DB 19.x installation for SAP + +## Prerequisites + +### SAP HANA Software Installation .SAR Files + +Download installation media from SAP Download Center on host, and set Ansible Variable `sap_anydb_install_oracle_extract_path` to this path. + +### Default Parameters + +Please check the default parameters file for more information on other parameters that can be used as an input +- [**sap_anydb_install_oracle** default parameters](defaults/main.yml) + +## Execution + +Sample Ansible Playbook Execution: + +- Local Host Installation + - `ansible-playbook --connection=local --limit localhost -i "localhost," sap-anydb-oracle-install.yml -e "@inputs/oracledb.install"` + +- Target Host Installation + - `ansible-playbook -i "" sap-anydb-oracle-install.yml -e "@inputs/oracledb.install"` + +## Sample playbook + +### Sample playbook for installing a new scale-up (=single node) SAP HANA system + +```yaml +--- +- hosts: all + become: true + + collections: + - community.sap_install + + vars: + sap_anydb_install_oracle_method: minimal + sap_anydb_install_oracle_sid: "OR1" + sap_anydb_install_oracle_base: "/oracle" + sap_anydb_install_oracle_system_password: "Password1%" + sap_anydb_install_oracle_extract_path: "/software/oracledb_extracted" + + - name: Execute Ansible Role sap_anydb_install_oracle + include_role: + name: { role: community.sap_install.sap_anydb_install_oracle } +``` + +## License + +Apache license 2.0 + +## Author Information + +Sean Freeman diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml index 64befd292..dbf8d1ef3 100644 --- a/roles/sap_anydb_install_oracle/defaults/main.yml +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -1,22 +1,22 @@ --- -oracledb_prep_reboot_ok: yes +sap_anydb_install_oracle_prep_reboot_ok: yes -oracledb_prep_fail_if_reboot_required: no +sap_anydb_install_oracle_prep_fail_if_reboot_required: no -oracledb_prep_precheck: no +sap_anydb_install_oracle_prep_precheck: no # minimal, responsefile sap_anydb_install_oracle_method: minimal -oracledb_sid: OR1 +sap_anydb_install_oracle_sid: OR1 -oracledb_base: /oracle +sap_anydb_install_oracle_base: /oracle -oracledb_filesystem_storage: /oradata +sap_anydb_install_oracle_filesystem_storage: /oradata -oracledb_inventory_central: /oraInventory +sap_anydb_install_oracle_inventory_central: /oraInventory -oracledb_system_password: +sap_anydb_install_oracle_system_password: -oracledb_installer_extract_path: +sap_anydb_install_oracle_extract_path: # e.g. /software diff --git a/roles/sap_anydb_install_oracle/handlers/main.yml b/roles/sap_anydb_install_oracle/handlers/main.yml index 4646e028f..873560edd 100644 --- a/roles/sap_anydb_install_oracle/handlers/main.yml +++ b/roles/sap_anydb_install_oracle/handlers/main.yml @@ -4,22 +4,22 @@ - name: Reboot the managed node ansible.builtin.reboot: test_command: /bin/true - listen: __oracledb_prep_reboot_handler + listen: __sap_anydb_install_oracle_reboot_handler when: - - oracledb_prep_reboot_ok | d(false) + - sap_anydb_install_oracle_prep_reboot_ok | d(false) - name: Let the role fail if a reboot is required ansible.builtin.fail: msg: Reboot is required! - listen: __oracledb_prep_reboot_handler + listen: __sap_anydb_install_oracle_reboot_handler when: - - oracledb_prep_fail_if_reboot_required | d(true) - - not oracledb_prep_reboot_ok | d(false) + - sap_anydb_install_oracle_prep_fail_if_reboot_required | d(true) + - not sap_anydb_install_oracle_prep_reboot_ok | d(false) - name: Show a warning message if a reboot is required ansible.builtin.debug: msg: "WARN: Reboot is required!" - listen: __oracledb_prep_reboot_handler + listen: __sap_anydb_install_oracle_reboot_handler when: - - not oracledb_prep_fail_if_reboot_required | d(true) - - not oracledb_prep_reboot_ok | d(false) + - not sap_anydb_install_oracle_prep_fail_if_reboot_required | d(true) + - not sap_anydb_install_oracle_prep_reboot_ok | d(false) diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml index 1b4e408aa..b5cabd5b1 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_install_pre.yml @@ -33,7 +33,7 @@ - unixODBC-devel - libnsl state: present - notify: __oracledb_prep_reboot_handler + notify: __sap_anydb_install_oracle_reboot_handler # Removed Packages from RHEL 8.x # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages @@ -75,12 +75,12 @@ group: "{{ item.group }}" mode: '0774' loop: - - { path: "{{ oracledb_base }}", owner: oracle, group: oinstall } # Oracle Base directory - - { path: "{{ oracledb_base }}/dvd/19.0.0", owner: oracle, group: oinstall } # Oracle home image file path - - { path: "{{ oracledb_base }}/{{ oracledb_sid }}/19.0.0", owner: oracle, group: oinstall } # Oracle Home installation directory - - { path: "{{ oracledb_inventory_central }}", owner: oracle, group: oracle } # Oracle Central Inventory - - { path: "{{ oracledb_base }}{{ oracledb_inventory_central }}", owner: oracle, group: oinstall } # Oracle Inventory - - { path: "{{ oracledb_filesystem_storage }}", owner: oracle, group: oinstall } + - { path: "{{ sap_anydb_install_oracle_base }}", owner: oracle, group: oinstall } # Oracle Base directory + - { path: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0", owner: oracle, group: oinstall } # Oracle home image file path + - { path: "{{ sap_anydb_install_oracle_base }}/{{ sap_anydb_install_oracle_sid }}/19.0.0", owner: oracle, group: oinstall } # Oracle Home installation directory + - { path: "{{ sap_anydb_install_oracle_inventory_central }}", owner: oracle, group: oracle } # Oracle Central Inventory + - { path: "{{ sap_anydb_install_oracle_base }}{{ sap_anydb_install_oracle_inventory_central }}", owner: oracle, group: oinstall } # Oracle Inventory + - { path: "{{ sap_anydb_install_oracle_filesystem_storage }}", owner: oracle, group: oinstall } - { path: /rman, owner: oracle, group: oinstall } - { path: /archivelog, owner: oracle, group: oinstall } @@ -88,8 +88,8 @@ ansible.builtin.copy: remote_src: true directory_mode: true - src: "{{ oracledb_installer_extract_path }}/LINUX_X86_64/" - dest: "{{ oracledb_base }}/dvd/19.0.0" + src: "{{ sap_anydb_install_oracle_extract_path }}/LINUX_X86_64/" + dest: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0" owner: oracle group: oinstall mode: '0774' @@ -101,33 +101,33 @@ become_user: oracle args: executable: /bin/csh - chdir: "{{ oracledb_base }}/dvd/19.0.0/" - register: oracledb_precheck - changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_precheck.stdout" - failed_when: "oracledb_precheck.rc not in [ 0, 1 ]" + chdir: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0/" + register: __sap_anydb_install_oracle_precheck + changed_when: "'SAP RUNINSTALLER: Completed' in __sap_anydb_install_oracle_precheck.stdout" + failed_when: "__sap_anydb_install_oracle_precheck.rc not in [ 0, 1 ]" ansible.builtin.shell: | setenv CV_ASSUME_DISTID "OL7" setenv DISPLAY - setenv DB_SID "{{ oracledb_sid }}" - setenv ORACLE_BASE "{{ oracledb_base }}" + setenv DB_SID "{{ sap_anydb_install_oracle_sid }}" + setenv ORACLE_BASE "{{ sap_anydb_install_oracle_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" setenv ORACLE_HOME_NAME "OraDb19c_1" setenv IHRDBMS "$ORACLE_HOME" setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home" - setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" + setenv INVENTORY_LOCATION "{{ sap_anydb_install_oracle_inventory_central }}" $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohextract -ohcheck -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L" when: - - oracledb_prep_precheck + - sap_anydb_install_oracle_prep_precheck # Avoid built-in file Ansible Module with absent, this would remove directory too - name: Oracle DB - remove extracted directory after precheck - ansible.builtin.shell: rm -rf "{{ oracledb_base }}/dvd/19.0.0/*" + ansible.builtin.shell: rm -rf "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0/*" when: - - oracledb_prep_precheck + - sap_anydb_install_oracle_prep_precheck #- name: Oracle DB - debug output # ansible.builtin.debug: -# var: oracledb_precheck.stdout_lines +# var: __sap_anydb_install_oracle_precheck.stdout_lines # when: -# - oracledb_prep_precheck +# - sap_anydb_install_oracle_prep_precheck diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml index d4980b97a..df2a59a44 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml @@ -32,29 +32,29 @@ become_user: oracle args: executable: /bin/csh - chdir: "{{ oracledb_base }}/dvd/19.0.0/" - register: oracledb_install - changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_install.stdout" - failed_when: "oracledb_install.rc not in [ 0, 1 ]" + chdir: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0/" + register: __sap_anydb_install_oracle_install_exec + changed_when: "'SAP RUNINSTALLER: Completed' in __sap_anydb_install_oracle_install_exec.stdout" + failed_when: "__sap_anydb_install_oracle_install_exec.rc not in [ 0, 1 ]" ansible.builtin.shell: | setenv CV_ASSUME_DISTID "OL7" setenv DISPLAY - setenv DB_SID "{{ oracledb_sid }}" - setenv ORACLE_BASE "{{ oracledb_base }}" + setenv DB_SID "{{ sap_anydb_install_oracle_sid }}" + setenv ORACLE_BASE "{{ sap_anydb_install_oracle_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" setenv ORACLE_HOME_NAME "OraDb19c_1" setenv IHRDBMS "$ORACLE_HOME" setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19" setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home" - setenv INVENTORY_LOCATION "{{ oracledb_inventory_central }}" - setenv oracle.install.db.config.starterdb.globalDBName "{{ oracledb_sid }}" - setenv oracle.install.db.config.starterdb.SID "{{ oracledb_sid }}" + setenv INVENTORY_LOCATION "{{ sap_anydb_install_oracle_inventory_central }}" + setenv oracle.install.db.config.starterdb.globalDBName "{{ sap_anydb_install_oracle_sid }}" + setenv oracle.install.db.config.starterdb.SID "{{ sap_anydb_install_oracle_sid }}" setenv oracle.install.db.config.starterdb.memoryLimit "{{ (ansible_memtotal_mb*0.95) | int }}" setenv oracle.install.db.config.starterdb.storageType "FILE_SYSTEM_STORAGE" - setenv oracle.install.db.config.starterdb.fileSystemStorage.dataLocation "{{ oracledb_filesystem_storage }}" - setenv oracle.install.db.config.starterdb.password.ALL "{{ oracledb_system_password }}" - setenv oracle.install.db.config.starterdb.password.SYS "{{ oracledb_system_password }}" - setenv oracle.install.db.config.starterdb.password.SYSTEM "{{ oracledb_system_password }}" + setenv oracle.install.db.config.starterdb.fileSystemStorage.dataLocation "{{ sap_anydb_install_oracle_filesystem_storage }}" + setenv oracle.install.db.config.starterdb.password.ALL "{{ sap_anydb_install_oracle_system_password }}" + setenv oracle.install.db.config.starterdb.password.SYS "{{ sap_anydb_install_oracle_system_password }}" + setenv oracle.install.db.config.starterdb.password.SYSTEM "{{ sap_anydb_install_oracle_system_password }}" setenv oracle.install.db.DBA_GROUP "dba" setenv oracle.install.db.BACKUPDBA_GROUP "dba" setenv oracle.install.db.DGDBA_GROUP "dba" @@ -66,10 +66,10 @@ - name: Oracle DB - Root command scripts for Oracle DB Inventory and Oracle DB Home, from root user become_user: root ansible.builtin.shell: | - export DB_SID="{{ oracledb_sid }}" - export ORACLE_BASE="{{ oracledb_base }}" + export DB_SID="{{ sap_anydb_install_oracle_sid }}" + export ORACLE_BASE="{{ sap_anydb_install_oracle_base }}" export ORACLE_HOME="$ORACLE_BASE/$DB_SID/19.0.0" - export INVENTORY_LOCATION="{{ oracledb_inventory_central }}" + export INVENTORY_LOCATION="{{ sap_anydb_install_oracle_inventory_central }}" $INVENTORY_LOCATION/orainstRoot.sh $ORACLE_HOME/root.sh @@ -78,13 +78,13 @@ become_user: oracle args: executable: /bin/csh - register: oracledb_config - changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_config.stdout" - failed_when: "oracledb_config.rc not in [ 0, 1 ]" + register: __sap_anydb_install_oracle_config_exec + changed_when: "'SAP RUNINSTALLER: Completed' in __sap_anydb_install_oracle_config_exec.stdout" + failed_when: "__sap_anydb_install_oracle_config_exec.rc not in [ 0, 1 ]" ignore_errors: true ansible.builtin.shell: | - setenv DB_SID "{{ oracledb_sid }}" - export ORACLE_BASE="{{ oracledb_base }}" + setenv DB_SID "{{ sap_anydb_install_oracle_sid }}" + export ORACLE_BASE="{{ sap_anydb_install_oracle_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" set CURRENT_DATE_ISO=`date +%Y-%m-%d` set ORACLEDB_RESP_GENERATED_FILE=`find $ORACLE_BASE -iname "db_$CURRENT_DATE_ISO*"` @@ -94,8 +94,8 @@ become_user: root ansible.builtin.shell: | ls -1 /oraInventory/logs/InstallActions*/installActions* - register: oracledb_logs + register: __sap_anydb_install_oracle_logs - name: Oracle DB - View the following Oracle DB installation log files ansible.builtin.debug: - var: oracledb_logs.stdout_lines + var: __sap_anydb_install_oracle_logs.stdout_lines diff --git a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml index b7a4fd628..a43f94514 100644 --- a/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml +++ b/roles/sap_anydb_install_oracle/tasks/oracledb_installer_responsefile.yml @@ -1,11 +1,11 @@ --- -- name: Oracle DB - Process Oracle Response File jina template and create file {{ oracledb_base }}/dvd/19.0.0/oracledb_installer.rsp +- name: Oracle DB - Process Oracle Response File jina template and create file {{ sap_anydb_install_oracle_base }}/dvd/19.0.0/generated_db_install.rsp ansible.builtin.template: src: "{{ role_path }}/templates/oracledb_rsp_install_dbinstall.j2" - dest: "{{ oracledb_base }}/dvd/19.0.0/generated_db_install.rsp" + dest: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0/generated_db_install.rsp" mode: '0640' - register: oracledb_resp_db_install + register: __sap_anydb_install_oracle_resp_db_install # Installation requires change directory to Oracle RDBMS installation media directory - name: Oracle DB - Install Oracle DB, using Response File @@ -13,23 +13,23 @@ become_user: oracle args: executable: /bin/csh - chdir: "{{ oracledb_base }}/dvd/19.0.0/" - register: oracledb_install - changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_install.stdout" - failed_when: "oracledb_install.rc not in [ 0, 1 ]" + chdir: "{{ sap_anydb_install_oracle_base }}/dvd/19.0.0/" + register: __sap_anydb_install_oracle_install_exec + changed_when: "'SAP RUNINSTALLER: Completed' in __sap_anydb_install_oracle_install_exec.stdout" + failed_when: "__sap_anydb_install_oracle_install_exec.rc not in [ 0, 1 ]" ansible.builtin.shell: | setenv CV_ASSUME_DISTID "OL7" setenv DISPLAY - setenv DB_SID "{{ oracledb_sid }}" - {{ oracledb_base }}/dvd/19.0.0/db_home/SAP/19cinstall.sh -silent -ohinstall -responseFile {{ oracledb_base }}/dvd/19.0.0/generated_db_install.rsp + setenv DB_SID "{{ sap_anydb_install_oracle_sid }}" + {{ sap_anydb_install_oracle_base }}/dvd/19.0.0/db_home/SAP/19cinstall.sh -silent -ohinstall -responseFile {{ sap_anydb_install_oracle_base }}/dvd/19.0.0/generated_db_install.rsp - name: Oracle DB - Root command scripts for Oracle DB Inventory and Oracle DB Home, from root user become_user: root ansible.builtin.shell: | export DB_SID="OR1" - export ORACLE_BASE="{{ oracledb_base }}" + export ORACLE_BASE="{{ sap_anydb_install_oracle_base }}" export ORACLE_HOME="$ORACLE_BASE/$DB_SID/19.0.0" - export INVENTORY_LOCATION="{{ oracledb_inventory_central }}" + export INVENTORY_LOCATION="{{ sap_anydb_install_oracle_inventory_central }}" $INVENTORY_LOCATION/orainstRoot.sh $ORACLE_HOME/root.sh @@ -38,13 +38,13 @@ become_user: oracle args: executable: /bin/csh - register: oracledb_config - changed_when: "'SAP RUNINSTALLER: Completed' in oracledb_config.stdout" - failed_when: "oracledb_config.rc not in [ 0, 1 ]" + register: __sap_anydb_install_oracle_config_exec + changed_when: "'SAP RUNINSTALLER: Completed' in __sap_anydb_install_oracle_config_exec.stdout" + failed_when: "__sap_anydb_install_oracle_config_exec.rc not in [ 0, 1 ]" ignore_errors: true ansible.builtin.shell: | - setenv DB_SID "{{ oracledb_sid }}" - export ORACLE_BASE="{{ oracledb_base }}" + setenv DB_SID "{{ sap_anydb_install_oracle_sid }}" + export ORACLE_BASE="{{ sap_anydb_install_oracle_base }}" setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0" set CURRENT_DATE_ISO=`date +%Y-%m-%d` set ORACLEDB_RESP_GENERATED_FILE=`find $ORACLE_BASE -iname "db_$CURRENT_DATE_ISO*"` diff --git a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 index 67de06216..7dcb9d58c 100644 --- a/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 +++ b/roles/sap_anydb_install_oracle/templates/oracledb_rsp_install_dbinstall.j2 @@ -25,12 +25,12 @@ UNIX_GROUP_NAME=oinstall # This is an optional parameter if installing on # Windows based Operating System. #------------------------------------------------------------------------------- -INVENTORY_LOCATION={{ oracledb_inventory_central }} +INVENTORY_LOCATION={{ sap_anydb_install_oracle_inventory_central }} #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Home. #------------------------------------------------------------------------------- -ORACLE_HOME={{ oracledb_base }}/{{ oracledb_sid }}/19 +ORACLE_HOME={{ sap_anydb_install_oracle_base }}/{{ sap_anydb_install_oracle_sid }}/19 #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Base. @@ -167,12 +167,12 @@ oracle.install.db.config.starterdb.type=GENERAL_PURPOSE #------------------------------------------------------------------------------- # Specify the Starter Database Global Database Name. #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.globalDBName={{ oracledb_sid }} +oracle.install.db.config.starterdb.globalDBName={{ sap_anydb_install_oracle_sid }} #------------------------------------------------------------------------------- # Specify the Starter Database SID. #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.SID={{ oracledb_sid }} +oracle.install.db.config.starterdb.SID={{ sap_anydb_install_oracle_sid }} #------------------------------------------------------------------------------- # Specify whether the database should be configured as a Container database. @@ -242,17 +242,17 @@ oracle.install.db.config.starterdb.installExampleSchemas=false # This variable holds the password that is to be used for all schemas in the # starter database. #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.password.ALL={{ oracledb_system_password }} +oracle.install.db.config.starterdb.password.ALL={{ sap_anydb_install_oracle_system_password }} #------------------------------------------------------------------------------- # Specify the SYS password for the starter database. #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.password.SYS={{ oracledb_system_password }} +oracle.install.db.config.starterdb.password.SYS={{ sap_anydb_install_oracle_system_password }} #------------------------------------------------------------------------------- # Specify the SYSTEM password for the starter database. #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.password.SYSTEM={{ oracledb_system_password }} +oracle.install.db.config.starterdb.password.SYSTEM={{ sap_anydb_install_oracle_system_password }} #------------------------------------------------------------------------------- # Specify the DBSNMP password for the starter database. @@ -326,7 +326,7 @@ oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE # # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE #------------------------------------------------------------------------------- -oracle.install.db.config.starterdb.fileSystemStorage.dataLocation={{ oracledb_filesystem_storage }} +oracle.install.db.config.starterdb.fileSystemStorage.dataLocation={{ sap_anydb_install_oracle_filesystem_storage }} #------------------------------------------------------------------------------- # Specify the recovery location. From 5eff8aba9540cc59300b935e43711f98a3ffde0a Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 11:45:40 +0100 Subject: [PATCH 157/375] sap_anydb_install_oracle: fix typos --- roles/sap_anydb_install_oracle/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/sap_anydb_install_oracle/README.md b/roles/sap_anydb_install_oracle/README.md index 6a4cf261d..9db03c630 100644 --- a/roles/sap_anydb_install_oracle/README.md +++ b/roles/sap_anydb_install_oracle/README.md @@ -4,7 +4,7 @@ Ansible role for Oracle DB 19.x installation for SAP ## Prerequisites -### SAP HANA Software Installation .SAR Files +### Software Installation files Download installation media from SAP Download Center on host, and set Ansible Variable `sap_anydb_install_oracle_extract_path` to this path. @@ -25,8 +25,6 @@ Sample Ansible Playbook Execution: ## Sample playbook -### Sample playbook for installing a new scale-up (=single node) SAP HANA system - ```yaml --- - hosts: all From a4c077d176f60ac2ba14479556111a45b4872d01 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 12:20:39 +0000 Subject: [PATCH 158/375] sap_ha_cluster: rudimentary doc --- roles/sap_ha_cluster/README.md | 3 ++ roles/sap_ha_cluster/meta/argument_specs.yml | 37 ++++++++++++++------ roles/sap_ha_cluster/tasks/main.yml | 3 +- roles/sap_ha_cluster/variables.md | 14 ++++++++ 4 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 roles/sap_ha_cluster/README.md create mode 100644 roles/sap_ha_cluster/variables.md diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md new file mode 100644 index 000000000..746eb1145 --- /dev/null +++ b/roles/sap_ha_cluster/README.md @@ -0,0 +1,3 @@ +# new role... + +@@include[variables.md](variables.md) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 2f860e2ef..da1c3fbe3 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -18,20 +18,23 @@ argument_specs: alias: sap_ha_cluster_hana_sid sap_hana_instance_number: - description: The instance number of the SAP HANA database which is role will configure in the cluster. + description: + - The instance number of the SAP HANA database which is role will configure in the cluster. type: str required: true alias: sap_ha_cluster_hana_instance_number ha_cluster_cluster_name: - description: The name of the pacemaker cluster. + description: + - The name of the pacemaker cluster. type: str required: false default: my-cluster alias: sap_ha_cluster_cluster_name ha_cluster_hacluster_password: - description: The password of the `hacluster` user which is created during pacemaker installation. + description: + - The password of the `hacluster` user which is created during pacemaker installation. type: str required: true no_log: true @@ -40,12 +43,13 @@ argument_specs: sap_hana_vip: description: - Virtual floating IP for SAP HANA DB connections. - - This IP always will always run on the promoted HANA node. + - This IP will always run on the promoted HANA node. type: str required: true sap_ha_cluster_sap_type: - description: The SAP landscape to be installed. + description: + - The SAP landscape to be installed. type: str required: false default: scaleup @@ -54,7 +58,8 @@ argument_specs: - scaleout sap_ha_cluster_replication_type: - description: The type of SAP HANA site replication across multiple hosts. + description: + - The type of SAP HANA site replication across multiple hosts. type: str required: false default: none @@ -63,7 +68,9 @@ argument_specs: - none sap_ha_cluster_prefer_site_takeover: - description: Set to "false" if the cluster should first attempt to restart the instance on the same node. When set to "true" (default) a failover to secondary will be initiated on resource failure. + description: + - Set to "false" if the cluster should first attempt to restart the instance on the same node. + - When set to "true" (default) a failover to secondary will be initiated on resource failure. type: bool required: false default: true @@ -72,13 +79,17 @@ argument_specs: - false sap_ha_cluster_automated_register: - description: Define if a former primary should be re-registered automatically as secondary. + description: + - Define if a former primary should be re-registered automatically as secondary. type: bool required: false default: true sap_ha_cluster_duplicate_primary_timeout: - description: Time difference needed between to primary time stamps, if a dual-primary situation occurs. If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. After this registration to the new primary all data will be overwritten by the system replication. + description: + - Time difference needed between to primary time stamps, if a dual-primary situation occurs. + - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. + - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. type: int required: false default: 900 @@ -95,31 +106,35 @@ argument_specs: sap_ha_cluster_create_config_dest: description: - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. - - Specify a path/filename to overwrite the default. + - Specify a path/filename to save the file elsewhere. type: str required: false - default: sap_ha_cluster_report_config.yml + default: sap_ha_cluster_resource_config.yml # # sap_ha_cluster_ # description: +# - # type: # required: false # default: # # sap_ha_cluster_ # description: +# - # type: # required: false # default: # # sap_ha_cluster_ # description: +# - # type: # required: false # default: # # sap_ha_cluster_ # description: +# - # type: # required: false # default: diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index ceab3ccb4..b4c01d0f0 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -176,8 +176,7 @@ - not sap_ha_cluster_create_config_only ### END OF BLOCK -# TODO: how to deal with secrets in output? - +# TODO: how to deal with secrets in output? They should be masked somehow... - name: "{{ __tname }} Create cluster configuration parameters file" ansible.builtin.template: diff --git a/roles/sap_ha_cluster/variables.md b/roles/sap_ha_cluster/variables.md new file mode 100644 index 000000000..8ed6fa42a --- /dev/null +++ b/roles/sap_ha_cluster/variables.md @@ -0,0 +1,14 @@ +| Variable Name | Required | Description | +|---------------|----------|-------------| +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | +| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | +| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | +| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | +| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | +| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | From aeb4af05764dd6b16e9391fb8439ec6e5e2381ac Mon Sep 17 00:00:00 2001 From: Janine Fuchs <105372097+ja9fuchs@users.noreply.github.com> Date: Wed, 21 Sep 2022 14:24:50 +0200 Subject: [PATCH 159/375] Update README.md --- roles/sap_ha_cluster/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 746eb1145..23fcd78f1 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,3 +1,3 @@ # new role... -@@include[variables.md](variables.md) +@@include[variables.md] From 332469d6a6ffe028425227f91ae1e2a46eb1d5ee Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 12:26:13 +0000 Subject: [PATCH 160/375] sap_ha_cluster: testing readme --- roles/sap_ha_cluster/README.md | 2 +- roles/sap_ha_cluster/{ => includes}/variables.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename roles/sap_ha_cluster/{ => includes}/variables.md (100%) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 746eb1145..ebfd34802 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,3 +1,3 @@ # new role... -@@include[variables.md](variables.md) +@@include[variables.md](includes/variables.md) diff --git a/roles/sap_ha_cluster/variables.md b/roles/sap_ha_cluster/includes/variables.md similarity index 100% rename from roles/sap_ha_cluster/variables.md rename to roles/sap_ha_cluster/includes/variables.md From 5c985c3a4662c3e04206105e8d0a4d23f6ff4e2d Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 12:36:21 +0000 Subject: [PATCH 161/375] sap_ha_cluster: GH does not support inline includes --- roles/sap_ha_cluster/README.md | 17 ++++++++++++++--- roles/sap_ha_cluster/includes/variables.md | 14 -------------- 2 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 roles/sap_ha_cluster/includes/variables.md diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index ebfd34802..8ed6fa42a 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,3 +1,14 @@ -# new role... - -@@include[variables.md](includes/variables.md) +| Variable Name | Required | Description | +|---------------|----------|-------------| +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | +| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | +| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | +| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | +| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | +| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | diff --git a/roles/sap_ha_cluster/includes/variables.md b/roles/sap_ha_cluster/includes/variables.md deleted file mode 100644 index 8ed6fa42a..000000000 --- a/roles/sap_ha_cluster/includes/variables.md +++ /dev/null @@ -1,14 +0,0 @@ -| Variable Name | Required | Description | -|---------------|----------|-------------| -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | -| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | -| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | -| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | -| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | From 0fde20e1461db571b235d82d63601efac524c6cf Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 12:43:18 +0000 Subject: [PATCH 162/375] sap_ha_cluster: testing colour in .md --- roles/sap_ha_cluster/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 8ed6fa42a..eef9cb216 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,14 +1,14 @@ | Variable Name | Required | Description | |---------------|----------|-------------| -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | -| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | -| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | -| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | -| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | +| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | +| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | +| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | +| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | +| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | From 6b67a2a8062a94e8714d145a4bc03ca20ee2dad8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 14:22:36 +0000 Subject: [PATCH 163/375] sap_ha_cluster: fixing var name --- roles/sap_ha_cluster/vars/SAPHana_scaleout.yml | 2 +- roles/sap_ha_cluster/vars/SAPHana_scaleup.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml index 19801ec41..539ce5dd9 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml @@ -3,7 +3,7 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_extra_repos: +sap_ha_cluster_extra_packages: - resource-agents-sap-hana-scaleout sap_ha_cluster_ra_hana: SAPHanaController diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml index df78b1d7a..cc64bbff1 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml @@ -3,7 +3,7 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_extra_repos: +sap_ha_cluster_extra_packages: - resource-agents-sap-hana sap_ha_cluster_ra_hana: SAPHana From e7a19ba37a06a29ad3f0e9382449ba263fc64b55 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Sep 2022 14:31:44 +0000 Subject: [PATCH 164/375] sap_ha_cluster: added missing task to add extra packages --- roles/sap_ha_cluster/tasks/construct_vars_common.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 590563060..553d1eb98 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -4,12 +4,15 @@ - name: "{{ __tname }} Set cluster name" ansible.builtin.set_fact: - # Set cluster name: first read 'ha_cluster' native role variable - # This ensures that users could also use 'ha_cluster' system role - # directly for the same target cluster __sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" - name: "{{ __tname }} Register the 'hacluster' user password" ansible.builtin.set_fact: __sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" no_log: true + +- name: "{{ __tname }} Combine defined extra packages" + ansible.builtin.set_fact: + __sap_ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages + sap_ha_cluster_extra_packages }}" + when: + - sap_ha_cluster_extra_packages is defined From d372a3c98f088ea67ecac5d0cf5d3af24876c033 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 15:56:28 +0100 Subject: [PATCH 165/375] sap_swpm: add placeholder params for future --- roles/sap_swpm/templates/configfile.j2 | 51 ++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 78b6a227f..7722aa701 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -6,6 +6,8 @@ ###### archives.downloadBasket = {{ sap_swpm_software_path }} +# installation_export.archivesFolder = {{ sap_swpm_cd_export_path }} + # NOTE: Specific media requirements will use format # SAPINST.CD.PACKAGE. = {% endif %} @@ -21,11 +23,12 @@ HDB_Software_Dialogs.useMediaCD = {{ sap_swpm_software_use_media }} ###### # swpm_installation_media_swpm1 ###### -SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} -SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} SAPINST.CD.PACKAGE.LANGUAGE = {{ sap_swpm_cd_language_path }} SAPINST.CD.PACKAGE.JAVA = {{ sap_swpm_cd_java_path }} SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} +# SAPINST.CD.PACKAGE.KERNEL = +# SAPINST.CD.PACKAGE.KERNEL2 = +# SAPINST.CD.PACKAGE.KERNEL3 = {% endif %} {% if 'swpm_installation_media_swpm1_exportfiles' in sap_swpm_inifile_list %} @@ -33,8 +36,10 @@ SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} # swpm_installation_media_swpm1_exportfiles ###### SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} -# SAPINST.CD.PACKAGE.LOAD = -# installation_export.archivesFolder = {{ sap_swpm_cd_export_path }} +# SAPINST.CD.PACKAGE.LOAD +SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} +SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} +# SAPINST.CD.PACKAGE.JMIG {% endif %} {% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_list %} @@ -102,6 +107,22 @@ SAPINST.CD.PACKAGE.RDBMS-SYB-CLIENT = {{ sap_swpm_cd_sapase_client_path }} SAPINST.CD.PACKAGE.RDBMS-ADA = {{ sap_swpm_cd_sapmaxdb_path }} {% endif %} +{% if 'swpm_installation_media_download_service' in sap_swpm_inifile_list %} +###### +# swpm_installation_media_download_service +# Not in use by sap_swpm Ansible Role +###### +# nwUsers.sapServiceSIDPassword = +# download_service.directory = +# DownloadService.EnableProxy = +# DownloadService.HostName = +# DownloadService.Password = +# DownloadService.Port = +# DownloadService.ProvideAuthentication = +# DownloadService.Username = +# DownloadService.planNumber = +{% endif %} + {% if 'sum_config' in sap_swpm_inifile_list %} ###### # sum_config @@ -363,8 +384,8 @@ NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} # NW_HDB_getDBInfo.dbadmin = SYSTEM -# NW_HDB_getDBInfo.tenantOsGroup = -# NW_HDB_getDBInfo.tenantOsUser = +# NW_HDB_getDBInfo.tenantOsGroup = {{ sap_swpm_db_sid | lower }}grp +# NW_HDB_getDBInfo.tenantOsUser = {{ sap_swpm_db_sid | lower }}usr # NW_HDB_getDBInfo.tenantPort = # NW_HDB_DBClient.clientPathStrategy = LOCAL {% endif %} @@ -404,18 +425,20 @@ HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} # HDB_Recovery_Dialogs.skipExistenceCheck = false # HDB_Recovery_Dialogs.sourceDatabaseSid = # HDB_Recovery_Dialogs.useLicenseFile = false -# NW_CreateDBandLoad.movePVCforUsagePiAndDi = # HDB_Recovery_Dialogs.licenseFile = # NW_Recovery_Install_HDB.checkIntegrity = false # NW_Recovery_Install_HDB.backupLocationHANA = # NW_Recovery_Install_HDB.backupLocationSAP = # NW_Recovery_Install_HDB.loadOrMount = load +# NW_CreateDBandLoad.movePVCforUsagePiAndDi = {% endif %} {% if 'nw_config_anydb' in sap_swpm_inifile_list %} ###### # nw_config_anydb ###### +# Distributed installation or system copy with any database and SAP Basis release 740 or higher: +# Execute ABAP program 'RUTPOADAPT' for depooling. Set it to 'true' if declustering / depooling is selected for the distributed database instance installation option NW_CI_Instance_ABAP_Reports.executeReportsForDepooling = false {% endif %} @@ -448,6 +471,7 @@ NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} ###### NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} +#NW_SCS_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_SCS_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} {% endif %} @@ -461,6 +485,7 @@ NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} # NW_SCS_Instance.scsInstanceNumber = NW_SCS_Instance.instanceNumber = {{ sap_swpm_java_scs_instance_nr }} +NW_JAVA_Export.keyPhrase = {{ sap_swpm_master_password }} {% endif %} {% if 'nw_config_primary_application_server_instance' in sap_swpm_inifile_list %} @@ -575,6 +600,18 @@ NW_CI_Instance_ABAP_Reports.enableActivateICFService = true # SAP INTERNAL USE ONLY # NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false + +# Specify new password of the DDIC user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.ddic000Password = + +# Need specific new password of the DDIC user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewDDIC000Password = false + +# Need specific new password of the SAP* user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewSapStar000Password = false + +# Specify new password of the SAP* user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.sapStar000Password = {% endif %} {% if 'nw_config_livecache' in sap_swpm_inifile_list %} From f0f4428cd7b869e192064cb12e3c8a5772eb3246 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 21 Sep 2022 15:57:55 +0100 Subject: [PATCH 166/375] sap_swpm: fix typos --- roles/sap_swpm/templates/configfile.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 7722aa701..e803d886f 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -36,10 +36,10 @@ SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} # swpm_installation_media_swpm1_exportfiles ###### SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} -# SAPINST.CD.PACKAGE.LOAD +# SAPINST.CD.PACKAGE.LOAD = SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} -# SAPINST.CD.PACKAGE.JMIG +# SAPINST.CD.PACKAGE.JMIG = {% endif %} {% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_list %} @@ -471,7 +471,7 @@ NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} ###### NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} -#NW_SCS_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} +# NW_SCS_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} NW_SCS_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} {% endif %} From 95fdb726c64b133fcaf6aa58f2cdce04d4734874 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 21 Sep 2022 23:24:21 +0200 Subject: [PATCH 167/375] sap_hana_preconfigure: Support setting SELinux file contexts --- roles/sap_hana_install/README.md | 6 ++- .../meta/collection-requirements.yml | 2 + roles/sap_hana_install/tasks/post_install.yml | 2 +- roles/sap_hana_install/tasks/pre_install.yml | 2 +- roles/sap_hana_preconfigure/README.md | 16 +++++--- roles/sap_hana_preconfigure/defaults/main.yml | 5 +++ .../meta/collection-requirements.yml | 2 + .../tasks/RedHat/generic/assert-selinux.yml | 41 +++++++++++++++++++ .../RedHat/generic/configure-selinux.yml | 15 +++++++ .../sapnote/2777782/01-assert-selinux.yml | 5 +-- .../sapnote/2777782/01-configure-selinux.yml | 5 +-- 11 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 roles/sap_hana_install/meta/collection-requirements.yml create mode 100644 roles/sap_hana_preconfigure/meta/collection-requirements.yml create mode 100644 roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml create mode 100644 roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 68a7411b9..fa08db114 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -2,7 +2,11 @@ Ansible role for SAP HANA Installation -## Prerequisites +## Requirements + +The role requires additional collections which are specified in `meta/collection-requirements.yml`. These are not automatically installed. You must install them like this: + +`ansible-galaxy install -vv -r meta/collection-requirements.yml` ### Configure your system for the installation of SAP HANA diff --git a/roles/sap_hana_install/meta/collection-requirements.yml b/roles/sap_hana_install/meta/collection-requirements.yml new file mode 100644 index 000000000..6a656f882 --- /dev/null +++ b/roles/sap_hana_install/meta/collection-requirements.yml @@ -0,0 +1,2 @@ +collections: + - name: fedora.linux_system_roles diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 3b81387a8..f2c6c0c3c 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -157,7 +157,7 @@ - name: Configure '/usr/sap' SELinux file contexts ansible.builtin.include_role: - name: linux-system-roles.selinux + name: fedora.linux_system_roles.selinux vars: selinux_fcontexts: - { target: '/usr/sap(/.*)?', setype: 'usr_t' } diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 4aca6d2ec..3141fc70c 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -85,7 +85,7 @@ - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts ansible.builtin.include_role: - name: linux-system-roles.selinux + name: fedora.linux_system_roles.selinux vars: selinux_booleans: - { name: 'selinuxuser_execmod', state: 'on' } diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index 63b841686..d5443a02c 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -6,12 +6,18 @@ and then role sap_hana_preconfigure. ## Requirements -To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by running -role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). -It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system time, -before or after running role sap_hana_preconfigure. +The role requires additional collections which are specified in `meta/collection-requirements.yml`. These are not automatically installed. +You must install them like this: -Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessable (see also example playbook): +`ansible-galaxy install -vv -r meta/collection-requirements.yml` + +To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by +running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). +It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system +time, before or after running role sap_hana_preconfigure. + +Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessible +(see also example playbook): for RHEL 7.x: - rhel-7-[server|for-power-le]-e4s-rpms diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index 758ba1bdf..9d720148f 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -79,6 +79,11 @@ sap_hana_preconfigure_reboot_ok: no # Set the following variable to "no" if you want the role to not fail if a reboot is required: sap_hana_preconfigure_fail_if_reboot_required: yes +# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively relabel +# directories and files in `/hana` and in `/usr/sap` to have the 'usr_t' flag. +# If relabeling not desired, set the following variable to `no`. +sap_hana_preconfigure_modify_selinux_labels: yes + ### # # The following variables are optional. diff --git a/roles/sap_hana_preconfigure/meta/collection-requirements.yml b/roles/sap_hana_preconfigure/meta/collection-requirements.yml new file mode 100644 index 000000000..6a656f882 --- /dev/null +++ b/roles/sap_hana_preconfigure/meta/collection-requirements.yml @@ -0,0 +1,2 @@ +collections: + - name: fedora.linux_system_roles diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml new file mode 100644 index 000000000..e4b0e2f8b --- /dev/null +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -0,0 +1,41 @@ +--- + +- name: Count SELinux configuration database entries for /hana + ansible.builtin.shell: semanage fcontext -l | awk 'BEGIN{a=0}$1=="/hana(/.*)?"&&$NF~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_semanage_fcontext_hana_result + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Assert that there is an entry for /hana in the SELinux configuration database + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_semanage_fcontext_hana_result.stdout|int != 0 + +- name: Count files in /hana and below without SELinux `usr_t` file context + ansible.builtin.shell: find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_ls_fcontext_hana_result + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Assert that all files in /hana and below have the usr_t file context + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_selinux_fcontext_hana_result.stdout|int == 0 + +- name: Count SELinux configuration database entries for /usr/sap + ansible.builtin.shell: semanage fcontext -l | awk 'BEGIN{a=0}$1=="/usr/sap(/.*)?"&&$NF~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_semanage_fcontext_usr_sap_result + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Assert that there is an entry for /usr/sap in the SELinux configuration database + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_semanage_fcontext_usr_sap_result.stdout|int != 0 + +- name: Count files in /usr/sap and below without SELinux `usr_t` file context + ansible.builtin.shell: find /usr/sap -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_ls_fcontext_usr_sap_result + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Assert that all files in /usr/sap and below have the usr_t file context + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_selinux_fcontext_usr_sap_result.stdout|int == 0 diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml new file mode 100644 index 000000000..a17a41296 --- /dev/null +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -0,0 +1,15 @@ +--- + +- name: Configure SELinux file contexts + ansible.builtin.include_role: + name: fedora.linux_system_roles.selinux + vars: + selinux_booleans: + - { name: 'selinuxuser_execmod', state: 'on' } + selinux_fcontexts: + - { target: '/hana(/.*)?', setype: 'usr_t' } + - { target: '/usr/sap(/.*)?', setype: 'usr_t' } + selinux_restore_dirs: + - /hana + - /usr/sap + when: sap_hana_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml index e8af82774..88a054e0d 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml @@ -3,7 +3,4 @@ - name: Assert 2777782-1 ansible.builtin.debug: msg: "SAP note 2777782 Step 1: Configure SELinux" - -- name: Notify about where SELinux is asserted - ansible.builtin.debug: - msg: "SELinux is already asserted by role sap_general_preconfigure." +- import_tasks: ../../RedHat/generic/assert-selinux.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml index a1d1fe5f0..545494a16 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml @@ -3,7 +3,4 @@ - name: Configure 2777782-1 ansible.builtin.debug: msg: "SAP note 2777782 Step 1: Configure SELinux" - -- name: Notify about where SELinux is configured - ansible.builtin.debug: - msg: "SELinux is already configured by role sap_general_preconfigure." +- import_tasks: ../../RedHat/generic/configure-selinux.yml From 1aafe3c214a58b149d167442030f8ba0b33979a7 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 22 Sep 2022 10:49:03 +0000 Subject: [PATCH 168/375] sap_ha_cluster: fixed wrong variable name for repo enabling --- roles/sap_ha_cluster/templates/cluster_create_config.j2 | 2 +- roles/sap_ha_cluster/vars/RedHat_8.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 index 7a225589a..f100fdc0f 100644 --- a/roles/sap_ha_cluster/templates/cluster_create_config.j2 +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -37,7 +37,7 @@ ha_cluster_fence_agent_packages: # __ha_cluster_repos: -{{ sap_ha_cluster_repos | to_nice_yaml(indent=2) }} +{{ __sap_ha_cluster_repos | to_nice_yaml(indent=2) }} # ha_cluster_resource_clones: diff --git a/roles/sap_ha_cluster/vars/RedHat_8.yml b/roles/sap_ha_cluster/vars/RedHat_8.yml index dc06c7ee1..1be4e1ab6 100644 --- a/roles/sap_ha_cluster/vars/RedHat_8.yml +++ b/roles/sap_ha_cluster/vars/RedHat_8.yml @@ -1,6 +1,6 @@ --- # Overwrite HA_CLUSTER repository ID to use E4S repository # - an alternative logic could be to enable the repo before running ha_cluster -sap_ha_cluster_repos: +__sap_ha_cluster_repos: - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" name: High Availability From 0c386455396caa5afa10bcecc5a94aeade0fc771 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 22 Sep 2022 12:24:17 +0000 Subject: [PATCH 169/375] sap_ha_cluster: moved construction var definitions for better protection --- roles/sap_ha_cluster/defaults/main.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 7c9457b94..b4f14095b 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -31,27 +31,3 @@ sap_ha_cluster_automated_register: true sap_ha_cluster_duplicate_primary_timeout: 900 # PREFER_SITE_TAKEOVER sap_ha_cluster_prefer_site_takeover: true - -# Define empty parameters to avoid undefined input variables. -# The arguments_spec check complains. -# The actual values must be empty, they are set by various tasks! -# -# ATTENTION: -# Any variables for 'ha_cluster' which this SAP role supports/inherits should also -# be added to -# - variable validations -# - conditionals (if applicable) -# - config report template -# -__sap_ha_cluster_cluster_name: -__sap_ha_cluster_cluster_properties: [] -__sap_ha_cluster_constraints_colocation: [] -__sap_ha_cluster_constraints_location: [] -__sap_ha_cluster_constraints_order: [] -__sap_ha_cluster_extra_packages: [] -__sap_ha_cluster_fence_agent_packages: [] -__sap_ha_cluster_hacluster_password: -__sap_ha_cluster_repos: [] -__sap_ha_cluster_resource_primitives: [] -__sap_ha_cluster_resource_groups: [] -__sap_ha_cluster_resource_clones: [] From 1a07fb5ca5e67fd9163d3fad43e49a229d345dc4 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 22 Sep 2022 13:12:55 +0000 Subject: [PATCH 170/375] sap_ha_cluster: sorted parameters for consistency --- roles/sap_ha_cluster/meta/argument_specs.yml | 145 ++++++++----------- roles/sap_ha_cluster/vars/main.yml | 24 +++ 2 files changed, 87 insertions(+), 82 deletions(-) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index da1c3fbe3..2032823f8 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -9,20 +9,15 @@ argument_specs: main: short_description: SAP HA requirements options: - sap_hana_sid: - description: - - The SAP System ID of the instance that will be configured in the cluster. - - The SAP SID must follow SAP specifications - see SAP Note 1979280. - type: str - required: true - alias: sap_ha_cluster_hana_sid - sap_hana_instance_number: - description: - - The instance number of the SAP HANA database which is role will configure in the cluster. - type: str - required: true - alias: sap_ha_cluster_hana_instance_number +# Take this template and copy it to the desired place. +# Ideally sort by key (variable name) alphabetically. +# sap_ha_cluster_ +# description: +# - +# type: +# required: false +# default: ha_cluster_cluster_name: description: @@ -40,32 +35,38 @@ argument_specs: no_log: true alias: sap_hana_hacluster_password - sap_hana_vip: + sap_ha_cluster_automated_register: description: - - Virtual floating IP for SAP HANA DB connections. - - This IP will always run on the promoted HANA node. - type: str - required: true + - Define if a former primary should be re-registered automatically as secondary. + type: bool + required: false + default: true - sap_ha_cluster_sap_type: + sap_ha_cluster_create_config_dest: description: - - The SAP landscape to be installed. + - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. + - Specify a path/filename to save the file elsewhere. type: str required: false - default: scaleup - choices: - - scaleup - - scaleout + default: sap_ha_cluster_resource_config.yml - sap_ha_cluster_replication_type: + sap_ha_cluster_create_config_only: description: - - The type of SAP HANA site replication across multiple hosts. - type: str + - Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role. + - The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role. + - WARNING! This report may include sensitive details like secrets required for certain cluster resources! + type: bool required: false - default: none - choices: - - mtr - - none + default: false + + sap_ha_cluster_duplicate_primary_timeout: + description: + - Time difference needed between to primary time stamps, if a dual-primary situation occurs. + - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. + - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. + type: int + required: false + default: 900 sap_ha_cluster_prefer_site_takeover: description: @@ -78,64 +79,44 @@ argument_specs: - true - false - sap_ha_cluster_automated_register: + sap_ha_cluster_replication_type: description: - - Define if a former primary should be re-registered automatically as secondary. - type: bool + - The type of SAP HANA site replication across multiple hosts. + type: str required: false - default: true + default: none + choices: + - mtr + - none - sap_ha_cluster_duplicate_primary_timeout: + sap_ha_cluster_sap_type: description: - - Time difference needed between to primary time stamps, if a dual-primary situation occurs. - - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. - - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. - type: int + - The SAP landscape to be installed. + type: str required: false - default: 900 + default: scaleup + choices: + - scaleup + - scaleout - sap_ha_cluster_create_config_only: + sap_hana_instance_number: description: - - Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role. - - The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role. - - WARNING! This report may include sensitive details like secrets required for certain cluster resources! - type: bool - required: false - default: false + - The instance number of the SAP HANA database which is role will configure in the cluster. + type: str + required: true + alias: sap_ha_cluster_hana_instance_number - sap_ha_cluster_create_config_dest: + sap_hana_sid: description: - - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. - - Specify a path/filename to save the file elsewhere. + - The SAP System ID of the instance that will be configured in the cluster. + - The SAP SID must follow SAP specifications - see SAP Note 1979280. type: str - required: false - default: sap_ha_cluster_resource_config.yml -# -# sap_ha_cluster_ -# description: -# - -# type: -# required: false -# default: -# -# sap_ha_cluster_ -# description: -# - -# type: -# required: false -# default: -# -# sap_ha_cluster_ -# description: -# - -# type: -# required: false -# default: -# -# sap_ha_cluster_ -# description: -# - -# type: -# required: false -# default: -# + required: true + alias: sap_ha_cluster_hana_sid + + sap_hana_vip: + description: + - Virtual floating IP for SAP HANA DB connections. + - This IP will always run on the promoted HANA node. + type: str + required: true diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 371a1e516..17a634c94 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -2,3 +2,27 @@ # SAP System IDs that are reserved and must not be used # Reference: SAP Note 1979280 __sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'AUX', 'AVG', 'BIN', 'BIT', 'CDC', 'COM', 'CON', 'DAA', 'DBA', 'DBM', 'DBO', 'DTD', 'ECO', 'END', 'EPS', 'EXE', 'FOR', 'GET', 'GID', 'IBM', 'INT', 'KEY', 'LIB', 'LOG', 'LPT', 'MAP', 'MAX', 'MEM', 'MIG', 'MIN', 'MON', 'NET', 'NIX', 'NOT', 'NUL', 'OFF', 'OLD', 'OMS', 'OUT', 'PAD', 'PRN', 'RAW', 'REF', 'ROW', 'SAP', 'SET', 'SGA', 'SHG', 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', 'USE', 'USR', 'VAR'] + +# Define empty parameters to avoid undefined input variables. +# The arguments_spec check complains. +# The actual values must be empty, they are set by various tasks! +# +# ATTENTION: +# Any variables for 'ha_cluster' which this SAP role supports/inherits should also +# be added to +# - variable validations +# - conditionals (if applicable) +# - config report template +# +__sap_ha_cluster_cluster_name: +__sap_ha_cluster_cluster_properties: [] +__sap_ha_cluster_constraints_colocation: [] +__sap_ha_cluster_constraints_location: [] +__sap_ha_cluster_constraints_order: [] +__sap_ha_cluster_extra_packages: [] +__sap_ha_cluster_fence_agent_packages: [] +__sap_ha_cluster_hacluster_password: +__sap_ha_cluster_repos: [] +__sap_ha_cluster_resource_primitives: [] +__sap_ha_cluster_resource_groups: [] +__sap_ha_cluster_resource_clones: [] From aaaeea00d0813d829f83a75e1e3d47849bce575f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 22 Sep 2022 16:33:51 +0200 Subject: [PATCH 171/375] sap_general_preconfigure: Support setting SELinux file contexts Solves issues #208 and #209. Also the test scripts for sap_general_preconfigure and sap_hana_preconfigure now support idempotency checking. --- .../defaults/main.yml | 5 + .../meta/collection-requirements.yml | 4 + .../tasks/RedHat/configuration.yml | 8 + .../tasks/RedHat/generic/assert-selinux.yml | 32 +++- .../RedHat/generic/configure-selinux.yml | 12 ++ ...p_general_preconfigure-test-idempotency.py | 121 ------------- .../run-sap_general_preconfigure-tests.py | 59 +++--- .../meta/collection-requirements.yml | 2 + roles/sap_hana_preconfigure/README.md | 9 +- roles/sap_hana_preconfigure/defaults/main.yml | 4 +- .../meta/collection-requirements.yml | 2 + .../tasks/RedHat/configuration.yml | 8 + .../tasks/RedHat/generic/assert-selinux.yml | 38 ++-- .../RedHat/generic/configure-selinux.yml | 6 +- .../tests/run-sap_hana_preconfigure-tests.py | 170 ++++++------------ 15 files changed, 169 insertions(+), 311 deletions(-) create mode 100644 roles/sap_general_preconfigure/meta/collection-requirements.yml delete mode 100755 roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index d635a7d73..6e3ed31bd 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -69,6 +69,11 @@ sap_general_preconfigure_fail_if_reboot_required: yes sap_general_preconfigure_selinux_state: disabled +# For compatibility of SAP software with SELinux in enforcing mode, the role will recursively add +# the 'usr_t' label to directories and files in `/usr/sap`. +# If relabeling not desired, set the following variable to `no`. +sap_general_preconfigure_modify_selinux_labels: yes + sap_general_preconfigure_size_of_tmpfs_gb: "{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}" sap_general_preconfigure_locale: en_US.UTF-8 diff --git a/roles/sap_general_preconfigure/meta/collection-requirements.yml b/roles/sap_general_preconfigure/meta/collection-requirements.yml new file mode 100644 index 000000000..0a4e50f46 --- /dev/null +++ b/roles/sap_general_preconfigure/meta/collection-requirements.yml @@ -0,0 +1,4 @@ +--- + +collections: + - name: fedora.linux_system_roles diff --git a/roles/sap_general_preconfigure/tasks/RedHat/configuration.yml b/roles/sap_general_preconfigure/tasks/RedHat/configuration.yml index 8537434db..df5a48e9b 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/configuration.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/configuration.yml @@ -4,6 +4,14 @@ ansible.builtin.debug: var: __sap_general_preconfigure_sapnotes_versions | difference(['']) +- name: Configure - Create directory '/usr/sap' + ansible.builtin.file: + path: '/usr/sap' + state: directory + mode: '0755' + owner: root + group: root + - name: Configure - Include configuration actions for required sapnotes ansible.builtin.include_tasks: "sapnote/{{ sap_note_line_item.number }}.yml" with_items: "{{ __sap_general_preconfigure_sapnotes_versions | difference(['']) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 89efd2c53..7aa2d8458 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -1,20 +1,20 @@ --- -- name: Get info about file /etc/selinux/config +- name: Get info about file '/etc/selinux/config' ansible.builtin.stat: path: /etc/selinux/config register: __sap_general_preconfigure_register_stat_selinux_conf_assert -- name: Assert that file /etc/selinux/config exists and is a regular file +- name: Assert that file '/etc/selinux/config' exists and is a regular file ansible.builtin.assert: that: __sap_general_preconfigure_register_stat_selinux_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/selinux/config does not exist or is not a regular file!" # success_msg: "PASS: File /etc/selinux/config exists and is a regular file." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" -- name: Warn about SELinux being set to 'enforcing' +- name: Info about SELinux being set to 'enforcing' ansible.builtin.debug: - msg: "WARN: The SELinux state has been set to 'enforcing' (variable sap_general_preconfigure_selinux_state)." + msg: "INFO: The SELinux state has been set to 'enforcing' (variable sap_general_preconfigure_selinux_state)." ignore_errors: yes when: "sap_general_preconfigure_selinux_state == 'enforcing'" @@ -46,10 +46,32 @@ register: __sap_general_preconfigure_register_getenforce_assert changed_when: no -- name: Assert that SELinux is set correctly +- name: Assert that the SELinux state is set correctly ansible.builtin.assert: that: __sap_general_preconfigure_register_getenforce_assert.stdout | lower == "{{ sap_general_preconfigure_selinux_state }}" fail_msg: "FAIL: SELinux is currently not '{{ sap_general_preconfigure_selinux_state }}'! The current SELinux state is: '{{ __sap_general_preconfigure_register_getenforce_assert.stdout | lower }}'." success_msg: "PASS: SELinux is currently {{ sap_general_preconfigure_selinux_state }}." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" + +- name: Count SELinux configuration database entries for '/usr/sap' + ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/usr/sap(/.*)?"&&$NF~/usr_t/{a++}END{print a}' + register: __sap_general_preconfigure_register_semanage_fcontext_usr_sap_result + when: sap_general_preconfigure_modify_selinux_labels + +- name: Assert that there is an entry for '/usr/sap' in the SELinux configuration database + ansible.builtin.assert: + that: + __sap_general_preconfigure_register_semanage_fcontext_usr_sap_result.stdout | int != 0 + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" + +- name: Count files in '/usr/sap' and below without SELinux `usr_t` file context + ansible.builtin.shell: set -o pipefail && find /usr/sap -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + register: __sap_general_preconfigure_register_ls_fcontext_usr_sap_result + when: sap_general_preconfigure_modify_selinux_labels + +- name: Assert that all files in '/usr/sap' and below have the usr_t file context + ansible.builtin.assert: + that: + __sap_general_preconfigure_register_selinux_fcontext_usr_sap_result.stdout | int == 0 + ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index b21fa84c8..d63bad4b8 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -96,3 +96,15 @@ - name: SELinux - Display the content of sap_general_preconfigure_fact_reboot_required ansible.builtin.debug: var: sap_general_preconfigure_fact_reboot_required | d(false) + +- name: Configure '/usr/sap' SELinux file labels + ansible.builtin.include_role: + name: fedora.linux_system_roles.selinux + vars: + selinux_booleans: + - { name: 'selinuxuser_execmod', state: 'on' } + selinux_fcontexts: + - { target: '/usr/sap(/.*)?', setype: 'usr_t' } + selinux_restore_dirs: + - '/usr/sap' + when: sap_general_preconfigure_modify_selinux_labels diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py deleted file mode 100755 index 8e249e8ea..000000000 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-test-idempotency.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python - -""" -Tests for role sap_general_preconfigure -""" - -import os -import sys -import subprocess - -# output field delimiter for displaying the results: -# FIELD_DELIMITER = ';' -FIELD_DELIMITER = '\t' - -if len(sys.argv) == 1: - _managed_node = input("Provide name of managed node: ") -else: - _managed_node = sys.argv[1] - -print('Running tests for role sap_general_preconfigure...\n') -print('Managed node: ' + _managed_node) - -_mn_rhel_release = subprocess.getoutput( - "ssh root@" - + _managed_node - + " cat /etc/redhat-release | \ - awk 'BEGIN{FS=\"release \"}{split($2, a, \" \"); print a[1]}'") -print('Managed node Red Hat release: ' + _mn_rhel_release) -_mn_hw_arch = subprocess.getoutput("ssh root@" + _managed_node + " uname -m") -print('Managed node HW architecture: ' + _mn_hw_arch) - -__tests = [ - { - 'number': '1', - 'name': 'Run in normal mode on new system, allow reboot.', - 'command_line_parameter': '', - 'ignore_error_final': False, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_general_preconfigure_fail_if_reboot_required': False, - 'sap_general_preconfigure_reboot_ok': True - } - ] - }, - { - 'number': '2', - 'name': 'Run in normal mode on new system the second time, allow reboot.', - 'command_line_parameter': '', - 'ignore_error_final': False, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_general_preconfigure_fail_if_reboot_required': False, - 'sap_general_preconfigure_reboot_ok': True - } - ] - }, -] - -for par1 in __tests: - print('\n' + 'Test ' + par1['number'] + ': ' + par1['name']) - command = ( - 'ansible-playbook sap_general_preconfigure-default-settings.yml ' - + par1['command_line_parameter'] - + '-l ' - + _managed_node - + ' ' - + '-e "' - ) - for par2 in par1['role_vars']: - command += str(par2) - command += '"' - if par1['compact_assert_output']: - command += ' | ../tools/beautify-assert-output.sh' - print("command: " + command) - _py_rc = os.system(command) - par1['rc'] = str(int(_py_rc / 256)) - if _py_rc != 0: - if par1['ignore_error_final']: - print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '. Continuing with the next test') - else: - print('Test ' - + par1['number'] - + ' finished with return code ' - + par1['rc'] + '.') - sys.exit(_py_rc) - else: - print('Test ' + par1['number'] + ' finished with return code ' + par1['rc'] + '.') - -print('\nResults for role sap_general_preconfigure: ' - + _managed_node - + ' - RHEL ' - + _mn_rhel_release - + ' - ' - + _mn_hw_arch + ':') - -print('\n#' - + FIELD_DELIMITER - + 'RC' + FIELD_DELIMITER - + 'name' + FIELD_DELIMITER - + 'argument' + FIELD_DELIMITER - + 'compact' + FIELD_DELIMITER - + 'role_vars') - -for par1 in __tests: - print(par1['number'] + FIELD_DELIMITER - + par1['rc'] + FIELD_DELIMITER - + par1['name'] + FIELD_DELIMITER - + par1['command_line_parameter'] + FIELD_DELIMITER - + str(par1['compact_assert_output']) + FIELD_DELIMITER, end='') - if len(par1['role_vars']) == 0: - print("") - else: - for par2 in par1['role_vars']: - print(str(par2)) diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index bfc186536..4c5e61dd2 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -37,13 +37,18 @@ 'ignore_error_final': True, 'compact_assert_output': False, 'rc': '99', - 'role_vars': [] + 'role_vars': [ + { + 'sap_general_preconfigure_fail_if_reboot_required': False, + } + ] }, { 'number': '2', 'name': 'Run in assert mode on new system, \ check for enabled repos and for minor release lock, \ - check for possible RHEL update, ignore any assert error.', + check for possible RHEL update, \ + ignore assert errors.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -54,29 +59,38 @@ 'sap_general_preconfigure_assert_ignore_errors': True, 'sap_general_preconfigure_update': True, 'sap_general_preconfigure_enable_repos': True, - 'sap_general_preconfigure_set_minor_release': True + 'sap_general_preconfigure_set_minor_release': True, } ] }, { 'number': '3', - 'name': 'Run in normal mode on new system, no reboot.', + 'name': 'Run in normal mode on new system, \ + enable repos and set minor release lock, \ + check for possible RHEL update, \ + set SELinux to permisive, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_general_preconfigure_fail_if_reboot_required': False + 'sap_general_preconfigure_update': True, + 'sap_general_preconfigure_enable_repos': True, + 'sap_general_preconfigure_set_minor_release': True, + 'sap_general_preconfigure_selinux_state': 'permissive', + 'sap_general_preconfigure_reboot_ok': True, } ] }, { 'number': '4', - 'name': 'Run in normal mode on modified system, \ + 'name': 'Idempotency check: Run in normal mode on modified system, \ enable repos and set minor release lock, \ check for possible RHEL update, \ - set SELinux to permisive, allow a reboot.', + set SELinux to permisive, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, @@ -87,19 +101,20 @@ 'sap_general_preconfigure_enable_repos': True, 'sap_general_preconfigure_set_minor_release': True, 'sap_general_preconfigure_selinux_state': 'permissive', - 'sap_general_preconfigure_reboot_ok': True + 'sap_general_preconfigure_reboot_ok': True, } ] }, { 'number': '5', 'name': 'Run in assert mode on modified system, \ - enable repos and set minor release lock, \ + check for repos and for the RHEL minor release lock, \ check for possible RHEL update, \ - set SELinux to permisive, ignore any assert errors.', + check if SELinux is permisive, \ + ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': False, - 'compact_assert_output': False, + 'compact_assert_output': True, 'rc': '99', 'role_vars': [ { @@ -108,30 +123,18 @@ 'sap_general_preconfigure_update': True, 'sap_general_preconfigure_enable_repos': True, 'sap_general_preconfigure_set_minor_release': True, - 'sap_general_preconfigure_selinux_state': 'permissive' + 'sap_general_preconfigure_selinux_state': 'permissive', } ] }, { 'number': '6', - 'name': 'Run in assert mode on modified system, \ - enable repos and set minor release lock, \ - check for possible RHEL update, \ - set SELinux to permisive, ignore any assert errors.', - 'command_line_parameter': '', + 'name': 'Run in check mode on modified system.', + 'command_line_parameter': '--check ', 'ignore_error_final': False, - 'compact_assert_output': True, + 'compact_assert_output': False, 'rc': '99', - 'role_vars': [ - { - 'sap_general_preconfigure_assert': True, - 'sap_general_preconfigure_assert_ignore_errors': True, - 'sap_general_preconfigure_update': True, - 'sap_general_preconfigure_enable_repos': True, - 'sap_general_preconfigure_set_minor_release': True, - 'sap_general_preconfigure_selinux_state': 'permissive' - } - ] + 'role_vars': [] }, ] diff --git a/roles/sap_hana_install/meta/collection-requirements.yml b/roles/sap_hana_install/meta/collection-requirements.yml index 6a656f882..0a4e50f46 100644 --- a/roles/sap_hana_install/meta/collection-requirements.yml +++ b/roles/sap_hana_install/meta/collection-requirements.yml @@ -1,2 +1,4 @@ +--- + collections: - name: fedora.linux_system_roles diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index d5443a02c..a372d4035 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -74,11 +74,10 @@ The current version modifies this behavior: If sap_hana_preconfigure_use_tuned is set to `no`, the role will perform a static configuration, including the modification of the linux command line in grub. - The role can use tuned, or configure the kernel command line, or both. -2) Previous versions of this role used variable sap_hana_preconfigure_selinux_state to set the SELinux state to disabled, which is mentioned in -SAP notes 2292690 (RHEL 7) and 2777782 (RHEL 8). As role sap_general_preconfigure already allows to specify the desired SELinux state, and as -sap_general_preconfigure is run before sap_hana_preconfigure, there is no need any more to let sap_hana_preconfigure configure the SELinux state. -Same applies to the assertion of the SELinux state. Because of this, variable sap_hana_preconfigure_selinux_state has been removed from this role and -tasks 2292690/08-disable-selinux.yml and 2777782/01-assert-selinux.yml have been commented out. +2) Previous versions of this role used variable sap_hana_preconfigure_selinux_state to set the SELinux state to disabled, which is +mentioned in SAP notes 2292690 (RHEL 7) and 2777782 (RHEL 8). As role sap_general_preconfigure already allows to specify the desired +SELinux state, and as sap_general_preconfigure is run before sap_hana_preconfigure, there is no need any more to let +sap_hana_preconfigure configure the SELinux state. Same applies to the assertion of the SELinux state. ## Role Variables diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index 9d720148f..55e6bafa9 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -79,8 +79,8 @@ sap_hana_preconfigure_reboot_ok: no # Set the following variable to "no" if you want the role to not fail if a reboot is required: sap_hana_preconfigure_fail_if_reboot_required: yes -# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively relabel -# directories and files in `/hana` and in `/usr/sap` to have the 'usr_t' flag. +# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add +# the 'usr_t' label to directories and files in `/hana`. # If relabeling not desired, set the following variable to `no`. sap_hana_preconfigure_modify_selinux_labels: yes diff --git a/roles/sap_hana_preconfigure/meta/collection-requirements.yml b/roles/sap_hana_preconfigure/meta/collection-requirements.yml index 6a656f882..0a4e50f46 100644 --- a/roles/sap_hana_preconfigure/meta/collection-requirements.yml +++ b/roles/sap_hana_preconfigure/meta/collection-requirements.yml @@ -1,2 +1,4 @@ +--- + collections: - name: fedora.linux_system_roles diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml index 54472d77a..10e7a0378 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml @@ -4,6 +4,14 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes_versions | difference(['']) +- name: Configure - Create directory '/hana' + ansible.builtin.file: + path: '/hana' + state: directory + mode: '0755' + owner: root + group: root + - name: Configure - Include configuration actions for required sapnotes ansible.builtin.include_tasks: "sapnote/{{ sap_note_line_item.number }}.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes_versions | difference(['']) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml index e4b0e2f8b..b908dced1 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -1,41 +1,23 @@ --- -- name: Count SELinux configuration database entries for /hana - ansible.builtin.shell: semanage fcontext -l | awk 'BEGIN{a=0}$1=="/hana(/.*)?"&&$NF~/usr_t/{a++}END{print a}' +- name: Count SELinux configuration database entries for '/hana' + ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/hana(/.*)?"&&$NF~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_semanage_fcontext_hana_result when: sap_hana_preconfigure_modify_selinux_labels -- name: Assert that there is an entry for /hana in the SELinux configuration database +- name: Assert that there is an entry for '/hana' in the SELinux configuration database ansible.builtin.assert: that: - __sap_hana_preconfigure_register_semanage_fcontext_hana_result.stdout|int != 0 + __sap_hana_preconfigure_register_semanage_fcontext_hana_result.stdout | int != 0 + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" -- name: Count files in /hana and below without SELinux `usr_t` file context - ansible.builtin.shell: find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' +- name: Count files in '/hana' and below without SELinux `usr_t` file context + ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_ls_fcontext_hana_result when: sap_hana_preconfigure_modify_selinux_labels -- name: Assert that all files in /hana and below have the usr_t file context +- name: Assert that all files in '/hana' and below have the usr_t file context ansible.builtin.assert: that: - __sap_hana_preconfigure_register_selinux_fcontext_hana_result.stdout|int == 0 - -- name: Count SELinux configuration database entries for /usr/sap - ansible.builtin.shell: semanage fcontext -l | awk 'BEGIN{a=0}$1=="/usr/sap(/.*)?"&&$NF~/usr_t/{a++}END{print a}' - register: __sap_hana_preconfigure_register_semanage_fcontext_usr_sap_result - when: sap_hana_preconfigure_modify_selinux_labels - -- name: Assert that there is an entry for /usr/sap in the SELinux configuration database - ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_semanage_fcontext_usr_sap_result.stdout|int != 0 - -- name: Count files in /usr/sap and below without SELinux `usr_t` file context - ansible.builtin.shell: find /usr/sap -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' - register: __sap_hana_preconfigure_register_ls_fcontext_usr_sap_result - when: sap_hana_preconfigure_modify_selinux_labels - -- name: Assert that all files in /usr/sap and below have the usr_t file context - ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_selinux_fcontext_usr_sap_result.stdout|int == 0 + __sap_hana_preconfigure_register_selinux_fcontext_hana_result.stdout | int == 0 + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml index a17a41296..6b78b31da 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -1,6 +1,6 @@ --- -- name: Configure SELinux file contexts +- name: Configure '/hana' SELinux file labels ansible.builtin.include_role: name: fedora.linux_system_roles.selinux vars: @@ -8,8 +8,6 @@ - { name: 'selinuxuser_execmod', state: 'on' } selinux_fcontexts: - { target: '/hana(/.*)?', setype: 'usr_t' } - - { target: '/usr/sap(/.*)?', setype: 'usr_t' } selinux_restore_dirs: - - /hana - - /usr/sap + - '/hana' when: sap_hana_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index dbfd8b359..3d977dd74 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -40,175 +40,141 @@ }, { 'number': '2', - 'name': 'Run in assert mode on new system. Ignore a final error.', + 'name': 'Run in assert mode on new system, \ + ignore assert errors.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_assert': True + 'sap_hana_preconfigure_assert': True, + 'sap_hana_preconfigure_assert_ignore_errors': True, } ] }, { 'number': '3', - 'name': 'Run in assert mode on new system, \ - check for possible RHEL update, ignore any assert error.', + 'name': 'Run in normal mode on new system, \ + check for possible RHEL update, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True + 'sap_hana_preconfigure_update': True, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { 'number': '4', - 'name': 'Run in assert mode on new system, \ + 'name': 'Idempotency check: Run in normal mode again, \ check for possible RHEL update, \ - compact output, \ - ignore any assert or final error.', - 'command_line_parameter': '', - 'ignore_error_final': True, - 'compact_assert_output': True, - 'rc': '99', - 'role_vars': [ - { - 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True - } - ] - }, - { - 'number': '5', - 'name': 'Run in normal mode on new system, no reboot.', + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_fail_if_reboot_required': False - } - ] - }, - { - 'number': '6', - 'name': 'Run in check mode on configured system.', - 'command_line_parameter': '--check ', - 'ignore_error_final': False, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [] - }, - { - 'number': '7', - 'name': 'Run in assert mode on modified system. Ignore a final error.', - 'command_line_parameter': '', - 'ignore_error_final': True, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_hana_preconfigure_assert': True + 'sap_hana_preconfigure_update': True, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { - 'number': '8', + 'number': '5', 'name': 'Run in assert mode on modified system, \ check for possible RHEL update, \ - compact output, \ - ignore any assert or final error.', + ignore any assert error.', 'command_line_parameter': '', - 'ignore_error_final': True, + 'ignore_error_final': False, 'compact_assert_output': True, 'rc': '99', 'role_vars': [ { 'sap_hana_preconfigure_assert': True, 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True + 'sap_hana_preconfigure_update': True, } ] }, { - 'number': '9', - 'name': 'Run in normal mode. Update to the latest packages. Allow a reboot.', + 'number': '6', + 'name': 'Run in normal mode, \ + do not use tuned, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_enable_sap_hana_repos': True, - 'sap_hana_preconfigure_set_minor_release': True, - 'sap_hana_preconfigure_update': True, - 'sap_hana_preconfigure_reboot_ok': True + 'sap_hana_preconfigure_use_tuned': False, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { - 'number': '10', - 'name': 'Run in assert mode on modified system. Ignore a final error.', + 'number': '7', + 'name': 'Idempotency check: Run in normal mode again, \ + do not use tuned, \ + allow a reboot.', 'command_line_parameter': '', - 'ignore_error_final': True, + 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_assert': True + 'sap_hana_preconfigure_use_tuned': False, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { - 'number': '11', - 'name': 'Run in assert mode on modified system, \ - check for possible RHEL update, \ - compact output, \ - ignore any assert or final error.', + 'number': '8', + 'name': 'Run in normal mode, \ + use tuned and also modify boot command line, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, - 'compact_assert_output': True, + 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True + 'sap_hana_preconfigure_use_tuned': True, + 'sap_hana_preconfigure_modify_grub_cmdline_linux': True, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { - 'number': '12', - 'name': 'Run in normal mode. Do not use tuned. Allow a reboot.', + 'number': '9', + 'name': 'Idempotency check: Run in normal mode again, \ + use tuned and also modify boot command line, \ + allow a reboot.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_hana_preconfigure_enable_sap_hana_repos': True, - 'sap_hana_preconfigure_set_minor_release': True, - 'sap_hana_preconfigure_update': True, - 'sap_hana_preconfigure_use_tuned': False, - 'sap_hana_preconfigure_reboot_ok': True + 'sap_hana_preconfigure_use_tuned': True, + 'sap_hana_preconfigure_modify_grub_cmdline_linux': True, + 'sap_hana_preconfigure_reboot_ok': True, } ] }, { - 'number': '13', - 'name': 'Run in assert mode again, \ + 'number': '10', + 'name': 'Run in assert mode, \ check for possible RHEL update, \ check all config, \ compact output, \ - ignore any assert or final error.', + ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -218,49 +184,17 @@ 'sap_hana_preconfigure_assert': True, 'sap_hana_preconfigure_assert_all_config': True, 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True } ] }, { - 'number': '14', - 'name': 'Run in normal mode. \ - Use tuned and also modify boot command line. \ - Allow a reboot.', - 'command_line_parameter': '', + 'number': '11', + 'name': 'Run in check mode on modified system.', + 'command_line_parameter': '--check ', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', - 'role_vars': [ - { - 'sap_hana_preconfigure_enable_sap_hana_repos': True, - 'sap_hana_preconfigure_set_minor_release': True, - 'sap_hana_preconfigure_update': True, - 'sap_hana_preconfigure_use_tuned': True, - 'sap_hana_preconfigure_modify_grub_cmdline_linux': True, - 'sap_hana_preconfigure_reboot_ok': True - } - ] - }, - { - 'number': '15', - 'name': 'Run in assert mode again, \ - check for possible RHEL update, \ - check all config, \ - compact output, \ - ignore any assert error.', - 'command_line_parameter': '', - 'ignore_error_final': True, - 'compact_assert_output': True, - 'rc': '99', - 'role_vars': [ - { - 'sap_hana_preconfigure_assert': True, - 'sap_hana_preconfigure_assert_all_config': True, - 'sap_hana_preconfigure_assert_ignore_errors': True, - 'sap_hana_preconfigure_update': True - } - ] + 'role_vars': [] } ] From 1fb766d4fbf63200057f158de441e48b8a63d308 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 22 Sep 2022 16:05:18 +0000 Subject: [PATCH 172/375] sap_ha_cluster: prepared platform tasks and some aws basics for fencing --- .../tasks/ascertain_platform_type.yml | 9 +++ .../tasks/construct_vars_common.yml | 3 +- roles/sap_ha_cluster/tasks/main.yml | 18 +++++- .../tasks/preconfigure_platform_aws.yml | 62 +++++++++++++++++++ roles/sap_ha_cluster/vars/Platform_aws.yml | 53 ++++++++++++++++ .../sap_ha_cluster/vars/Platform_ibmcloud.yml | 4 ++ 6 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml create mode 100644 roles/sap_ha_cluster/vars/Platform_aws.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index 5f199914f..c8b7a1344 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -2,6 +2,15 @@ # Platform detection for cloud platforms. # Potentially also useful for other virtual or hardware platforms. +# Possible useful ansible facts are: +# - ansible_chassis_asset_tag +# - ansible_board_asset_tag +# - ansible_system_vendor + +# TODO: smarter detection based on multiple facts and providing one standard +# name for use as platform type in related include files + - name: "{{ __tname }} Set platform type based on Ansible facts" ansible.builtin.set_fact: __sap_ha_cluster_vm_asset_tag: "{{ ansible_facts.node.ansible_chassis_asset_tag | default('NA') }}" + # __sap_ha_cluster_platform_type: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 553d1eb98..43798fa81 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -1,6 +1,5 @@ --- -# Variables containing variables must be constructed with values -# to be fed into an included role +# Create or combine input parameters for the ha_cluster role. - name: "{{ __tname }} Set cluster name" ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index b4c01d0f0..c832ff66d 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -62,8 +62,9 @@ tags: check_platform tags: check_platform -# Copied from rhel-system-roles/roles/ha_cluster/tasks/main.yml and enhanced -# for additional environment settings. +# Include vars files based on the environment +# Make sure the include order is correct (potentially overwriting the same +# parameters). - name: "{{ __tname }} Set platform/version specific variables" ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: @@ -102,6 +103,18 @@ file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' +- name: "{{ __tname }} Include platform specific fencing prerequisites" + ansible.builtin.include_tasks: + file: "{{ item }}" + loop: + - "preconfigure_platform_{{ __sap_ha_cluster_platform_type }}.yml" + vars: + __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" + when: + - __sap_ha_cluster_platform_type is defined + - __sap_ha_cluster_platform_file is file + ignore_errors: "{{ ansible_check_mode }}" + # TODO: combine various definitions into one parameter for role include input # For example, multiple resource primitives are defined in different places for # different purpose. The result shall be a complete list of all the constructed @@ -110,6 +123,7 @@ # Before we are ready to call the ha_cluster role, we want to validate # that the minimum required parameters are defined and not empty. +# TODO: make this smarter, currently all these vars are pre-defined anyway - name: "{{ __tname }} Validate parameters for 'ha_cluster' role input" ansible.builtin.assert: that: diff --git a/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml b/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml new file mode 100644 index 000000000..28bd5718f --- /dev/null +++ b/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml @@ -0,0 +1,62 @@ +--- +# Requirement to enable the fencing resource to function. + +- name: "{{ __tname }} Create awscli config directory" + ansible.builtin.file: + mode: 0755 + owner: root + path: /root/.aws + state: directory + +- name: "{{ __tname }} Create awscli config" + ansible.builtin.blockinfile: + backup: true + block: | + [default] + region = {{ sap_ha_cluster_aws_region }} + create: true + mode: 0600 + owner: root + path: /root/.aws/config + +- name: "{{ __tname }} Store awscli credentials" + ansible.builtin.blockinfile: + backup: true + block: | + [default] + aws_access_key_id = {{ sap_ha_cluster_aws_access_key_id }} + aws_secret_access_key = {{ sap_ha_cluster_aws_secret_access_key }} + create: true + mode: 0600 + owner: root + path: /root/.aws/credentials + +- name: "{{ __tname }} Get VPC info" + ansible.builtin.shell: | + aws ec2 describe-vpcs \ + --output text \ + --filters "Name=tag:Name,Values={{ sap_ha_cluster_aws_vpc }}" \ + --query 'Vpcs[*].VpcId' + register: __sap_ha_cluster_aws_describe_vpcs + changed_when: false + run_once: true + check_mode: false + +- name: "{{ __tname }} Get instances info" + ansible.builtin.shell: | + aws ec2 describe-instances \ + --output json \ + --query 'Reservations[].Instances[]' + register: __sap_ha_cluster_aws_describe_instances + changed_when: false + run_once: true + check_mode: false + +- name: "{{ __tname }} Combine instance info into a dictionary" + ansible.builtin.set_fact: + __sap_ha_cluster_aws_instances: "{{ __sap_ha_cluster_aws_instances + [{'private_ip': item.PrivateIpAddress, 'instance_id': item.InstanceId}] }}" + loop: "{{ __sap_ha_cluster_aws_describe_instances.stdout }}" + loop_control: + label: "{{ item.PrivateIpAddress }}" + run_once: true + check_mode: false diff --git a/roles/sap_ha_cluster/vars/Platform_aws.yml b/roles/sap_ha_cluster/vars/Platform_aws.yml new file mode 100644 index 000000000..1f1fe1c2b --- /dev/null +++ b/roles/sap_ha_cluster/vars/Platform_aws.yml @@ -0,0 +1,53 @@ +--- +# Variables specific on AWS cloud platform +# +# TODO: make sure to first respect 'ha_cluster' native variables + +sap_ha_cluster_fence_agent_packages: + - fence-agents-aws + +sap_ha_cluster_extra_packages: + - awscli + +__sap_ha_cluster_repos: + - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rhui-rpms" + name: High Availability + +# Predefine +__sap_ha_cluster_aws_instances: [] + +## Requires: +# sap_ha_cluster_aws_access_key_id: +# sap_ha_cluster_aws_secret_access_key: +# sap_ha_cluster_aws_region: +# sap_ha_cluster_aws_vpc: + +# TODO: move to defaults +sap_ha_cluster_aws_fence_power_timeout: 240 +sap_ha_cluster_aws_fence_reboot_retries: 4 +sap_ha_cluster_aws_fence_reboot_timeout: 400 + +# TODO: construct parameter +#__sap_ha_cluster_pcmk_host_map + +ha_cluster_resource_primitives: + - id: res_fence_aws + agent: "stonith:fence_aws" + instance_attrs: + - attrs: + - name: access_key + value: "{{ sap_ha_cluster_aws_access_key_id }}" + - name: secret_key + value: "{{ sap_ha_cluster_aws_secret_access_key }}" + - name: region + value: "{{ sap_ha_cluster_aws_region }}" + - name: pcmk_host_map + value: "{{ __sap_ha_cluster_pcmk_host_map }}" + - name: pcmk_reboot_retries + value: "{{ sap_ha_cluster_aws_fence_reboot_retries }}" + - name: pcmk_reboot_timeout + value: "{{ sap_ha_cluster_aws_fence_reboot_timeout }}" + - name: power_timeout + value: "{{ sap_ha_cluster_aws_fence_power_timeout }}" + - name: + value: diff --git a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml index b7af211a1..2dd091692 100644 --- a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml +++ b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml @@ -5,3 +5,7 @@ # sap_ha_cluster_fence_agent_packages: - fence-agents-ibm-vpc + +#__sap_ha_cluster_repos: +# - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rhui-rpms" +# name: High Availability From ff40960ae684f8d1601aa4268db70d6e7abbe042 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 22 Sep 2022 20:13:31 +0100 Subject: [PATCH 173/375] sap_install_media_detect: add SAP BW/4HANA vars and task call --- roles/sap_install_media_detect/defaults/main.yml | 2 +- roles/sap_install_media_detect/tasks/main.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index 7e56337fd..4f66ec2aa 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -15,7 +15,7 @@ sap_install_media_detect_igs: true sap_install_media_detect_kernel: true sap_install_media_detect_webdisp: false -# saps4hana, sapecc +# saps4hana, sapecc, sapbw4hana sap_install_media_detect_export: # e.g. /db_backup diff --git a/roles/sap_install_media_detect/tasks/main.yml b/roles/sap_install_media_detect/tasks/main.yml index e8b682ad1..5e910cef2 100644 --- a/roles/sap_install_media_detect/tasks/main.yml +++ b/roles/sap_install_media_detect/tasks/main.yml @@ -76,6 +76,10 @@ when: - sap_install_media_detect_export == "saps4hana" +- name: SAP Install Media Detect - EXPORT files for SAP BW/4HANA + include_tasks: "detect_export_sapbw4hana.yml" + when: + - sap_install_media_detect_export == "sapbw4hana" - name: SAP Install Media Detection Completed - set global vars for subsequent Ansible Tasks include_tasks: "set_global_vars.yml" From 7f38e539ab9666dabf292babd6edb7db92a6611f Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 23 Sep 2022 00:03:21 +0100 Subject: [PATCH 174/375] sap_install_media_detect: amend maxdb logic and fix export path vars set --- .../tasks/detect_sapanydb_sapmaxdb.yml | 4 +++- .../tasks/set_global_vars.yml | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml index 4de384d32..5f9a63c76 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml @@ -49,7 +49,9 @@ paths: "{{ sap_install_media_detect_directory }}/sapmaxdb_extracted/" recurse: yes file_type: directory - contains: "MaxDB_7.9" +# contains: "MaxDB_7.9" + patterns: '.*MaxDB_7.9.*' + use_regex: yes register: detect_directory_sapmaxdb_extracted - name: SAP Install Media Detect - SAP MaxDB - Local Directory source - move SAP MaxDB compressed archive files diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index cdf6d870e..7cd85d316 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -45,14 +45,21 @@ sap_swpm_cd_export_path: "{{ detect_directory_export_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - - sap_install_media_detect_export == "ecc" + - sap_install_media_detect_export == "sapecc" - name: SAP Install Media Detection Completed - set facts for Export of SAP S/4HANA ansible.builtin.set_fact: sap_swpm_cd_export_path: "{{ s4hana_export_files.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true when: - - sap_install_media_detect_export == "s4hana" + - sap_install_media_detect_export == "saps4hana" + +- name: SAP Install Media Detection Completed - set facts for Export of SAP BW/4HANA + ansible.builtin.set_fact: + sap_swpm_cd_export_path: "{{ bw4hana_export_files.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_export == "sapbw4hana" - name: SAP Install Media Detection Completed - set facts for SAP SWPM ansible.builtin.set_fact: From 63b1d8e629022b50d6fcacc2fdaa23e361b370be Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 23 Sep 2022 02:39:03 +0100 Subject: [PATCH 175/375] sap_install_media_detect: ref to unrar --- .../tasks/detect_export_sapecc.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml index 2de4d961b..e6a22eb1a 100644 --- a/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml +++ b/roles/sap_install_media_detect/tasks/detect_export_sapecc.yml @@ -40,7 +40,7 @@ - name: SAP Install Media Detect - SAP ECC EXPORT - Identify SAP ECC EXPORT files ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; - elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if ../unrar lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_ecc_export changed_when: "item | length > 0" with_items: @@ -75,7 +75,9 @@ paths: "{{ sap_install_media_detect_directory }}/sapecc_export_extracted" recurse: yes file_type: directory - contains: "DATA_UNITS" +# contains: "DATA_UNITS" + patterns: '.*DATA_UNITS.*' + use_regex: yes register: detect_directory_export_extracted - name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-list files in directory @@ -113,7 +115,7 @@ - name: SAP Install Media Detect - SAP ECC EXPORT - Local Directory source - re-identify SAP ECC EXPORT files ansible.builtin.shell: | if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; - elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if ../unrar lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/EXPORT_' ; then echo '{{ item }}' ; fi ; fi register: detect_directory_files_ecc_export_repeated changed_when: "item | length > 0" with_items: From ee32a39d033801eb10fb62e0e17a2db52ec70a85 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 23 Sep 2022 10:33:44 +0000 Subject: [PATCH 176/375] sap_ha_cluster: cib backup and improved order of some vars and tasks --- roles/sap_ha_cluster/defaults/main.yml | 11 +++ roles/sap_ha_cluster/tasks/main.yml | 99 ++++++++++++---------- roles/sap_ha_cluster/vars/Platform_aws.yml | 14 +-- 3 files changed, 68 insertions(+), 56 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index b4f14095b..1c4b3b177 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -19,6 +19,10 @@ sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" sap_ha_cluster_fence_agent_packages: - fence-agents-all +# Resource defaults +sap_ha_cluster_resource_stickiness: 1000 +sap_ha_cluster_migration_threshold: 5000 + # The type of SAP landscape and multi-node replication # TODO: variable name update, depending on feedback #sap_ha_cluster_sap_type: "" @@ -31,3 +35,10 @@ sap_ha_cluster_automated_register: true sap_ha_cluster_duplicate_primary_timeout: 900 # PREFER_SITE_TAKEOVER sap_ha_cluster_prefer_site_takeover: true + +### stonith resource parameter defaults +# not all of the defined variables will be needed for all fence types +# ideally this is generic and covers all platform type agents +sap_ha_cluster_fence_power_timeout: 240 +sap_ha_cluster_fence_reboot_retries: 4 +sap_ha_cluster_fence_reboot_timeout: 400 diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index c832ff66d..241ea925a 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -103,50 +103,58 @@ file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' -- name: "{{ __tname }} Include platform specific fencing prerequisites" - ansible.builtin.include_tasks: - file: "{{ item }}" - loop: - - "preconfigure_platform_{{ __sap_ha_cluster_platform_type }}.yml" - vars: - __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" - when: - - __sap_ha_cluster_platform_type is defined - - __sap_ha_cluster_platform_file is file - ignore_errors: "{{ ansible_check_mode }}" - -# TODO: combine various definitions into one parameter for role include input -# For example, multiple resource primitives are defined in different places for -# different purpose. The result shall be a complete list of all the constructed -# resources. - - -# Before we are ready to call the ha_cluster role, we want to validate -# that the minimum required parameters are defined and not empty. -# TODO: make this smarter, currently all these vars are pre-defined anyway -- name: "{{ __tname }} Validate parameters for 'ha_cluster' role input" - ansible.builtin.assert: - that: - - __sap_ha_cluster_cluster_properties is defined - - __sap_ha_cluster_extra_packages is defined - - __sap_ha_cluster_resource_primitives is defined - - __sap_ha_cluster_resource_clones is defined - - __sap_ha_cluster_constraints_order is defined - - __sap_ha_cluster_constraints_colocation is defined -# - blahtest is defined - fail_msg: "Cluster build parameter construction has failed for this parameter." - #### for debugging #- name: "Fail here for now..." # ansible.builtin.fail: -### Up to here there has been NO changes, only environment validations and -### parameter constructions! - -- name: "{{ __tname }} Block that executes the actual changes" +- name: "{{ __tname }} Block with actual changes" block: - -# TODO: sanity: check if there is a cluster already and back up the CIB + # Start with prerequisite changes for certain platforms, if applicable + - name: "{{ __tname }} Include platform specific fencing prerequisites" + ansible.builtin.include_tasks: + file: "{{ item }}" + loop: + - "preconfigure_platform_{{ __sap_ha_cluster_platform_type }}.yml" + vars: + __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" + when: + - __sap_ha_cluster_platform_type is defined + - __sap_ha_cluster_platform_file is file + ignore_errors: "{{ ansible_check_mode }}" + + # Before we are ready to call the ha_cluster role, we want to validate + # that the minimum required parameters are defined and not empty. + # TODO: make this smarter, currently all these vars are pre-defined anyway + - name: "{{ __tname }} Validate parameters for 'ha_cluster' role input" + ansible.builtin.assert: + that: + - __sap_ha_cluster_cluster_properties is defined + - __sap_ha_cluster_extra_packages is defined + - __sap_ha_cluster_resource_primitives is defined + - __sap_ha_cluster_resource_clones is defined + - __sap_ha_cluster_constraints_order is defined + - __sap_ha_cluster_constraints_colocation is defined + fail_msg: "Cluster build parameter construction has failed for this parameter." + + - name: "{{ __tname }} Query if CIB already exists" + ansible.builtin.command: + cmd: cibadmin --query + register: __sap_ha_cluster_cib_query + check_mode: no + changed_when: false + failed_when: false + + - name: "{{ __tname }} Create backup of existing CIB" + ansible.builtin.copy: + backup: true + content: "{{ __sap_ha_cluster_cib_query.stdout }}" + dest: /root/cib_backup.xml + group: root + owner: root + mode: 0600 + when: + - __sap_ha_cluster_cib_query.stdout is defined + - __sap_ha_cluster_cib_query.stdout|length > 0 # include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) - name: "{{ __tname }} Include System Role 'ha_cluster'" @@ -167,17 +175,16 @@ ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" - # no_log: true # some parameters contain secrets + no_log: true # some parameters contain secrets tags: ha_cluster - #### from old ha role - # TODO: test if the defaults can be updated as part of other parameters - name: "{{ __tname }} Update resource default values" - ansible.builtin.shell: | - pcs resource defaults update resource-stickiness=1000 - pcs resource defaults update migration-threshold=5000 - changed_when: not ansible_check_mode + ansible.builtin.command: + cmd: pcs resource defaults update {{ item }} + loop: + - "resource-stickiness={{ sap_ha_cluster_resource_stickiness }}" + - "migration-threshold={{ sap_ha_cluster_migration_threshold }}" - name: "{{ __tname }} Include srHook configuration" ansible.builtin.include_tasks: diff --git a/roles/sap_ha_cluster/vars/Platform_aws.yml b/roles/sap_ha_cluster/vars/Platform_aws.yml index 1f1fe1c2b..720eda278 100644 --- a/roles/sap_ha_cluster/vars/Platform_aws.yml +++ b/roles/sap_ha_cluster/vars/Platform_aws.yml @@ -17,16 +17,12 @@ __sap_ha_cluster_repos: __sap_ha_cluster_aws_instances: [] ## Requires: +# TODO: decide where to define these vars # sap_ha_cluster_aws_access_key_id: # sap_ha_cluster_aws_secret_access_key: # sap_ha_cluster_aws_region: # sap_ha_cluster_aws_vpc: -# TODO: move to defaults -sap_ha_cluster_aws_fence_power_timeout: 240 -sap_ha_cluster_aws_fence_reboot_retries: 4 -sap_ha_cluster_aws_fence_reboot_timeout: 400 - # TODO: construct parameter #__sap_ha_cluster_pcmk_host_map @@ -44,10 +40,8 @@ ha_cluster_resource_primitives: - name: pcmk_host_map value: "{{ __sap_ha_cluster_pcmk_host_map }}" - name: pcmk_reboot_retries - value: "{{ sap_ha_cluster_aws_fence_reboot_retries }}" + value: "{{ sap_ha_cluster_fence_reboot_retries }}" - name: pcmk_reboot_timeout - value: "{{ sap_ha_cluster_aws_fence_reboot_timeout }}" + value: "{{ sap_ha_cluster_fence_reboot_timeout }}" - name: power_timeout - value: "{{ sap_ha_cluster_aws_fence_power_timeout }}" - - name: - value: + value: "{{ sap_ha_cluster_fence_power_timeout }}" From e6a992ae5fab73ed3e15a352bb4b94d409b50fae Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 23 Sep 2022 12:52:24 +0000 Subject: [PATCH 177/375] sap_ha_cluster: fixed constraint construction conditionals --- .../ascertain_ha_cluster_in_inventory.yml | 76 ++++++++----------- .../tasks/construct_vars_hana_common.yml | 6 +- roles/sap_ha_cluster/tasks/main.yml | 17 +++-- 3 files changed, 43 insertions(+), 56 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 9c6b2892f..7672dbc46 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -2,72 +2,58 @@ # If there are 'ha_cluster" role parameters are already defined in the # inventory, we will use these custom specifications. +## Take the following template to add additional parameters to be inherited: +#- name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_ }}" +# when: ha_cluster_ is defined + - name: "{{ __tname }} Register ha_cluster_cluster_properties" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" when: ha_cluster_cluster_properties is defined -- name: "{{ __tname }} Register ha_cluster_fence_agent_packages" +- name: "{{ __tname }} Register ha_cluster_constraints_colocation" ansible.builtin.set_fact: - __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" - when: ha_cluster_fence_agent_packages is defined + __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" + when: ha_cluster_constraints_colocation is defined + +- name: "{{ __tname }} Register ha_cluster_constraints_location" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" + when: ha_cluster_constraints_location is defined + +- name: "{{ __tname }} Register ha_cluster_constraints_order" + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" + when: ha_cluster_constraints_order is defined - name: "{{ __tname }} Register ha_cluster_extra_packages" ansible.builtin.set_fact: __sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages }}" when: ha_cluster_extra_packages is defined -- name: "{{ __tname }} Register ha_cluster_resource_primitives" +- name: "{{ __tname }} Register ha_cluster_fence_agent_packages" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" - when: ha_cluster_resource_primitives is defined + __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" + when: ha_cluster_fence_agent_packages is defined -- name: "{{ __tname }} Register ha_cluster_resource_groups" +- name: "{{ __tname }} Register ha_cluster_repos" ansible.builtin.set_fact: - __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" - when: ha_cluster_resource_groups is defined + __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" + when: ha_cluster_repos is defined - name: "{{ __tname }} Register ha_cluster_resource_clones" ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" when: ha_cluster_resource_clones is defined -- name: "{{ __tname }} Register ha_cluster_constraints_location" - ansible.builtin.set_fact: - __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" - when: ha_cluster_constraints_location is defined - -- name: "{{ __tname }} Register ha_cluster_constraints_colocation" - ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" - when: ha_cluster_constraints_colocation is defined - -- name: "{{ __tname }} Register ha_cluster_constraints_order" +- name: "{{ __tname }} Register ha_cluster_resource_groups" ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" - when: ha_cluster_constraints_order is defined + __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" + when: ha_cluster_resource_groups is defined -- name: "{{ __tname }} Register ha_cluster_repos" +- name: "{{ __tname }} Register ha_cluster_resource_primitives" ansible.builtin.set_fact: - __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" - when: ha_cluster_repos is defined - -#- name: "{{ __tname }} Register ha_cluster_" -# ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_}}" -# when: ha_cluster_is defined -# -#- name: "{{ __tname }} Register ha_cluster_" -# ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_}}" -# when: ha_cluster_is defined -# -#- name: "{{ __tname }} Register ha_cluster_" -# ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_}}" -# when: ha_cluster_is defined -# -#- name: "{{ __tname }} Register ha_cluster_" -# ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_}}" -# when: ha_cluster_is defined + __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" + when: ha_cluster_resource_primitives is defined diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index c2386abb3..cedad02ed 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -162,7 +162,7 @@ - name: symmetrical value: "false" when: - - __constraint_order_topology.resource_then.id not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - __constraint_order_topology.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # Start the VIP only after the HANA resource has been promoted - name: "{{ __tname }} Add order constraint: VIP starts after DB is promoted" @@ -177,7 +177,7 @@ id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" action: start when: - - __constraint_order_vip.resource_then.id not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # The VIP only runs where HANA is promoted - name: "{{ __tname }} Add colocation constraint: VIP runs where HANA is promoted" @@ -194,4 +194,4 @@ - name: score value: 2000 when: - - __constraint_colo_vip.resource_follower.id not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) + - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 241ea925a..b27eb46f6 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -54,7 +54,7 @@ tags: check_sap tags: check_sap -# Determine if we are on a cloud platform +# Determine if we are on a cloud platform. - name: "{{ __tname }} Include tasks for platform detection" ansible.builtin.include_tasks: file: ascertain_platform_type.yml @@ -62,9 +62,8 @@ tags: check_platform tags: check_platform -# Include vars files based on the environment -# Make sure the include order is correct (potentially overwriting the same -# parameters). +# Include vars files based on the environment. +# Respect order for potential variable precedence. - name: "{{ __tname }} Set platform/version specific variables" ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: @@ -156,7 +155,8 @@ - __sap_ha_cluster_cib_query.stdout is defined - __sap_ha_cluster_cib_query.stdout|length > 0 - # include ha_cluster role from "linux-system-roles" (symlink to rhel-system-roles on rhel) + # Cluster installation and configuration through the dedicated + # linux system role 'ha_cluster' - name: "{{ __tname }} Include System Role 'ha_cluster'" ansible.builtin.include_role: name: linux-system-roles.ha_cluster @@ -175,16 +175,17 @@ ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" - no_log: true # some parameters contain secrets +# no_log: true # some parameters contain secrets tags: ha_cluster -# TODO: test if the defaults can be updated as part of other parameters + # TODO: test if the defaults can be updated as part of other parameters - name: "{{ __tname }} Update resource default values" ansible.builtin.command: cmd: pcs resource defaults update {{ item }} loop: - "resource-stickiness={{ sap_ha_cluster_resource_stickiness }}" - "migration-threshold={{ sap_ha_cluster_migration_threshold }}" + run_once: true - name: "{{ __tname }} Include srHook configuration" ansible.builtin.include_tasks: @@ -193,9 +194,9 @@ tags: srhook tags: srhook +### END OF BLOCK: prerequisite changes and cluster setup when: - not sap_ha_cluster_create_config_only -### END OF BLOCK # TODO: how to deal with secrets in output? They should be masked somehow... From ef19a1b9ca9fe1e05d63c9094565ebfd6684aae2 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 23 Sep 2022 13:39:56 +0000 Subject: [PATCH 178/375] sap_ha_cluster: readme args rebuild --- roles/sap_ha_cluster/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index eef9cb216..cd8d341d0 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,14 +1,14 @@ | Variable Name | Required | Description | |---------------|----------|-------------| -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |
False

Default: "my-cluster" | The name of the pacemaker cluster. | -| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str |
True
| The password of the `hacluster` user which is created during pacemaker installation. | -| sap_ha_cluster_automated_register

Type: bool |
False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_create_config_dest

Type: str |
False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool |
False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int |
False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool |
False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_replication_type

Type: str |
False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str |
False

Default: "scaleup" | The SAP landscape to be installed. | -| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str |
True
| The instance number of the SAP HANA database which is role will configure in the cluster. | -| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str |
True
| The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| sap_hana_vip

Type: str |
True
| Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | +| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str | *True* | The password of the `hacluster` user which is created during pacemaker installation. | +| sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | +| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str | *True* | The instance number of the SAP HANA database which is role will configure in the cluster. | +| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str | *True* | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | +| sap_hana_vip

Type: str | *True* | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | From 5ddb9d9868089e8c30e225f59c755ce6a8abe611 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 23 Sep 2022 14:23:29 +0000 Subject: [PATCH 179/375] sap_ha_cluster: readme highlight required parameters --- roles/sap_ha_cluster/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index cd8d341d0..d4a3322b6 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,7 +1,7 @@ | Variable Name | Required | Description | |---------------|----------|-------------| | ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | -| ha_cluster_hacluster_password
Alias: sap_hana_hacluster_password
Type: str | *True* | The password of the `hacluster` user which is created during pacemaker installation. | +| **ha_cluster_hacluster_password**
Alias: sap_hana_hacluster_password
Type: str | **True** | The password of the `hacluster` user which is created during pacemaker installation. | | sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | | sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | | sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | @@ -9,6 +9,6 @@ | sap_ha_cluster_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | | sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | | sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | -| sap_hana_instance_number
Alias: sap_ha_cluster_hana_instance_number
Type: str | *True* | The instance number of the SAP HANA database which is role will configure in the cluster. | -| sap_hana_sid
Alias: sap_ha_cluster_hana_sid
Type: str | *True* | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| sap_hana_vip

Type: str | *True* | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | +| **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | +| **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | +| **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | From 8c34c210e63e17fc803ea6bd8601001d1605c12a Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 23 Sep 2022 16:31:35 +0000 Subject: [PATCH 180/375] sap_ha_cluster: better .md generation --- roles/sap_ha_cluster/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index d4a3322b6..1fc8778ca 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,3 +1,6 @@ + +## Role Input Parameters + | Variable Name | Required | Description | |---------------|----------|-------------| | ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | @@ -12,3 +15,4 @@ | **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | | **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | | **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | + From c1d0761f493e04c78091104da53203e51edbcb45 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Sat, 24 Sep 2022 01:02:03 +0200 Subject: [PATCH 181/375] sap_hana_preconfigure: improvements to selinux assertions --- roles/sap_hana_preconfigure/handlers/main.yml | 22 ++++++++--------- .../tasks/RedHat/generic/assert-selinux.yml | 24 +++++++++++++++++-- .../RedHat/generic/configure-selinux.yml | 1 - roles/sap_hana_preconfigure/tasks/main.yml | 4 ++-- .../tasks/sapnote/2777782.yml | 4 +++- .../tasks/sapnote/assert-2777782.yml | 4 +++- .../tests/run-sap_hana_preconfigure-tests.py | 24 ++++--------------- 7 files changed, 45 insertions(+), 38 deletions(-) diff --git a/roles/sap_hana_preconfigure/handlers/main.yml b/roles/sap_hana_preconfigure/handlers/main.yml index beb94babf..49e5191c7 100644 --- a/roles/sap_hana_preconfigure/handlers/main.yml +++ b/roles/sap_hana_preconfigure/handlers/main.yml @@ -7,14 +7,14 @@ register: __sap_hana_preconfigure_register_stat_sys_firmware_efi listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler when: - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: Debug BIOS or UEFI ansible.builtin.debug: var: __sap_hana_preconfigure_register_stat_sys_firmware_efi.stat.exists listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler when: - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: "Run grub-mkconfig (BIOS mode)" ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg @@ -23,7 +23,7 @@ notify: __sap_hana_preconfigure_reboot_handler when: - not __sap_hana_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: "Debug grub-mkconfig BIOS mode" ansible.builtin.debug: @@ -32,7 +32,7 @@ listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler when: - not __sap_hana_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: "Set the grub.cfg location RHEL" ansible.builtin.set_fact: @@ -55,7 +55,7 @@ notify: __sap_hana_preconfigure_reboot_handler when: - __sap_hana_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: "Debug grub-mkconfig UEFI" ansible.builtin.debug: @@ -64,7 +64,7 @@ listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler when: - __sap_hana_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hana_preconfigure_run_grub2_mkconfig|d(true) + - sap_hana_preconfigure_run_grub2_mkconfig | d(true) - name: "Run grubby for enabling TSX" ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL @@ -77,20 +77,20 @@ test_command: /bin/true listen: __sap_hana_preconfigure_reboot_handler when: - - sap_hana_preconfigure_reboot_ok|d(false) + - sap_hana_preconfigure_reboot_ok | d(false) - name: Let the role fail if a reboot is required ansible.builtin.fail: msg: Reboot is required! listen: __sap_hana_preconfigure_reboot_handler when: - - sap_hana_preconfigure_fail_if_reboot_required|d(true) - - not sap_hana_preconfigure_reboot_ok|d(false) + - sap_hana_preconfigure_fail_if_reboot_required | d(true) + - not sap_hana_preconfigure_reboot_ok | d(false) - name: Show a warning message if a reboot is required ansible.builtin.debug: msg: "WARN: Reboot is required!" listen: __sap_hana_preconfigure_reboot_handler when: - - not sap_hana_preconfigure_fail_if_reboot_required|d(true) - - not sap_hana_preconfigure_reboot_ok|d(false) + - not sap_hana_preconfigure_fail_if_reboot_required | d(true) + - not sap_hana_preconfigure_reboot_ok | d(false) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml index b908dced1..5bb34d58b 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -1,23 +1,43 @@ --- +- name: Install the package which provides the semanage command + ansible.builtin.package: + state: latest + name: policycoreutils-python-utils + +- name: Check if the directory '/hana' exists + ansible.builtin.stat: + path: '/hana' + register: __sap_hana_preconfigure_register_stat_hana + failed_when: false + +- name: Report that SELinux checking will not be performed in case the directory '/hana' does not exist + ansible.builtin.debug: + msg: "INFO: SELinux checks will not be run because the directory '/hana' does not exist." + when: not __sap_hana_preconfigure_register_stat_hana.stat.exists or + (__sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and + not __sap_hana_preconfigure_register_stat_hana.stat.isdir) + - name: Count SELinux configuration database entries for '/hana' ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/hana(/.*)?"&&$NF~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_semanage_fcontext_hana_result - when: sap_hana_preconfigure_modify_selinux_labels + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Assert that there is an entry for '/hana' in the SELinux configuration database ansible.builtin.assert: that: __sap_hana_preconfigure_register_semanage_fcontext_hana_result.stdout | int != 0 ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Count files in '/hana' and below without SELinux `usr_t` file context ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_ls_fcontext_hana_result - when: sap_hana_preconfigure_modify_selinux_labels + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Assert that all files in '/hana' and below have the usr_t file context ansible.builtin.assert: that: __sap_hana_preconfigure_register_selinux_fcontext_hana_result.stdout | int == 0 ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 6b78b31da..0688f4cee 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -10,4 +10,3 @@ - { target: '/hana(/.*)?', setype: 'usr_t' } selinux_restore_dirs: - '/hana' - when: sap_hana_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index c0f38389e..7ae398264 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -36,7 +36,7 @@ var: sap_general_preconfigure_fact_reboot_required - include_tasks: '{{ item }}/{{ assert_prefix }}installation.yml' - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_installation|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_installation | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' @@ -45,7 +45,7 @@ ansible.builtin.package_facts: - include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_configuration|d(false) + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_configuration | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' - '{{ ansible_distribution }}' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml index fd4191eb9..bd1184e2e 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782.yml @@ -6,7 +6,9 @@ - name: Import tasks from '2777782/01-configure-selinux.yml' ansible.builtin.import_tasks: 2777782/01-configure-selinux.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) + when: + - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) + - sap_hana_preconfigure_modify_selinux_labels - name: Import tasks from '2777782/02-configure-tuned.yml' ansible.builtin.import_tasks: 2777782/02-configure-tuned.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml index 358a7b836..8efa90274 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2777782.yml @@ -6,7 +6,9 @@ - name: Import tasks from '2777782/01-assert-selinux.yml' ansible.builtin.import_tasks: 2777782/01-assert-selinux.yml - when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) + when: + - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2777782_01|d(false) + - sap_hana_preconfigure_modify_selinux_labels - name: Import tasks from '2777782/02-assert-tuned.yml' ansible.builtin.import_tasks: 2777782/02-assert-tuned.yml diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index 3d977dd74..6eecfab70 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -43,7 +43,7 @@ 'name': 'Run in assert mode on new system, \ ignore assert errors.', 'command_line_parameter': '', - 'ignore_error_final': True, + 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ @@ -120,22 +120,6 @@ }, { 'number': '7', - 'name': 'Idempotency check: Run in normal mode again, \ - do not use tuned, \ - allow a reboot.', - 'command_line_parameter': '', - 'ignore_error_final': False, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_hana_preconfigure_use_tuned': False, - 'sap_hana_preconfigure_reboot_ok': True, - } - ] - }, - { - 'number': '8', 'name': 'Run in normal mode, \ use tuned and also modify boot command line, \ allow a reboot.', @@ -152,7 +136,7 @@ ] }, { - 'number': '9', + 'number': '8', 'name': 'Idempotency check: Run in normal mode again, \ use tuned and also modify boot command line, \ allow a reboot.', @@ -169,7 +153,7 @@ ] }, { - 'number': '10', + 'number': '9', 'name': 'Run in assert mode, \ check for possible RHEL update, \ check all config, \ @@ -188,7 +172,7 @@ ] }, { - 'number': '11', + 'number': '10', 'name': 'Run in check mode on modified system.', 'command_line_parameter': '--check ', 'ignore_error_final': False, From de9379075487d80f2d3a5b68d39165ef27c46802 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 25 Sep 2022 00:24:59 +0100 Subject: [PATCH 182/375] sap_install_media_detect: fix var set for sap_anydb_install_oracle Ansible Role --- roles/sap_install_media_detect/tasks/set_global_vars.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index 7cd85d316..f443b60a7 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -19,6 +19,7 @@ - name: SAP Install Media Detection Completed - set facts for Oracle DB ansible.builtin.set_fact: + sap_anydb_install_oracle_extract_path: "{{ detect_directory_oracledb_extracted.files[0].path }}" # for sao_anydb_install_oracle Ansible Role sap_swpm_cd_oracle_path: "{{ detect_directory_oracledb_extracted.files[0].path }}" # for sap_swpm Ansible Role sap_swpm_cd_oracle_client_path: "{{ detect_directory_oracledb_client_extracted.files[0].path }}" # for sap_swpm Ansible Role ignore_errors: true From 6f727f9607cf71dcf55f279218d51a1ba3a63783 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 08:28:37 +0000 Subject: [PATCH 183/375] sap_ha_cluster: required parameters at the top --- roles/sap_ha_cluster/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 1fc8778ca..a87f8f1ae 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -3,16 +3,16 @@ | Variable Name | Required | Description | |---------------|----------|-------------| -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | | **ha_cluster_hacluster_password**
Alias: sap_hana_hacluster_password
Type: str | **True** | The password of the `hacluster` user which is created during pacemaker installation. | -| sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | | **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | | **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | | **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |False

Default: "my-cluster" | The name of the pacemaker cluster. | +| sap_ha_cluster_automated_register

Type: bool |False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str |False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool |False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int |False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool |False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str |False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str |False

Default: "scaleup" | The SAP landscape to be installed. | From ffd4310d968b09ba1673529531b28c7dd8028073 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 09:01:15 +0000 Subject: [PATCH 184/375] sap_ha_cluster: added ha_cluster dict reference --- roles/sap_ha_cluster/meta/argument_specs.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 2032823f8..f60ec2603 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -12,6 +12,7 @@ argument_specs: # Take this template and copy it to the desired place. # Ideally sort by key (variable name) alphabetically. +# # sap_ha_cluster_ # description: # - @@ -19,6 +20,33 @@ argument_specs: # required: false # default: + ha_cluster: + description: + - Optional host_vars parameter, if defined it must be set for each node. + - Definition of node name and IP addresses to be used for the pacemaker cluster. + - Required for resilient node communication by providing more than one corosync IP. + - Reference [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses] + type: dict + required: false + options: + node_name: + description: + - The name of the node in the cluster. + default: + type: str + pcs_address: + description: + - An address used by pcs to communicate with the node. + - Can be a name, FQDN or IP address and can contain a port. + default: + type: str + corosync_addresses: + description: + - List of IP addresses used by Corosync. + - All nodes must have the same number of addresses. + - The order of the listed addresses matters. + type: list + ha_cluster_cluster_name: description: - The name of the pacemaker cluster. From 7c7fd6d53efa4f759cc3eb023a6721cfeed68ca0 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 09:04:40 +0000 Subject: [PATCH 185/375] sap_ha_cluster: added ha_cluster dict reference --- roles/sap_ha_cluster/README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index a87f8f1ae..71e3770d6 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -7,12 +7,13 @@ | **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | | **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | | **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str |False

Default: "my-cluster" | The name of the pacemaker cluster. | -| sap_ha_cluster_automated_register

Type: bool |False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_create_config_dest

Type: str |False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool |False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int |False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool |False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_replication_type

Type: str |False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str |False

Default: "scaleup" | The SAP landscape to be installed. | +| ha_cluster

Type: dict | False | Optional host_vars parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
Reference [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses] | +| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | +| sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | +| sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | +| sap_ha_cluster_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | +| sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | From 2706744122298efc01333445ab0ef160a783f259 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 09:08:12 +0000 Subject: [PATCH 186/375] sap_ha_cluster: reference ha_cluster readme --- roles/sap_ha_cluster/README.md | 2 +- roles/sap_ha_cluster/meta/argument_specs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 71e3770d6..f087beb4c 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -7,7 +7,7 @@ | **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | | **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | | **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | -| ha_cluster

Type: dict | False | Optional host_vars parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
Reference [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses] | +| ha_cluster

Type: dict | False | Optional host_vars parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses | | ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | | sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | | sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index f60ec2603..b31a26427 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -25,7 +25,7 @@ argument_specs: - Optional host_vars parameter, if defined it must be set for each node. - Definition of node name and IP addresses to be used for the pacemaker cluster. - Required for resilient node communication by providing more than one corosync IP. - - Reference [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses] + - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses type: dict required: false options: From 2160b12944f8fd430953a3d47fd16895639d37be Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 12:39:31 +0000 Subject: [PATCH 187/375] sap_ha_cluster: default cluster name, aligned with ha_cluster role --- roles/sap_ha_cluster/defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 1c4b3b177..9abacba1a 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -6,6 +6,8 @@ __tname: "SAP HA Cluster -" # The included 'ha_cluster' role will not work with the role variables set # in this role. +sap_ha_cluster_cluster_name: my-cluster + sap_ha_cluster_create_config_only: false sap_ha_cluster_create_config_dest: sap_ha_cluster_resource_config.yml From 9cfb231bb0bf90fcde850cc6bca5c09478cb5607 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 26 Sep 2022 13:56:45 +0000 Subject: [PATCH 188/375] sap_ha_cluster: idempotency for resource defaults update + explanation of vars file --- roles/sap_ha_cluster/tasks/main.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index b27eb46f6..4b5923524 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -175,10 +175,19 @@ ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" -# no_log: true # some parameters contain secrets + no_log: true # some parameters contain secrets tags: ha_cluster - # TODO: test if the defaults can be updated as part of other parameters + # Resource defaults can currently not be updated through ha_cluster + # role parameters, and thus need to be added. + - name: "{{ __tname }} Check resource defaults" + ansible.builtin.command: + cmd: pcs resource defaults config + register: __sap_ha_cluster_check_resource_defaults + run_once: true + changed_when: false + check_mode: no + - name: "{{ __tname }} Update resource default values" ansible.builtin.command: cmd: pcs resource defaults update {{ item }} @@ -186,6 +195,8 @@ - "resource-stickiness={{ sap_ha_cluster_resource_stickiness }}" - "migration-threshold={{ sap_ha_cluster_migration_threshold }}" run_once: true + when: + - item not in __sap_ha_cluster_check_resource_defaults.stdout - name: "{{ __tname }} Include srHook configuration" ansible.builtin.include_tasks: @@ -198,7 +209,16 @@ when: - not sap_ha_cluster_create_config_only -# TODO: how to deal with secrets in output? They should be masked somehow... +# Save all the constructed cluster parameters into a vars file. +# +# This will help re-using ha_cluster afterwards without loosing the already +# configured resources and constraints. +# The ha_cluster role will otherwise remove configuration that is not part +# of the parameters provided during any subsequent run outside of the current +# SAP system role. +# +# TODO: Deal with secrets in output. They should be masked, maybe with +# their user provided variables? - name: "{{ __tname }} Create cluster configuration parameters file" ansible.builtin.template: From cb5c00a58446e02bfc4d245ef0615c25f99c8f68 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 26 Sep 2022 22:54:59 +0200 Subject: [PATCH 189/375] sap_hana_preconfigure: SELinux directory flexibility --- .../tasks/RedHat/generic/assert-selinux.yml | 48 +++++++++++++++---- .../run-sap_general_preconfigure-tests.py | 2 +- roles/sap_hana_preconfigure/defaults/main.yml | 25 ++++++++-- .../tasks/RedHat/configuration.yml | 26 +++++++++- .../generic/assert-2777782-01-loop-block.yml | 38 +++++++++++++++ .../tasks/RedHat/generic/assert-selinux.yml | 42 +++------------- .../RedHat/generic/configure-selinux.yml | 6 +-- 7 files changed, 132 insertions(+), 55 deletions(-) create mode 100644 roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 7aa2d8458..63b80a61b 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -54,24 +54,56 @@ success_msg: "PASS: SELinux is currently {{ sap_general_preconfigure_selinux_state }}." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" +- name: Install the package which provides the semanage command + ansible.builtin.package: + state: latest + name: policycoreutils-python-utils + when: sap_general_preconfigure_modify_selinux_labels + +- name: Check if the directory '/usr/sap' exists + ansible.builtin.stat: + path: '/usr/sap' + register: __sap_general_preconfigure_register_stat_usr_sap + failed_when: false + when: sap_general_preconfigure_modify_selinux_labels + +- name: Report that SELinux checking will not be performed if the directory '/usr/sap' does not exist + ansible.builtin.debug: + msg: "INFO: SELinux checks will not be run because the directory '/usr/sap' does not exist." + when: + - sap_general_preconfigure_modify_selinux_labels + - not __sap_general_preconfigure_register_stat_usr_sap.stat.exists or + (__sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and + not __sap_general_preconfigure_register_stat_usr_sap.stat.isdir) + - name: Count SELinux configuration database entries for '/usr/sap' ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/usr/sap(/.*)?"&&$NF~/usr_t/{a++}END{print a}' - register: __sap_general_preconfigure_register_semanage_fcontext_usr_sap_result - when: sap_general_preconfigure_modify_selinux_labels + register: __sap_general_preconfigure_register_semanage_fcontext_usr_sap + when: + - sap_general_preconfigure_modify_selinux_labels + - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir - name: Assert that there is an entry for '/usr/sap' in the SELinux configuration database ansible.builtin.assert: that: - __sap_general_preconfigure_register_semanage_fcontext_usr_sap_result.stdout | int != 0 + __sap_general_preconfigure_register_semanage_fcontext_usr_sap.stdout | int != 0 ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" + when: + - sap_general_preconfigure_modify_selinux_labels + - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir -- name: Count files in '/usr/sap' and below without SELinux `usr_t` file context +- name: Count files in '/usr/sap' and below without SELinux 'usr_t' file context ansible.builtin.shell: set -o pipefail && find /usr/sap -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' - register: __sap_general_preconfigure_register_ls_fcontext_usr_sap_result - when: sap_general_preconfigure_modify_selinux_labels + register: __sap_general_preconfigure_register_ls_z_usr_sap + when: + - sap_general_preconfigure_modify_selinux_labels + - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir -- name: Assert that all files in '/usr/sap' and below have the usr_t file context +- name: Assert that all files in '/usr/sap' and below have the 'usr_t' file context ansible.builtin.assert: that: - __sap_general_preconfigure_register_selinux_fcontext_usr_sap_result.stdout | int == 0 + __sap_general_preconfigure_register_selinux_z_usr_sap.stdout | int == 0 ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" + when: + - sap_general_preconfigure_modify_selinux_labels + - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index 4c5e61dd2..25933aba9 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -131,7 +131,7 @@ 'number': '6', 'name': 'Run in check mode on modified system.', 'command_line_parameter': '--check ', - 'ignore_error_final': False, + 'ignore_error_final': True, 'compact_assert_output': False, 'rc': '99', 'role_vars': [] diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index 55e6bafa9..e9aeae9ac 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -56,6 +56,26 @@ sap_hana_preconfigure_req_repos_redhat_9_ppc64le: "{{ __sap_hana_preconfigure_re # Set to "yes" if you want the role to set the RHEL minor release, which is required for SAP HANA. Default is "no". sap_hana_preconfigure_set_minor_release: no +# Set to 'no' if you do not want the SAP HANA directories to be created by the role. Default is 'yes'. +# Note: The SAP HANA directories will always be created if 'sap_hana_preconfigure_modify_selinux_labels' +# (see below) is set to 'yes', no matter how 'sap_hana_preconfigure_create_directories' is set. +sap_hana_preconfigure_create_directories: yes + +# HANA directories to be created +sap_hana_preconfigure_hana_directories: + - '/hana' +# - '/hana/shared' +# - '/hana/data' +# - '/hana/log' + - '/lss/shared' + +# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add +# the 'usr_t' label to directories and files in the directories where HANA is installed. +# If relabeling not desired, set the following variable to `no`. +# Note: If the variable is set to 'yes', which is the default, the SAP HANA directories will be created +# no matter how the variable 'sap_hana_preconfigure_create_directories' (see above) is set. +sap_hana_preconfigure_modify_selinux_labels: yes + # HANA Major and minor version # These variables are used in other SAP HANA related roles, e.g. sap-hana-mediacheck. sap_hana_version: "2" @@ -79,11 +99,6 @@ sap_hana_preconfigure_reboot_ok: no # Set the following variable to "no" if you want the role to not fail if a reboot is required: sap_hana_preconfigure_fail_if_reboot_required: yes -# For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add -# the 'usr_t' label to directories and files in `/hana`. -# If relabeling not desired, set the following variable to `no`. -sap_hana_preconfigure_modify_selinux_labels: yes - ### # # The following variables are optional. diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml index 10e7a0378..8333223da 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml @@ -4,13 +4,35 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes_versions | difference(['']) -- name: Configure - Create directory '/hana' +- name: Configure - Set directory variables for setting SELinux file contexts + ansible.builtin.set_fact: + sap_hana_preconfigure_fact_targets_setypes: "{{ sap_hana_preconfigure_fact_targets_setypes | d([]) + + [ __sap_hana_preconfigure_tmp_dict_target_setype ] }}" + loop: "{{ sap_hana_preconfigure_hana_directories }}" + loop_control: + loop_var: line_item + vars: + __sap_hana_preconfigure_tmp_dict_target_setype: + target: "{{ line_item }}(/.*)?" + setype: 'usr_t' + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Configure - Display directory variable + ansible.builtin.debug: + var: sap_hana_preconfigure_fact_targets_setypes + when: sap_hana_preconfigure_modify_selinux_labels + +- name: Configure - Create directories ansible.builtin.file: - path: '/hana' + path: "{{ line_item }}" state: directory mode: '0755' owner: root group: root + loop: "{{ sap_hana_preconfigure_hana_directories }}" + loop_control: + loop_var: line_item + when: sap_hana_preconfigure_create_directories or sap_hana_preconfigure_modify_selinux_labels - name: Configure - Include configuration actions for required sapnotes ansible.builtin.include_tasks: "sapnote/{{ sap_note_line_item.number }}.yml" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml new file mode 100644 index 000000000..1a6f55573 --- /dev/null +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml @@ -0,0 +1,38 @@ +--- + +- name: 2777782-01 - Check if the directory '{{ line_item }}' exists + ansible.builtin.stat: + path: "{{ line_item }}" + register: __sap_hana_preconfigure_register_stat_hana + failed_when: false + +- name: Report that SELinux checking will not be performed if the directory '{{ line_item }}' does not exist + ansible.builtin.debug: + msg: "INFO: SELinux checks will not be run because the directory '{{ line_item }}' does not exist." + when: not __sap_hana_preconfigure_register_stat_hana.stat.exists or + (__sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and + not __sap_hana_preconfigure_register_stat_hana.stat.isdir) + +- name: Count SELinux configuration database entries for '{{ line_item }}' + ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="{{ line_item }}(/.*)?"&&$NF~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_semanage_fcontext_hana + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir + +- name: Assert that there is an entry for '{{ line_item }}' in the SELinux configuration database + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_semanage_fcontext_hana.stdout | int != 0 + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir + +- name: Count files in '{{ line_item }}' and below without SELinux 'usr_t' file context + ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + register: __sap_hana_preconfigure_register_ls_z_hana + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir + +- name: Assert that all files in '{{ line_item }}' and below have the 'usr_t' file context + ansible.builtin.assert: + that: + __sap_hana_preconfigure_register_ls_z_hana.stdout | int == 0 + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 5bb34d58b..8de82aa59 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -5,39 +5,9 @@ state: latest name: policycoreutils-python-utils -- name: Check if the directory '/hana' exists - ansible.builtin.stat: - path: '/hana' - register: __sap_hana_preconfigure_register_stat_hana - failed_when: false - -- name: Report that SELinux checking will not be performed in case the directory '/hana' does not exist - ansible.builtin.debug: - msg: "INFO: SELinux checks will not be run because the directory '/hana' does not exist." - when: not __sap_hana_preconfigure_register_stat_hana.stat.exists or - (__sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and - not __sap_hana_preconfigure_register_stat_hana.stat.isdir) - -- name: Count SELinux configuration database entries for '/hana' - ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/hana(/.*)?"&&$NF~/usr_t/{a++}END{print a}' - register: __sap_hana_preconfigure_register_semanage_fcontext_hana_result - when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - -- name: Assert that there is an entry for '/hana' in the SELinux configuration database - ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_semanage_fcontext_hana_result.stdout | int != 0 - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - -- name: Count files in '/hana' and below without SELinux `usr_t` file context - ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' - register: __sap_hana_preconfigure_register_ls_fcontext_hana_result - when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - -- name: Assert that all files in '/hana' and below have the usr_t file context - ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_selinux_fcontext_hana_result.stdout | int == 0 - ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir +- name: Assert SELinux directory settings + ansible.builtin.include_tasks: assert-2777782-01-loop-block.yml + loop: "{{ sap_hana_preconfigure_hana_directories }}" + loop_control: + loop_var: line_item + when: sap_hana_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 0688f4cee..43c2c06bb 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -1,12 +1,12 @@ --- -- name: Configure '/hana' SELinux file labels +- name: SAP HANA Pre Install - Configure SELinux file contexts ansible.builtin.include_role: name: fedora.linux_system_roles.selinux vars: selinux_booleans: - { name: 'selinuxuser_execmod', state: 'on' } selinux_fcontexts: - - { target: '/hana(/.*)?', setype: 'usr_t' } + - "{{ sap_hana_preconfigure_fact_targets_setypes }}" selinux_restore_dirs: - - '/hana' + - "{{ sap_hana_preconfigure_hana_directories }}" From fbdba6c7efe62a7e63e169ba367e25ca80207fed Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 27 Sep 2022 09:05:56 +0000 Subject: [PATCH 190/375] sap_ha_cluster: make resource defaults a list of name-value pairs --- roles/sap_ha_cluster/defaults/main.yml | 9 ++++++--- roles/sap_ha_cluster/tasks/main.yml | 10 ++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 9abacba1a..dae961761 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -21,9 +21,12 @@ sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" sap_ha_cluster_fence_agent_packages: - fence-agents-all -# Resource defaults -sap_ha_cluster_resource_stickiness: 1000 -sap_ha_cluster_migration_threshold: 5000 +# Adjusting resource defaults +sap_ha_cluster_resource_defaults: + - name: resource-stickiness + value: 1000 + - name: migration-threshold + value: 5000 # The type of SAP landscape and multi-node replication # TODO: variable name update, depending on feedback diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 4b5923524..a5520cb8f 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -188,15 +188,13 @@ changed_when: false check_mode: no - - name: "{{ __tname }} Update resource default values" + - name: "{{ __tname }} Update resource default attributes" ansible.builtin.command: - cmd: pcs resource defaults update {{ item }} - loop: - - "resource-stickiness={{ sap_ha_cluster_resource_stickiness }}" - - "migration-threshold={{ sap_ha_cluster_migration_threshold }}" + cmd: pcs resource defaults update {{ item.name }}={{ item.value }} + loop: "{{ sap_ha_cluster_resource_defaults }}" run_once: true when: - - item not in __sap_ha_cluster_check_resource_defaults.stdout + - item.name ~ '=' ~ item.value not in __sap_ha_cluster_check_resource_defaults.stdout - name: "{{ __tname }} Include srHook configuration" ansible.builtin.include_tasks: From 1050a364ede66d5d2b21448f38504d81e6263b46 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 27 Sep 2022 11:18:13 +0200 Subject: [PATCH 191/375] sap_hana_preconfigure: SELinux assert messages, fix ansible-lint errors --- .../tasks/RedHat/generic/assert-selinux.yml | 3 ++- .../tasks/RedHat/configuration.yml | 2 +- .../RedHat/generic/assert-2777782-01-loop-block.yml | 10 ++++++---- .../tasks/RedHat/generic/assert-selinux.yml | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 63b80a61b..320b163ca 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -54,7 +54,8 @@ success_msg: "PASS: SELinux is currently {{ sap_general_preconfigure_selinux_state }}." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" -- name: Install the package which provides the semanage command +# Reason for noqa: Both yum and dnf support "state: latest" +- name: Install the package which provides the semanage command # noqa package-latest ansible.builtin.package: state: latest name: policycoreutils-python-utils diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml index 8333223da..24815aa52 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/configuration.yml @@ -7,7 +7,7 @@ - name: Configure - Set directory variables for setting SELinux file contexts ansible.builtin.set_fact: sap_hana_preconfigure_fact_targets_setypes: "{{ sap_hana_preconfigure_fact_targets_setypes | d([]) + - [ __sap_hana_preconfigure_tmp_dict_target_setype ] }}" + [__sap_hana_preconfigure_tmp_dict_target_setype] }}" loop: "{{ sap_hana_preconfigure_hana_directories }}" loop_control: loop_var: line_item diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml index 1a6f55573..2e976a3ca 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml @@ -20,8 +20,9 @@ - name: Assert that there is an entry for '{{ line_item }}' in the SELinux configuration database ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_semanage_fcontext_hana.stdout | int != 0 + that: __sap_hana_preconfigure_register_semanage_fcontext_hana.stdout | int != 0 + fail_msg: "FAIL: There is no entry for '{{ line_item }}' in the SELinux configuration database!" + success_msg: "PASS: There is an entry for '{{ line_item }}' in the SELinux configuration database." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir @@ -32,7 +33,8 @@ - name: Assert that all files in '{{ line_item }}' and below have the 'usr_t' file context ansible.builtin.assert: - that: - __sap_hana_preconfigure_register_ls_z_hana.stdout | int == 0 + that: __sap_hana_preconfigure_register_ls_z_hana.stdout | int == 0 + fail_msg: "FAIL: There is at least one file in '{{ line_item }}' or below without the 'usr_t' file context!" + success_msg: "PASS: All files in '{{ line_item }}' or below have the 'usr_t' file context." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 8de82aa59..f1ecf86a9 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -1,6 +1,7 @@ --- -- name: Install the package which provides the semanage command +# Reason for noqa: Both yum and dnf support "state: latest" +- name: Install the package which provides the semanage command # noqa package-latest ansible.builtin.package: state: latest name: policycoreutils-python-utils From 1b7a0905b07ebc095288189c96c2e20f158a5bca Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 27 Sep 2022 11:29:22 +0200 Subject: [PATCH 192/375] sap_hana_preconfigure: add changed_when to SELinux assertions --- .../tasks/RedHat/generic/assert-2777782-01-loop-block.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml index 2e976a3ca..9f71c9c90 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml @@ -16,6 +16,7 @@ - name: Count SELinux configuration database entries for '{{ line_item }}' ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="{{ line_item }}(/.*)?"&&$NF~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_semanage_fcontext_hana + changed_when: false when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Assert that there is an entry for '{{ line_item }}' in the SELinux configuration database @@ -29,6 +30,7 @@ - name: Count files in '{{ line_item }}' and below without SELinux 'usr_t' file context ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' register: __sap_hana_preconfigure_register_ls_z_hana + changed_when: false when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Assert that all files in '{{ line_item }}' and below have the 'usr_t' file context From 376ca71077c690583030edb54e44660c151612d2 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 27 Sep 2022 14:14:22 +0200 Subject: [PATCH 193/375] repository: replace links to lint config files by files ansible-lint 6.7.0 using ansible 2.13.4 did not find the files .ansible-lint and .yamllint.yml in the role when following the links to the home of the collection, so the links had to be replaced by copies from the home of the collection, using: for dir in roles/*; do cp -p .ansible-lint $dir cp -p .yamllint.yml $dir done --- .ansible-lint | 2 ++ roles/sap_anydb_install_oracle/.ansible-lint | 8 +++++++ roles/sap_anydb_install_oracle/.yamllint.yml | 21 ++++++++++++++++++ roles/sap_general_preconfigure/.ansible-lint | 9 +++++++- roles/sap_general_preconfigure/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_ha_install_hana_hsr/.ansible-lint | 9 +++++++- roles/sap_ha_install_hana_hsr/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_ha_install_pacemaker/.ansible-lint | 9 +++++++- roles/sap_ha_install_pacemaker/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_ha_prepare_pacemaker/.ansible-lint | 9 +++++++- roles/sap_ha_prepare_pacemaker/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_ha_set_hana/.ansible-lint | 9 +++++++- roles/sap_ha_set_hana/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_ha_set_netweaver/.ansible-lint | 8 +++++++ roles/sap_ha_set_netweaver/.yamllint.yml | 21 ++++++++++++++++++ roles/sap_hana_install/.ansible-lint | 9 +++++++- roles/sap_hana_install/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_hana_preconfigure/.ansible-lint | 9 +++++++- roles/sap_hana_preconfigure/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_hostagent/.ansible-lint | 8 +++++++ roles/sap_hostagent/.yamllint.yml | 21 ++++++++++++++++++ roles/sap_install_media_detect/.ansible-lint | 8 +++++++ roles/sap_install_media_detect/.yamllint.yml | 21 ++++++++++++++++++ .../sap_netweaver_preconfigure/.ansible-lint | 9 +++++++- .../sap_netweaver_preconfigure/.yamllint.yml | 22 ++++++++++++++++++- roles/sap_storage_setup/.ansible-lint | 8 +++++++ roles/sap_storage_setup/.yamllint.yml | 21 ++++++++++++++++++ roles/sap_swpm/.ansible-lint | 9 +++++++- roles/sap_swpm/.yamllint.yml | 22 ++++++++++++++++++- 29 files changed, 408 insertions(+), 18 deletions(-) create mode 100644 roles/sap_anydb_install_oracle/.ansible-lint create mode 100644 roles/sap_anydb_install_oracle/.yamllint.yml mode change 120000 => 100644 roles/sap_general_preconfigure/.ansible-lint mode change 120000 => 100644 roles/sap_general_preconfigure/.yamllint.yml mode change 120000 => 100644 roles/sap_ha_install_hana_hsr/.ansible-lint mode change 120000 => 100644 roles/sap_ha_install_hana_hsr/.yamllint.yml mode change 120000 => 100644 roles/sap_ha_install_pacemaker/.ansible-lint mode change 120000 => 100644 roles/sap_ha_install_pacemaker/.yamllint.yml mode change 120000 => 100644 roles/sap_ha_prepare_pacemaker/.ansible-lint mode change 120000 => 100644 roles/sap_ha_prepare_pacemaker/.yamllint.yml mode change 120000 => 100644 roles/sap_ha_set_hana/.ansible-lint mode change 120000 => 100644 roles/sap_ha_set_hana/.yamllint.yml create mode 100644 roles/sap_ha_set_netweaver/.ansible-lint create mode 100644 roles/sap_ha_set_netweaver/.yamllint.yml mode change 120000 => 100644 roles/sap_hana_install/.ansible-lint mode change 120000 => 100644 roles/sap_hana_install/.yamllint.yml mode change 120000 => 100644 roles/sap_hana_preconfigure/.ansible-lint mode change 120000 => 100644 roles/sap_hana_preconfigure/.yamllint.yml create mode 100644 roles/sap_hostagent/.ansible-lint create mode 100644 roles/sap_hostagent/.yamllint.yml create mode 100644 roles/sap_install_media_detect/.ansible-lint create mode 100644 roles/sap_install_media_detect/.yamllint.yml mode change 120000 => 100644 roles/sap_netweaver_preconfigure/.ansible-lint mode change 120000 => 100644 roles/sap_netweaver_preconfigure/.yamllint.yml create mode 100644 roles/sap_storage_setup/.ansible-lint create mode 100644 roles/sap_storage_setup/.yamllint.yml mode change 120000 => 100644 roles/sap_swpm/.ansible-lint mode change 120000 => 100644 roles/sap_swpm/.yamllint.yml diff --git a/.ansible-lint b/.ansible-lint index 8ec477952..f2cb38f59 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -4,3 +4,5 @@ enable_list: skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_anydb_install_oracle/.ansible-lint b/roles/sap_anydb_install_oracle/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_anydb_install_oracle/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_anydb_install_oracle/.yamllint.yml b/roles/sap_anydb_install_oracle/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_anydb_install_oracle/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_general_preconfigure/.ansible-lint b/roles/sap_general_preconfigure/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_general_preconfigure/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_general_preconfigure/.ansible-lint b/roles/sap_general_preconfigure/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_general_preconfigure/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_general_preconfigure/.yamllint.yml b/roles/sap_general_preconfigure/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_general_preconfigure/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_general_preconfigure/.yamllint.yml b/roles/sap_general_preconfigure/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_general_preconfigure/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_ha_install_hana_hsr/.ansible-lint b/roles/sap_ha_install_hana_hsr/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_install_hana_hsr/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/.ansible-lint b/roles/sap_ha_install_hana_hsr/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_ha_install_hana_hsr/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_install_hana_hsr/.yamllint.yml b/roles/sap_ha_install_hana_hsr/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_install_hana_hsr/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/.yamllint.yml b/roles/sap_ha_install_hana_hsr/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_ha_install_hana_hsr/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_install_pacemaker/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_ha_install_pacemaker/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_install_pacemaker/.yamllint.yml b/roles/sap_ha_install_pacemaker/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_install_pacemaker/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_install_pacemaker/.yamllint.yml b/roles/sap_ha_install_pacemaker/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_ha_install_pacemaker/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_prepare_pacemaker/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_ha_prepare_pacemaker/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_prepare_pacemaker/.yamllint.yml b/roles/sap_ha_prepare_pacemaker/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_prepare_pacemaker/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/.yamllint.yml b/roles/sap_ha_prepare_pacemaker/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_ha_prepare_pacemaker/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_set_hana/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_ha_set_hana/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_set_hana/.yamllint.yml b/roles/sap_ha_set_hana/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_set_hana/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_set_hana/.yamllint.yml b/roles/sap_ha_set_hana/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_ha_set_hana/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_ha_set_netweaver/.ansible-lint b/roles/sap_ha_set_netweaver/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_ha_set_netweaver/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_set_netweaver/.yamllint.yml b/roles/sap_ha_set_netweaver/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_ha_set_netweaver/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_hana_install/.ansible-lint b/roles/sap_hana_install/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_hana_install/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_hana_install/.ansible-lint b/roles/sap_hana_install/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_hana_install/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hana_install/.yamllint.yml b/roles/sap_hana_install/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_hana_install/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_hana_install/.yamllint.yml b/roles/sap_hana_install/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_hana_install/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_hana_preconfigure/.ansible-lint b/roles/sap_hana_preconfigure/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_hana_preconfigure/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/.ansible-lint b/roles/sap_hana_preconfigure/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_hana_preconfigure/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hana_preconfigure/.yamllint.yml b/roles/sap_hana_preconfigure/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_hana_preconfigure/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/.yamllint.yml b/roles/sap_hana_preconfigure/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_hana_preconfigure/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_hostagent/.ansible-lint b/roles/sap_hostagent/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_hostagent/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hostagent/.yamllint.yml b/roles/sap_hostagent/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_hostagent/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_install_media_detect/.ansible-lint b/roles/sap_install_media_detect/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_install_media_detect/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_install_media_detect/.yamllint.yml b/roles/sap_install_media_detect/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_install_media_detect/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_netweaver_preconfigure/.ansible-lint b/roles/sap_netweaver_preconfigure/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_netweaver_preconfigure/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/.ansible-lint b/roles/sap_netweaver_preconfigure/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_netweaver_preconfigure/.yamllint.yml b/roles/sap_netweaver_preconfigure/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_netweaver_preconfigure/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/.yamllint.yml b/roles/sap_netweaver_preconfigure/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_storage_setup/.ansible-lint b/roles/sap_storage_setup/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_storage_setup/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_storage_setup/.yamllint.yml b/roles/sap_storage_setup/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_storage_setup/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_swpm/.ansible-lint b/roles/sap_swpm/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_swpm/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_swpm/.ansible-lint b/roles/sap_swpm/.ansible-lint new file mode 100644 index 000000000..f2cb38f59 --- /dev/null +++ b/roles/sap_swpm/.ansible-lint @@ -0,0 +1,8 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_swpm/.yamllint.yml b/roles/sap_swpm/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_swpm/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_swpm/.yamllint.yml b/roles/sap_swpm/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_swpm/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable From a92975bbba6819f29bceb4e8cbe02c260097acf5 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 28 Sep 2022 12:56:22 +0000 Subject: [PATCH 194/375] sap_ha_cluster: role introduction and some requirements --- roles/sap_ha_cluster/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index f087beb4c..78fd0954e 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,3 +1,29 @@ + +# sap_ha_cluster Ansible Role + +This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources. +The cluster setup is managed through the `ha_cluster` Linux System Role.
+`sap_ha_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. + + + + +## Requirements + +Target Systems: +- Supported OS: RHEL 8.4+ +- RHEL registration and access to High-Availability repository +- SAP Hana installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository + +Ansible Control System: +- Ansible 2.9+ +- `Linux System Roles` collection from either source: + - RHEL package: rhel-system-roles-1.16.2 + - Automation Hub: + - Ansible Galaxy: + + + ## Role Input Parameters From 8331642c948fac3b32d28f46da41303dcda2374c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 28 Sep 2022 15:41:39 +0000 Subject: [PATCH 195/375] sap_ha_cluster: linter improvements --- .../tasks/ascertain_ha_cluster_in_inventory.yml | 10 +++++----- roles/sap_ha_cluster/tasks/configure_srhook.yml | 4 ++-- .../tasks/construct_vars_hana_common.yml | 4 ++-- .../tasks/construct_vars_hana_scaleout.yml | 4 ++-- .../tasks/construct_vars_hana_scaleup.yml | 4 ++-- roles/sap_ha_cluster/tasks/construct_vars_stonith.yml | 9 ++++++--- roles/sap_ha_cluster/tasks/main.yml | 10 +++++----- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 7672dbc46..c103dcff0 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -2,11 +2,11 @@ # If there are 'ha_cluster" role parameters are already defined in the # inventory, we will use these custom specifications. -## Take the following template to add additional parameters to be inherited: -#- name: "{{ __tname }} Register ha_cluster_" -# ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_ }}" -# when: ha_cluster_ is defined +### Take the following template to add additional parameters to be inherited: +# - name: "{{ __tname }} Register ha_cluster_" +# ansible.builtin.set_fact: +# __sap_ha_cluster_: "{{ ha_cluster_ }}" +# when: ha_cluster_ is defined - name: "{{ __tname }} Register ha_cluster_cluster_properties" ansible.builtin.set_fact: diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml index ed6510727..a6a88a3e3 100644 --- a/roles/sap_ha_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -25,7 +25,7 @@ failed_when: false # This command should always run, even in check mode. # It never does a change, but the return code is required for the next task. - check_mode: no + check_mode: false changed_when: false - name: "{{ __tname }} Update srHook in global.ini" @@ -44,7 +44,7 @@ - name: "{{ __tname }} Add srHook sudo entries" ansible.builtin.template: - backup: yes + backup: true dest: /etc/sudoers.d/20-saphana mode: "0440" owner: root diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index cedad02ed..eb6871084 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -116,7 +116,7 @@ vars: __clone_topology: resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - promotable: no + promotable: "no" meta_attrs: - attrs: - name: clone-max @@ -134,7 +134,7 @@ vars: __clone_hana: resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" - promotable: yes + promotable: "yes" meta_attrs: - attrs: - name: clone-max diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index 2268ed7b1..121815578 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -5,8 +5,8 @@ # TODO: add here any scale-out special variable constructions # Make sure to first respect 'ha_cluster' native variables -#- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" -# ansible.builtin.set_fact: +# - name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" +# ansible.builtin.set_fact: - name: "{{ __tname }} Info" ansible.builtin.debug: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml index 2e03a3c5a..0ce23aa38 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -5,8 +5,8 @@ # TODO: add here any scale-up special variable constructions # Make sure to first respect 'ha_cluster' native variables -#- name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" -# ansible.builtin.set_fact: +# - name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" +# ansible.builtin.set_fact: # - name: "{{ __tname }} Info" ansible.builtin.debug: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index bdacc6736..68ba9fe02 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -10,7 +10,8 @@ - name: stonith-enabled value: true when: - - (__stonith_enabled | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + - (__stonith_enabled | map(attribute='name') | join('')) not in + (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - name: "{{ __tname }} Add to cluster properties: stonith-timeout" ansible.builtin.set_fact: @@ -20,7 +21,8 @@ - name: stonith-timeout value: 900 when: - - (__stonith_timeout | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + - (__stonith_timeout | map(attribute='name') | join('')) not in + (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - name: "{{ __tname }} Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: @@ -30,7 +32,8 @@ - name: concurrent-fencing value: true when: - - (__concurrent_fencing | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + - (__concurrent_fencing | map(attribute='name') | join('')) not in + (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) # The STONITH resource is an element in the cluster_resource_primitives list - name: "{{ __tname }} Construct stonith resources definition" diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index a5520cb8f..6f5a60bd7 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -103,8 +103,8 @@ when: sap_ha_cluster_sap_type == 'scaleout' #### for debugging -#- name: "Fail here for now..." -# ansible.builtin.fail: +# - name: "Fail here for now..." +# ansible.builtin.fail: - name: "{{ __tname }} Block with actual changes" block: @@ -139,7 +139,7 @@ ansible.builtin.command: cmd: cibadmin --query register: __sap_ha_cluster_cib_query - check_mode: no + check_mode: false changed_when: false failed_when: false @@ -186,7 +186,7 @@ register: __sap_ha_cluster_check_resource_defaults run_once: true changed_when: false - check_mode: no + check_mode: false - name: "{{ __tname }} Update resource default attributes" ansible.builtin.command: @@ -227,7 +227,7 @@ delegate_to: localhost run_once: true become: false - check_mode: no + check_mode: false when: - sap_ha_cluster_create_config_dest is defined From 9b4619215276e2b7b8328122e3e7287ef5056c76 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 28 Sep 2022 16:07:31 +0000 Subject: [PATCH 196/375] sap_ha_cluster: new linter fix for name[template] --- roles/sap_ha_cluster/defaults/main.yml | 3 -- .../ascertain_ha_cluster_in_inventory.yml | 22 +++++----- .../tasks/ascertain_platform_type.yml | 2 +- .../tasks/ascertain_sap_landscape.yml | 2 +- .../sap_ha_cluster/tasks/configure_srhook.yml | 10 ++--- .../tasks/construct_vars_common.yml | 6 +-- .../tasks/construct_vars_hana_common.yml | 16 +++---- .../tasks/construct_vars_hana_scaleout.yml | 4 +- .../tasks/construct_vars_hana_scaleup.yml | 4 +- .../tasks/construct_vars_stonith.yml | 8 ++-- roles/sap_ha_cluster/tasks/main.yml | 42 +++++++++---------- .../tasks/preconfigure_platform_aws.yml | 12 +++--- .../vars/{RedHat_8.yml => RedHat.yml} | 0 roles/sap_ha_cluster/vars/RedHat_9.yml | 1 - 14 files changed, 64 insertions(+), 68 deletions(-) rename roles/sap_ha_cluster/vars/{RedHat_8.yml => RedHat.yml} (100%) delete mode 120000 roles/sap_ha_cluster/vars/RedHat_9.yml diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index dae961761..bdeb14cbf 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -1,7 +1,4 @@ --- -# task name prefix -__tname: "SAP HA Cluster -" - # Variables for the cluster setup must be constructed by dedicated tasks! # The included 'ha_cluster' role will not work with the role variables set # in this role. diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index c103dcff0..b329e098e 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -3,57 +3,57 @@ # inventory, we will use these custom specifications. ### Take the following template to add additional parameters to be inherited: -# - name: "{{ __tname }} Register ha_cluster_" +# - name: "SAP HA Cluster - Register ha_cluster_" # ansible.builtin.set_fact: # __sap_ha_cluster_: "{{ ha_cluster_ }}" # when: ha_cluster_ is defined -- name: "{{ __tname }} Register ha_cluster_cluster_properties" +- name: "SAP HA Cluster - Register ha_cluster_cluster_properties" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" when: ha_cluster_cluster_properties is defined -- name: "{{ __tname }} Register ha_cluster_constraints_colocation" +- name: "SAP HA Cluster - Register ha_cluster_constraints_colocation" ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" when: ha_cluster_constraints_colocation is defined -- name: "{{ __tname }} Register ha_cluster_constraints_location" +- name: "SAP HA Cluster - Register ha_cluster_constraints_location" ansible.builtin.set_fact: __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" when: ha_cluster_constraints_location is defined -- name: "{{ __tname }} Register ha_cluster_constraints_order" +- name: "SAP HA Cluster - Register ha_cluster_constraints_order" ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" when: ha_cluster_constraints_order is defined -- name: "{{ __tname }} Register ha_cluster_extra_packages" +- name: "SAP HA Cluster - Register ha_cluster_extra_packages" ansible.builtin.set_fact: __sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages }}" when: ha_cluster_extra_packages is defined -- name: "{{ __tname }} Register ha_cluster_fence_agent_packages" +- name: "SAP HA Cluster - Register ha_cluster_fence_agent_packages" ansible.builtin.set_fact: __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" when: ha_cluster_fence_agent_packages is defined -- name: "{{ __tname }} Register ha_cluster_repos" +- name: "SAP HA Cluster - Register ha_cluster_repos" ansible.builtin.set_fact: __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" when: ha_cluster_repos is defined -- name: "{{ __tname }} Register ha_cluster_resource_clones" +- name: "SAP HA Cluster - Register ha_cluster_resource_clones" ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" when: ha_cluster_resource_clones is defined -- name: "{{ __tname }} Register ha_cluster_resource_groups" +- name: "SAP HA Cluster - Register ha_cluster_resource_groups" ansible.builtin.set_fact: __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" when: ha_cluster_resource_groups is defined -- name: "{{ __tname }} Register ha_cluster_resource_primitives" +- name: "SAP HA Cluster - Register ha_cluster_resource_primitives" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" when: ha_cluster_resource_primitives is defined diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index c8b7a1344..f519bc358 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -10,7 +10,7 @@ # TODO: smarter detection based on multiple facts and providing one standard # name for use as platform type in related include files -- name: "{{ __tname }} Set platform type based on Ansible facts" +- name: "SAP HA Cluster - Set platform type based on Ansible facts" ansible.builtin.set_fact: __sap_ha_cluster_vm_asset_tag: "{{ ansible_facts.node.ansible_chassis_asset_tag | default('NA') }}" # __sap_ha_cluster_platform_type: diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml index 8904eb235..a732dce6d 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -7,7 +7,7 @@ # TODO: check play hosts against cluster nodes definition - there should be no # hosts in the play that are undefined? -- name: "{{ __tname }} Set landscape to scale-up if there are only 2 nodes" +- name: "SAP HA Cluster - Set landscape to scale-up if there are only 2 nodes" ansible.builtin.set_fact: sap_ha_cluster_sap_type: scaleup when: diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml index a6a88a3e3..699f7ab8c 100644 --- a/roles/sap_ha_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -1,5 +1,5 @@ --- -- name: "{{ __tname }} Create srHook shared directory" +- name: "SAP HA Cluster - Create srHook shared directory" ansible.builtin.file: path: "{{ sap_ha_cluster_hadr_provider_path }}" state: directory @@ -7,7 +7,7 @@ owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" group: sapsys -- name: "{{ __tname }} Copy srHook to shared directory" +- name: "SAP HA Cluster - Copy srHook to shared directory" ansible.builtin.copy: remote_src: true src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py @@ -18,7 +18,7 @@ # Do not run in check mode because the path is created in the previous step when: not ansible_check_mode -- name: "{{ __tname }} Check global.ini for 'ha_dr_saphanasr'" +- name: "SAP HA Cluster - Check global.ini for 'ha_dr_saphanasr'" ansible.builtin.shell: | grep ha_dr_saphanasr /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini register: __sap_ha_cluster_srhook_trace_global @@ -28,7 +28,7 @@ check_mode: false changed_when: false -- name: "{{ __tname }} Update srHook in global.ini" +- name: "SAP HA Cluster - Update srHook in global.ini" ansible.builtin.blockinfile: path: /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini marker: "" @@ -42,7 +42,7 @@ ha_dr_saphanasr = info when: __sap_ha_cluster_srhook_trace_global.rc == 1 -- name: "{{ __tname }} Add srHook sudo entries" +- name: "SAP HA Cluster - Add srHook sudo entries" ansible.builtin.template: backup: true dest: /etc/sudoers.d/20-saphana diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 43798fa81..89f9c0808 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -1,16 +1,16 @@ --- # Create or combine input parameters for the ha_cluster role. -- name: "{{ __tname }} Set cluster name" +- name: "SAP HA Cluster - Set cluster name" ansible.builtin.set_fact: __sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" -- name: "{{ __tname }} Register the 'hacluster' user password" +- name: "SAP HA Cluster - Register the 'hacluster' user password" ansible.builtin.set_fact: __sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" no_log: true -- name: "{{ __tname }} Combine defined extra packages" +- name: "SAP HA Cluster - Combine defined extra packages" ansible.builtin.set_fact: __sap_ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages + sap_ha_cluster_extra_packages }}" when: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index eb6871084..38cb951da 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -9,7 +9,7 @@ # TODO: add conditionals to verify that the same resource agent is not already # defined in user input variables. Conflicting user input should take precedence. -- name: "{{ __tname }} Add resource: SAP HANA Topology" +- name: "SAP HA Cluster - Add resource: SAP HANA Topology" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_topology ] }}" vars: @@ -40,7 +40,7 @@ when: - __resource_topology.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) -- name: "{{ __tname }} Add resource: SAP HANA DB" +- name: "SAP HA Cluster - Add resource: SAP HANA DB" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_hana ] }}" vars: @@ -96,7 +96,7 @@ - __resource_hana.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) # TODO: change logic to allow multiple VIP resources and constraints -- name: "{{ __tname }} Add resource: SAP HANA VIP" +- name: "SAP HA Cluster - Add resource: SAP HANA VIP" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_vip ] }}" vars: @@ -110,7 +110,7 @@ when: - __resource_vip.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) -- name: "{{ __tname }} Add resource clone: SAP HANA Topology" +- name: "SAP HA Cluster - Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_topology ] }}" vars: @@ -128,7 +128,7 @@ when: - __clone_topology.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) -- name: "{{ __tname }} Add resource clone: SAP HANA DB" +- name: "SAP HA Cluster - Add resource clone: SAP HANA DB" ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_hana ] }}" vars: @@ -147,7 +147,7 @@ - __clone_hana.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) # First start Topology, then HANA (automatically stops in reverse order) -- name: "{{ __tname }} Add order constraint: Topology starts before DB" +- name: "SAP HA Cluster - Add order constraint: Topology starts before DB" ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_topology ] }}" vars: @@ -165,7 +165,7 @@ - __constraint_order_topology.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # Start the VIP only after the HANA resource has been promoted -- name: "{{ __tname }} Add order constraint: VIP starts after DB is promoted" +- name: "SAP HA Cluster - Add order constraint: VIP starts after DB is promoted" ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_vip ] }}" vars: @@ -180,7 +180,7 @@ - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) # The VIP only runs where HANA is promoted -- name: "{{ __tname }} Add colocation constraint: VIP runs where HANA is promoted" +- name: "SAP HA Cluster - Add colocation constraint: VIP runs where HANA is promoted" ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [ __constraint_colo_vip ] }}" vars: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml index 121815578..15accd5b0 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml @@ -5,9 +5,9 @@ # TODO: add here any scale-out special variable constructions # Make sure to first respect 'ha_cluster' native variables -# - name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-out" +# - name: "SAP HA Cluster - Construct cluster vars for SAP HANA Scale-out" # ansible.builtin.set_fact: -- name: "{{ __tname }} Info" +- name: "SAP HA Cluster - Info" ansible.builtin.debug: msg: "INFO: There is currently no Scale-out specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml index 0ce23aa38..376e4b46c 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml @@ -5,9 +5,9 @@ # TODO: add here any scale-up special variable constructions # Make sure to first respect 'ha_cluster' native variables -# - name: "{{ __tname }} Construct cluster vars for SAP HANA Scale-up" +# - name: "SAP HA Cluster - Construct cluster vars for SAP HANA Scale-up" # ansible.builtin.set_fact: # -- name: "{{ __tname }} Info" +- name: "SAP HA Cluster - Info" ansible.builtin.debug: msg: "INFO: There is currently no Scale-up specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 68ba9fe02..c359e224e 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -2,7 +2,7 @@ # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. -- name: "{{ __tname }} Add to cluster properties: stonith-enabled" +- name: "SAP HA Cluster - Add to cluster properties: stonith-enabled" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_enabled }] }}" vars: @@ -13,7 +13,7 @@ - (__stonith_enabled | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) -- name: "{{ __tname }} Add to cluster properties: stonith-timeout" +- name: "SAP HA Cluster - Add to cluster properties: stonith-timeout" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_timeout }] }}" vars: @@ -24,7 +24,7 @@ - (__stonith_timeout | map(attribute='name') | join('')) not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) -- name: "{{ __tname }} Add to cluster properties: concurrent-fencing" +- name: "SAP HA Cluster - Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __concurrent_fencing }] }}" vars: @@ -36,7 +36,7 @@ (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) # The STONITH resource is an element in the cluster_resource_primitives list -- name: "{{ __tname }} Construct stonith resources definition" +- name: "SAP HA Cluster - Construct stonith resources definition" ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + __stonith_resources }}" vars: diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 6f5a60bd7..2b2cbb497 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -24,7 +24,7 @@ # The SAP ID must follow a strict format and not use reserved special values # TODO: This check may be better placed in a SAP role earlier in the chain... -- name: "{{ __tname }} Validate SAP System ID" +- name: "SAP HA Cluster - Validate SAP System ID" ansible.builtin.assert: that: - sap_ha_cluster_hana_sid is defined @@ -35,7 +35,7 @@ # Make sure that all parameters already set for 'ha_cluster' are also inherited. # Add to the include file a task for each parameter which this SAP cluster role # supports. -- name: "{{ __tname }} Include tasks for checking 'ha_cluster' predefinitions" +- name: "SAP HA Cluster - Include tasks for checking 'ha_cluster' predefinitions" ansible.builtin.include_tasks: file: ascertain_ha_cluster_in_inventory.yml apply: @@ -47,7 +47,7 @@ # The result will be parameters: # - sap_ha_cluster_sap_type (values: scaleup, scaleout) # - sap_ha_cluster_replication_type (values: mtr, ?) -- name: "{{ __tname }} Include tasks for SAP landscape calculation" +- name: "SAP HA Cluster - Include tasks for SAP landscape calculation" ansible.builtin.include_tasks: file: ascertain_sap_landscape.yml apply: @@ -55,7 +55,7 @@ tags: check_sap # Determine if we are on a cloud platform. -- name: "{{ __tname }} Include tasks for platform detection" +- name: "SAP HA Cluster - Include tasks for platform detection" ansible.builtin.include_tasks: file: ascertain_platform_type.yml apply: @@ -64,7 +64,7 @@ # Include vars files based on the environment. # Respect order for potential variable precedence. -- name: "{{ __tname }} Set platform/version specific variables" +- name: "SAP HA Cluster - Set platform/version specific variables" ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: - "{{ ansible_facts['os_family'] }}.yml" @@ -82,22 +82,22 @@ __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" when: __sap_ha_cluster_vars_file is file -- name: "{{ __tname }} Include common variable construction tasks" +- name: "SAP HA Cluster - Include common variable construction tasks" ansible.builtin.import_tasks: construct_vars_common.yml -- name: "{{ __tname }} Include variable construction for STONITH resources" +- name: "SAP HA Cluster - Include variable construction for STONITH resources" ansible.builtin.import_tasks: construct_vars_stonith.yml -- name: "{{ __tname }} Include variable construction for SAP HANA common" +- name: "SAP HA Cluster - Include variable construction for SAP HANA common" ansible.builtin.include_tasks: file: construct_vars_hana_common.yml -- name: "{{ __tname }} Include variable construction for SAP HANA Scale-up" +- name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-up" ansible.builtin.include_tasks: file: construct_vars_hana_scaleup.yml when: sap_ha_cluster_sap_type == 'scaleup' -- name: "{{ __tname }} Include variable construction for SAP HANA Scale-out" +- name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-out" ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' @@ -106,10 +106,10 @@ # - name: "Fail here for now..." # ansible.builtin.fail: -- name: "{{ __tname }} Block with actual changes" +- name: "SAP HA Cluster - Block with actual changes" block: # Start with prerequisite changes for certain platforms, if applicable - - name: "{{ __tname }} Include platform specific fencing prerequisites" + - name: "SAP HA Cluster - Include platform specific fencing prerequisites" ansible.builtin.include_tasks: file: "{{ item }}" loop: @@ -124,7 +124,7 @@ # Before we are ready to call the ha_cluster role, we want to validate # that the minimum required parameters are defined and not empty. # TODO: make this smarter, currently all these vars are pre-defined anyway - - name: "{{ __tname }} Validate parameters for 'ha_cluster' role input" + - name: "SAP HA Cluster - Validate parameters for 'ha_cluster' role input" ansible.builtin.assert: that: - __sap_ha_cluster_cluster_properties is defined @@ -135,7 +135,7 @@ - __sap_ha_cluster_constraints_colocation is defined fail_msg: "Cluster build parameter construction has failed for this parameter." - - name: "{{ __tname }} Query if CIB already exists" + - name: "SAP HA Cluster - Query if CIB already exists" ansible.builtin.command: cmd: cibadmin --query register: __sap_ha_cluster_cib_query @@ -143,7 +143,7 @@ changed_when: false failed_when: false - - name: "{{ __tname }} Create backup of existing CIB" + - name: "SAP HA Cluster - Create backup of existing CIB" ansible.builtin.copy: backup: true content: "{{ __sap_ha_cluster_cib_query.stdout }}" @@ -157,7 +157,7 @@ # Cluster installation and configuration through the dedicated # linux system role 'ha_cluster' - - name: "{{ __tname }} Include System Role 'ha_cluster'" + - name: "SAP HA Cluster - Include System Role 'ha_cluster'" ansible.builtin.include_role: name: linux-system-roles.ha_cluster apply: @@ -180,7 +180,7 @@ # Resource defaults can currently not be updated through ha_cluster # role parameters, and thus need to be added. - - name: "{{ __tname }} Check resource defaults" + - name: "SAP HA Cluster - Check resource defaults" ansible.builtin.command: cmd: pcs resource defaults config register: __sap_ha_cluster_check_resource_defaults @@ -188,7 +188,7 @@ changed_when: false check_mode: false - - name: "{{ __tname }} Update resource default attributes" + - name: "SAP HA Cluster - Update resource default attributes" ansible.builtin.command: cmd: pcs resource defaults update {{ item.name }}={{ item.value }} loop: "{{ sap_ha_cluster_resource_defaults }}" @@ -196,7 +196,7 @@ when: - item.name ~ '=' ~ item.value not in __sap_ha_cluster_check_resource_defaults.stdout - - name: "{{ __tname }} Include srHook configuration" + - name: "SAP HA Cluster - Include srHook configuration" ansible.builtin.include_tasks: file: configure_srhook.yml apply: @@ -218,7 +218,7 @@ # TODO: Deal with secrets in output. They should be masked, maybe with # their user provided variables? -- name: "{{ __tname }} Create cluster configuration parameters file" +- name: "SAP HA Cluster - Create cluster configuration parameters file" ansible.builtin.template: backup: true dest: "{{ sap_ha_cluster_create_config_dest }}" @@ -231,7 +231,7 @@ when: - sap_ha_cluster_create_config_dest is defined -- name: "{{ __tname }} Display configuration parameters SAVE FILE location" +- name: "SAP HA Cluster - Display configuration parameters SAVE FILE location" ansible.builtin.debug: msg: | The cluster resource configuration parameters have been saved here: diff --git a/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml b/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml index 28bd5718f..70a9255e4 100644 --- a/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml +++ b/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml @@ -1,14 +1,14 @@ --- # Requirement to enable the fencing resource to function. -- name: "{{ __tname }} Create awscli config directory" +- name: "SAP HA Cluster - Create awscli config directory" ansible.builtin.file: mode: 0755 owner: root path: /root/.aws state: directory -- name: "{{ __tname }} Create awscli config" +- name: "SAP HA Cluster - Create awscli config" ansible.builtin.blockinfile: backup: true block: | @@ -19,7 +19,7 @@ owner: root path: /root/.aws/config -- name: "{{ __tname }} Store awscli credentials" +- name: "SAP HA Cluster - Store awscli credentials" ansible.builtin.blockinfile: backup: true block: | @@ -31,7 +31,7 @@ owner: root path: /root/.aws/credentials -- name: "{{ __tname }} Get VPC info" +- name: "SAP HA Cluster - Get VPC info" ansible.builtin.shell: | aws ec2 describe-vpcs \ --output text \ @@ -42,7 +42,7 @@ run_once: true check_mode: false -- name: "{{ __tname }} Get instances info" +- name: "SAP HA Cluster - Get instances info" ansible.builtin.shell: | aws ec2 describe-instances \ --output json \ @@ -52,7 +52,7 @@ run_once: true check_mode: false -- name: "{{ __tname }} Combine instance info into a dictionary" +- name: "SAP HA Cluster - Combine instance info into a dictionary" ansible.builtin.set_fact: __sap_ha_cluster_aws_instances: "{{ __sap_ha_cluster_aws_instances + [{'private_ip': item.PrivateIpAddress, 'instance_id': item.InstanceId}] }}" loop: "{{ __sap_ha_cluster_aws_describe_instances.stdout }}" diff --git a/roles/sap_ha_cluster/vars/RedHat_8.yml b/roles/sap_ha_cluster/vars/RedHat.yml similarity index 100% rename from roles/sap_ha_cluster/vars/RedHat_8.yml rename to roles/sap_ha_cluster/vars/RedHat.yml diff --git a/roles/sap_ha_cluster/vars/RedHat_9.yml b/roles/sap_ha_cluster/vars/RedHat_9.yml deleted file mode 120000 index ad7713d66..000000000 --- a/roles/sap_ha_cluster/vars/RedHat_9.yml +++ /dev/null @@ -1 +0,0 @@ -RedHat_8.yml \ No newline at end of file From 8f715e613a85d0ffa8818ecc5a44b03c21ae0c90 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 28 Sep 2022 16:32:51 +0000 Subject: [PATCH 197/375] sap_ha_cluster: ansible-lint 6.7.0 fixes --- .../tasks/construct_vars_hana_common.yml | 16 ++++++++-------- .../tasks/construct_vars_stonith.yml | 6 +++--- roles/sap_ha_cluster/tasks/main.yml | 5 +++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 38cb951da..0c30214c6 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -11,7 +11,7 @@ - name: "SAP HA Cluster - Add resource: SAP HANA Topology" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_topology ] }}" + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_topology] }}" vars: __resource_topology: id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" @@ -42,7 +42,7 @@ - name: "SAP HA Cluster - Add resource: SAP HANA DB" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_hana ] }}" + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_hana] }}" vars: __resource_hana: id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" @@ -98,7 +98,7 @@ # TODO: change logic to allow multiple VIP resources and constraints - name: "SAP HA Cluster - Add resource: SAP HANA VIP" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [ __resource_vip ] }}" + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" @@ -112,7 +112,7 @@ - name: "SAP HA Cluster - Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: - __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_topology ] }}" + __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_topology] }}" vars: __clone_topology: resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" @@ -130,7 +130,7 @@ - name: "SAP HA Cluster - Add resource clone: SAP HANA DB" ansible.builtin.set_fact: - __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [ __clone_hana ] }}" + __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_hana] }}" vars: __clone_hana: resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" @@ -149,7 +149,7 @@ # First start Topology, then HANA (automatically stops in reverse order) - name: "SAP HA Cluster - Add order constraint: Topology starts before DB" ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_topology ] }}" + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_topology] }}" vars: __constraint_order_topology: resource_first: @@ -167,7 +167,7 @@ # Start the VIP only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: VIP starts after DB is promoted" ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [ __constraint_order_vip ] }}" + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" vars: __constraint_order_vip: resource_first: @@ -182,7 +182,7 @@ # The VIP only runs where HANA is promoted - name: "SAP HA Cluster - Add colocation constraint: VIP runs where HANA is promoted" ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [ __constraint_colo_vip ] }}" + __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: __constraint_colo_vip: resource_leader: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index c359e224e..ca84eedfe 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -4,7 +4,7 @@ - name: "SAP HA Cluster - Add to cluster properties: stonith-enabled" ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_enabled }] }}" + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __stonith_enabled}] }}" vars: __stonith_enabled: - name: stonith-enabled @@ -15,7 +15,7 @@ - name: "SAP HA Cluster - Add to cluster properties: stonith-timeout" ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __stonith_timeout }] }}" + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __stonith_timeout}] }}" vars: __stonith_timeout: - name: stonith-timeout @@ -26,7 +26,7 @@ - name: "SAP HA Cluster - Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{ 'attr': __concurrent_fencing }] }}" + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __concurrent_fencing}] }}" vars: __concurrent_fencing: - name: concurrent-fencing diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 2b2cbb497..43e6af954 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -108,6 +108,9 @@ - name: "SAP HA Cluster - Block with actual changes" block: + when: + - not sap_ha_cluster_create_config_only + # Start with prerequisite changes for certain platforms, if applicable - name: "SAP HA Cluster - Include platform specific fencing prerequisites" ansible.builtin.include_tasks: @@ -204,8 +207,6 @@ tags: srhook ### END OF BLOCK: prerequisite changes and cluster setup - when: - - not sap_ha_cluster_create_config_only # Save all the constructed cluster parameters into a vars file. # From 905d9dfd84c1aaacf156d7ea1b45ae497bab3f1a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 28 Sep 2022 19:48:21 +0200 Subject: [PATCH 198/375] sap_hana_install: add SAP SID validation --- roles/sap_hana_install/tasks/main.yml | 22 +++++++++++++++---- roles/sap_hana_install/tasks/post_install.yml | 8 +++---- roles/sap_hana_install/vars/main.yml | 4 ++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 5960917b0..2b6f29a08 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -12,15 +12,29 @@ - sap_hana_install_set_log_mode - sap_hana_install_configure_firewall -- name: Fail if necessary variable 'sap_hana_install_sid' is not configured +- name: Fail if necessary variable 'sap_hana_install_sid' is not defined ansible.builtin.fail: - msg: "Variable 'sap_hana_install_sid' is not configured." + msg: "The variable 'sap_hana_install_sid' is not defined." when: sap_hana_install_sid | length == 0 tags: sap_hana_install_preinstall -- name: Fail if necessary variable 'sap_hana_install_number' is not configured +- name: Validate SAP HANA System ID - 'sap_hana_install_sid' consists of 3 characters + ansible.builtin.assert: + that: sap_hana_install_sid | length == 3 + success_msg: "PASS: The length of the SAP System ID '{{ sap_hana_install_sid }}' is 3 characters." + fail_msg: "FAIL: The length of the SAP HANA System ID '{{ sap_hana_install_sid }}' is not 3 characters!" + tags: sap_hana_install_preinstall + +- name: Validate SAP HANA System ID - 'sap_hana_install_sid' is not in the list of reserved SAP SIDs + ansible.builtin.assert: + that: sap_hana_install_sid not in __sap_hana_install_sid_prohibited + success_msg: "PASS: The SAP HANA System ID '{{ sap_hana_install_sid }}' is not in the list of reserved SAP SIDs in SAP note 1979280 v.20." + fail_msg: "FAIL: The SAP HANA System ID '{{ sap_hana_install_sid }}' is in the list of reserved SAP SIDs in SAP note 1979280 v.20!" + tags: sap_hana_install_preinstall + +- name: Fail if necessary variable 'sap_hana_install_number' is not defined ansible.builtin.fail: - msg: "Variable 'sap_hana_install_number' is not configured." + msg: "The variable 'sap_hana_install_number' is not defined." when: sap_hana_install_number | length == 0 tags: sap_hana_install_preinstall diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index f2c6c0c3c..6650f1e74 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -112,27 +112,27 @@ var: __sap_hana_install_fact_installation_check_command # Reason for noqa: The command to be executed contains input redirection - - name: SAP HANA hdblcm installation check - Perform the check # noqa command-instead-of-shell + - name: SAP HANA hdblcm installation check with hdbcheck - Perform the check # noqa command-instead-of-shell ansible.builtin.shell: "{{ __sap_hana_install_fact_installation_check_command }}" args: chdir: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/global/hdb/install/bin" register: __sap_hana_install_register_installation_check when: sap_hana_install_use_hdbcheck | d(true) - - name: SAP HANA hdblcm installation check - Display the result + - name: SAP HANA hdblcm installation check with hdbcheck - Display the result ansible.builtin.debug: var: __sap_hana_install_register_installation_check.stdout_lines when: sap_hana_install_use_hdbcheck | d(true) # Reason for noqa: The command to be executed contains input redirection - - name: SAP HANA hdblcm installation check - Perform the check # noqa command-instead-of-shell + - name: SAP HANA hdblcm installation check with hdblcm - Perform the check # noqa command-instead-of-shell ansible.builtin.shell: "{{ __sap_hana_install_fact_installation_check_command }}" args: chdir: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/hdblcm" register: __sap_hana_install_register_installation_check when: not sap_hana_install_use_hdbcheck | d(true) - - name: SAP HANA hdblcm installation check - Display the result + - name: SAP HANA hdblcm installation check with hdblcm - Display the result ansible.builtin.debug: var: __sap_hana_install_register_installation_check.stdout_lines when: not sap_hana_install_use_hdbcheck | d(true) diff --git a/roles/sap_hana_install/vars/main.yml b/roles/sap_hana_install/vars/main.yml index 584c61a2f..b01f0a70d 100644 --- a/roles/sap_hana_install/vars/main.yml +++ b/roles/sap_hana_install/vars/main.yml @@ -1,3 +1,7 @@ --- +# SAP System IDs that are reserved and must not be used +# Reference: SAP Note 1979280 +__sap_hana_install_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'AUX', 'AVG', 'BIN', 'BIT', 'CDC', 'COM', 'CON', 'DAA', 'DBA', 'DBM', 'DBO', 'DTD', 'ECO', 'END', 'EPS', 'EXE', 'FOR', 'GET', 'GID', 'IBM', 'INT', 'KEY', 'LIB', 'LOG', 'LPT', 'MAP', 'MAX', 'MEM', 'MIG', 'MIN', 'MON', 'NET', 'NIX', 'NOT', 'NUL', 'OFF', 'OLD', 'OMS', 'OUT', 'PAD', 'PRN', 'RAW', 'REF', 'ROW', 'SAP', 'SET', 'SGA', 'SHG', 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', 'USE', 'USR', 'VAR'] + __sap_hana_install_fact_tmp_dirname: '' From 2f6290c40596dfc01d37c442a66dcd859c748c2e Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 28 Sep 2022 20:18:04 +0200 Subject: [PATCH 199/375] sap_general_preconfigure: fix ansible-lint key-order --- .ansible-lint | 1 - roles/sap_anydb_install_oracle/.ansible-lint | 1 - roles/sap_general_preconfigure/.ansible-lint | 1 - .../tasks/RedHat/assert-installation.yml | 30 ++++++++---------- .../tasks/RedHat/generic/assert-firewall.yml | 3 +- .../RedHat/generic/configure-etc-hosts.yml | 5 ++- .../RedHat/generic/configure-selinux.yml | 31 +++++++++---------- .../tasks/RedHat/installation.yml | 11 +++---- .../tasks/SLES/assert-installation.yml | 8 ++--- .../tasks/SLES/installation.yml | 8 ++--- roles/sap_ha_install_hana_hsr/.ansible-lint | 1 - roles/sap_ha_install_pacemaker/.ansible-lint | 1 - roles/sap_ha_prepare_pacemaker/.ansible-lint | 1 - roles/sap_ha_set_hana/.ansible-lint | 1 - roles/sap_ha_set_netweaver/.ansible-lint | 1 - roles/sap_hana_install/.ansible-lint | 1 - roles/sap_hana_preconfigure/.ansible-lint | 1 - roles/sap_hostagent/.ansible-lint | 1 - roles/sap_install_media_detect/.ansible-lint | 1 - .../sap_netweaver_preconfigure/.ansible-lint | 1 - roles/sap_storage_setup/.ansible-lint | 1 - roles/sap_swpm/.ansible-lint | 1 - 22 files changed, 44 insertions(+), 67 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_anydb_install_oracle/.ansible-lint b/roles/sap_anydb_install_oracle/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_anydb_install_oracle/.ansible-lint +++ b/roles/sap_anydb_install_oracle/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_general_preconfigure/.ansible-lint b/roles/sap_general_preconfigure/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_general_preconfigure/.ansible-lint +++ b/roles/sap_general_preconfigure/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index 470375344..da8233f10 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -1,6 +1,7 @@ --- - name: Check enabled repos + when: sap_general_preconfigure_enable_repos block: - name: Assert - Unset list of RHEL repos, SAP NetWeaver @@ -60,9 +61,8 @@ loop_var: line_item ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - when: sap_general_preconfigure_enable_repos - - name: Check the RHEL release lock + when: sap_general_preconfigure_set_minor_release block: - name: Detect if and how the minor RHEL release is set @@ -86,12 +86,13 @@ is the last RHEL {{ ansible_distribution_major_version }} minor release" when: "ansible_distribution_version == '7.9'" - when: - - sap_general_preconfigure_set_minor_release - # Reason for noqa: A double brace might also occur in an awk command sequence. - name: Check RHEL 7 package groups + when: + - sap_general_preconfigure_packagegroups | d([]) + - ansible_distribution_major_version == '7' block: + - name: Set yum group list installed command # noqa jinja[spacing] ansible.builtin.set_fact: __sap_general_preconfigure_fact_yum_group_list_installed_command_assert: "yum group list installed hidden ids | @@ -116,13 +117,13 @@ loop_var: line_item ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - when: - - sap_general_preconfigure_packagegroups | d([]) - - ansible_distribution_major_version == '7' - # Reason for noqa: A double brace might also occur in an awk command sequence. - name: Check RHEL 8 environment groups + when: + - sap_general_preconfigure_envgroups | d([]) + - ansible_distribution_major_version == '8' block: + - name: Set yum envgroup list installed command # noqa jinja[spacing] ansible.builtin.set_fact: __sap_general_preconfigure_fact_yum_envgroup_list_installed_command_assert: "yum group list installed -v | @@ -148,10 +149,6 @@ loop_var: line_item ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - when: - - sap_general_preconfigure_envgroups | d([]) - - ansible_distribution_major_version == '8' - - name: Assert that all required packages are installed ansible.builtin.assert: that: "'{{ line_item }}' in ansible_facts.packages" @@ -164,6 +161,9 @@ ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check + when: + - sap_general_preconfigure_min_package_check|bool + - __sap_general_preconfigure_min_pkgs | d([]) block: - name: Assert - Create a list of minimum required package versions to be installed # How does it work? @@ -220,10 +220,6 @@ label: "" ignore_errors: yes - when: - - sap_general_preconfigure_min_package_check|bool - - __sap_general_preconfigure_min_pkgs | d([]) - - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml index 86ca2cd49..5fc5cbd3d 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml @@ -10,6 +10,7 @@ # - "'disabled' in ansible_facts.packages['firewalld'].status" - name: Check firewalld + when: "'firewalld' in ansible_facts.packages" block: # Reason for noqa: We need to get the current status only @@ -34,8 +35,6 @@ success_msg: "PASS: Service 'firewalld' is inactive." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - when: "'firewalld' in ansible_facts.packages" - - name: Report firewall install status ansible.builtin.debug: msg: "PASS: Service 'firewalld' is not installed." diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml index d93881247..ba2a184b5 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml @@ -22,7 +22,9 @@ var=__sap_general_preconfigure_register_sap_hostname_aliases - name: Check if ipv4 address, FQDN, and hostname are in /etc/hosts + when: not sap_general_preconfigure_modify_etc_hosts | bool block: + - name: Perform the /etc/hosts completeness check ansible.builtin.command: awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts register: __sap_general_preconfigure_register_ipv4_fqdn_sap_hostname_once_check @@ -51,9 +53,6 @@ - __sap_general_preconfigure_register_ipv4_fqdn_sap_hostname_once_check.stdout != "1" ignore_errors: "{{ ansible_check_mode }}" - when: - - not sap_general_preconfigure_modify_etc_hosts | bool - # We allow more than one line containing sap_ip: - name: Check for duplicate entries of {{ sap_ip }} in /etc/hosts ansible.builtin.shell: | diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index d63bad4b8..8cc7bedb8 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -40,6 +40,11 @@ sap_general_preconfigure_selinux_state - name: Set or unset SELinux kernel parameter, RHEL 8 and RHEL 9 + when: + - ansible_os_family == 'RedHat' + - ( ansible_distribution_major_version == '8' or + ansible_distribution_major_version == '9' + ) block: - name: SELinux - Examine grub entries @@ -49,7 +54,12 @@ changed_when: false - name: Disable SELinux on the kernel command line, RHEL 8 and RHEL 9 + when: + - sap_general_preconfigure_selinux_state == 'disabled' + - __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').1 != + __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').0 block: + # If the number of grub entries for args is different from the number of grub entries with "selinux=0", # we know that at least one grub entry is missing "selinux=0", so we make sure that all grub entries # contain "selinux=0" @@ -63,13 +73,13 @@ ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: true - when: - - sap_general_preconfigure_selinux_state == 'disabled' - - __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').1 != - __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').0 - - name: Enable SELinux on the kernel command line, RHEL 8 and RHEL 9 + when: + - sap_general_preconfigure_selinux_state == 'enforcing' or + sap_general_preconfigure_selinux_state == 'permissive' + - __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').1 != '0' block: + # If the number of grub entries for args with "selinux=0" is not 0, we know that there is at least # one grub entry with "selinux=0", so we make sure that no grub entry contains "selinux=0" - name: Make sure SELinux is not disabled on the kernel command line, RHEL 8 and RHEL 9 @@ -82,17 +92,6 @@ ansible.builtin.set_fact: sap_general_preconfigure_fact_reboot_required: true - when: - - sap_general_preconfigure_selinux_state == 'enforcing' or - sap_general_preconfigure_selinux_state == 'permissive' - - __sap_general_preconfigure_register_grubby_info_all_selinux.stdout.split(' ').1 != '0' - - when: - - ansible_os_family == 'RedHat' - - ( ansible_distribution_major_version == '8' or - ansible_distribution_major_version == '9' - ) - - name: SELinux - Display the content of sap_general_preconfigure_fact_reboot_required ansible.builtin.debug: var: sap_general_preconfigure_fact_reboot_required | d(false) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 808f462e6..d70aec0c5 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -1,6 +1,7 @@ --- - name: Perform steps for enabling required repos + when: sap_general_preconfigure_enable_repos block: - name: Unset list of RHEL repos, SAP NetWeaver @@ -85,8 +86,6 @@ ansible.builtin.debug: var: __sap_general_preconfigure_register_yum_repolist.stdout_lines - when: sap_general_preconfigure_enable_repos - - name: Detect if the RHEL minor release lock is set ansible.builtin.shell: set -o pipefail && subscription-manager release --show | awk '{print $NF}' register: __sap_general_preconfigure_register_subscription_manager_release @@ -137,7 +136,11 @@ name: "{{ sap_general_preconfigure_packages }}" - name: Ensure that the minimum required package versions are installed + when: + - sap_general_preconfigure_min_package_check|bool + - __sap_general_preconfigure_min_pkgs|d([]) block: + - name: Create a list of minimum required package versions to be installed # How does it work? # 1 - Print the required package name and version with a prefix "1" followed by a space. @@ -190,10 +193,6 @@ loop_control: loop_var: line_item - when: - - sap_general_preconfigure_min_package_check|bool - - __sap_general_preconfigure_min_pkgs|d([]) - # Reason for noqa: Both yum and dnf support "state: latest" - name: Ensure that the system is updated to the latest patchlevel # noqa package-latest ansible.builtin.package: diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index bb519cb51..647c5dfb3 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -12,7 +12,11 @@ ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check + when: + - sap_general_preconfigure_min_package_check | bool + - __sap_general_preconfigure_min_pkgs | d([]) block: + - name: Assert - Create a list of minimum required package versions to be installed # How does it work? # 1 - Print the required package name and version with a prefix "1" followed by a space. @@ -68,10 +72,6 @@ label: "" ignore_errors: yes - when: - - sap_general_preconfigure_min_package_check | bool - - __sap_general_preconfigure_min_pkgs | d([]) - - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." diff --git a/roles/sap_general_preconfigure/tasks/SLES/installation.yml b/roles/sap_general_preconfigure/tasks/SLES/installation.yml index ca0f16405..224390f29 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/installation.yml @@ -6,7 +6,11 @@ name: "{{ sap_general_preconfigure_packages }}" - name: Ensure that the minimum required package versions are installed + when: + - sap_general_preconfigure_min_package_check|bool + - __sap_general_preconfigure_min_pkgs|d([]) block: + - name: Create a list of minimum required package versions to be installed # How does it work? # 1 - Print the required package name and version with a prefix "1" followed by a space. @@ -59,10 +63,6 @@ loop_control: loop_var: line_item - when: - - sap_general_preconfigure_min_package_check|bool - - __sap_general_preconfigure_min_pkgs|d([]) - # Reason for noqa: Both yum and dnf support "state: latest" - name: Ensure that the system is updated to the latest patchlevel # noqa package-latest ansible.builtin.package: diff --git a/roles/sap_ha_install_hana_hsr/.ansible-lint b/roles/sap_ha_install_hana_hsr/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_ha_install_hana_hsr/.ansible-lint +++ b/roles/sap_ha_install_hana_hsr/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_ha_install_pacemaker/.ansible-lint +++ b/roles/sap_ha_install_pacemaker/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_ha_prepare_pacemaker/.ansible-lint +++ b/roles/sap_ha_prepare_pacemaker/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_ha_set_hana/.ansible-lint +++ b/roles/sap_ha_set_hana/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_ha_set_netweaver/.ansible-lint b/roles/sap_ha_set_netweaver/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_ha_set_netweaver/.ansible-lint +++ b/roles/sap_ha_set_netweaver/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hana_install/.ansible-lint b/roles/sap_hana_install/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_hana_install/.ansible-lint +++ b/roles/sap_hana_install/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hana_preconfigure/.ansible-lint b/roles/sap_hana_preconfigure/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_hana_preconfigure/.ansible-lint +++ b/roles/sap_hana_preconfigure/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_hostagent/.ansible-lint b/roles/sap_hostagent/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_hostagent/.ansible-lint +++ b/roles/sap_hostagent/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_install_media_detect/.ansible-lint b/roles/sap_install_media_detect/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_install_media_detect/.ansible-lint +++ b/roles/sap_install_media_detect/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_netweaver_preconfigure/.ansible-lint b/roles/sap_netweaver_preconfigure/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_netweaver_preconfigure/.ansible-lint +++ b/roles/sap_netweaver_preconfigure/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_storage_setup/.ansible-lint b/roles/sap_storage_setup/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_storage_setup/.ansible-lint +++ b/roles/sap_storage_setup/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule diff --git a/roles/sap_swpm/.ansible-lint b/roles/sap_swpm/.ansible-lint index f2cb38f59..63122b8f9 100644 --- a/roles/sap_swpm/.ansible-lint +++ b/roles/sap_swpm/.ansible-lint @@ -5,4 +5,3 @@ skip_list: - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work - - key-order # Missing explanations in the ansible-lint output and documentation about what violates the rule From 613b4a47f6754bce2820cdb1b84d5ddf3c7a7139 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 28 Sep 2022 20:19:11 +0200 Subject: [PATCH 200/375] sap_netweaver_preconfigure: fix ansible-lint key-order --- roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml b/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml index 21d39e04d..4520c4375 100644 --- a/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml +++ b/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml @@ -31,7 +31,9 @@ # __sap_netweaver_preconfigure_register_active_tuned_profile: "{{ __sap_netweaver_preconfigure_register_current_tuned_profile.stdout }}" - name: Switch to tuned profile sap-netweaver if not currently active + when: __sap_netweaver_preconfigure_register_current_tuned_profile.stdout != 'sap-netweaver' block: + - name: Switch to tuned profile sap-netweaver ansible.builtin.command: /usr/sbin/tuned-adm profile sap-netweaver changed_when: true @@ -49,5 +51,3 @@ # - name: Set a variable which contains the name of the now active tuned profile # set_fact: # __sap_netweaver_preconfigure_register_active_tuned_profile: "{{ __sap_netweaver_preconfigure_register_new_tuned_profile.stdout }}" - when: - - __sap_netweaver_preconfigure_register_current_tuned_profile.stdout != 'sap-netweaver' From 66a1bca20e3ac1f04351b982f978eac62a63529c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 28 Sep 2022 20:40:06 +0200 Subject: [PATCH 201/375] sap_hana_preconfigure: fix ansible-lint key-order --- .../tasks/RedHat/assert-installation.yml | 10 +++++----- .../assert-c-states-for-lower-latency.yml | 10 +++++----- .../assert-cpu-governor-for-performance.yml | 12 ++++++------ .../tasks/RedHat/generic/assert-epb.yml | 12 ++++++------ .../tasks/RedHat/generic/assert-services.yml | 4 ++-- .../tasks/RedHat/generic/assert-thp.yml | 8 ++++---- .../tasks/RedHat/generic/assert-tsx.yml | 11 ++++++----- .../configure-cpu-governor-for-performance.yml | 13 ++++++------- .../tasks/RedHat/generic/configure-epb.yml | 13 ++++++------- .../tasks/RedHat/generic/configure-tuned.yml | 18 +++++++----------- .../tasks/RedHat/installation.yml | 12 ++++++------ .../tasks/sapnote/2009879_7.yml | 6 +++--- .../tasks/sapnote/2055470.yml | 3 +-- .../2292690/10-assert-ibm-energyscale.yml | 4 ++-- .../tasks/sapnote/2382421.yml | 10 ++++------ .../tasks/sapnote/3024346.yml | 7 +++---- .../tasks/sapnote/assert-2009879_7.yml | 14 +++++++------- .../tasks/sapnote/assert-2055470.yml | 7 +++---- .../tasks/sapnote/assert-2382421.yml | 14 +++++++------- .../tasks/sapnote/assert-3024346.yml | 16 ++++++++-------- 20 files changed, 97 insertions(+), 107 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index c760608a1..8d72936e6 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -101,7 +101,12 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - name: Minimum required package version check + when: + - sap_hana_preconfigure_min_package_check | bool + - __sap_hana_preconfigure_min_pkgs | d([]) + - sap_hana_preconfigure_assert_ignore_errors | d(false) block: + - name: Assert - Create a list of minimum required package versions to be installed # How does it work? # 1 - Print the required package name and version with a prefix "1" followed by a space. @@ -157,11 +162,6 @@ label: "" ignore_errors: yes - when: - - sap_hana_preconfigure_min_package_check | bool - - __sap_hana_preconfigure_min_pkgs | d([]) - - sap_hana_preconfigure_assert_ignore_errors | d(false) - - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_hana_preconfigure_min_pkgs)." diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml index 40e5db1a5..070e212ae 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-c-states-for-lower-latency.yml @@ -2,7 +2,12 @@ # can be configured by tuned profile sap-hana, entry "force_latency=70" - name: Assert - Perform steps for checking the required C-State configuration + when: ansible_architecture == 'x86_64' and + (not sap_hana_preconfigure_use_tuned or + sap_hana_preconfigure_modify_grub_cmdline_linux or + sap_hana_preconfigure_assert_all_config) block: + - name: C-States - Get contents of GRUB_CMDLINE_LINUX in /etc/default/grub ansible.builtin.command: grep GRUB_CMDLINE_LINUX /etc/default/grub register: __sap_hana_preconfigure_register_default_grub_cmdline_cstate_assert @@ -40,8 +45,3 @@ fail_msg: "FAIL: 'intel_idle.max_cstate=1' is not in /proc/cmdline!" success_msg: "PASS: 'intel_idle.max_cstate=1' is in /proc/cmdline." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - - when: ansible_architecture == 'x86_64' and - (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_modify_grub_cmdline_linux or - sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml index d97b79d77..42355de1a 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml @@ -3,7 +3,11 @@ # can be configured by tuned profile sap-hana, entry "governor=performance" # in included tuned profile throughput-performance - name: Assert - Perform steps for checking the CPU Governor for performance + when: ansible_architecture == 'x86_64' and + (not sap_hana_preconfigure_use_tuned or + sap_hana_preconfigure_assert_all_config) block: + - name: Check if system is able to set CPU Governor for performance (x86_64 platform only) ansible.builtin.shell: LC_ALL=C cpupower frequency-info -g | awk '/available cpufreq governors/{print $(NF-1), $NF}' check_mode: no @@ -17,7 +21,9 @@ __sap_hana_preconfigure_register_cpupower_frequency_info_supported_assert.stderr_lines - name: Check that the CPU Governor for performance is configured (x86_64 platform only) + when: "__sap_hana_preconfigure_register_cpupower_frequency_info_supported_assert.stdout != 'Not Available'" block: + - name: Get info about file /etc/rc.d/rc.local ansible.builtin.stat: path: /etc/rc.d/rc.local @@ -78,13 +84,7 @@ success_msg: "PASS: The current status of the CPU Governor for performance is 'performance'." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - when: "__sap_hana_preconfigure_register_cpupower_frequency_info_supported_assert.stdout != 'Not Available'" - - name: Report if the system does not support setting the CPU Governor for performance ansible.builtin.debug: msg: "INFO: The system is not capable of setting the CPU Governor for 'performance'." when: "__sap_hana_preconfigure_register_cpupower_frequency_info_supported_assert.stdout == 'Not Available'" - - when: ansible_architecture == 'x86_64' and - (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml index 70fb9fd9d..7dee8c28e 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-epb.yml @@ -4,7 +4,11 @@ # in included tuned profile throughput-performance # More details on EPB are in: https://github.com/torvalds/linux/blob/be1fcde604e429691771ce70230668af8097e29b/arch/x86/kernel/cpu/intel_epb.c - name: Assert - Perform steps for checking EPB + when: ansible_architecture == 'x86_64' and + (not sap_hana_preconfigure_use_tuned or + sap_hana_preconfigure_assert_all_config) block: + - name: Check if system supports Intel's performance bias setting (x86_64 platform only) ansible.builtin.shell: LC_ALL=C cpupower info | head -1 | awk '{print $2, $3, $4}' check_mode: no @@ -18,7 +22,9 @@ __sap_hana_preconfigure_register_cpupower_info_epb_supported_assert.stderr_lines - name: Check EPB if possible (x86_64 platform only) + when: "__sap_hana_preconfigure_register_cpupower_info_epb_supported_assert.stdout != 'does not support'" block: + - name: Get info about file /etc/init.d/boot.local ansible.builtin.stat: path: /etc/init.d/boot.local @@ -80,13 +86,7 @@ success_msg: "PASS: EPB is currently set to '0' ('performance')." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - when: "__sap_hana_preconfigure_register_cpupower_info_epb_supported_assert.stdout != 'does not support'" - - name: Report if the system does not support EPB ansible.builtin.debug: msg: "INFO: The system does not support Intel's performance bias setting (EPB)." when: "__sap_hana_preconfigure_register_cpupower_info_epb_supported_assert.stdout == 'does not support'" - - when: ansible_architecture == 'x86_64' and - (not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_assert_all_config) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml index 7a1eba005..55de317c8 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-services.yml @@ -2,7 +2,9 @@ - name: Assert that service {{ __sap_hana_preconfigure_packages_and_services[line_item].svc }} is disabled if package {{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }} is installed + when: "__sap_hana_preconfigure_packages_and_services[line_item].pkg in ansible_facts.packages" block: + - name: "Report that package {{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }} is installed" ansible.builtin.debug: msg: "INFO: Package '{{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }}' is installed." @@ -33,8 +35,6 @@ {{ __sap_hana_preconfigure_packages_and_services[line_item].systemd_state }}." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - when: "__sap_hana_preconfigure_packages_and_services[line_item].pkg in ansible_facts.packages" - - name: "Report that package {{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }} is not installed" ansible.builtin.debug: msg: "PASS: Package '{{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }}' is not installed." diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml index d7a3f0c5a..f365fc88b 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-thp.yml @@ -2,7 +2,11 @@ # can be configured by tuned profile sap-hana, entry "transparent_hugepages=never" - name: Perform steps for setting transparent_hugepage=never + when: not sap_hana_preconfigure_use_tuned or + sap_hana_preconfigure_modify_grub_cmdline_linux or + sap_hana_preconfigure_assert_all_config | d(false) block: + - name: THP - Get contents of GRUB_CMDLINE_LINUX in /etc/default/grub ansible.builtin.command: grep GRUB_CMDLINE_LINUX /etc/default/grub register: __sap_hana_preconfigure_register_default_grub_cmdline_thp_assert @@ -26,7 +30,3 @@ fail_msg: "FAIL: 'transparent_hugepage=never' is not in /proc/cmdline!" success_msg: "PASS: 'transparent_hugepage=never' is in /proc/cmdline." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - - when: not sap_hana_preconfigure_use_tuned or - sap_hana_preconfigure_modify_grub_cmdline_linux or - sap_hana_preconfigure_assert_all_config | d(false) diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml index 345f50f26..591f1f93f 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml @@ -1,7 +1,13 @@ --- - name: Assert - Perform steps for checking TSX + when: + - ansible_architecture == 'x86_64' + - ansible_distribution == 'RedHat' + - ansible_distribution_major_version == '8' + - __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3 block: + # There are CPUs which are not capable of enabling the rtm flag, so we just report the status: - name: Get all CPU flags ansible.builtin.shell: lscpu | grep "^Flags:" @@ -73,8 +79,3 @@ when: - "'tsx=on' not in __sap_hana_preconfigure_register_proc_cmdline_tsx_assert.stdout" - __sap_hana_preconfigure_register_lscpu_flags.stdout is regex("^Flags:.*\s*rtm\s*.*") - - when: ansible_architecture == 'x86_64' and - ansible_distribution == 'RedHat' and - ansible_distribution_major_version == '8' and - __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3 diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml index 8b759bf5b..29d77964e 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-cpu-governor-for-performance.yml @@ -3,7 +3,11 @@ # can be configured by tuned profile sap-hana, entry "governor=performance" # in included tuned profile throughput-performance - name: Perform steps for configuring the CPU Governor for performance + when: + - ansible_architecture == 'x86_64' + - not sap_hana_preconfigure_use_tuned block: + - name: Check if system is able to set CPU Governor for performance ansible.builtin.shell: LC_ALL=C cpupower frequency-info -g | awk '/available cpufreq governors/{print $(NF-1), $NF}' check_mode: no @@ -17,7 +21,9 @@ __sap_hana_preconfigure_register_cpupower_frequency_info_supported.stderr_lines - name: Configure CPU Governor for performance if possible + when: __sap_hana_preconfigure_register_cpupower_frequency_info_supported.stdout != 'Not Available' block: + - name: Create file /etc/rc.d/rc.local if it does not exist ansible.builtin.file: path: /etc/rc.d/rc.local @@ -49,10 +55,3 @@ - name: Display the output of the cpupower frequency-info -g command again ansible.builtin.debug: var: __sap_hana_preconfigure_register_cpupower_frequency_info.stdout_lines, __sap_hana_preconfigure_register_cpupower_frequency_info.stderr_lines - - when: - - __sap_hana_preconfigure_register_cpupower_frequency_info_supported.stdout != 'Not Available' - - when: - - ansible_architecture == 'x86_64' - - not sap_hana_preconfigure_use_tuned diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-epb.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-epb.yml index eb56e15e6..42195b1e4 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-epb.yml @@ -4,7 +4,11 @@ # in included tuned profile throughput-performance # More details on EPB are in: https://github.com/torvalds/linux/blob/be1fcde604e429691771ce70230668af8097e29b/arch/x86/kernel/cpu/intel_epb.c - name: Perform steps for configuring EPB + when: + - ansible_architecture == 'x86_64' + - not sap_hana_preconfigure_use_tuned block: + - name: Check if system supports Intel's performance bias setting ansible.builtin.shell: set -o pipefail && LC_ALL=C cpupower info | head -1 | awk '{print $2, $3, $4}' check_mode: no @@ -18,7 +22,9 @@ __sap_hana_preconfigure_register_cpupower_info_epb_supported.stderr_lines - name: Change EPB if possible + when: __sap_hana_preconfigure_register_cpupower_info_epb_supported.stdout != 'does not support' block: + - name: Create file /etc/init.d/boot.local if it does not exist ansible.builtin.file: path: /etc/init.d/boot.local @@ -50,10 +56,3 @@ - name: Display the output of the cpupower info -b command ansible.builtin.debug: var: __sap_hana_preconfigure_register_cpupower_info.stdout_lines, __sap_hana_preconfigure_register_cpupower_info.stderr_lines - - when: - - __sap_hana_preconfigure_register_cpupower_info_epb_supported.stdout != 'does not support' - - when: - - ansible_architecture == 'x86_64' - - not sap_hana_preconfigure_use_tuned diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-tuned.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-tuned.yml index ab1483564..a5de66bfa 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-tuned.yml @@ -1,6 +1,10 @@ --- - name: Perform specific steps for tuned profile on RHEL 8.0 ppc64le + when: + - sap_hana_preconfigure_use_tuned + - ansible_architecture == "ppc64le" + - ansible_distribution_version == "8.0" block: - name: RHEL 8.0 ppc64le - Create directory /etc/tuned/sap-hana-ppc64le @@ -20,12 +24,8 @@ mode: '0644' backup: yes - when: - - sap_hana_preconfigure_use_tuned - - ansible_architecture == "ppc64le" - - ansible_distribution_version == "8.0" - - name: Perform steps for setting tuned profile + when: sap_hana_preconfigure_use_tuned block: - name: Enable and start tuned @@ -45,7 +45,9 @@ var: __sap_hana_preconfigure_register_current_tuned_profile.stdout_lines, __sap_hana_preconfigure_register_current_tuned_profile.stderr_lines - name: Switch to tuned profile '{{ sap_hana_preconfigure_tuned_profile }}' if not currently active + when: __sap_hana_preconfigure_register_current_tuned_profile.stdout != sap_hana_preconfigure_tuned_profile block: + - name: Switch to tuned profile '{{ sap_hana_preconfigure_tuned_profile }}' ansible.builtin.command: /usr/sbin/tuned-adm profile '{{ sap_hana_preconfigure_tuned_profile }}' changed_when: true @@ -59,9 +61,3 @@ - name: Display the output of the tuned-adm active command after switching to profile '{{ sap_hana_preconfigure_tuned_profile }}' ansible.builtin.debug: var: __sap_hana_preconfigure_register_new_tuned_profile.stdout_lines, __sap_hana_preconfigure_register_new_tuned_profile.stderr_lines - - when: - - __sap_hana_preconfigure_register_current_tuned_profile.stdout != sap_hana_preconfigure_tuned_profile - - when: - - sap_hana_preconfigure_use_tuned diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml index 711c7d779..ec3ef54ed 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml @@ -12,7 +12,9 @@ ignore_errors: "{{ not sap_hana_preconfigure_min_rhel_release_check }}" - name: Perform steps for enabling repos for SAP HANA + when: sap_hana_preconfigure_enable_sap_hana_repos block: + # repos required for SAP HANA on RHEL 7 and RHEL 8: - name: Fill the variable for the generic list of required repos ansible.builtin.set_fact: @@ -33,8 +35,6 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_register_subscription_enable_repos - when: sap_hana_preconfigure_enable_sap_hana_repos - - name: Detect if the minor RHEL release is set ansible.builtin.shell: set -o pipefail && subscription-manager release --show | awk '{print $NF}' register: __sap_hana_preconfigure_register_subscription_manager_release @@ -111,7 +111,11 @@ # when: ansible_architecture == "ppc64le" - name: Ensure that the minimum required package versions are installed + when: + - sap_hana_preconfigure_min_package_check | bool + - __sap_hana_preconfigure_min_pkgs | d([]) block: + - name: Create a list of minimum required package versions to be installed # How does it work? # 1 - Print the required package name and version with a prefix "1" followed by a space. @@ -164,10 +168,6 @@ loop_control: loop_var: line_item - when: - - sap_hana_preconfigure_min_package_check | bool - - __sap_hana_preconfigure_min_pkgs | d([]) - # Reason for noqa: Both yum and dnf support "state: latest" - name: Ensure that the system is updated to the latest patchlevel # noqa package-latest ansible.builtin.package: diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml index 8fd9921d3..ad28b1015 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml @@ -20,7 +20,9 @@ ### 3.9 - Create the compatibility links for HANA - name: Create compatibility links + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) block: + - name: 3.9 create compatibility links for RHEL 7.2 ansible.builtin.file: src=/usr/lib64/{{ line_item.src }} dest=/usr/lib64/{{ line_item.dest }} state=link with_items: @@ -41,11 +43,9 @@ loop_control: loop_var: line_item - when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) - ### 3.10 - THP -> SAP Note 2292690 ### 3.11 - CPU Governor for performance -> TunedProfile -> SAP Note 2292690 -### 3.12 - Processor C-States für x86_64 -> SAP Note 2292690 +### 3.12 - Processor C-States for x86_64 -> SAP Note 2292690 ### Set by HANA installer #- name: Configure - Increase file handles to 32800 for sapsys group diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml index 81e0af71f..aeee28a8b 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml @@ -11,6 +11,7 @@ # Network_Configuration_for_HANA_Workloads_on_IBM_Power_Servers_V4.pdf - name: Perform configuration changes for ppc64le + when: ansible_architecture == 'ppc64le' block: - name: Configure - Display SAP note number 2055470 and its version @@ -71,5 +72,3 @@ - name: Display largesend kernel parameters ansible.builtin.debug: var: __sap_hana_preconfigure_register_ibm_largesend_sysctl_p_output.stdout_lines - - when: ansible_architecture == 'ppc64le' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml index 8beaf5d0a..e84302ade 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml @@ -6,7 +6,9 @@ msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" - name: Check of package pseries-energy + when: ansible_architecture == "ppc64le" block: + - name: Check if package pseries-energy is not installed ansible.builtin.command: yum info installed pseries-energy register: __sap_hana_preconfigure_register_yum_pseries_energy_assert @@ -20,5 +22,3 @@ that: __sap_hana_preconfigure_register_yum_pseries_energy_assert is failed fail_msg: "FAIL: Package 'pseries-energy' is installed!" success_msg: "PASS: Package 'pseries-energy' is not installed." - - when: ansible_architecture == "ppc64le" diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml index 22e533a9b..3593e8daf 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml @@ -7,6 +7,7 @@ (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2382421$') | first).version }}): Recommended network settings for SAP HANA" - name: Set kernel tunables as per SAP note 2382421 + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) block: - name: Modify entries in file '{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}' @@ -22,6 +23,9 @@ loop_var: line_item - name: Set net.core.wmem_max and net.core.rmem_max if necessary + when: + - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) + - not ansible_architecture == 'ppc64le' block: - name: Get the value of net.ipv4.tcp_wmem @@ -62,10 +66,6 @@ line: "net.core.rmem_max={{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem.stdout.split()[-1] }}" state: present - when: - - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - - not ansible_architecture == 'ppc64le' - # Reason for noqa: We unconditionally reload the kernel parameters without first checking the current values - name: Reload kernel parameters from file '{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}' # noqa no-changed-when ansible.builtin.command: sysctl -p "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}" @@ -74,5 +74,3 @@ - name: Display kernel parameters for network tuning ansible.builtin.debug: var: __sap_hana_preconfigure_register_saphana_conf_sysctl_p_output.stdout_lines - - when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml index 4d38854e5..67c92ac5f 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml @@ -7,6 +7,9 @@ (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3024346$') | first).version }}): Linux kernel settings for NetApp NFS" - name: Set kernel tunables for NetApp NFS as per SAP note 3024346 + when: + - sap_hana_preconfigure_use_netapp_settings_nfs|d(false) + - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) block: - name: Modify entries in file '{{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }}' @@ -38,7 +41,3 @@ regexp: '^options sunrpc tcp_max_slot_table_entries' line: options sunrpc tcp_max_slot_table_entries=128 when: sap_hana_preconfigure_use_netapp_settings_nfsv3 - - when: - - sap_hana_preconfigure_use_netapp_settings_nfs|d(false) - - sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_3024346|d(false) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml index f7a7a3ed8..9aea11a35 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml @@ -20,9 +20,13 @@ ### 3.9 - Create the compatibility links for HANA - name: Check if required links exist + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) block: + - name: ... in case of RHEL 7.2 + when: "ansible_distribution_version == '7.2'" block: + - name: RHEL 7.2 - Get info about file /usr/lib64/libssl.so.1.0.1 ansible.builtin.stat: path: /usr/lib64/libssl.so.1.0.1 @@ -79,10 +83,10 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_72_assert.stat.exists - when: "ansible_distribution_version == '7.2'" - - name: ... in case of RHEL 7.3 and above + when: "ansible_distribution_version != '7.2'" block: + - name: Get info about file /usr/lib64/libssl.so.1.0.1 ansible.builtin.stat: path: /usr/lib64/libssl.so.1.0.1 @@ -139,13 +143,9 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_libcrypto_rhel_7_assert.stat.exists - when: "ansible_distribution_version != '7.2'" - - when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_9 | d(false) - ### 3.10 - THP -> SAP Note 2292690 ### 3.11 - CPU Governor for performance -> TunedProfile -> SAP Note 2292690 -### 3.12 - Processor C-States für x86_64 -> SAP Note 2292690 +### 3.12 - Processor C-States for x86_64 -> SAP Note 2292690 ### Set by HANA installer #- name: Assert - increase file handles to 32800 for sapsys group diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml index bf0bb5de7..00d4215b4 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2055470.yml @@ -11,6 +11,7 @@ # Network_Configuration_for_HANA_Workloads_on_IBM_Power_Servers_V4.pdf - name: Assert ppc64le specific settings + when: ansible_architecture == 'ppc64le' block: - name: Assert - Display SAP note number 2055470 and its version @@ -58,7 +59,9 @@ # loop_var: line_item - name: Check /etc/sysctl.d/ibm_largesend.conf + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2055470 | d(false) block: + - name: Get info about file /etc/sysctl.d/ibm_largesend.conf ansible.builtin.stat: path: /etc/sysctl.d/ibm_largesend.conf @@ -79,13 +82,9 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_ibm_largesend_conf_assert.stat.exists - when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2055470 | d(false) - - name: Get and assert kernel tunables for ppc64le ansible.builtin.include_tasks: ../RedHat/generic/assert-2055470-loop-block.yml loop: "{{ sap_hana_preconfigure_kernel_parameters_ppc64le }}" loop_control: loop_var: line_item when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2055470 | d(false) - - when: ansible_architecture == 'ppc64le' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml index f69360266..d8e7a622f 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2382421.yml @@ -9,7 +9,9 @@ (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2382421$') | first).version }}): Recommended network settings for SAP HANA" - name: Check SAP HANA sysctl conf file + when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) block: + - name: Get info about file {{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }} ansible.builtin.stat: path: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}" @@ -30,8 +32,6 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_sysctl_saphana_conf_assert.stat.exists - when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) - - name: Get and assert kernel tunables ansible.builtin.include_tasks: ../RedHat/generic/assert-2382421-loop-block.yml loop: "{{ __sap_hana_preconfigure_kernel_parameters_default }}" @@ -40,7 +40,12 @@ when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) - name: Check net.core.wmem_max and net.core.rmem_max if necessary + when: + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) + - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) + - not ansible_architecture == 'ppc64le' block: + - name: 2382421 - Get the maximum value of net.ipv4.tcp_wmem ansible.builtin.command: sysctl net.ipv4.tcp_wmem register: __sap_hana_preconfigure_register_sysctl_ipv4_tcp_wmem_assert @@ -132,8 +137,3 @@ success_msg: "PASS: The current value of 'net.core.rmem_max' as per sysctl is '{{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem_assert.stdout.split()[-1] }}'." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - - when: - - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2382421 | d(false) - - not sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - - not ansible_architecture == 'ppc64le' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml index f0a3f5de8..d44cfd7c4 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml @@ -8,7 +8,11 @@ (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3024346$') | first).version }}): Linux kernel settings for NetApp NFS" - name: Check NetApp sysctl conf file for SAP HANA + when: + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) block: + - name: Get info about file {{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }} ansible.builtin.stat: path: "{{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }}" @@ -29,10 +33,6 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_sysctl_netapp_hana_conf_assert.stat.exists - when: - - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - - name: Get and assert kernel tunables for NetApp NFS ansible.builtin.include_tasks: ../RedHat/generic/assert-3024346-loop-block.yml loop: "{{ __sap_hana_preconfigure_kernel_parameters_netapp_nfs }}" @@ -43,7 +43,11 @@ - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - name: Check NetApp modprobe conf file for SAP HANA with NFSv3 + when: + - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) + - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) block: + - name: Get info about file /etc/modprobe.d/sunrpc.conf ansible.builtin.stat: path: /etc/modprobe.d/sunrpc.conf @@ -64,10 +68,6 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists - when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) - - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) - - name: Get value of 'options sunrpc tcp_max_slot_table_entries' from /etc/modprobe.d/sunrpc.conf ansible.builtin.command: awk 'BEGIN{FS="="}/options sunrpc tcp_max_slot_table_entries/{print $NF}' /etc/modprobe.d/sunrpc.conf register: __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert From 99617029c5929cc704d678211fa8d1b69535ab71 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 28 Sep 2022 20:47:49 +0200 Subject: [PATCH 202/375] sap_hana_install: fix ansible-lint key-order --- .../sap_hana_install/tasks/hana_addhosts.yml | 3 +-- roles/sap_hana_install/tasks/hana_exists.yml | 12 +++++------- roles/sap_hana_install/tasks/post_install.yml | 8 +++----- roles/sap_hana_install/tasks/pre_install.yml | 19 +++++++------------ .../tasks/pre_install/hdblcm_configfile.yml | 3 +-- .../tasks/pre_install/prepare_sapcar.yml | 7 +++---- .../tasks/pre_install/prepare_sarfiles.yml | 6 ++---- .../tasks/pre_install/verify_checksum.yml | 3 +-- 8 files changed, 23 insertions(+), 38 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_addhosts.yml b/roles/sap_hana_install/tasks/hana_addhosts.yml index 6014d2f2c..c641c8c6d 100644 --- a/roles/sap_hana_install/tasks/hana_addhosts.yml +++ b/roles/sap_hana_install/tasks/hana_addhosts.yml @@ -20,6 +20,7 @@ loop_var: line_item - name: SAP HANA Add Hosts - Make sure the additional hosts are not yet part of the exiting SAP HANA system - hdblcm checks + when: not ansible_check_mode block: - name: SAP HANA Add Hosts - Run 'hdblcm --list_systems' @@ -48,8 +49,6 @@ loop_control: loop_var: line_item - when: not ansible_check_mode - - name: SAP HANA Add Hosts - Set fact for hdblcm command line ansible.builtin.set_fact: __sap_hana_install_hdblcm_command: "./hdblcm {{ sap_hana_install_hdblcm_extraargs | d('') }} diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index e6bbec9d5..6c9bf291c 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -1,6 +1,7 @@ --- - name: SAP HANA Checks - HANA admin user check + when: sap_hana_install_check_sidadm_user | d(true) block: - name: Check for sidadm user @@ -17,11 +18,13 @@ Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." success_msg: "PASS: User '{{ sap_hana_install_sid | lower }}adm' does not exist." - when: sap_hana_install_check_sidadm_user | d(true) - # The role supports specifying the SAP HANA group id in variable `sap_hana_install_groupid`, which is the id of the sapsys group. # The SAP HANA installation will fail if there is already a group named sapsys but with a different ID. Let's better fail before. - name: SAP HANA Checks - Check HANA admin group + when: + - sap_hana_install_groupid is defined + - sap_hana_install_groupid | string != "None" + - sap_hana_install_groupid | string | length > 0 block: - name: SAP HANA Checks - Get info about the ID of the sapsys group @@ -41,11 +44,6 @@ Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." when: __sap_hana_install_register_getent_group_sapsys.rc == 0 - when: - - sap_hana_install_groupid is defined - - sap_hana_install_groupid | string != "None" - - sap_hana_install_groupid | string | length > 0 - - name: SAP HANA Checks - Get info about directory '/hana/shared/{{ sap_hana_install_sid }}' ansible.builtin.stat: path: "/hana/shared/{{ sap_hana_install_sid }}" diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 6650f1e74..4213575c1 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -1,6 +1,7 @@ --- - name: Tasks for new HANA Systems + when: sap_hana_install_new_system | d(true) block: - name: SAP HANA Post Install - Store connection information @@ -51,11 +52,11 @@ delegate_to: 127.0.0.1 tags: sap_hana_install_generate_input_file - when: sap_hana_install_new_system | d(true) - ################ - name: Perform an hdblcm installation check + when: sap_hana_install_check_installation | d(false) + tags: sap_hana_install_check_installation block: - name: SAP HANA hdblcm installation check - Create a Jinja2 template from the hdblcm xml configfile template @@ -137,9 +138,6 @@ var: __sap_hana_install_register_installation_check.stdout_lines when: not sap_hana_install_use_hdbcheck | d(true) - when: sap_hana_install_check_installation | d(false) - tags: sap_hana_install_check_installation - - name: SAP HANA Install - Run 'hdblcm --list_systems' after the installation ansible.builtin.shell: | set -o pipefail && ./hdblcm --list_systems | awk '/\/hana\/shared\/{{ sap_hana_install_sid }}/{a=1} diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 3141fc70c..bcb6e3773 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -19,6 +19,7 @@ ################ - name: Prepare the HANA software for installation, new system + when: sap_hana_install_new_system | d(true) block: - name: SAP HANA Pre Install - Normalize directory path @@ -39,6 +40,7 @@ success_msg: "PASS: The software directory '{{ __sap_hana_install_fact_software_directory }}' exist." - name: SAP HANA Pre Install - Assert directory permissions in case `sap_hana_install_software_extract_directory` is below `sap_hana_install_software_extract_directory` + when: sap_hana_install_software_extract_directory is search(sap_hana_install_software_directory) block: - name: SAP HANA Pre Install - Set fact for number of directory levels of the software directory @@ -67,8 +69,6 @@ # loop_control: # loop_var: line_item - when: sap_hana_install_software_extract_directory is search(sap_hana_install_software_directory) - - name: SAP HANA Pre Install - Change ownership of HANA directories ansible.builtin.file: path: "{{ item }}" @@ -129,6 +129,9 @@ when: __sap_hana_install_register_stat_software_extract_directory.stat.exists - name: SAP HANA Pre Install - Set directory of 'hdblcm' from successful find result + when: + - __sap_hana_install_register_stat_software_extract_directory.stat.exists + - __sap_hana_install_register_find_directory_sap_hana_database_initial.files[0] is defined block: - name: SAP HANA Pre Install - Set fact for 'hdblcm' installer directory if found initially @@ -148,11 +151,8 @@ fail_msg: "FAIL: File '{{ __sap_hana_install_fact_hdblcm_path + '/hdblcm' }}' could not be found. Installation of SAP HANA is not possible." success_msg: "Using '{{ __sap_hana_install_fact_hdblcm_path + '/hdblcm' }}' for the installation of SAP HANA." - when: - - __sap_hana_install_register_stat_software_extract_directory.stat.exists - - __sap_hana_install_register_find_directory_sap_hana_database_initial.files[0] is defined - - name: SAP HANA Pre Install - Extract SAR files if file 'hdblcm' was not found initially + when: __sap_hana_install_register_find_directory_sap_hana_database_initial.files[0] is not defined block: - name: SAP HANA Pre Install - Run hdblcm prepare @@ -181,13 +181,10 @@ success_msg: "Using file '{{ __sap_hana_install_fact_hdblcm_path + '/hdblcm' }}' for the installation of SAP HANA." when: not ansible_check_mode - when: __sap_hana_install_register_find_directory_sap_hana_database_initial.files[0] is not defined - - when: sap_hana_install_new_system | d(true) - # For an addhosts operation, we first use the hdblcm command for creating a new configfile template, which # we then process with the templating engine. The actual addhosts installation is done via the resident hdblcm. - name: Set the path to hdblcm, addhosts + when: not sap_hana_install_new_system | d(true) block: - name: SAP HANA Pre Install - Find directory 'SAP_HANA_DATABASE' in '{{ sap_hana_install_software_extract_directory }}' @@ -202,8 +199,6 @@ ansible.builtin.set_fact: __sap_hana_install_fact_hdblcm_path: "{{ __sap_hana_install_register_find_directory_sap_hana_database_addhosts.files[0].path }}" - when: not sap_hana_install_new_system | d(true) - ################ # Pre Install Steps ################ diff --git a/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml b/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml index 5f11ae6c1..2c086030a 100644 --- a/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml +++ b/roles/sap_hana_install/tasks/pre_install/hdblcm_configfile.yml @@ -28,6 +28,7 @@ when: __sap_hana_install_register_stat_hdblcm_configfile.stat.exists - name: Create the hdblcm configfile dynamically + when: not __sap_hana_install_register_stat_hdblcm_configfile.stat.exists block: - name: SAP HANA Pre Install - Create the hdblcm configfile template '{{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg' @@ -71,8 +72,6 @@ register: __sap_hana_install_register_cftemplate when: not ansible_check_mode - when: not __sap_hana_install_register_stat_hdblcm_configfile.stat.exists - - name: SAP HANA Pre Install - Display the path name of the hdblcm configfile ansible.builtin.debug: msg: "The hdblcm configfile is: '{{ __sap_hana_install_register_tmpdir.path }}/configfile.cfg'" diff --git a/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml b/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml index b68a56c1b..051feb27d 100644 --- a/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml +++ b/roles/sap_hana_install/tasks/pre_install/prepare_sapcar.yml @@ -2,6 +2,7 @@ # hdblcm prepare SAPCAR - name: SAP HANA hdblcm prepare - SAPCAR defined - Prepare the SAPCAR executable if 'sap_hana_install_sapcar_filename' is defined + when: sap_hana_install_sapcar_filename is defined block: - name: SAP HANA hdblcm prepare - SAPCAR defined - Check if the SAPCAR executable exists @@ -61,10 +62,10 @@ ansible.builtin.set_fact: __sap_hana_install_fact_selected_sapcar_filename: "{{ sap_hana_install_sapcar_filename }}" - when: sap_hana_install_sapcar_filename is defined - - name: SAP HANA hdblcm prepare - SAPCAR autodetection - Prepare the SAPCAR executable if 'sap_hana_install_sapcar_filename' is not defined + when: sap_hana_install_sapcar_filename is not defined block: + # We need the 'file' package for the 'file' command, which we need in the next task. # RHEL: The 'file' package is contained in the Base software group, which should be installed already. @@ -197,8 +198,6 @@ path: "{{ sap_hana_install_software_extract_directory }}/sapcar_tmp" state: absent - when: sap_hana_install_sapcar_filename is not defined - - name: SAP HANA hdblcm prepare - Make sure the SAPCAR executable has execute permissions and is owned by root ansible.builtin.file: path: "{{ sap_hana_install_software_extract_directory }}/sapcar/{{ __sap_hana_install_fact_selected_sapcar_filename }}" diff --git a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml index e3c65922f..a77c50ed9 100644 --- a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml +++ b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml @@ -16,6 +16,7 @@ when: sap_hana_install_sarfiles is defined - name: SAP HANA hdblcm prepare - Find all SAR files if 'sap_hana_install_sarfiles' is undefined + when: sap_hana_install_sarfiles is not defined block: - name: SAP HANA hdblcm prepare - Find all SAR files in '{{ __sap_hana_install_fact_software_directory }}' @@ -35,9 +36,8 @@ ansible.builtin.debug: var: __sap_hana_install_fact_sarfiles - when: sap_hana_install_sarfiles is not defined - - name: Copy SAR files to final destination if 'sap_hana_install_copy_sarfiles' is 'yes' + when: sap_hana_install_copy_sarfiles block: - name: SAP HANA hdblcm prepare - Create directory '{{ sap_hana_install_software_extract_directory }}/sarfiles' @@ -60,8 +60,6 @@ ansible.builtin.set_fact: __sap_hana_install_fact_sar_dir: "{{ sap_hana_install_software_extract_directory }}/sarfiles" - when: sap_hana_install_copy_sarfiles - - name: SAP HANA hdblcm prepare - Fill list of dicts containing dir, file, and global checksum file ansible.builtin.set_fact: __sap_hana_install_fact_sarfiles_dict: "{{ __sap_hana_install_fact_sarfiles_dict | d([]) + [__sap_hana_install_tmp_sarfiles_dict] }}" diff --git a/roles/sap_hana_install/tasks/pre_install/verify_checksum.yml b/roles/sap_hana_install/tasks/pre_install/verify_checksum.yml index 16c682f55..c8f6ee2f7 100644 --- a/roles/sap_hana_install/tasks/pre_install/verify_checksum.yml +++ b/roles/sap_hana_install/tasks/pre_install/verify_checksum.yml @@ -11,6 +11,7 @@ when: not __sap_hana_install_register_stat_checksum_file.stat.exists - name: Continue if checksum file exists + when: __sap_hana_install_register_stat_checksum_file.stat.exists block: # We are using awk to search for the file name in the checksum file. If there is no entry for the file, instead of @@ -43,5 +44,3 @@ success_msg: "PASS: The checksum of file '{{ __sap_hana_install_passed_file_dict.dir }}/{{ __sap_hana_install_passed_file_dict.file }}' matches the checksum stored in file '{{ __sap_hana_install_passed_file_dict.checksum_file }}'." when: __sap_hana_install_register_checksum_from_file.stdout != 'Missing entry' - - when: __sap_hana_install_register_stat_checksum_file.stat.exists From 2286eb9dc0a472be5950a670c82c53913f2e1cef Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 29 Sep 2022 07:40:10 +0000 Subject: [PATCH 203/375] sap_ha_cluster: fixed wrong name-block-when order (does not work!) --- roles/sap_ha_cluster/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 43e6af954..ebb224908 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -107,9 +107,9 @@ # ansible.builtin.fail: - name: "SAP HA Cluster - Block with actual changes" - block: when: - not sap_ha_cluster_create_config_only + block: # Start with prerequisite changes for certain platforms, if applicable - name: "SAP HA Cluster - Include platform specific fencing prerequisites" @@ -147,7 +147,7 @@ failed_when: false - name: "SAP HA Cluster - Create backup of existing CIB" - ansible.builtin.copy: + ansible.builtin.copy: # noqa template-instead-of-copy backup: true content: "{{ __sap_ha_cluster_cib_query.stdout }}" dest: /root/cib_backup.xml From 02a7501a7038549af9d8cadc6faad4fba9aea715 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 10:54:12 +0200 Subject: [PATCH 204/375] sap_ha_cluster: adjusted combination of extra packages list --- roles/sap_ha_cluster/defaults/main.yml | 4 +++- .../tasks/ascertain_ha_cluster_in_inventory.yml | 5 ----- roles/sap_ha_cluster/tasks/construct_vars_common.yml | 12 ++++++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index bdeb14cbf..2d70a0855 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -18,6 +18,8 @@ sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" sap_ha_cluster_fence_agent_packages: - fence-agents-all +sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages | default([]) }}" + # Adjusting resource defaults sap_ha_cluster_resource_defaults: - name: resource-stickiness @@ -27,7 +29,7 @@ sap_ha_cluster_resource_defaults: # The type of SAP landscape and multi-node replication # TODO: variable name update, depending on feedback -#sap_ha_cluster_sap_type: "" +# sap_ha_cluster_sap_type: "" sap_ha_cluster_replication_type: none # Optional parameters to customize resource parameters diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index b329e098e..4aace6b25 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -28,11 +28,6 @@ __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" when: ha_cluster_constraints_order is defined -- name: "SAP HA Cluster - Register ha_cluster_extra_packages" - ansible.builtin.set_fact: - __sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages }}" - when: ha_cluster_extra_packages is defined - - name: "SAP HA Cluster - Register ha_cluster_fence_agent_packages" ansible.builtin.set_fact: __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 89f9c0808..6218fe0ae 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -10,8 +10,12 @@ __sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" no_log: true -- name: "SAP HA Cluster - Combine defined extra packages" +- name: "SAP HA Cluster - Combine extra packages lists" ansible.builtin.set_fact: - __sap_ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages + sap_ha_cluster_extra_packages }}" - when: - - sap_ha_cluster_extra_packages is defined + __sap_ha_cluster_extra_packages: "{{ + sap_ha_cluster_extra_packages + + + sap_ha_cluster_sap_extra_packages | default([]) + + + sap_ha_cluster_platform_extra_packages | default([]) + }}" From 38d712ed048c3cc6e2aaaf9293b610293df1a7dd Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 10:56:58 +0200 Subject: [PATCH 205/375] sap_ha_cluster: yamllint fix of variable length and indentation --- roles/sap_ha_cluster/vars/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 17a634c94..da5077fde 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -1,7 +1,15 @@ --- # SAP System IDs that are reserved and must not be used # Reference: SAP Note 1979280 -__sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'AUX', 'AVG', 'BIN', 'BIT', 'CDC', 'COM', 'CON', 'DAA', 'DBA', 'DBM', 'DBO', 'DTD', 'ECO', 'END', 'EPS', 'EXE', 'FOR', 'GET', 'GID', 'IBM', 'INT', 'KEY', 'LIB', 'LOG', 'LPT', 'MAP', 'MAX', 'MEM', 'MIG', 'MIN', 'MON', 'NET', 'NIX', 'NOT', 'NUL', 'OFF', 'OLD', 'OMS', 'OUT', 'PAD', 'PRN', 'RAW', 'REF', 'ROW', 'SAP', 'SET', 'SGA', 'SHG', 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', 'USE', 'USR', 'VAR'] +__sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', + 'AUX', 'AVG', 'BIN', 'BIT', 'CDC', 'COM', 'CON', 'DAA', + 'DBA', 'DBM', 'DBO', 'DTD', 'ECO', 'END', 'EPS', 'EXE', + 'FOR', 'GET', 'GID', 'IBM', 'INT', 'KEY', 'LIB', 'LOG', + 'LPT', 'MAP', 'MAX', 'MEM', 'MIG', 'MIN', 'MON', 'NET', + 'NIX', 'NOT', 'NUL', 'OFF', 'OLD', 'OMS', 'OUT', 'PAD', + 'PRN', 'RAW', 'REF', 'ROW', 'SAP', 'SET', 'SGA', 'SHG', + 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', + 'USE', 'USR', 'VAR'] # Define empty parameters to avoid undefined input variables. # The arguments_spec check complains. From 141be55a0f0abadadb20692c8b141078c39bdabb Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 10:59:06 +0200 Subject: [PATCH 206/375] sap_ha_cluster: extra packages definitions --- roles/sap_ha_cluster/templates/cluster_create_config.j2 | 4 +--- roles/sap_ha_cluster/vars/SAPHana_scaleout.yml | 2 +- roles/sap_ha_cluster/vars/SAPHana_scaleup.yml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 index f100fdc0f..56210f704 100644 --- a/roles/sap_ha_cluster/templates/cluster_create_config.j2 +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -25,11 +25,9 @@ ha_cluster_constraints_location: ha_cluster_constraints_order: {{ __sap_ha_cluster_constraints_order | to_nice_yaml(indent=2) }} -{%- if sap_ha_cluster_extra_packages is defined and sap_ha_cluster_extra_packages|length > 0 %} # ha_cluster_extra_packages: -{{ sap_ha_cluster_extra_packages | to_nice_yaml(indent=2) }} -{% endif %} +{{ sap_ha_cluster_extra_packages + sap_ha_cluster_sap_extra_packages | default([]) + sap_ha_cluster_platform_extra_packages | default([]) | to_nice_yaml(indent=2) }} # ha_cluster_fence_agent_packages: diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml index 539ce5dd9..fab558d23 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml @@ -3,7 +3,7 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_extra_packages: +sap_ha_cluster_sap_extra_packages: - resource-agents-sap-hana-scaleout sap_ha_cluster_ra_hana: SAPHanaController diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml index cc64bbff1..bd04a7e39 100644 --- a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml +++ b/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml @@ -3,7 +3,7 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_extra_packages: +sap_ha_cluster_sap_extra_packages: - resource-agents-sap-hana sap_ha_cluster_ra_hana: SAPHana From 80342f2f0c9fab5213058703bf6e11d6f80db399 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 11:03:04 +0200 Subject: [PATCH 207/375] sap_ha_cluster: AWS integration preparations - still WIP --- .../tasks/ascertain_platform_type.yml | 19 ++++-- .../tasks/ascertain_sap_landscape.yml | 9 ++- roles/sap_ha_cluster/tasks/main.yml | 16 ++--- .../preconfigure_platform_amazon_ec2.yml | 66 +++++++++++++++++++ .../tasks/preconfigure_platform_aws.yml | 62 ----------------- ...atform_aws.yml => Platform_amazon_ec2.yml} | 6 +- .../sap_ha_cluster/vars/Platform_ibmcloud.yml | 2 +- 7 files changed, 96 insertions(+), 84 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml delete mode 100644 roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml rename roles/sap_ha_cluster/vars/{Platform_aws.yml => Platform_amazon_ec2.yml} (91%) diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index f519bc358..a21dc548d 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -2,10 +2,21 @@ # Platform detection for cloud platforms. # Potentially also useful for other virtual or hardware platforms. -# Possible useful ansible facts are: -# - ansible_chassis_asset_tag -# - ansible_board_asset_tag -# - ansible_system_vendor +### AWS facts already available in Ansible +# +# ansible_bios_vendor: "Amazon EC2" +# ansible_bios_version: "1.0" +# ansible_board_asset_tag: "i-043d3c1a889ed9016" +# ansible_board_name: "NA" +# ansible_board_serial: "NA" +# ansible_board_vendor: "Amazon EC2" +# ansible_board_version: "NA" +# ansible_chassis_asset_tag: "Amazon EC2" +# ansible_chassis_serial: "NA" +# ansible_chassis_vendor: "Amazon EC2" +# ansible_chassis_version: "NA" +# ansible_product_name: "r5.8xlarge" +# ansible_system_vendor: "Amazon EC2" # TODO: smarter detection based on multiple facts and providing one standard # name for use as platform type in related include files diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml index a732dce6d..fd835450b 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -7,12 +7,15 @@ # TODO: check play hosts against cluster nodes definition - there should be no # hosts in the play that are undefined? +# 2 nodes are also valid for other scenarios. +# TODO: collect possible rules for target landscapes + - name: "SAP HA Cluster - Set landscape to scale-up if there are only 2 nodes" - ansible.builtin.set_fact: - sap_ha_cluster_sap_type: scaleup when: - ansible_play_hosts|length == 2 - sap_ha_cluster_sap_type is not defined + ansible.builtin.set_fact: + sap_ha_cluster_sap_type: scaleup # TODO: validate the value of sap_ha_cluster_sap_type to -# be a supported key +# be a supported key (to catch mismatches if it is user-defined) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index ebb224908..10618b0ee 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -77,7 +77,7 @@ ansible_facts['distribution_version'] }}.yml - "SAPHana_{{ sap_ha_cluster_sap_type }}.yml" - "SAPHana_{{ sap_ha_cluster_replication_type }}.yml" - - "Platform_{{ __sap_ha_cluster_vm_asset_tag }}.yml" + - "Platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" when: __sap_ha_cluster_vars_file is file @@ -102,10 +102,6 @@ file: construct_vars_hana_scaleout.yml when: sap_ha_cluster_sap_type == 'scaleout' -#### for debugging -# - name: "Fail here for now..." -# ansible.builtin.fail: - - name: "SAP HA Cluster - Block with actual changes" when: - not sap_ha_cluster_create_config_only @@ -113,16 +109,14 @@ # Start with prerequisite changes for certain platforms, if applicable - name: "SAP HA Cluster - Include platform specific fencing prerequisites" + when: + - __sap_ha_cluster_platform_file is file ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "preconfigure_platform_{{ __sap_ha_cluster_platform_type }}.yml" + - "preconfigure_platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" vars: __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" - when: - - __sap_ha_cluster_platform_type is defined - - __sap_ha_cluster_platform_file is file - ignore_errors: "{{ ansible_check_mode }}" # Before we are ready to call the ha_cluster role, we want to validate # that the minimum required parameters are defined and not empty. @@ -165,7 +159,7 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster - no_log: true + # no_log: true vars: ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" diff --git a/roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml b/roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml new file mode 100644 index 000000000..c41f9118c --- /dev/null +++ b/roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml @@ -0,0 +1,66 @@ +--- +# Requirement to enable the fencing resource to function. + +- name: "SAP HA Cluster - Create awscli config directory" + ansible.builtin.file: + mode: 0755 + owner: root + path: /root/.aws + state: directory + +- name: "SAP HA Cluster - Create awscli config" + ansible.builtin.blockinfile: + backup: true + block: | + [default] + region = {{ sap_ha_cluster_aws_region }} + create: true + mode: 0600 + owner: root + path: /root/.aws/config + +- name: "SAP HA Cluster - Store awscli credentials" + ansible.builtin.blockinfile: + backup: true + block: | + [default] + aws_access_key_id = {{ sap_ha_cluster_aws_access_key_id }} + aws_secret_access_key = {{ sap_ha_cluster_aws_secret_access_key }} + create: true + mode: 0600 + owner: root + path: /root/.aws/credentials + no_log: true + +# TODO: find a better way to work with multi-nic instances +# The cluster setup works with the primary interface by default. + +# - name: "SAP HA Cluster - Get VPC info" +# ansible.builtin.shell: | +# aws ec2 describe-vpcs \ +# --output text \ +# --filters "Name=tag:Name,Values={{ sap_ha_cluster_aws_vpc }}" \ +# --query 'Vpcs[*].VpcId' +# register: __sap_ha_cluster_aws_describe_vpcs +# changed_when: false +# run_once: true +# check_mode: false +# +# - name: "SAP HA Cluster - Get instances info" +# ansible.builtin.shell: | +# aws ec2 describe-instances \ +# --output json \ +# --query 'Reservations[].Instances[]' +# register: __sap_ha_cluster_aws_describe_instances +# changed_when: false +# run_once: true +# check_mode: false +# +# - name: "SAP HA Cluster - Combine instance info into a dictionary" +# ansible.builtin.set_fact: +# __sap_ha_cluster_aws_instances: "{{ __sap_ha_cluster_aws_instances + [{'private_ip': item.PrivateIpAddress, 'instance_id': item.InstanceId}] }}" +# loop: "{{ __sap_ha_cluster_aws_describe_instances.stdout }}" +# loop_control: +# label: "{{ item.PrivateIpAddress }}" +# run_once: true +# check_mode: false diff --git a/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml b/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml deleted file mode 100644 index 70a9255e4..000000000 --- a/roles/sap_ha_cluster/tasks/preconfigure_platform_aws.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -# Requirement to enable the fencing resource to function. - -- name: "SAP HA Cluster - Create awscli config directory" - ansible.builtin.file: - mode: 0755 - owner: root - path: /root/.aws - state: directory - -- name: "SAP HA Cluster - Create awscli config" - ansible.builtin.blockinfile: - backup: true - block: | - [default] - region = {{ sap_ha_cluster_aws_region }} - create: true - mode: 0600 - owner: root - path: /root/.aws/config - -- name: "SAP HA Cluster - Store awscli credentials" - ansible.builtin.blockinfile: - backup: true - block: | - [default] - aws_access_key_id = {{ sap_ha_cluster_aws_access_key_id }} - aws_secret_access_key = {{ sap_ha_cluster_aws_secret_access_key }} - create: true - mode: 0600 - owner: root - path: /root/.aws/credentials - -- name: "SAP HA Cluster - Get VPC info" - ansible.builtin.shell: | - aws ec2 describe-vpcs \ - --output text \ - --filters "Name=tag:Name,Values={{ sap_ha_cluster_aws_vpc }}" \ - --query 'Vpcs[*].VpcId' - register: __sap_ha_cluster_aws_describe_vpcs - changed_when: false - run_once: true - check_mode: false - -- name: "SAP HA Cluster - Get instances info" - ansible.builtin.shell: | - aws ec2 describe-instances \ - --output json \ - --query 'Reservations[].Instances[]' - register: __sap_ha_cluster_aws_describe_instances - changed_when: false - run_once: true - check_mode: false - -- name: "SAP HA Cluster - Combine instance info into a dictionary" - ansible.builtin.set_fact: - __sap_ha_cluster_aws_instances: "{{ __sap_ha_cluster_aws_instances + [{'private_ip': item.PrivateIpAddress, 'instance_id': item.InstanceId}] }}" - loop: "{{ __sap_ha_cluster_aws_describe_instances.stdout }}" - loop_control: - label: "{{ item.PrivateIpAddress }}" - run_once: true - check_mode: false diff --git a/roles/sap_ha_cluster/vars/Platform_aws.yml b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml similarity index 91% rename from roles/sap_ha_cluster/vars/Platform_aws.yml rename to roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml index 720eda278..3a1c5af03 100644 --- a/roles/sap_ha_cluster/vars/Platform_aws.yml +++ b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml @@ -1,12 +1,12 @@ --- -# Variables specific on AWS cloud platform +# Variables specific on AWS EC2 cloud platform # # TODO: make sure to first respect 'ha_cluster' native variables sap_ha_cluster_fence_agent_packages: - fence-agents-aws -sap_ha_cluster_extra_packages: +sap_ha_cluster_platform_extra_packages: - awscli __sap_ha_cluster_repos: @@ -24,7 +24,7 @@ __sap_ha_cluster_aws_instances: [] # sap_ha_cluster_aws_vpc: # TODO: construct parameter -#__sap_ha_cluster_pcmk_host_map +# __sap_ha_cluster_pcmk_host_map ha_cluster_resource_primitives: - id: res_fence_aws diff --git a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml index 2dd091692..c9daf7497 100644 --- a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml +++ b/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml @@ -6,6 +6,6 @@ sap_ha_cluster_fence_agent_packages: - fence-agents-ibm-vpc -#__sap_ha_cluster_repos: +# __sap_ha_cluster_repos: # - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rhui-rpms" # name: High Availability From e9162bb18e9a14aaa2fe5ea8a78f024e4f96a29c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 30 Sep 2022 13:18:25 +0200 Subject: [PATCH 208/375] preconfigure roles: add links to beautify scripts to ./tests --- roles/sap_general_preconfigure/tests/beautify-assert-output.sh | 1 + roles/sap_hana_preconfigure/tests/beautify-assert-output.sh | 1 + roles/sap_netweaver_preconfigure/tests/beautify-assert-output.sh | 1 + 3 files changed, 3 insertions(+) create mode 120000 roles/sap_general_preconfigure/tests/beautify-assert-output.sh create mode 120000 roles/sap_hana_preconfigure/tests/beautify-assert-output.sh create mode 120000 roles/sap_netweaver_preconfigure/tests/beautify-assert-output.sh diff --git a/roles/sap_general_preconfigure/tests/beautify-assert-output.sh b/roles/sap_general_preconfigure/tests/beautify-assert-output.sh new file mode 120000 index 000000000..9a2e97612 --- /dev/null +++ b/roles/sap_general_preconfigure/tests/beautify-assert-output.sh @@ -0,0 +1 @@ +../tools/beautify-assert-output.sh \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/tests/beautify-assert-output.sh b/roles/sap_hana_preconfigure/tests/beautify-assert-output.sh new file mode 120000 index 000000000..9a2e97612 --- /dev/null +++ b/roles/sap_hana_preconfigure/tests/beautify-assert-output.sh @@ -0,0 +1 @@ +../tools/beautify-assert-output.sh \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/tests/beautify-assert-output.sh b/roles/sap_netweaver_preconfigure/tests/beautify-assert-output.sh new file mode 120000 index 000000000..9a2e97612 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tests/beautify-assert-output.sh @@ -0,0 +1 @@ +../tools/beautify-assert-output.sh \ No newline at end of file From 1ce40374ef5476b5e8f790093481b6934a6a9550 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 15:12:52 +0200 Subject: [PATCH 209/375] sap_ha_cluster: made every entry optional and fixed whitespaces --- .../templates/cluster_create_config.j2 | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 index 56210f704..11d0f0cd7 100644 --- a/roles/sap_ha_cluster/templates/cluster_create_config.j2 +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -7,46 +7,64 @@ # The name of the cluster ha_cluster_cluster_name: {{ __sap_ha_cluster_cluster_name }} -# +{% if __sap_ha_cluster_cluster_properties is defined and __sap_ha_cluster_cluster_properties|length > 0 %} +# Properties that enable and control cluster behavior ha_cluster_cluster_properties: {{ __sap_ha_cluster_cluster_properties | to_nice_yaml(indent=2) }} +{%- endif %} -# +{% if __sap_ha_cluster_constraints_colocation is defined and __sap_ha_cluster_constraints_colocation|length > 0 %} +# Definition of resources which depend on other resources ha_cluster_constraints_colocation: {{ __sap_ha_cluster_constraints_colocation | to_nice_yaml(indent=2) }} +{%- endif -%} {% if __sap_ha_cluster_constraints_location is defined and __sap_ha_cluster_constraints_location|length > 0 %} -# +# Definition of resources which have specific location dependencies or preferences ha_cluster_constraints_location: {{ __sap_ha_cluster_constraints_location | to_nice_yaml(indent=2) }} -{% endif -%} +{%- endif %} -# +{% if __sap_ha_cluster_constraints_order is defined and __sap_ha_cluster_constraints_order|length > 0 %} +# Definition of an order in which resources must be started. +# They are automatically stopped in reverse order. ha_cluster_constraints_order: {{ __sap_ha_cluster_constraints_order | to_nice_yaml(indent=2) }} +{%- endif %} -# +{% if __sap_ha_cluster_extra_packages is defined and __sap_ha_cluster_extra_packages|length > 0 %} +# Extra packages that are needed for this HA environment ha_cluster_extra_packages: -{{ sap_ha_cluster_extra_packages + sap_ha_cluster_sap_extra_packages | default([]) + sap_ha_cluster_platform_extra_packages | default([]) | to_nice_yaml(indent=2) }} +{{ __sap_ha_cluster_extra_packages | to_nice_yaml(indent=2) }} +{%- endif %} -# +{% if sap_ha_cluster_fence_agent_packages is defined and sap_ha_cluster_fence_agent_packages|length > 0 %} +# Fence agent package(s) for this HA environment ha_cluster_fence_agent_packages: {{ sap_ha_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} +{%- endif %} -# +{% if __sap_ha_cluster_repos is defined and __sap_ha_cluster_repos|length > 0 %} +# Definition of repositories to enable (if disable) to ensure +# access to all required packages __ha_cluster_repos: {{ __sap_ha_cluster_repos | to_nice_yaml(indent=2) }} +{%- endif %} -# +{% if __sap_ha_cluster_resource_clones is defined and __sap_ha_cluster_resource_clones|length > 0 %} +# Definition of resources that are cloned and monitored on all nodes ha_cluster_resource_clones: {{ __sap_ha_cluster_resource_clones | to_nice_yaml(indent=2) }} +{%- endif %} -{%- if __sap_ha_cluster_resource_groups is defined and __sap_ha_cluster_resource_groups|length > 0 %} -# +{% if __sap_ha_cluster_resource_groups is defined and __sap_ha_cluster_resource_groups|length > 0 %} +# Definition of resources that are grouped together ha_cluster_resource_groups: {{ __sap_ha_cluster_resource_groups | to_nice_yaml(indent=2) }} -{% endif %} +{%- endif %} -# +{% if __sap_ha_cluster_resource_primitives is defined and __sap_ha_cluster_resource_primitives|length > 0 %} +# Definition of all cluster resources ha_cluster_resource_primitives: {{ __sap_ha_cluster_resource_primitives | to_nice_yaml(indent=2) }} +{%- endif %} From c14bce6d278ae550e2f6223e054fcfcfbddb78fe Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 15:21:42 +0200 Subject: [PATCH 210/375] sap_ha_cluster: additional parameter is required for srHook config after cluster setup --- roles/sap_ha_cluster/meta/argument_specs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index b31a26427..53f5e2035 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -127,6 +127,13 @@ argument_specs: - scaleup - scaleout + sap_hana_cluster_nodes: + description: + - List of cluster nodes and associated attributes (in dictionary format). + - This is required for the srHook configuration. + type: list + required: true + sap_hana_instance_number: description: - The instance number of the SAP HANA database which is role will configure in the cluster. From b297addde7b5358ac9dd0622ff248b2c2d827b9b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 16:49:08 +0200 Subject: [PATCH 211/375] sap_ha_cluster: combine cluster properties collection in one task --- .../tasks/construct_vars_stonith.yml | 51 ++++++------------- 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index ca84eedfe..8e512ec06 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -2,48 +2,27 @@ # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. -- name: "SAP HA Cluster - Add to cluster properties: stonith-enabled" - ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __stonith_enabled}] }}" - vars: - __stonith_enabled: - - name: stonith-enabled - value: true - when: - - (__stonith_enabled | map(attribute='name') | join('')) not in - (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - -- name: "SAP HA Cluster - Add to cluster properties: stonith-timeout" - ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __stonith_timeout}] }}" - vars: - __stonith_timeout: - - name: stonith-timeout - value: 900 +- name: "SAP HA Cluster - Define cluster properties" when: - - (__stonith_timeout | map(attribute='name') | join('')) not in + - item.name not in (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) - -- name: "SAP HA Cluster - Add to cluster properties: concurrent-fencing" ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': __concurrent_fencing}] }}" - vars: - __concurrent_fencing: - - name: concurrent-fencing - value: true - when: - - (__concurrent_fencing | map(attribute='name') | join('')) not in - (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': item}] }}" + loop_control: + label: "{{ item.name }}" + loop: + - name: stonith-enabled + value: true + - name: stonith-timeout + value: 900 + - name: concurrent-fencing + value: true # The STONITH resource is an element in the cluster_resource_primitives list - name: "SAP HA Cluster - Construct stonith resources definition" - ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + __stonith_resources }}" - vars: - # Take from SAP role list parameter in inventory for custom stonith resource config. - # There is no separate stonith resource parameter in the 'ha_cluster' role. - __stonith_resources: "{{ sap_ha_cluster_stonith_resources }}" - no_log: true # stonith resources usually contain secrets when: - sap_ha_cluster_stonith_resources is defined - sap_ha_cluster_stonith_resources is iterable + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + sap_ha_cluster_stonith_resources }}" + #no_log: true # stonith resources usually contain secrets From 927e7fd4310f3a5a03d00673fe5932131bbeb927 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 16:51:03 +0200 Subject: [PATCH 212/375] sap_ha_cluster: pcmk_host_map variable construction for AWS --- .../tasks/ascertain_platform_type.yml | 18 ++++++++++++++---- .../vars/Platform_amazon_ec2.yml | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index a21dc548d..2fcd98da0 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -18,10 +18,20 @@ # ansible_product_name: "r5.8xlarge" # ansible_system_vendor: "Amazon EC2" -# TODO: smarter detection based on multiple facts and providing one standard +# TODO: detection based on multiple facts and providing one standard # name for use as platform type in related include files -- name: "SAP HA Cluster - Set platform type based on Ansible facts" +# TODO: workaround, pcmk_host_map must be defined before stonith vars are built +# Mapping will probably be different on non-AWS platforms. To be adjusted... +- name: "SAP HA Cluster - Construct pcmk_host_map for stonith" + when: (ansible_system_vendor | lower | replace(' ', '_')) == "amazon_ec2" ansible.builtin.set_fact: - __sap_ha_cluster_vm_asset_tag: "{{ ansible_facts.node.ansible_chassis_asset_tag | default('NA') }}" - # __sap_ha_cluster_platform_type: + __sap_ha_cluster_pcmk_host_map: >- + {% for entry in sap_hana_cluster_nodes -%} + {% for host in ansible_play_hosts -%} + {% if hostvars[host].ansible_hostname == entry.node_name -%} + {{ entry.node_name }}:{{ hostvars[host].ansible_board_asset_tag }} + {%- if not loop.last %};{% endif %} + {%- endif %} + {%- endfor %} + {%- endfor %} diff --git a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml index 3a1c5af03..cf2bb7529 100644 --- a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml +++ b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml @@ -26,7 +26,7 @@ __sap_ha_cluster_aws_instances: [] # TODO: construct parameter # __sap_ha_cluster_pcmk_host_map -ha_cluster_resource_primitives: +sap_ha_cluster_stonith_resources: - id: res_fence_aws agent: "stonith:fence_aws" instance_attrs: @@ -38,7 +38,7 @@ ha_cluster_resource_primitives: - name: region value: "{{ sap_ha_cluster_aws_region }}" - name: pcmk_host_map - value: "{{ __sap_ha_cluster_pcmk_host_map }}" + value: "{{ __sap_ha_cluster_pcmk_host_map | quote }}" - name: pcmk_reboot_retries value: "{{ sap_ha_cluster_fence_reboot_retries }}" - name: pcmk_reboot_timeout From 0c2bd03bb2e87b96bc1cf98b1cffff739f654ed9 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 30 Sep 2022 19:57:18 +0200 Subject: [PATCH 213/375] sap_ha_cluster: fence package vars fixes and a few when lines moved --- .../tasks/construct_vars_common.yml | 8 ++++++ .../tasks/construct_vars_stonith.yml | 2 +- roles/sap_ha_cluster/tasks/main.yml | 27 +++++++++---------- .../templates/cluster_create_config.j2 | 4 +-- roles/sap_ha_cluster/vars/main.yml | 3 +++ 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index 6218fe0ae..a597378f8 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -19,3 +19,11 @@ + sap_ha_cluster_platform_extra_packages | default([]) }}" + +- name: "SAP HA Cluster - Combine fence agent packages lists" + ansible.builtin.set_fact: + __sap_ha_cluster_fence_agent_packages: "{{ + sap_ha_cluster_fence_agent_packages + + + __sap_ha_cluster_fence_agent_packages + }}" diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 8e512ec06..067feb5d9 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -25,4 +25,4 @@ - sap_ha_cluster_stonith_resources is iterable ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + sap_ha_cluster_stonith_resources }}" - #no_log: true # stonith resources usually contain secrets + no_log: true # stonith resources usually contain secrets diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 10618b0ee..c90920c43 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -65,6 +65,7 @@ # Include vars files based on the environment. # Respect order for potential variable precedence. - name: "SAP HA Cluster - Set platform/version specific variables" + when: __sap_ha_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: - "{{ ansible_facts['os_family'] }}.yml" @@ -80,7 +81,6 @@ - "Platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" - when: __sap_ha_cluster_vars_file is file - name: "SAP HA Cluster - Include common variable construction tasks" ansible.builtin.import_tasks: construct_vars_common.yml @@ -93,24 +93,22 @@ file: construct_vars_hana_common.yml - name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-up" + when: sap_ha_cluster_sap_type == 'scaleup' ansible.builtin.include_tasks: file: construct_vars_hana_scaleup.yml - when: sap_ha_cluster_sap_type == 'scaleup' - name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-out" + when: sap_ha_cluster_sap_type == 'scaleout' ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml - when: sap_ha_cluster_sap_type == 'scaleout' - name: "SAP HA Cluster - Block with actual changes" - when: - - not sap_ha_cluster_create_config_only + when: not sap_ha_cluster_create_config_only block: # Start with prerequisite changes for certain platforms, if applicable - name: "SAP HA Cluster - Include platform specific fencing prerequisites" - when: - - __sap_ha_cluster_platform_file is file + when: __sap_ha_cluster_platform_file is file ansible.builtin.include_tasks: file: "{{ item }}" loop: @@ -141,6 +139,9 @@ failed_when: false - name: "SAP HA Cluster - Create backup of existing CIB" + when: + - __sap_ha_cluster_cib_query.stdout is defined + - __sap_ha_cluster_cib_query.stdout|length > 0 ansible.builtin.copy: # noqa template-instead-of-copy backup: true content: "{{ __sap_ha_cluster_cib_query.stdout }}" @@ -148,9 +149,6 @@ group: root owner: root mode: 0600 - when: - - __sap_ha_cluster_cib_query.stdout is defined - - __sap_ha_cluster_cib_query.stdout|length > 0 # Cluster installation and configuration through the dedicated # linux system role 'ha_cluster' @@ -186,12 +184,12 @@ check_mode: false - name: "SAP HA Cluster - Update resource default attributes" + when: + - item.name ~ '=' ~ item.value not in __sap_ha_cluster_check_resource_defaults.stdout ansible.builtin.command: cmd: pcs resource defaults update {{ item.name }}={{ item.value }} loop: "{{ sap_ha_cluster_resource_defaults }}" run_once: true - when: - - item.name ~ '=' ~ item.value not in __sap_ha_cluster_check_resource_defaults.stdout - name: "SAP HA Cluster - Include srHook configuration" ansible.builtin.include_tasks: @@ -214,17 +212,18 @@ # their user provided variables? - name: "SAP HA Cluster - Create cluster configuration parameters file" + when: sap_ha_cluster_create_config_dest is defined ansible.builtin.template: backup: true dest: "{{ sap_ha_cluster_create_config_dest }}" mode: 0600 src: cluster_create_config.j2 + trim_blocks: true + lstrip_blocks: true delegate_to: localhost run_once: true become: false check_mode: false - when: - - sap_ha_cluster_create_config_dest is defined - name: "SAP HA Cluster - Display configuration parameters SAVE FILE location" ansible.builtin.debug: diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 index 11d0f0cd7..e567d611d 100644 --- a/roles/sap_ha_cluster/templates/cluster_create_config.j2 +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -38,10 +38,10 @@ ha_cluster_extra_packages: {{ __sap_ha_cluster_extra_packages | to_nice_yaml(indent=2) }} {%- endif %} -{% if sap_ha_cluster_fence_agent_packages is defined and sap_ha_cluster_fence_agent_packages|length > 0 %} +{% if __sap_ha_cluster_fence_agent_packages is defined and __sap_ha_cluster_fence_agent_packages|length > 0 %} # Fence agent package(s) for this HA environment ha_cluster_fence_agent_packages: -{{ sap_ha_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} +{{ __sap_ha_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} {%- endif %} {% if __sap_ha_cluster_repos is defined and __sap_ha_cluster_repos|length > 0 %} diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index da5077fde..eb3e574f7 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -34,3 +34,6 @@ __sap_ha_cluster_repos: [] __sap_ha_cluster_resource_primitives: [] __sap_ha_cluster_resource_groups: [] __sap_ha_cluster_resource_clones: [] + +# Predefine host_map for variable construction +__sap_ha_cluster_pcmk_host_map: From 8122cc75cfbeeab319d977b8984f15ecc3ae617b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 10:24:53 +0200 Subject: [PATCH 214/375] sap_ha_cluster: vip integration on aws and more optional parameters for res names --- roles/sap_ha_cluster/defaults/main.yml | 13 +++- .../tasks/ascertain_platform_type.yml | 5 +- .../tasks/construct_vars_hana_common.yml | 59 ++------------ .../construct_vars_vip_resources_aws.yml | 76 +++++++++++++++++++ .../construct_vars_vip_resources_default.yml | 51 +++++++++++++ .../tasks/include_construct_vip_resources.yml | 23 ++++++ roles/sap_ha_cluster/tasks/main.yml | 21 ++--- .../vars/Platform_amazon_ec2.yml | 9 ++- roles/sap_ha_cluster/vars/main.yml | 5 +- 9 files changed, 193 insertions(+), 69 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml create mode 100644 roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml create mode 100644 roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 2d70a0855..a6e4f6393 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -12,7 +12,6 @@ sap_ha_cluster_create_config_dest: sap_ha_cluster_resource_config.yml sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" sap_ha_cluster_hana_sid: "{{ sap_hana_sid }}" sap_ha_cluster_hana_instance_number: "{{ sap_hana_instance_number }}" -sap_ha_cluster_hana_instance_vip: "{{ sap_hana_vip }}" # Make sure that there is always the default fed into the included role sap_ha_cluster_fence_agent_packages: @@ -46,3 +45,15 @@ sap_ha_cluster_prefer_site_takeover: true sap_ha_cluster_fence_power_timeout: 240 sap_ha_cluster_fence_reboot_retries: 4 sap_ha_cluster_fence_reboot_timeout: 400 + +### Resource default patterns +sap_ha_cluster_vip_address: "{{ sap_hana_vip }}" +sap_ha_cluster_vip_interface: "eth0" +sap_ha_cluster_vip_resource_agent: "ocf:heartbeat:IPaddr2" +sap_ha_cluster_vip_resource_name: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + +# Resource IDs (names) as convenience parameters. +sap_ha_cluster_hana_resource_name: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" +sap_ha_cluster_hana_resource_clone_name: "{{ sap_ha_cluster_hana_resource_name }}-clone" +sap_ha_cluster_hana_topology_resource_name: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" +sap_ha_cluster_hana_topology_resource_clone_name: "{{ sap_ha_cluster_hana_topology_resource_name }}-clone" diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index 2fcd98da0..985daefc7 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -31,7 +31,4 @@ {% for host in ansible_play_hosts -%} {% if hostvars[host].ansible_hostname == entry.node_name -%} {{ entry.node_name }}:{{ hostvars[host].ansible_board_asset_tag }} - {%- if not loop.last %};{% endif %} - {%- endif %} - {%- endfor %} - {%- endfor %} + {%- if not loop.last %};{% endif %}{%- endif %}{%- endfor %}{%- endfor %} diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 0c30214c6..de30a0c2b 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -14,7 +14,7 @@ __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_topology] }}" vars: __resource_topology: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + id: "{{ sap_ha_cluster_hana_topology_resource_name }}" agent: "ocf:heartbeat:SAPHanaTopology" instance_attrs: - attrs: @@ -45,7 +45,7 @@ __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_hana] }}" vars: __resource_hana: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + id: "{{ sap_ha_cluster_hana_resource_name }}" agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" instance_attrs: - attrs: @@ -95,27 +95,12 @@ when: - __resource_hana.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) -# TODO: change logic to allow multiple VIP resources and constraints -- name: "SAP HA Cluster - Add resource: SAP HANA VIP" - ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" - vars: - __resource_vip: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - agent: "ocf:heartbeat:IPaddr2" - instance_attrs: - - attrs: - - name: ip - value: "{{ sap_ha_cluster_hana_instance_vip }}" - when: - - __resource_vip.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) - - name: "SAP HA Cluster - Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_topology] }}" vars: __clone_topology: - resource_id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + resource_id: "{{ sap_ha_cluster_hana_topology_resource_name }}" promotable: "no" meta_attrs: - attrs: @@ -133,7 +118,7 @@ __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_hana] }}" vars: __clone_hana: - resource_id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" + resource_id: "{{ sap_ha_cluster_hana_resource_name }}" promotable: "yes" meta_attrs: - attrs: @@ -153,45 +138,13 @@ vars: __constraint_order_topology: resource_first: - id: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + id: "{{ sap_ha_cluster_hana_topology_resource_clone_name }}" action: start resource_then: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" action: start options: - name: symmetrical value: "false" when: - __constraint_order_topology.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - -# Start the VIP only after the HANA resource has been promoted -- name: "SAP HA Cluster - Add order constraint: VIP starts after DB is promoted" - ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" - vars: - __constraint_order_vip: - resource_first: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - action: promote - resource_then: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - action: start - when: - - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - -# The VIP only runs where HANA is promoted -- name: "SAP HA Cluster - Add colocation constraint: VIP runs where HANA is promoted" - ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" - vars: - __constraint_colo_vip: - resource_leader: - id: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}-clone" - role: promoted - resource_follower: - id: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}_MASTER" - options: - - name: score - value: 2000 - when: - - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml new file mode 100644 index 000000000..1ee02eac7 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml @@ -0,0 +1,76 @@ +--- +# Reminder: This file is included in a loop over a dictionary. + +- name: "SAP HA Cluster - Add resource: VIP for {{ vip_list_item.key }}" + when: + - sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + vars: + __resource_vip: + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "ocf:heartbeat:IPaddr2" + instance_attrs: + - attrs: + - name: ip + value: "{{ vip_list_item.value }}" + +- name: "SAP HA Cluster - Add resource: Private IP for {{ vip_list_item.key }}" + when: + - ('pri' ~ sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + vars: + __resource_vip: + id: "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "ocf:heartbeat:awsvip" + instance_attrs: + - attrs: + - name: secondary_private_ip + value: "{{ vip_list_item.value }}" + +- name: "SAP HA Cluster - Add resource group: {{ sap_ha_cluster_vip_resource_group_name }}" + when: + - __vip_group.id is not in (__sap_ha_cluster_resource_groups | map(attribute='id')) + ansible.builtin.set_fact: + __sap_ha_cluster_resource_groups: "{{ __sap_ha_cluster_resource_groups + [__vip_group] }}" + vars: + __vip_group: + id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + resource_ids: + - "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + - "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + +# Start the VIP(s) only after the HANA resource has been promoted +- name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" + when: + - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key == 'primary' + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + vars: + __constraint_order_vip: + resource_first: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + action: promote + resource_then: + id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + action: start + +# The VIP only runs where HANA is promoted +- name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" + when: + - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key == 'primary' + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + vars: + __constraint_colo_vip: + resource_leader: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + role: promoted + resource_follower: + id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml new file mode 100644 index 000000000..5415e51fd --- /dev/null +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml @@ -0,0 +1,51 @@ +--- +# Reminder: This file is included in a loop over a dictionary. + +# VIP resource definition itself +- name: "SAP HA Cluster - Add resource: VIP {{ sap_ha_clluster_vip_address.key }}" + when: + - sap_ha_cluster_vip_resource_name ~ '_' ~ sap_ha_cluster_vip_address.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + vars: + __resource_vip: + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + agent: "{{ sap_ha_cluster_vip_resource_agent }}" + instance_attrs: + attrs: + - name: ip + value: "{{ vip_list_item }}" + +# Start the VIP(s) only after the HANA resource has been promoted +- name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" + when: + - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key == 'primary' + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + vars: + __constraint_order_vip: + resource_first: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + action: promote + resource_then: + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + action: start + +# The VIP only runs where HANA is promoted +- name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" + when: + - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key == 'primary' + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + vars: + __constraint_colo_vip: + resource_leader: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + role: promoted + resource_follower: + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + options: + - name: score + value: 2000 diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml new file mode 100644 index 000000000..88757d7a8 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -0,0 +1,23 @@ +--- +# The VIP resource construction files are included in a loop to allow +# for multiple IPs to be configured in cluster resources + +- name: "SAP HA Cluster - Include variable construction for VIP resources" + when: + - __sap_ha_cluster_cloud_platform | length == '0' + - (vip_list_item.value is defined) and (vip_list_item.value != '') + ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml + loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" + loop_control: + index_var: loop_index + loop_var: vip_list_item + +- name: "SAP HA Cluster - Include variable construction for VIP resources on AWS" + when: + - __sap_ha_cluster_cloud_platform == 'aws' + - (vip_list_item.value is defined) and (vip_list_item.value != '') + ansible.builtin.include_tasks: construct_vars_vip_resources_aws.yml + loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" + loop_control: + index_var: loop_index + loop_var: vip_list_item diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index c90920c43..a7b1eaad8 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -88,6 +88,9 @@ - name: "SAP HA Cluster - Include variable construction for STONITH resources" ansible.builtin.import_tasks: construct_vars_stonith.yml +- name: "SAP HA Cluster - Include variable construction for VIP resources" + ansible.builtin.include_tasks: include_construct_vip_resources.yml + - name: "SAP HA Cluster - Include variable construction for SAP HANA common" ansible.builtin.include_tasks: file: construct_vars_hana_common.yml @@ -157,20 +160,20 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster - # no_log: true + no_log: true # some parameters contain secrets vars: - ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" - ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" - ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" - ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" - ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" - ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" - ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" + ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" + ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" - no_log: true # some parameters contain secrets + ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" + ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" + ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" + ha_cluster_resource_groups: "{{ __sap_ha_cluster_resource_groups }}" + ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" tags: ha_cluster # Resource defaults can currently not be updated through ha_cluster diff --git a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml index cf2bb7529..3b0630fd2 100644 --- a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml +++ b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml @@ -1,6 +1,13 @@ --- # Variables specific on AWS EC2 cloud platform -# +__sap_ha_cluster_cloud_platform: aws + +# New approach for VIP resource setup as per RH doc: +# - 2 resources of types IPaddr2 and awsvip +# - both in one resource group +# - colo and order constraints for the resource group +sap_ha_cluster_vip_resource_group_name: vipgroup + # TODO: make sure to first respect 'ha_cluster' native variables sap_ha_cluster_fence_agent_packages: diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index eb3e574f7..0cf6e2b9f 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -14,7 +14,10 @@ __sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', # Define empty parameters to avoid undefined input variables. # The arguments_spec check complains. # The actual values must be empty, they are set by various tasks! -# + +# cloud platform helper variable - leave empty for default = not cloud +__sap_ha_cluster_cloud_platform: + # ATTENTION: # Any variables for 'ha_cluster' which this SAP role supports/inherits should also # be added to From fce12e89c9f33e8b8d95a2dfaf721e43066aff93 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 10:30:56 +0200 Subject: [PATCH 215/375] sap_ha_cluster: fix triple quotes in config output .yml --- roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml index 3b0630fd2..d12547ec0 100644 --- a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml +++ b/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml @@ -45,7 +45,7 @@ sap_ha_cluster_stonith_resources: - name: region value: "{{ sap_ha_cluster_aws_region }}" - name: pcmk_host_map - value: "{{ __sap_ha_cluster_pcmk_host_map | quote }}" + value: "{{ __sap_ha_cluster_pcmk_host_map }}" - name: pcmk_reboot_retries value: "{{ sap_ha_cluster_fence_reboot_retries }}" - name: pcmk_reboot_timeout From 1142165781a19a24bf7ed837243f33c5795b0629 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 08:38:36 +0000 Subject: [PATCH 216/375] sap_ha_cluster: fixed conditional for non-cloud --- roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index 88757d7a8..ca031e46d 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -4,7 +4,7 @@ - name: "SAP HA Cluster - Include variable construction for VIP resources" when: - - __sap_ha_cluster_cloud_platform | length == '0' + - __sap_ha_cluster_cloud_platform == '' - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" From 9d0947269f306b4ce77da4e14311742ba4af6694 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 12:47:55 +0000 Subject: [PATCH 217/375] sap_ha_cluster: updated arguments spec and made hana resource var names more clear --- roles/sap_ha_cluster/defaults/main.yml | 9 +- roles/sap_ha_cluster/meta/argument_specs.yml | 174 +++++++++++++----- .../tasks/construct_vars_hana_common.yml | 10 +- 3 files changed, 136 insertions(+), 57 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index a6e4f6393..6376bd5ba 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -31,13 +31,13 @@ sap_ha_cluster_resource_defaults: # sap_ha_cluster_sap_type: "" sap_ha_cluster_replication_type: none -# Optional parameters to customize resource parameters +# Optional parameters to customize HANA resources # AUTOMATED_REGISTER -sap_ha_cluster_automated_register: true +sap_ha_cluster_hana_automated_register: true # DUPLICATE_PRIMARY_TIMEOUT -sap_ha_cluster_duplicate_primary_timeout: 900 +sap_ha_cluster_hana_duplicate_primary_timeout: 900 # PREFER_SITE_TAKEOVER -sap_ha_cluster_prefer_site_takeover: true +sap_ha_cluster_hana_prefer_site_takeover: true ### stonith resource parameter defaults # not all of the defined variables will be needed for all fence types @@ -48,7 +48,6 @@ sap_ha_cluster_fence_reboot_timeout: 400 ### Resource default patterns sap_ha_cluster_vip_address: "{{ sap_hana_vip }}" -sap_ha_cluster_vip_interface: "eth0" sap_ha_cluster_vip_resource_agent: "ocf:heartbeat:IPaddr2" sap_ha_cluster_vip_resource_name: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 53f5e2035..2858c13c3 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -11,14 +11,20 @@ argument_specs: options: # Take this template and copy it to the desired place. +# Add content and remove placeholders that are not needed. # Ideally sort by key (variable name) alphabetically. # # sap_ha_cluster_ +# alias: +# default: # description: # - -# type: # required: false -# default: +# type: +# options: # additional options for lists and dicts +# : +# description: +# ... ha_cluster: description: @@ -26,132 +32,206 @@ argument_specs: - Definition of node name and IP addresses to be used for the pacemaker cluster. - Required for resilient node communication by providing more than one corosync IP. - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses - type: dict required: false + type: dict options: + corosync_addresses: + description: + - List of IP addresses used by Corosync. + - All nodes must have the same number of addresses. + - The order of the listed addresses matters. + type: list node_name: + default: description: - The name of the node in the cluster. - default: type: str pcs_address: + default: description: - An address used by pcs to communicate with the node. - Can be a name, FQDN or IP address and can contain a port. - default: type: str - corosync_addresses: - description: - - List of IP addresses used by Corosync. - - All nodes must have the same number of addresses. - - The order of the listed addresses matters. - type: list ha_cluster_cluster_name: + alias: sap_ha_cluster_cluster_name + default: my-cluster description: - The name of the pacemaker cluster. - type: str required: false - default: my-cluster - alias: sap_ha_cluster_cluster_name + type: str ha_cluster_hacluster_password: + alias: sap_hana_hacluster_password description: - The password of the `hacluster` user which is created during pacemaker installation. - type: str - required: true no_log: true - alias: sap_hana_hacluster_password + required: true + type: str - sap_ha_cluster_automated_register: + sap_ha_cluster_aws_region: description: - - Define if a former primary should be re-registered automatically as secondary. - type: bool + - The AWS region in which the instances to be used for the cluster setup are located. + - Required for cluster nodes setup on Amazon cloud. required: false - default: true + type: str + + sap_ha_cluster_aws_access_key_id: + description: + - AWS access key to allow control of instances (for example for fencing operations). + - Required for cluster nodes setup on Amazon cloud. + required: false + type: str + + sap_ha_cluster_aws_secret_access_key: + description: + - AWS secret key, paired with the access key for instance control. + - Required for cluster nodes setup on Amazon cloud. + required: false + type: str sap_ha_cluster_create_config_dest: + default: sap_ha_cluster_resource_config.yml description: - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. - Specify a path/filename to save the file elsewhere. - type: str required: false - default: sap_ha_cluster_resource_config.yml + type: str sap_ha_cluster_create_config_only: + default: false description: - Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role. - The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role. - WARNING! This report may include sensitive details like secrets required for certain cluster resources! + required: false type: bool + + sap_ha_cluster_fence_power_timeout: + default: 240 + description: + - STONITH resource parameter to test X seconds for status change after ON/OFF. required: false - default: false + type: int - sap_ha_cluster_duplicate_primary_timeout: + sap_ha_cluster_fence_reboot_retries: + default: 4 description: - - Time difference needed between to primary time stamps, if a dual-primary situation occurs. - - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. - - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. + - STONITH resource parameter to define how often it retries to restart a node. + required: false type: int + + sap_ha_cluster_fence_reboot_timeout: + default: 400 + description: + - STONITH resource parameter to define after which timeout a node restart is returned as failed. required: false - default: 900 + type: int - sap_ha_cluster_prefer_site_takeover: + sap_ha_cluster_hana_automated_register: + default: true description: - - Set to "false" if the cluster should first attempt to restart the instance on the same node. - - When set to "true" (default) a failover to secondary will be initiated on resource failure. + - Define if a former primary should be re-registered automatically as secondary. + required: false type: bool + + sap_ha_cluster_hana_duplicate_primary_timeout: + default: 900 + description: + - Time difference needed between to primary time stamps, if a dual-primary situation occurs. + - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. + - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. required: false - default: true + type: int + + sap_ha_cluster_hana_prefer_site_takeover: choices: - true - false + default: true + description: + - Set to "false" if the cluster should first attempt to restart the instance on the same node. + - When set to "true" (default) a failover to secondary will be initiated on resource failure. + required: false + type: bool - sap_ha_cluster_replication_type: + sap_ha_cluster_hana_resource_name: + default: "SAPHana__" description: - - The type of SAP HANA site replication across multiple hosts. + - Customize the cluster resource name of the SAP HANA DB resource. + required: false type: str + + sap_ha_cluster_hana_topology_resource_name: + default: "SAPHanaTopology__" + description: + - Customize the cluster resource name of the SAP HANA Topology resource. required: false - default: none + type: str + + sap_ha_cluster_replication_type: choices: - mtr - none - - sap_ha_cluster_sap_type: + default: none description: - - The SAP landscape to be installed. - type: str + - The type of SAP HANA site replication across multiple hosts. required: false - default: scaleup + type: str + + sap_ha_cluster_sap_type: choices: - scaleup - scaleout + default: scaleup + description: + - The SAP landscape to be installed. + required: false + type: str sap_hana_cluster_nodes: description: - List of cluster nodes and associated attributes (in dictionary format). - This is required for the srHook configuration. - type: list + elements: str required: true + type: list sap_hana_instance_number: + alias: sap_ha_cluster_hana_instance_number description: - The instance number of the SAP HANA database which is role will configure in the cluster. - type: str required: true - alias: sap_ha_cluster_hana_instance_number + type: str sap_hana_sid: + alias: sap_ha_cluster_hana_sid description: - The SAP System ID of the instance that will be configured in the cluster. - The SAP SID must follow SAP specifications - see SAP Note 1979280. - type: str required: true - alias: sap_ha_cluster_hana_sid + type: str sap_hana_vip: description: - Virtual floating IP for SAP HANA DB connections. - This IP will always run on the promoted HANA node. - type: str required: true + type: dict + options: + primary: + aliases: + - main + - promoted + description: + - At least one Virtual IP is required to always reach the promoted SAP HANA DB. + required: true + type: str + secondary: + aliases: + - unpromoted + - readonly + description: + - An additional VIP can be used to run on a secondary node for read-only DB access. + required: false + type: str diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index de30a0c2b..09b9b00d6 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -53,12 +53,12 @@ value: "{{ sap_ha_cluster_hana_sid }}" - name: InstanceNumber value: "{{ sap_ha_cluster_hana_instance_number }}" - - name: PREFER_SITE_TAKEOVER - value: "{{ sap_ha_cluster_prefer_site_takeover | string }}" - - name: DUPLICATE_PRIMARY_TIMEOUT - value: "{{ sap_ha_cluster_duplicate_primary_timeout | string }}" - name: AUTOMATED_REGISTER - value: "{{ sap_ha_cluster_automated_register | string }}" + value: "{{ sap_ha_cluster_hana_automated_register | string }}" + - name: DUPLICATE_PRIMARY_TIMEOUT + value: "{{ sap_ha_cluster_hana_duplicate_primary_timeout | string }}" + - name: PREFER_SITE_TAKEOVER + value: "{{ sap_ha_cluster_hana_prefer_site_takeover | string }}" operations: - action: start attrs: From e9fe3f1e01d74c2a241edc1d0697aae9426d1de5 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 12:58:02 +0000 Subject: [PATCH 218/375] sap_ha_cluster: minor cosmetical changes --- roles/sap_ha_cluster/meta/argument_specs.yml | 1 + .../ascertain_ha_cluster_in_inventory.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 2858c13c3..1c3efc57a 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -36,6 +36,7 @@ argument_specs: type: dict options: corosync_addresses: + default: description: - List of IP addresses used by Corosync. - All nodes must have the same number of addresses. diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 4aace6b25..5da669759 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -9,46 +9,46 @@ # when: ha_cluster_ is defined - name: "SAP HA Cluster - Register ha_cluster_cluster_properties" + when: ha_cluster_cluster_properties is defined ansible.builtin.set_fact: __sap_ha_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" - when: ha_cluster_cluster_properties is defined - name: "SAP HA Cluster - Register ha_cluster_constraints_colocation" + when: ha_cluster_constraints_colocation is defined ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" - when: ha_cluster_constraints_colocation is defined - name: "SAP HA Cluster - Register ha_cluster_constraints_location" + when: ha_cluster_constraints_location is defined ansible.builtin.set_fact: __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" - when: ha_cluster_constraints_location is defined - name: "SAP HA Cluster - Register ha_cluster_constraints_order" + when: ha_cluster_constraints_order is defined ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" - when: ha_cluster_constraints_order is defined - name: "SAP HA Cluster - Register ha_cluster_fence_agent_packages" + when: ha_cluster_fence_agent_packages is defined ansible.builtin.set_fact: __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" - when: ha_cluster_fence_agent_packages is defined - name: "SAP HA Cluster - Register ha_cluster_repos" + when: ha_cluster_repos is defined ansible.builtin.set_fact: __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" - when: ha_cluster_repos is defined - name: "SAP HA Cluster - Register ha_cluster_resource_clones" + when: ha_cluster_resource_clones is defined ansible.builtin.set_fact: __sap_ha_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" - when: ha_cluster_resource_clones is defined - name: "SAP HA Cluster - Register ha_cluster_resource_groups" + when: ha_cluster_resource_groups is defined ansible.builtin.set_fact: __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" - when: ha_cluster_resource_groups is defined - name: "SAP HA Cluster - Register ha_cluster_resource_primitives" + when: ha_cluster_resource_primitives is defined ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" - when: ha_cluster_resource_primitives is defined From 3506762e38c733907f3109097559e551863d97ce Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 16:46:41 +0000 Subject: [PATCH 219/375] sap_ha_cluster: alternative readme format and added example code --- roles/sap_ha_cluster/README.md | 19 +- roles/sap_ha_cluster/README_alt.md | 238 +++++++++++++++++++ roles/sap_ha_cluster/meta/argument_specs.yml | 31 ++- 3 files changed, 280 insertions(+), 8 deletions(-) create mode 100644 roles/sap_ha_cluster/README_alt.md diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 78fd0954e..cbdcff9ba 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -30,16 +30,25 @@ Ansible Control System: | Variable Name | Required | Description | |---------------|----------|-------------| | **ha_cluster_hacluster_password**
Alias: sap_hana_hacluster_password
Type: str | **True** | The password of the `hacluster` user which is created during pacemaker installation. | +| **sap_hana_cluster_nodes**

Type: list | **True** | List of cluster nodes and associated attributes (in dictionary format).
This is required for the srHook configuration. | | **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | | **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| **sap_hana_vip**

Type: str | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | -| ha_cluster

Type: dict | False | Optional host_vars parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses | +| **sap_hana_vip**

Type: dict | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | +| ha_cluster

Type: dict | False | Optional **host_vars** parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses | | ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | -| sap_ha_cluster_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_aws_access_key_id

Type: str | False | AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud. | +| sap_ha_cluster_aws_region

Type: str | False | The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud. | +| sap_ha_cluster_aws_secret_access_key

Type: str | False | AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud. | | sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | | sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_fence_power_timeout

Type: int | False

Default: "240" | STONITH resource parameter to test X seconds for status change after ON/OFF. | +| sap_ha_cluster_fence_reboot_retries

Type: int | False

Default: "4" | STONITH resource parameter to define how often it retries to restart a node. | +| sap_ha_cluster_fence_reboot_timeout

Type: int | False

Default: "400" | STONITH resource parameter to define after which timeout a node restart is returned as failed. | +| sap_ha_cluster_hana_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | +| sap_ha_cluster_hana_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | +| sap_ha_cluster_hana_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | +| sap_ha_cluster_hana_resource_name

Type: str | False

Default: "SAPHana__" | Customize the cluster resource name of the SAP HANA DB resource. | +| sap_ha_cluster_hana_topology_resource_name

Type: str | False

Default: "SAPHanaTopology__" | Customize the cluster resource name of the SAP HANA Topology resource. | | sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | | sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | diff --git a/roles/sap_ha_cluster/README_alt.md b/roles/sap_ha_cluster/README_alt.md new file mode 100644 index 000000000..d491522cc --- /dev/null +++ b/roles/sap_ha_cluster/README_alt.md @@ -0,0 +1,238 @@ + +## Role Input Parameters + +### ha_cluster_hacluster_password required + +- _Alias:_ `sap_hana_hacluster_password` +- _Type:_ `str` + +The password of the `hacluster` user which is created during pacemaker installation.
+ +### sap_hana_cluster_nodes required + +- _Type:_ `list` + +List of cluster nodes and associated attributes (in dictionary format).
+This is required for the srHook configuration.
+ +```text +hana_site: + description: + - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). + - Required for HANA System Replication configuration. + required: true +node_name: + description: + - Name of the cluster node, should match the remote system's hostname. + required: true +node_role: + choices: + - primary + - secondary + description: + - Role of this node in the SAP cluster setup. + required: true +``` + +### sap_hana_instance_number required + +- _Alias:_ `sap_ha_cluster_hana_instance_number` +- _Type:_ `str` + +The instance number of the SAP HANA database which is role will configure in the cluster.
+ +### sap_hana_sid required + +- _Alias:_ `sap_ha_cluster_hana_sid` +- _Type:_ `str` + +The SAP System ID of the instance that will be configured in the cluster.
+The SAP SID must follow SAP specifications - see SAP Note 1979280.
+ +### sap_hana_vip required + +- _Type:_ `dict` + +Virtual floating IP for SAP HANA DB connections.
+This IP will always run on the promoted HANA node.
+ +```text +primary: + aliases: + - main + - promoted + description: + - At least one Virtual IP is required to always reach the promoted SAP HANA DB. + required: true + type: str +secondary: + aliases: + - readonly + - unpromoted + description: + - An additional VIP can be used to run on a secondary node for read-only DB access. + required: false + type: str +``` + + +### ha_cluster + +- _Type:_ `dict` + +Optional **host_vars** parameter, if defined it must be set for each node.
+Definition of node name and IP addresses to be used for the pacemaker cluster.
+Required for resilient node communication by providing more than one corosync IP.
+See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses
+ +```text +corosync_addresses: + default: + description: + - List of IP addresses used by Corosync. + - All nodes must have the same number of addresses. + - The order of the listed addresses matters. + type: list +node_name: + default: + description: + - The name of the node in the cluster. + type: str +pcs_address: + default: + description: + - An address used by pcs to communicate with the node. + - Can be a name, FQDN or IP address and can contain a port. + type: str +``` + +Example: +```yaml +ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA + pcs_address: nodeA +``` + +### ha_cluster_cluster_name + +- _Alias:_ `sap_ha_cluster_cluster_name` +- _Type:_ `str` +- _Default:_ `my-cluster` + +The name of the pacemaker cluster.
+ +### sap_ha_cluster_aws_access_key_id + +- _Type:_ `str` + +AWS access key to allow control of instances (for example for fencing operations).
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_aws_region + +- _Type:_ `str` + +The AWS region in which the instances to be used for the cluster setup are located.
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_aws_secret_access_key + +- _Type:_ `str` + +AWS secret key, paired with the access key for instance control.
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_create_config_dest + +- _Type:_ `str` +- _Default:_ `sap_ha_cluster_resource_config.yml` + +The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
+Specify a path/filename to save the file elsewhere.
+ +### sap_ha_cluster_create_config_only + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
+The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
+WARNING! This report may include sensitive details like secrets required for certain cluster resources!
+ +### sap_ha_cluster_fence_power_timeout + +- _Type:_ `int` +- _Default:_ `240` + +STONITH resource parameter to test X seconds for status change after ON/OFF.
+ +### sap_ha_cluster_fence_reboot_retries + +- _Type:_ `int` +- _Default:_ `4` + +STONITH resource parameter to define how often it retries to restart a node.
+ +### sap_ha_cluster_fence_reboot_timeout + +- _Type:_ `int` +- _Default:_ `400` + +STONITH resource parameter to define after which timeout a node restart is returned as failed.
+ +### sap_ha_cluster_hana_automated_register + +- _Type:_ `bool` +- _Default:_ `True` + +Define if a former primary should be re-registered automatically as secondary.
+ +### sap_ha_cluster_hana_duplicate_primary_timeout + +- _Type:_ `int` +- _Default:_ `900` + +Time difference needed between to primary time stamps, if a dual-primary situation occurs.
+If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
+This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
+ +### sap_ha_cluster_hana_prefer_site_takeover + +- _Type:_ `bool` +- _Default:_ `True` + +Set to "false" if the cluster should first attempt to restart the instance on the same node.
+When set to "true" (default) a failover to secondary will be initiated on resource failure.
+ +### sap_ha_cluster_hana_resource_name + +- _Type:_ `str` +- _Default:_ `SAPHana__` + +Customize the cluster resource name of the SAP HANA DB resource.
+ +### sap_ha_cluster_hana_topology_resource_name + +- _Type:_ `str` +- _Default:_ `SAPHanaTopology__` + +Customize the cluster resource name of the SAP HANA Topology resource.
+ +### sap_ha_cluster_replication_type + +- _Type:_ `str` +- _Default:_ `none` + +The type of SAP HANA site replication across multiple hosts.
+ +### sap_ha_cluster_sap_type + +- _Type:_ `str` +- _Default:_ `scaleup` + +The SAP landscape to be installed.
+ + diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 1c3efc57a..96f46043d 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -7,7 +7,7 @@ argument_specs: # in the current role namespace main: - short_description: SAP HA requirements + short_description: SAP HA automated cluster setup requirements options: # Take this template and copy it to the desired place. @@ -28,7 +28,7 @@ argument_specs: ha_cluster: description: - - Optional host_vars parameter, if defined it must be set for each node. + - Optional **host_vars** parameter, if defined it must be set for each node. - Definition of node name and IP addresses to be used for the pacemaker cluster. - Required for resilient node communication by providing more than one corosync IP. - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses @@ -54,6 +54,14 @@ argument_specs: - Can be a name, FQDN or IP address and can contain a port. type: str + example: + ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA + pcs_address: nodeA + ha_cluster_cluster_name: alias: sap_ha_cluster_cluster_name default: my-cluster @@ -197,6 +205,23 @@ argument_specs: elements: str required: true type: list + options: + node_name: + description: + - Name of the cluster node, should match the remote system's hostname. + required: true + node_role: + choices: + - primary + - secondary + description: + - Role of this node in the SAP cluster setup. + required: true + hana_site: + description: + - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). + - Required for HANA System Replication configuration. + required: true sap_hana_instance_number: alias: sap_ha_cluster_hana_instance_number @@ -230,8 +255,8 @@ argument_specs: type: str secondary: aliases: - - unpromoted - readonly + - unpromoted description: - An additional VIP can be used to run on a secondary node for read-only DB access. required: false From a5f86444b30982f54cb13be6c977b5e77112a297 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 16:48:57 +0000 Subject: [PATCH 220/375] sap_ha_cluster: added requirements to alternative readme --- roles/sap_ha_cluster/README_alt.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/roles/sap_ha_cluster/README_alt.md b/roles/sap_ha_cluster/README_alt.md index d491522cc..4cc9d619c 100644 --- a/roles/sap_ha_cluster/README_alt.md +++ b/roles/sap_ha_cluster/README_alt.md @@ -1,3 +1,29 @@ + +# sap_ha_cluster Ansible Role + +This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources. +The cluster setup is managed through the `ha_cluster` Linux System Role.
+`sap_ha_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. + + + + +## Requirements + +Target Systems: +- Supported OS: RHEL 8.4+ +- RHEL registration and access to High-Availability repository +- SAP Hana installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository + +Ansible Control System: +- Ansible 2.9+ +- `Linux System Roles` collection from either source: + - RHEL package: rhel-system-roles-1.16.2 + - Automation Hub: + - Ansible Galaxy: + + + ## Role Input Parameters From 4eb2b0921974e5cfeeda0fe9a65fe48cd136c84b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 5 Oct 2022 17:33:02 +0000 Subject: [PATCH 221/375] sap_ha_cluster: links to required parameters at the top --- roles/sap_ha_cluster/README_alt.md | 166 +++++++++++++---------------- 1 file changed, 76 insertions(+), 90 deletions(-) diff --git a/roles/sap_ha_cluster/README_alt.md b/roles/sap_ha_cluster/README_alt.md index 4cc9d619c..ddfbfd580 100644 --- a/roles/sap_ha_cluster/README_alt.md +++ b/roles/sap_ha_cluster/README_alt.md @@ -27,83 +27,16 @@ Ansible Control System: ## Role Input Parameters -### ha_cluster_hacluster_password required - -- _Alias:_ `sap_hana_hacluster_password` -- _Type:_ `str` - -The password of the `hacluster` user which is created during pacemaker installation.
- -### sap_hana_cluster_nodes required - -- _Type:_ `list` - -List of cluster nodes and associated attributes (in dictionary format).
-This is required for the srHook configuration.
- -```text -hana_site: - description: - - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). - - Required for HANA System Replication configuration. - required: true -node_name: - description: - - Name of the cluster node, should match the remote system's hostname. - required: true -node_role: - choices: - - primary - - secondary - description: - - Role of this node in the SAP cluster setup. - required: true -``` - -### sap_hana_instance_number required - -- _Alias:_ `sap_ha_cluster_hana_instance_number` -- _Type:_ `str` - -The instance number of the SAP HANA database which is role will configure in the cluster.
- -### sap_hana_sid required - -- _Alias:_ `sap_ha_cluster_hana_sid` -- _Type:_ `str` - -The SAP System ID of the instance that will be configured in the cluster.
-The SAP SID must follow SAP specifications - see SAP Note 1979280.
- -### sap_hana_vip required - -- _Type:_ `dict` - -Virtual floating IP for SAP HANA DB connections.
-This IP will always run on the promoted HANA node.
- -```text -primary: - aliases: - - main - - promoted - description: - - At least one Virtual IP is required to always reach the promoted SAP HANA DB. - required: true - type: str -secondary: - aliases: - - readonly - - unpromoted - description: - - An additional VIP can be used to run on a secondary node for read-only DB access. - required: false - type: str -``` +Required parameters: +- [ha_cluster_hacluster_password](#ha_cluster_hacluster_password) +- [sap_hana_cluster_nodes](#sap_hana_cluster_nodes) +- [sap_hana_instance_number](#sap_hana_instance_number) +- [sap_hana_sid](#sap_hana_sid) +- [sap_hana_vip](#sap_hana_vip) +--- ### ha_cluster - - _Type:_ `dict` Optional **host_vars** parameter, if defined it must be set for each node.
@@ -143,36 +76,37 @@ ha_cluster: ``` ### ha_cluster_cluster_name - - _Alias:_ `sap_ha_cluster_cluster_name` - _Type:_ `str` - _Default:_ `my-cluster` The name of the pacemaker cluster.
-### sap_ha_cluster_aws_access_key_id +### ha_cluster_hacluster_password required +- _Alias:_ `sap_hana_hacluster_password` +- _Type:_ `str` +The password of the `hacluster` user which is created during pacemaker installation.
+ +### sap_ha_cluster_aws_access_key_id - _Type:_ `str` AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud.
### sap_ha_cluster_aws_region - - _Type:_ `str` The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud.
### sap_ha_cluster_aws_secret_access_key - - _Type:_ `str` AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud.
### sap_ha_cluster_create_config_dest - - _Type:_ `str` - _Default:_ `sap_ha_cluster_resource_config.yml` @@ -180,7 +114,6 @@ The cluster resource configuration created by this role will be saved in a Yaml Specify a path/filename to save the file elsewhere.
### sap_ha_cluster_create_config_only - - _Type:_ `bool` - _Default:_ `False` @@ -189,35 +122,30 @@ The output is saved in a variables file and used for individual execution of the WARNING! This report may include sensitive details like secrets required for certain cluster resources!
### sap_ha_cluster_fence_power_timeout - - _Type:_ `int` - _Default:_ `240` STONITH resource parameter to test X seconds for status change after ON/OFF.
### sap_ha_cluster_fence_reboot_retries - - _Type:_ `int` - _Default:_ `4` STONITH resource parameter to define how often it retries to restart a node.
### sap_ha_cluster_fence_reboot_timeout - - _Type:_ `int` - _Default:_ `400` STONITH resource parameter to define after which timeout a node restart is returned as failed.
### sap_ha_cluster_hana_automated_register - - _Type:_ `bool` - _Default:_ `True` Define if a former primary should be re-registered automatically as secondary.
### sap_ha_cluster_hana_duplicate_primary_timeout - - _Type:_ `int` - _Default:_ `900` @@ -226,7 +154,6 @@ If the time difference is less than the time gap, then the cluster holds one or This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
### sap_ha_cluster_hana_prefer_site_takeover - - _Type:_ `bool` - _Default:_ `True` @@ -234,31 +161,90 @@ Set to "false" if the cluster should first attempt to restart the instance on th When set to "true" (default) a failover to secondary will be initiated on resource failure.
### sap_ha_cluster_hana_resource_name - - _Type:_ `str` - _Default:_ `SAPHana__` Customize the cluster resource name of the SAP HANA DB resource.
### sap_ha_cluster_hana_topology_resource_name - - _Type:_ `str` - _Default:_ `SAPHanaTopology__` Customize the cluster resource name of the SAP HANA Topology resource.
### sap_ha_cluster_replication_type - - _Type:_ `str` - _Default:_ `none` The type of SAP HANA site replication across multiple hosts.
### sap_ha_cluster_sap_type - - _Type:_ `str` - _Default:_ `scaleup` The SAP landscape to be installed.
+### sap_hana_cluster_nodes required +- _Type:_ `list` + +List of cluster nodes and associated attributes (in dictionary format).
+This is required for the srHook configuration.
+ +```text +hana_site: + description: + - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). + - Required for HANA System Replication configuration. + required: true +node_name: + description: + - Name of the cluster node, should match the remote system's hostname. + required: true +node_role: + choices: + - primary + - secondary + description: + - Role of this node in the SAP cluster setup. + required: true +``` + +### sap_hana_instance_number required +- _Alias:_ `sap_ha_cluster_hana_instance_number` +- _Type:_ `str` + +The instance number of the SAP HANA database which is role will configure in the cluster.
+ +### sap_hana_sid required +- _Alias:_ `sap_ha_cluster_hana_sid` +- _Type:_ `str` + +The SAP System ID of the instance that will be configured in the cluster.
+The SAP SID must follow SAP specifications - see SAP Note 1979280.
+ +### sap_hana_vip required +- _Type:_ `dict` + +Virtual floating IP for SAP HANA DB connections.
+This IP will always run on the promoted HANA node.
+ +```text +primary: + aliases: + - main + - promoted + description: + - At least one Virtual IP is required to always reach the promoted SAP HANA DB. + required: true + type: str +secondary: + aliases: + - readonly + - unpromoted + description: + - An additional VIP can be used to run on a secondary node for read-only DB access. + required: false + type: str +``` + From d9906581e3bf57b0e18d466b26ee6a92bbe5e45a Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 6 Oct 2022 13:16:51 +0000 Subject: [PATCH 222/375] sap_ha_cluster: argument_specs updates and vip definition flexibility --- roles/sap_ha_cluster/meta/argument_specs.yml | 35 ++++++++----------- .../construct_vars_vip_resources_aws.yml | 4 +-- .../construct_vars_vip_resources_default.yml | 4 +-- roles/sap_ha_cluster/vars/main.yml | 11 ++++++ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 96f46043d..02381d47d 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -222,16 +222,22 @@ argument_specs: - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). - Required for HANA System Replication configuration. required: true + example: + sap_hana_cluster_nodes: + - node_name: nodeA + node_role: primary + hana_site: DC01 + - node_name: nodeB + node_role: secondary + hana_site: DC02 sap_hana_instance_number: - alias: sap_ha_cluster_hana_instance_number description: - The instance number of the SAP HANA database which is role will configure in the cluster. required: true type: str sap_hana_sid: - alias: sap_ha_cluster_hana_sid description: - The SAP System ID of the instance that will be configured in the cluster. - The SAP SID must follow SAP specifications - see SAP Note 1979280. @@ -240,24 +246,11 @@ argument_specs: sap_hana_vip: description: - - Virtual floating IP for SAP HANA DB connections. - - This IP will always run on the promoted HANA node. + - One floating IP is required for SAP HANA DB connection by clients. + - This main VIP will always run on the promoted HANA node and be moved with it during a failover. required: true type: dict - options: - primary: - aliases: - - main - - promoted - description: - - At least one Virtual IP is required to always reach the promoted SAP HANA DB. - required: true - type: str - secondary: - aliases: - - readonly - - unpromoted - description: - - An additional VIP can be used to run on a secondary node for read-only DB access. - required: false - type: str + required_one_of: [{ primary, main, rw, promoted }] + example: + sap_hana_vip: + primary: 192.168.10.100 diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml index 1ee02eac7..b58de6190 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml @@ -45,7 +45,7 @@ - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" when: - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - - vip_list_item.key == 'primary' + - vip_list_item.key in __sap_ha_cluster_primary_synonyms ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" vars: @@ -61,7 +61,7 @@ - name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) - - vip_list_item.key == 'primary' + - vip_list_item.key in __sap_ha_cluster_primary_synonyms ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml index 5415e51fd..f40386d25 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml @@ -20,7 +20,7 @@ - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" when: - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - - vip_list_item.key == 'primary' + - vip_list_item.key in __sap_ha_cluster_primary_synonyms ansible.builtin.set_fact: __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" vars: @@ -36,7 +36,7 @@ - name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) - - vip_list_item.key == 'primary' + - vip_list_item.key in __sap_ha_cluster_primary_synonyms ansible.builtin.set_fact: __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 0cf6e2b9f..b784db3e7 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -15,6 +15,17 @@ __sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', # The arguments_spec check complains. # The actual values must be empty, they are set by various tasks! +__sap_ha_cluster_primary_synonyms: + - primary + - main + - promoted + - rw + +__sap_ha_cluster_secondary_synonyms: + - secondary + - unpromoted + - ro + # cloud platform helper variable - leave empty for default = not cloud __sap_ha_cluster_cloud_platform: From fada3949ad430032a45ef1ad9bd5c591d18ed9c8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 6 Oct 2022 14:47:02 +0000 Subject: [PATCH 223/375] sap_ha_cluster: put back parameter to apply to included tasks that was accidentally removed earlier --- roles/sap_ha_cluster/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index a7b1eaad8..105a8a7e2 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -160,6 +160,7 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster + no_log: true # some parameters contain secrets no_log: true # some parameters contain secrets vars: __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" From 994803a41c78b4e0b894272607a7ce0f94b40190 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 6 Oct 2022 14:48:15 +0000 Subject: [PATCH 224/375] sap_ha_cluster: fixed vip parameter reference inside the loop --- .../construct_vars_vip_resources_default.yml | 16 ++++++++-------- .../tasks/include_construct_vip_resources.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml index f40386d25..2751fb5ca 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml @@ -2,19 +2,19 @@ # Reminder: This file is included in a loop over a dictionary. # VIP resource definition itself -- name: "SAP HA Cluster - Add resource: VIP {{ sap_ha_clluster_vip_address.key }}" +- name: "SAP HA Cluster - Add resource: VIP {{ vip_list_item.key }}" when: - - sap_ha_cluster_vip_resource_name ~ '_' ~ sap_ha_cluster_vip_address.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + - sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" agent: "{{ sap_ha_cluster_vip_resource_agent }}" instance_attrs: - attrs: - - name: ip - value: "{{ vip_list_item }}" + - attrs: + - name: ip + value: "{{ vip_list_item.value | quote }}" # Start the VIP(s) only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" @@ -29,7 +29,7 @@ id: "{{ sap_ha_cluster_hana_resource_clone_name }}" action: promote resource_then: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" action: start # The VIP only runs where HANA is promoted @@ -45,7 +45,7 @@ id: "{{ sap_ha_cluster_hana_resource_clone_name }}" role: promoted resource_follower: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ sap_ha_cluster_vip_address.key }}" + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" options: - name: score value: 2000 diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index ca031e46d..7b63fc481 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -4,7 +4,7 @@ - name: "SAP HA Cluster - Include variable construction for VIP resources" when: - - __sap_ha_cluster_cloud_platform == '' + - __sap_ha_cluster_cloud_platform not in ['aws', 'ibmcloud'] - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" From 7e06d40731750f28ddb342289b6e0e3a573c79b8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 13 Oct 2022 12:00:52 +0200 Subject: [PATCH 225/375] sap_ha_cluster: moved platform tasks into subfolder --- .../tasks/include_construct_vip_resources.yml | 2 +- roles/sap_ha_cluster/tasks/main.yml | 11 ++--------- .../tasks/{ => platform}/ascertain_platform_type.yml | 0 .../construct_vars_vip_resources_aws.yml | 0 .../preconfigure_platform_amazon_ec2.yml | 0 5 files changed, 3 insertions(+), 10 deletions(-) rename roles/sap_ha_cluster/tasks/{ => platform}/ascertain_platform_type.yml (100%) rename roles/sap_ha_cluster/tasks/{ => platform}/construct_vars_vip_resources_aws.yml (100%) rename roles/sap_ha_cluster/tasks/{ => platform}/preconfigure_platform_amazon_ec2.yml (100%) diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index 7b63fc481..b1facef8f 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -16,7 +16,7 @@ when: - __sap_ha_cluster_cloud_platform == 'aws' - (vip_list_item.value is defined) and (vip_list_item.value != '') - ansible.builtin.include_tasks: construct_vars_vip_resources_aws.yml + ansible.builtin.include_tasks: platform/construct_vars_vip_resources_aws.yml loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" loop_control: index_var: loop_index diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 105a8a7e2..bce38c16b 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -14,13 +14,6 @@ # TODO: Build all resource/constraint configuration variables based on # simpler user input (think: drop-down options in a UI) -# - Make resources configuration modular, allowing additional VIPs, for example - -# TODO: create CIB backup before running ha_cluster - -# TODO: add parameter to just construct ha_cluster input variables and display the output -# use-case: users can extract the parameters to add them to their variable files -# and re-use ha_cluster with a complete set of configuration definitions # The SAP ID must follow a strict format and not use reserved special values # TODO: This check may be better placed in a SAP role earlier in the chain... @@ -57,7 +50,7 @@ # Determine if we are on a cloud platform. - name: "SAP HA Cluster - Include tasks for platform detection" ansible.builtin.include_tasks: - file: ascertain_platform_type.yml + file: platform/ascertain_platform_type.yml apply: tags: check_platform tags: check_platform @@ -115,7 +108,7 @@ ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "preconfigure_platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" + - "platform/preconfigure_platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" vars: __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/ascertain_platform_type.yml rename to roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_vip_resources_aws.yml rename to roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws.yml diff --git a/roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml b/roles/sap_ha_cluster/tasks/platform/preconfigure_platform_amazon_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/preconfigure_platform_amazon_ec2.yml rename to roles/sap_ha_cluster/tasks/platform/preconfigure_platform_amazon_ec2.yml From aaa18e94144d6802f58dfd652fdc9c004ac8fb7c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 13 Oct 2022 12:26:07 +0200 Subject: [PATCH 226/375] sap_ha_cluster: platform name pattern preparation --- .../tasks/include_construct_vip_resources.yml | 8 ++++---- roles/sap_ha_cluster/tasks/main.yml | 6 +++--- .../tasks/platform/ascertain_platform_type.yml | 12 +++++++++--- ...onstruct_vars_vip_resources_aws_ec2_instance.yml} | 0 ...zon_ec2.yml => preconfigure_aws_ec2_instance.yml} | 0 ..._amazon_ec2.yml => Platform_aws_ec2_instance.yml} | 3 --- ...latform_ibmcloud.yml => Platform_ibmcloud_vs.yml} | 0 ...Platform_ibmpower.yml => Platform_ibmpowervc.yml} | 0 roles/sap_ha_cluster/vars/main.yml | 4 ++-- 9 files changed, 18 insertions(+), 15 deletions(-) rename roles/sap_ha_cluster/tasks/platform/{construct_vars_vip_resources_aws.yml => construct_vars_vip_resources_aws_ec2_instance.yml} (100%) rename roles/sap_ha_cluster/tasks/platform/{preconfigure_platform_amazon_ec2.yml => preconfigure_aws_ec2_instance.yml} (100%) rename roles/sap_ha_cluster/vars/{Platform_amazon_ec2.yml => Platform_aws_ec2_instance.yml} (95%) rename roles/sap_ha_cluster/vars/{Platform_ibmcloud.yml => Platform_ibmcloud_vs.yml} (100%) rename roles/sap_ha_cluster/vars/{Platform_ibmpower.yml => Platform_ibmpowervc.yml} (100%) diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index b1facef8f..039da6e10 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -4,7 +4,7 @@ - name: "SAP HA Cluster - Include variable construction for VIP resources" when: - - __sap_ha_cluster_cloud_platform not in ['aws', 'ibmcloud'] + - __sap_ha_cluster_platform not in ['aws_ec2_instance', 'ibmcloud'] - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" @@ -12,11 +12,11 @@ index_var: loop_index loop_var: vip_list_item -- name: "SAP HA Cluster - Include variable construction for VIP resources on AWS" +- name: "SAP HA Cluster - Include variable construction for VIP resources on platforms" when: - - __sap_ha_cluster_cloud_platform == 'aws' + - __sap_ha_cluster_cloud_platform != '' - (vip_list_item.value is defined) and (vip_list_item.value != '') - ansible.builtin.include_tasks: platform/construct_vars_vip_resources_aws.yml + ansible.builtin.include_tasks: "platform/construct_vars_vip_resources_{{ __sap_ha_cluster_platform }}.yml" loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" loop_control: index_var: loop_index diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index bce38c16b..68b0de7c3 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -57,7 +57,7 @@ # Include vars files based on the environment. # Respect order for potential variable precedence. -- name: "SAP HA Cluster - Set platform/version specific variables" +- name: "SAP HA Cluster - Set platform/environment specific variables" when: __sap_ha_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: @@ -71,7 +71,7 @@ ansible_facts['distribution_version'] }}.yml - "SAPHana_{{ sap_ha_cluster_sap_type }}.yml" - "SAPHana_{{ sap_ha_cluster_replication_type }}.yml" - - "Platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" + - "Platform_{{ __sap_ha_cluster_platform }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" @@ -108,7 +108,7 @@ ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "platform/preconfigure_platform_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" + - "platform/preconfigure_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" vars: __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml index 985daefc7..16199588f 100644 --- a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml @@ -1,6 +1,5 @@ --- -# Platform detection for cloud platforms. -# Potentially also useful for other virtual or hardware platforms. +# Platform detection for cloud and other infrastructure platforms. ### AWS facts already available in Ansible # @@ -21,10 +20,17 @@ # TODO: detection based on multiple facts and providing one standard # name for use as platform type in related include files +- name: "SAP HA Cluster - Check platform = Amazon EC2 Instance" + when: + - ansible_system_vendor == 'Amazon EC2' + ansible.builtin.set_fact: + __sap_ha_cluster_platform: aws_ec2_instance + + # TODO: workaround, pcmk_host_map must be defined before stonith vars are built # Mapping will probably be different on non-AWS platforms. To be adjusted... - name: "SAP HA Cluster - Construct pcmk_host_map for stonith" - when: (ansible_system_vendor | lower | replace(' ', '_')) == "amazon_ec2" + when: __sap_ha_cluster_platform == 'aws_ec2_instance' ansible.builtin.set_fact: __sap_ha_cluster_pcmk_host_map: >- {% for entry in sap_hana_cluster_nodes -%} diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws_ec2_instance.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws.yml rename to roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws_ec2_instance.yml diff --git a/roles/sap_ha_cluster/tasks/platform/preconfigure_platform_amazon_ec2.yml b/roles/sap_ha_cluster/tasks/platform/preconfigure_aws_ec2_instance.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/preconfigure_platform_amazon_ec2.yml rename to roles/sap_ha_cluster/tasks/platform/preconfigure_aws_ec2_instance.yml diff --git a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml b/roles/sap_ha_cluster/vars/Platform_aws_ec2_instance.yml similarity index 95% rename from roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml rename to roles/sap_ha_cluster/vars/Platform_aws_ec2_instance.yml index d12547ec0..bb2790ce7 100644 --- a/roles/sap_ha_cluster/vars/Platform_amazon_ec2.yml +++ b/roles/sap_ha_cluster/vars/Platform_aws_ec2_instance.yml @@ -1,7 +1,4 @@ --- -# Variables specific on AWS EC2 cloud platform -__sap_ha_cluster_cloud_platform: aws - # New approach for VIP resource setup as per RH doc: # - 2 resources of types IPaddr2 and awsvip # - both in one resource group diff --git a/roles/sap_ha_cluster/vars/Platform_ibmcloud.yml b/roles/sap_ha_cluster/vars/Platform_ibmcloud_vs.yml similarity index 100% rename from roles/sap_ha_cluster/vars/Platform_ibmcloud.yml rename to roles/sap_ha_cluster/vars/Platform_ibmcloud_vs.yml diff --git a/roles/sap_ha_cluster/vars/Platform_ibmpower.yml b/roles/sap_ha_cluster/vars/Platform_ibmpowervc.yml similarity index 100% rename from roles/sap_ha_cluster/vars/Platform_ibmpower.yml rename to roles/sap_ha_cluster/vars/Platform_ibmpowervc.yml diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index b784db3e7..35762142c 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -26,8 +26,8 @@ __sap_ha_cluster_secondary_synonyms: - unpromoted - ro -# cloud platform helper variable - leave empty for default = not cloud -__sap_ha_cluster_cloud_platform: +# (cloud) platform helper variable - leave empty for default = not cloud +__sap_ha_cluster_platform: # ATTENTION: # Any variables for 'ha_cluster' which this SAP role supports/inherits should also From 0eba7904797951ab1dad88a014f0c60dec1ef655 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 13 Oct 2022 13:09:57 +0200 Subject: [PATCH 227/375] sap_ha_cluster: filenames should all be lower case --- roles/sap_ha_cluster/tasks/main.yml | 14 +++++++------- .../tasks/platform/ascertain_platform_type.yml | 4 ++-- ...=> construct_vars_vip_resources_vm_aws_ec2.yml} | 0 ...c2_instance.yml => preconfigure_vm_aws_ec2.yml} | 0 ...ws_ec2_instance.yml => platform_vm_aws_ec2.yml} | 0 ...rm_ibmcloud_vs.yml => platform_vm_ibmcloud.yml} | 0 ...mpowervc.yml => platform_vm_ibmcloud_power.yml} | 0 .../sap_ha_cluster/vars/{RedHat.yml => redhat.yml} | 0 .../{SAPHana_scaleout.yml => saphana_scaleout.yml} | 0 .../{SAPHana_scaleup.yml => saphana_scaleup.yml} | 0 10 files changed, 9 insertions(+), 9 deletions(-) rename roles/sap_ha_cluster/tasks/platform/{construct_vars_vip_resources_aws_ec2_instance.yml => construct_vars_vip_resources_vm_aws_ec2.yml} (100%) rename roles/sap_ha_cluster/tasks/platform/{preconfigure_aws_ec2_instance.yml => preconfigure_vm_aws_ec2.yml} (100%) rename roles/sap_ha_cluster/vars/{Platform_aws_ec2_instance.yml => platform_vm_aws_ec2.yml} (100%) rename roles/sap_ha_cluster/vars/{Platform_ibmcloud_vs.yml => platform_vm_ibmcloud.yml} (100%) rename roles/sap_ha_cluster/vars/{Platform_ibmpowervc.yml => platform_vm_ibmcloud_power.yml} (100%) rename roles/sap_ha_cluster/vars/{RedHat.yml => redhat.yml} (100%) rename roles/sap_ha_cluster/vars/{SAPHana_scaleout.yml => saphana_scaleout.yml} (100%) rename roles/sap_ha_cluster/vars/{SAPHana_scaleup.yml => saphana_scaleup.yml} (100%) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 68b0de7c3..5ea0525ae 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -61,17 +61,17 @@ when: __sap_ha_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" loop: - - "{{ ansible_facts['os_family'] }}.yml" - - "{{ ansible_facts['distribution'] }}.yml" + - "{{ ansible_facts['os_family'] | lower }}.yml" + - "{{ ansible_facts['distribution'] | lower }}.yml" - >- - {{ ansible_facts['distribution'] ~ '_' ~ + {{ ansible_facts['distribution'] | lower ~ '_' ~ ansible_facts['distribution_major_version'] }}.yml - >- - {{ ansible_facts['distribution'] ~ '_' ~ + {{ ansible_facts['distribution'] | lower ~ '_' ~ ansible_facts['distribution_version'] }}.yml - - "SAPHana_{{ sap_ha_cluster_sap_type }}.yml" - - "SAPHana_{{ sap_ha_cluster_replication_type }}.yml" - - "Platform_{{ __sap_ha_cluster_platform }}.yml" + - "saphana_{{ sap_ha_cluster_sap_type }}.yml" + - "saphana_{{ sap_ha_cluster_replication_type }}.yml" + - "platform_{{ __sap_ha_cluster_platform }}.yml" vars: __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml index 16199588f..c362c856b 100644 --- a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml @@ -24,13 +24,13 @@ when: - ansible_system_vendor == 'Amazon EC2' ansible.builtin.set_fact: - __sap_ha_cluster_platform: aws_ec2_instance + __sap_ha_cluster_platform: vm_aws_ec2 # TODO: workaround, pcmk_host_map must be defined before stonith vars are built # Mapping will probably be different on non-AWS platforms. To be adjusted... - name: "SAP HA Cluster - Construct pcmk_host_map for stonith" - when: __sap_ha_cluster_platform == 'aws_ec2_instance' + when: __sap_ha_cluster_platform == 'vm_aws_ec2' ansible.builtin.set_fact: __sap_ha_cluster_pcmk_host_map: >- {% for entry in sap_hana_cluster_nodes -%} diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws_ec2_instance.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_aws_ec2_instance.yml rename to roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/tasks/platform/preconfigure_aws_ec2_instance.yml b/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/preconfigure_aws_ec2_instance.yml rename to roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/vars/Platform_aws_ec2_instance.yml b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/vars/Platform_aws_ec2_instance.yml rename to roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/vars/Platform_ibmcloud_vs.yml b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml similarity index 100% rename from roles/sap_ha_cluster/vars/Platform_ibmcloud_vs.yml rename to roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml diff --git a/roles/sap_ha_cluster/vars/Platform_ibmpowervc.yml b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml similarity index 100% rename from roles/sap_ha_cluster/vars/Platform_ibmpowervc.yml rename to roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml diff --git a/roles/sap_ha_cluster/vars/RedHat.yml b/roles/sap_ha_cluster/vars/redhat.yml similarity index 100% rename from roles/sap_ha_cluster/vars/RedHat.yml rename to roles/sap_ha_cluster/vars/redhat.yml diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleout.yml b/roles/sap_ha_cluster/vars/saphana_scaleout.yml similarity index 100% rename from roles/sap_ha_cluster/vars/SAPHana_scaleout.yml rename to roles/sap_ha_cluster/vars/saphana_scaleout.yml diff --git a/roles/sap_ha_cluster/vars/SAPHana_scaleup.yml b/roles/sap_ha_cluster/vars/saphana_scaleup.yml similarity index 100% rename from roles/sap_ha_cluster/vars/SAPHana_scaleup.yml rename to roles/sap_ha_cluster/vars/saphana_scaleup.yml From fcfeb4679d838f75416865f001601ee9dbad2c65 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 13 Oct 2022 19:09:09 +0200 Subject: [PATCH 228/375] sap_ha_cluster: aws-vpc-move-ip for VIP and readonly VIP resource --- roles/sap_ha_cluster/defaults/main.yml | 4 + .../tasks/include_construct_vip_resources.yml | 8 +- ...onstruct_vars_vip_resources_vm_aws_ec2.yml | 75 +++++++++++++++++-- roles/sap_ha_cluster/vars/main.yml | 2 + .../vars/platform_vm_aws_ec2.yml | 24 ++++-- 5 files changed, 97 insertions(+), 16 deletions(-) diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 6376bd5ba..b370f1576 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -56,3 +56,7 @@ sap_ha_cluster_hana_resource_name: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap sap_ha_cluster_hana_resource_clone_name: "{{ sap_ha_cluster_hana_resource_name }}-clone" sap_ha_cluster_hana_topology_resource_name: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" sap_ha_cluster_hana_topology_resource_clone_name: "{{ sap_ha_cluster_hana_topology_resource_name }}-clone" + +# TODO: network interface name used for client access +sap_ha_cluster_vip_client_interface: "{{ ansible_default_ipv4.interface }}" +sap_ha_cluster_vip_routing_table: [] diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index 039da6e10..5d3c57c5f 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -2,9 +2,9 @@ # The VIP resource construction files are included in a loop to allow # for multiple IPs to be configured in cluster resources -- name: "SAP HA Cluster - Include variable construction for VIP resources" +- name: "SAP HA Cluster - Include variable construction for standard VIP resources" when: - - __sap_ha_cluster_platform not in ['aws_ec2_instance', 'ibmcloud'] + - __sap_ha_cluster_platform not in __sap_ha_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" @@ -12,9 +12,9 @@ index_var: loop_index loop_var: vip_list_item -- name: "SAP HA Cluster - Include variable construction for VIP resources on platforms" +- name: "SAP HA Cluster - Include variable construction for platform VIP resources" when: - - __sap_ha_cluster_cloud_platform != '' + - __sap_ha_cluster_platform != '' - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: "platform/construct_vars_vip_resources_{{ __sap_ha_cluster_platform }}.yml" loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml index b58de6190..c1ddb9ac7 100644 --- a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml @@ -1,39 +1,46 @@ --- # Reminder: This file is included in a loop over a dictionary. -- name: "SAP HA Cluster - Add resource: VIP for {{ vip_list_item.key }}" +- name: "SAP HA Cluster - Add resource: OS floating IP (dev/test only)" when: - sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + - (sap_ha_cluster_vip_strategy == 'ipaddr') or + (__sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].with is defined and + 'ipaddr' in __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].with) ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" vars: __resource_vip: id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "ocf:heartbeat:IPaddr2" + agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" instance_attrs: - attrs: - name: ip value: "{{ vip_list_item.value }}" -- name: "SAP HA Cluster - Add resource: Private IP for {{ vip_list_item.key }}" +- name: "SAP HA Cluster - Add resource: AWS floating IP (dev/test only)" when: - ('pri' ~ sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + - sap_ha_cluster_vip_strategy == 'awsvip' ansible.builtin.set_fact: __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: id: "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "ocf:heartbeat:awsvip" + agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" instance_attrs: - attrs: - name: secondary_private_ip value: "{{ vip_list_item.value }}" -- name: "SAP HA Cluster - Add resource group: {{ sap_ha_cluster_vip_resource_group_name }}" +- name: "SAP HA Cluster - Add resource group for VIP resources" when: - __vip_group.id is not in (__sap_ha_cluster_resource_groups | map(attribute='id')) + - sap_ha_cluster_vip_strategy in ['awsvip'] ansible.builtin.set_fact: __sap_ha_cluster_resource_groups: "{{ __sap_ha_cluster_resource_groups + [__vip_group] }}" + __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" vars: __vip_group: id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" @@ -41,6 +48,26 @@ - "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" +- name: "SAP HA Cluster - Add resource: AWS VIP routing" + when: + - (sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + - sap_ha_cluster_vip_strategy == 'aws_vpc_move_ip' + ansible.builtin.set_fact: + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + vars: + __resource_vip: + id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" + instance_attrs: + - attrs: + - name: ip + value: "{{ vip_list_item.value }}" + - name: interface + value: "{{ sap_ha_cluster_vip_client_interface }}" + - name: routing_table + value: "{{ sap_ha_cluster_vip_routing_table | join(',') }}" + # Start the VIP(s) only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" when: @@ -54,7 +81,7 @@ id: "{{ sap_ha_cluster_hana_resource_clone_name }}" action: promote resource_then: - id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + id: "{{ __sap_ha_cluster_vip_contraint_id }}" action: start # The VIP only runs where HANA is promoted @@ -70,7 +97,41 @@ id: "{{ sap_ha_cluster_hana_resource_clone_name }}" role: promoted resource_follower: - id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + id: "{{ __sap_ha_cluster_vip_contraint_id }}" + options: + - name: score + value: 2000 + +# Start the secondary VIP after the HANA resource has been promoted +- name: "SAP HA Cluster - Add order constraint: Read-only VIP starts after DB is promoted" + when: + - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key in __sap_ha_cluster_secondary_synonyms + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + vars: + __constraint_order_vip: + resource_first: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + action: promote + resource_then: + id: "{{ __sap_ha_cluster_vip_contraint_id }}" + action: start + +# The secondary VIP only runs where HANA is UNpromoted +- name: "SAP HA Cluster - Add colocation constraint: Read-only VIP runs where HANA is not promoted" + when: + - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key in __sap_ha_cluster_secondary_synonyms + ansible.builtin.set_fact: + __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + vars: + __constraint_colo_vip: + resource_leader: + id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + role: promoted + resource_follower: + id: "{{ __sap_ha_cluster_vip_contraint_id }}" options: - name: score value: 2000 diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 35762142c..2857bcdb9 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -28,6 +28,8 @@ __sap_ha_cluster_secondary_synonyms: # (cloud) platform helper variable - leave empty for default = not cloud __sap_ha_cluster_platform: +__sap_ha_cluster_supported_platforms: + - vm_aws_ec2 # ATTENTION: # Any variables for 'ha_cluster' which this SAP role supports/inherits should also diff --git a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml index bb2790ce7..3d2111901 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml @@ -1,9 +1,4 @@ --- -# New approach for VIP resource setup as per RH doc: -# - 2 resources of types IPaddr2 and awsvip -# - both in one resource group -# - colo and order constraints for the resource group -sap_ha_cluster_vip_resource_group_name: vipgroup # TODO: make sure to first respect 'ha_cluster' native variables @@ -49,3 +44,22 @@ sap_ha_cluster_stonith_resources: value: "{{ sap_ha_cluster_fence_reboot_timeout }}" - name: power_timeout value: "{{ sap_ha_cluster_fence_power_timeout }}" + + +# Platform specific VIP handling +sap_ha_cluster_vip_strategy: aws_vpc_move_ip +sap_ha_cluster_vip_resource_group_name: vipgroup + +__sap_ha_cluster_available_vip_agents: + # Testing only! Not officially supported for SAP on AWS. + ipaddr: + agent: "ocf:heartbeat:IPAddr2" + + # Testing only! Not officially supported for SAP on AWS. + awsvip: + agent: "ocf:heartbeat:awsvip" + with: ipaddr + + # Only officially supported agent to manage floating IPs. + aws_vpc_move_ip: + agent: "ocf:heartbeat:aws-vpc-move-ip" From 65c9c2b0259eb61d9b19c45d597aa97bd005cbdf Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 13 Oct 2022 19:42:48 +0100 Subject: [PATCH 229/375] sap_install_media_detect: append NWAS platform only --- .../defaults/main.yml | 2 +- .../tasks/detect_export_sapnwas_abap.yml | 134 ++++++++++++++++++ .../tasks/detect_export_sapnwas_java.yml | 134 ++++++++++++++++++ roles/sap_install_media_detect/tasks/main.yml | 12 ++ .../tasks/set_global_vars.yml | 14 ++ 5 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 roles/sap_install_media_detect/tasks/detect_export_sapnwas_abap.yml create mode 100644 roles/sap_install_media_detect/tasks/detect_export_sapnwas_java.yml diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index 4f66ec2aa..7b4c15a68 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -15,7 +15,7 @@ sap_install_media_detect_igs: true sap_install_media_detect_kernel: true sap_install_media_detect_webdisp: false -# saps4hana, sapecc, sapbw4hana +# saps4hana, sapecc, sapbw4hana, sapnwas_abap, sapnwas_java sap_install_media_detect_export: # e.g. /db_backup diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapnwas_abap.yml b/roles/sap_install_media_detect/tasks/detect_export_sapnwas_abap.yml new file mode 100644 index 000000000..b5e60927c --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_export_sapnwas_abap.yml @@ -0,0 +1,134 @@ +--- + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sap_install_media_detect_directory }}/sapnwas_abap_export/" + - "{{ sap_install_media_detect_directory }}/sapnwas_abap_export_extracted/" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - List files in directory + ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Identify EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXP' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/EXP' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_nwas_abap_export + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - If any ZIP, then extract the SAP NetWeaver (ABAP) Installation Export file (unzip) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./sapnwas_abap_export_extracted ; fi + with_items: + - "{{ detect_directory_files_nwas_abap_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - If any RAR without file extension, then add file extension (for use with unrar binary) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi + with_items: + - "{{ detect_directory_files_nwas_abap_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Find self-extracting RAR EXE (parent RAR file) and extract SAP NetWeaver (ABAP) Installation Export files (unrar x) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR self-extracting archive')" ]; then "{{ sap_install_media_detect_unrar_binary }}" x "{{ item }}" sapnwas_abap_export_extracted/ ; fi + with_items: + - "{{ detect_directory_files_nwas_abap_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Identify EXPORT extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/sapnwas_abap_export_extracted" + recurse: yes + file_type: directory +# contains: "DATA_UNITS" + patterns: '.*DATA_UNITS.*' + use_regex: yes + register: detect_directory_export_extracted + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Local Directory source - re-list files in directory + ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Local Directory source - re-detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Local Directory source - re-detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Local Directory source - re-identify EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/EXP' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/EXP' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_nwas_abap_export_repeated + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip_repeated.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar_repeated.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (ABAP) platform only EXPORT - Local Directory source - move EXPORT compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapnwas_abap_export/{{ item }}" + with_items: + - "{{ detect_directory_files_nwas_abap_export_repeated.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/detect_export_sapnwas_java.yml b/roles/sap_install_media_detect/tasks/detect_export_sapnwas_java.yml new file mode 100644 index 000000000..e96959d9e --- /dev/null +++ b/roles/sap_install_media_detect/tasks/detect_export_sapnwas_java.yml @@ -0,0 +1,134 @@ +--- + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Create Directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + owner: root + group: root + with_items: + - "{{ sap_install_media_detect_directory }}/sapnwas_java_export/" + - "{{ sap_install_media_detect_directory }}/sapnwas_java_export_extracted/" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - List files in directory + ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Identify EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/JAVA_EXPORT_JDMP' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/JAVA_EXPORT_JDMP' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_nwas_java_export + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - If any ZIP, then extract the SAP NetWeaver (JAVA) Installation Export file (unzip) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./sapnwas_java_export_extracted ; fi + with_items: + - "{{ detect_directory_files_nwas_java_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - If any RAR without file extension, then add file extension (for use with unrar binary) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi + with_items: + - "{{ detect_directory_files_nwas_java_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Find self-extracting RAR EXE (parent RAR file) and extract SAP NetWeaver (JAVA) Installation Export files (unrar x) + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR self-extracting archive')" ]; then "{{ sap_install_media_detect_unrar_binary }}" x "{{ item }}" sapnwas_java_export_extracted/ ; fi + with_items: + - "{{ detect_directory_files_nwas_java_export.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Identify EXPORT extracted + ansible.builtin.find: + paths: "{{ sap_install_media_detect_directory }}/sapnwas_java_export_extracted" + recurse: yes + file_type: directory +# contains: "DATA_UNITS" + patterns: '.*DATA_UNITS.*' + use_regex: yes + register: detect_directory_export_extracted + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Local Directory source - re-list files in directory + ansible.builtin.shell: ls -1 + register: detect_directory_files + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Local Directory source - re-detect ZIP files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi + register: detect_directory_files_zip_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Local Directory source - re-detect RAR files (including no file extensions), ignore errors + ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi + register: detect_directory_files_rar_repeated +# changed_when: "item.stdout | length > 0" + with_items: + - "{{ detect_directory_files.stdout_lines }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + ignore_errors: true + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Local Directory source - re-identify EXPORT files + ansible.builtin.shell: | + if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -q 'DATA_UNITS/JAVA_EXPORT_JDMP' ; then echo '{{ item }}' ; fi ; + elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -q 'DATA_UNITS/JAVA_EXPORT_JDMP' ; then echo '{{ item }}' ; fi ; fi + register: detect_directory_files_nwas_java_export_repeated + changed_when: "item | length > 0" + with_items: + - "{{ detect_directory_files_zip_repeated.results | map(attribute='stdout') | select() }}" + - "{{ detect_directory_files_rar_repeated.results | map(attribute='stdout') | select() }}" + args: + chdir: "{{ sap_install_media_detect_directory }}" + when: + - sap_install_media_detect_source == "local_dir" + +- name: SAP Install Media Detect - SAP NetWeaver AS (JAVA) platform only EXPORT - Local Directory source - move EXPORT compressed archive files + command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapnwas_java_export/{{ item }}" + with_items: + - "{{ detect_directory_files_nwas_java_export_repeated.results | map(attribute='stdout') | select() }}" + when: + - sap_install_media_detect_source == "local_dir" diff --git a/roles/sap_install_media_detect/tasks/main.yml b/roles/sap_install_media_detect/tasks/main.yml index 5e910cef2..a8a8680e8 100644 --- a/roles/sap_install_media_detect/tasks/main.yml +++ b/roles/sap_install_media_detect/tasks/main.yml @@ -81,9 +81,21 @@ when: - sap_install_media_detect_export == "sapbw4hana" +- name: SAP Install Media Detect - EXPORT files for SAP NetWeaver AS (ABAP) platform only + include_tasks: "detect_export_sapnwas_abap.yml" + when: + - sap_install_media_detect_export == "sapnwas_abap" + - name: SAP Install Media Detection Completed - set global vars for subsequent Ansible Tasks include_tasks: "set_global_vars.yml" +- name: SAP Install Media Detect - EXPORT files for SAP NetWeaver AS (JAVA) platform only + include_tasks: "detect_export_sapnwas_java.yml" + when: + - sap_install_media_detect_export == "sapnwas_java" + +- name: SAP Install Media Detection Completed - set global vars for subsequent Ansible Tasks + include_tasks: "set_global_vars.yml" # Output of detected SAP Software diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index f443b60a7..9e6c3b538 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -62,6 +62,20 @@ when: - sap_install_media_detect_export == "sapbw4hana" +- name: SAP Install Media Detection Completed - set facts for Export of SAP NetWeaver AS (ABAP) platform only + ansible.builtin.set_fact: + sap_swpm_cd_export_path: "{{ detect_directory_export_extracted.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_export == "sapnwas_abap" + +- name: SAP Install Media Detection Completed - set facts for Export of SAP NetWeaver AS (JAVA) platform only + ansible.builtin.set_fact: + sap_swpm_cd_export_path: "{{ detect_directory_export_extracted.files[0].path }}" # for sap_swpm Ansible Role + ignore_errors: true + when: + - sap_install_media_detect_export == "sapnwas_java" + - name: SAP Install Media Detection Completed - set facts for SAP SWPM ansible.builtin.set_fact: sap_swpm_sapcar_path: "{{ sap_install_media_detect_directory }}/sap_swpm" # for sap_swpm Ansible Role From 39d96eaf11b66712ecfe89979c14305c59862236 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 14 Oct 2022 00:47:09 +0100 Subject: [PATCH 230/375] sap_install_media_detect: fix copy paste error --- roles/sap_install_media_detect/tasks/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/main.yml b/roles/sap_install_media_detect/tasks/main.yml index a8a8680e8..c2780a4fe 100644 --- a/roles/sap_install_media_detect/tasks/main.yml +++ b/roles/sap_install_media_detect/tasks/main.yml @@ -86,9 +86,6 @@ when: - sap_install_media_detect_export == "sapnwas_abap" -- name: SAP Install Media Detection Completed - set global vars for subsequent Ansible Tasks - include_tasks: "set_global_vars.yml" - - name: SAP Install Media Detect - EXPORT files for SAP NetWeaver AS (JAVA) platform only include_tasks: "detect_export_sapnwas_java.yml" when: From 5aa647d4fb4b14616e31e2c3cd8d4f025ee1b976 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 14 Oct 2022 07:45:19 +0000 Subject: [PATCH 231/375] sap_ha_cluster: improved platform default --- .../tasks/include_construct_vip_resources.yml | 2 +- roles/sap_ha_cluster/vars/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index 5d3c57c5f..3c74605c3 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -14,7 +14,7 @@ - name: "SAP HA Cluster - Include variable construction for platform VIP resources" when: - - __sap_ha_cluster_platform != '' + - __sap_ha_cluster_platform in __sap_ha_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: "platform/construct_vars_vip_resources_{{ __sap_ha_cluster_platform }}.yml" loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 2857bcdb9..15d87c47f 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -27,7 +27,7 @@ __sap_ha_cluster_secondary_synonyms: - ro # (cloud) platform helper variable - leave empty for default = not cloud -__sap_ha_cluster_platform: +__sap_ha_cluster_platform: '' __sap_ha_cluster_supported_platforms: - vm_aws_ec2 @@ -38,7 +38,7 @@ __sap_ha_cluster_supported_platforms: # - conditionals (if applicable) # - config report template # -__sap_ha_cluster_cluster_name: +__sap_ha_cluster_cluster_name: '' __sap_ha_cluster_cluster_properties: [] __sap_ha_cluster_constraints_colocation: [] __sap_ha_cluster_constraints_location: [] @@ -52,4 +52,4 @@ __sap_ha_cluster_resource_groups: [] __sap_ha_cluster_resource_clones: [] # Predefine host_map for variable construction -__sap_ha_cluster_pcmk_host_map: +__sap_ha_cluster_pcmk_host_map: '' From fa7f721e3cd38722ceb5d10a3e2445e7fc76f931 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 14 Oct 2022 12:18:50 +0200 Subject: [PATCH 232/375] sap_ha_cluster: variable, specs and doc update --- roles/sap_ha_cluster/README.md | 240 +++++++++++++++-- roles/sap_ha_cluster/README_alt.md | 250 ------------------ roles/sap_ha_cluster/defaults/main.yml | 4 +- roles/sap_ha_cluster/meta/argument_specs.yml | 60 +++-- ...onstruct_vars_vip_resources_vm_aws_ec2.yml | 2 +- 5 files changed, 264 insertions(+), 292 deletions(-) delete mode 100644 roles/sap_ha_cluster/README_alt.md diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index cbdcff9ba..1793662ad 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -27,28 +27,220 @@ Ansible Control System: ## Role Input Parameters -| Variable Name | Required | Description | -|---------------|----------|-------------| -| **ha_cluster_hacluster_password**
Alias: sap_hana_hacluster_password
Type: str | **True** | The password of the `hacluster` user which is created during pacemaker installation. | -| **sap_hana_cluster_nodes**

Type: list | **True** | List of cluster nodes and associated attributes (in dictionary format).
This is required for the srHook configuration. | -| **sap_hana_instance_number**
Alias: sap_ha_cluster_hana_instance_number
Type: str | **True** | The instance number of the SAP HANA database which is role will configure in the cluster. | -| **sap_hana_sid**
Alias: sap_ha_cluster_hana_sid
Type: str | **True** | The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280. | -| **sap_hana_vip**

Type: dict | **True** | Virtual floating IP for SAP HANA DB connections.
This IP will always run on the promoted HANA node. | -| ha_cluster

Type: dict | False | Optional **host_vars** parameter, if defined it must be set for each node.
Definition of node name and IP addresses to be used for the pacemaker cluster.
Required for resilient node communication by providing more than one corosync IP.
See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses | -| ha_cluster_cluster_name
Alias: sap_ha_cluster_cluster_name
Type: str | False

Default: "my-cluster" | The name of the pacemaker cluster. | -| sap_ha_cluster_aws_access_key_id

Type: str | False | AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud. | -| sap_ha_cluster_aws_region

Type: str | False | The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud. | -| sap_ha_cluster_aws_secret_access_key

Type: str | False | AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud. | -| sap_ha_cluster_create_config_dest

Type: str | False

Default: "sap_ha_cluster_resource_config.yml" | The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere. | -| sap_ha_cluster_create_config_only

Type: bool | False

Default: "False" | Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
WARNING! This report may include sensitive details like secrets required for certain cluster resources! | -| sap_ha_cluster_fence_power_timeout

Type: int | False

Default: "240" | STONITH resource parameter to test X seconds for status change after ON/OFF. | -| sap_ha_cluster_fence_reboot_retries

Type: int | False

Default: "4" | STONITH resource parameter to define how often it retries to restart a node. | -| sap_ha_cluster_fence_reboot_timeout

Type: int | False

Default: "400" | STONITH resource parameter to define after which timeout a node restart is returned as failed. | -| sap_ha_cluster_hana_automated_register

Type: bool | False

Default: "True" | Define if a former primary should be re-registered automatically as secondary. | -| sap_ha_cluster_hana_duplicate_primary_timeout

Type: int | False

Default: "900" | Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. | -| sap_ha_cluster_hana_prefer_site_takeover

Type: bool | False

Default: "True" | Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure. | -| sap_ha_cluster_hana_resource_name

Type: str | False

Default: "SAPHana__" | Customize the cluster resource name of the SAP HANA DB resource. | -| sap_ha_cluster_hana_topology_resource_name

Type: str | False

Default: "SAPHanaTopology__" | Customize the cluster resource name of the SAP HANA Topology resource. | -| sap_ha_cluster_replication_type

Type: str | False

Default: "none" | The type of SAP HANA site replication across multiple hosts. | -| sap_ha_cluster_sap_type

Type: str | False

Default: "scaleup" | The SAP landscape to be installed. | +Required parameters: +- [ha_cluster_hacluster_password](#ha_cluster_hacluster_password) +- [sap_hana_cluster_nodes](#sap_hana_cluster_nodes) +- [sap_hana_instance_number](#sap_hana_instance_number) +- [sap_hana_sid](#sap_hana_sid) +- [sap_hana_vip](#sap_hana_vip) + +--- + +### ha_cluster +- _Type:_ `dict` + +Optional _**host_vars**_ parameter, if defined it must be set for each node.
+Definition of node name and IP addresses to be used for the pacemaker cluster.
+Required for resilient node communication by providing more than one corosync IP.
+See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses
+ + - **corosync_addresses**
+ _Default:_ ``
+ List of one or more IP addresses to be used for Corosync.
All nodes must have the same number of addresses.
The order of the listed addresses matters. + - **node_name**
+ _Default:_ ``
+ The name of the node in the cluster. + - **pcs_address**
+ _Default:_ ``
+ An address used by pcs to communicate with the node.
Can be a name, FQDN or IP address and can contain a port. + +Example: +```yaml +ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA + pcs_address: nodeA +``` + +### ha_cluster_cluster_name +- _Type:_ `str` +- _Default:_ `my-cluster` + +The name of the pacemaker cluster.
+ +### ha_cluster_hacluster_password required +- _Type:_ `str` + +The password of the `hacluster` user which is created during pacemaker installation.
+ +### sap_ha_cluster_aws_access_key_id +- _Type:_ `str` + +AWS access key to allow control of instances (for example for fencing operations).
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_aws_region +- _Type:_ `str` + +The AWS region in which the instances to be used for the cluster setup are located.
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_aws_secret_access_key +- _Type:_ `str` + +AWS secret key, paired with the access key for instance control.
+Required for cluster nodes setup on Amazon cloud.
+ +### sap_ha_cluster_create_config_dest +- _Type:_ `str` +- _Default:_ `sap_ha_cluster_resource_config.yml` + +The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
+Specify a path/filename to save the file elsewhere.
+ +### sap_ha_cluster_create_config_only +- _Type:_ `bool` +- _Default:_ `False` + +Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
+The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
+WARNING! This report may include sensitive details like secrets required for certain cluster resources!
+ +### sap_ha_cluster_fence_power_timeout +- _Type:_ `int` +- _Default:_ `240` + +STONITH resource parameter to test X seconds for status change after ON/OFF.
+ +### sap_ha_cluster_fence_reboot_retries +- _Type:_ `int` +- _Default:_ `4` + +STONITH resource parameter to define how often it retries to restart a node.
+ +### sap_ha_cluster_fence_reboot_timeout +- _Type:_ `int` +- _Default:_ `400` + +STONITH resource parameter to define after which timeout a node restart is returned as failed.
+ +### sap_ha_cluster_hana_automated_register +- _Type:_ `bool` +- _Default:_ `True` + +Define if a former primary should be re-registered automatically as secondary.
+ +### sap_ha_cluster_hana_duplicate_primary_timeout +- _Type:_ `int` +- _Default:_ `900` + +Time difference needed between to primary time stamps, if a dual-primary situation occurs.
+If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
+This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
+ +### sap_ha_cluster_hana_prefer_site_takeover +- _Type:_ `bool` +- _Default:_ `True` + +Set to "false" if the cluster should first attempt to restart the instance on the same node.
+When set to "true" (default) a failover to secondary will be initiated on resource failure.
+ +### sap_ha_cluster_hana_resource_name +- _Type:_ `str` +- _Default:_ `SAPHana__` + +Customize the cluster resource name of the SAP HANA DB resource.
+ +### sap_ha_cluster_hana_topology_resource_name +- _Type:_ `str` +- _Default:_ `SAPHanaTopology__` + +Customize the cluster resource name of the SAP HANA Topology resource.
+ +### sap_ha_cluster_replication_type +- _Type:_ `str` +- _Default:_ `none` + +The type of SAP HANA site replication across multiple hosts.
+_Not yet supported_
+ +### sap_ha_cluster_sap_type +- _Type:_ `str` +- _Default:_ `scaleup` + +The SAP landscape to be installed.
+_Currently only scale-up is supported_
+ +### sap_ha_cluster_vip_client_interface +- _Type:_ `str` +- _Default:_ `` + +OS device name of the network interface to use for the Virtual IP configuration.
+This is used for VIP agents that require an interface name, for example in cloud platform environments.
+ +### sap_ha_cluster_vip_resource_name +- _Type:_ `str` +- _Default:_ `vip__` + +Customize the name of the resource managing the Virtual IP.
+ +### sap_ha_cluster_vip_update_rt +- _Type:_ `list` + +List one more routing table IDs for managing Virtual IP failover through routing table changes.
+Required for VIP configuration in AWS EC2 environments.
+ +### sap_hana_cluster_nodes required +- _Type:_ `list` + +List of cluster nodes and associated attributes to describe the target SAP HA environment.
+This is required for the HANA System Replication configuration.
+ + - **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
This is required for HANA System Replication configuration. + - **node_ip**
+ IP address of the node used for HANA System Replication. + - **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
This is needed by the cluster members to know all their partner nodes. + - **node_role**
+ Role of this node in the SAP cluster setup.
There must be only *one* primary, but there can be multiple secondary nodes. + +Example: +```yaml +sap_hana_cluster_nodes: +- hana_site: DC01 + node_ip: 192.168.5.1 + node_name: nodeA + node_role: primary +- hana_site: DC02 + node_ip: 192.168.5.2 + node_name: nodeB + node_role: secondary +``` + +### sap_hana_instance_number required +- _Type:_ `str` + +The instance number of the SAP HANA database which is role will configure in the cluster.
+ +### sap_hana_sid required +- _Type:_ `str` + +The SAP System ID of the instance that will be configured in the cluster.
+The SAP SID must follow SAP specifications - see SAP Note 1979280.
+ +### sap_hana_vip required +- _Type:_ `dict` + +One floating IP is required for SAP HANA DB connection by clients.
+This main VIP will always run on the promoted HANA node and be moved with it during a failover.
+ +Example: +```yaml +sap_hana_vip: + primary: 192.168.10.100 +``` + diff --git a/roles/sap_ha_cluster/README_alt.md b/roles/sap_ha_cluster/README_alt.md deleted file mode 100644 index ddfbfd580..000000000 --- a/roles/sap_ha_cluster/README_alt.md +++ /dev/null @@ -1,250 +0,0 @@ - -# sap_ha_cluster Ansible Role - -This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources. -The cluster setup is managed through the `ha_cluster` Linux System Role.
-`sap_ha_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. - - - - -## Requirements - -Target Systems: -- Supported OS: RHEL 8.4+ -- RHEL registration and access to High-Availability repository -- SAP Hana installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository - -Ansible Control System: -- Ansible 2.9+ -- `Linux System Roles` collection from either source: - - RHEL package: rhel-system-roles-1.16.2 - - Automation Hub: - - Ansible Galaxy: - - - - -## Role Input Parameters - -Required parameters: -- [ha_cluster_hacluster_password](#ha_cluster_hacluster_password) -- [sap_hana_cluster_nodes](#sap_hana_cluster_nodes) -- [sap_hana_instance_number](#sap_hana_instance_number) -- [sap_hana_sid](#sap_hana_sid) -- [sap_hana_vip](#sap_hana_vip) - ---- - -### ha_cluster -- _Type:_ `dict` - -Optional **host_vars** parameter, if defined it must be set for each node.
-Definition of node name and IP addresses to be used for the pacemaker cluster.
-Required for resilient node communication by providing more than one corosync IP.
-See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses
- -```text -corosync_addresses: - default: - description: - - List of IP addresses used by Corosync. - - All nodes must have the same number of addresses. - - The order of the listed addresses matters. - type: list -node_name: - default: - description: - - The name of the node in the cluster. - type: str -pcs_address: - default: - description: - - An address used by pcs to communicate with the node. - - Can be a name, FQDN or IP address and can contain a port. - type: str -``` - -Example: -```yaml -ha_cluster: - corosync_addresses: - - 192.168.1.10 - - 192.168.2.10 - node_name: nodeA - pcs_address: nodeA -``` - -### ha_cluster_cluster_name -- _Alias:_ `sap_ha_cluster_cluster_name` -- _Type:_ `str` -- _Default:_ `my-cluster` - -The name of the pacemaker cluster.
- -### ha_cluster_hacluster_password required -- _Alias:_ `sap_hana_hacluster_password` -- _Type:_ `str` - -The password of the `hacluster` user which is created during pacemaker installation.
- -### sap_ha_cluster_aws_access_key_id -- _Type:_ `str` - -AWS access key to allow control of instances (for example for fencing operations).
-Required for cluster nodes setup on Amazon cloud.
- -### sap_ha_cluster_aws_region -- _Type:_ `str` - -The AWS region in which the instances to be used for the cluster setup are located.
-Required for cluster nodes setup on Amazon cloud.
- -### sap_ha_cluster_aws_secret_access_key -- _Type:_ `str` - -AWS secret key, paired with the access key for instance control.
-Required for cluster nodes setup on Amazon cloud.
- -### sap_ha_cluster_create_config_dest -- _Type:_ `str` -- _Default:_ `sap_ha_cluster_resource_config.yml` - -The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
-Specify a path/filename to save the file elsewhere.
- -### sap_ha_cluster_create_config_only -- _Type:_ `bool` -- _Default:_ `False` - -Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
-The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
-WARNING! This report may include sensitive details like secrets required for certain cluster resources!
- -### sap_ha_cluster_fence_power_timeout -- _Type:_ `int` -- _Default:_ `240` - -STONITH resource parameter to test X seconds for status change after ON/OFF.
- -### sap_ha_cluster_fence_reboot_retries -- _Type:_ `int` -- _Default:_ `4` - -STONITH resource parameter to define how often it retries to restart a node.
- -### sap_ha_cluster_fence_reboot_timeout -- _Type:_ `int` -- _Default:_ `400` - -STONITH resource parameter to define after which timeout a node restart is returned as failed.
- -### sap_ha_cluster_hana_automated_register -- _Type:_ `bool` -- _Default:_ `True` - -Define if a former primary should be re-registered automatically as secondary.
- -### sap_ha_cluster_hana_duplicate_primary_timeout -- _Type:_ `int` -- _Default:_ `900` - -Time difference needed between to primary time stamps, if a dual-primary situation occurs.
-If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
-This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
- -### sap_ha_cluster_hana_prefer_site_takeover -- _Type:_ `bool` -- _Default:_ `True` - -Set to "false" if the cluster should first attempt to restart the instance on the same node.
-When set to "true" (default) a failover to secondary will be initiated on resource failure.
- -### sap_ha_cluster_hana_resource_name -- _Type:_ `str` -- _Default:_ `SAPHana__` - -Customize the cluster resource name of the SAP HANA DB resource.
- -### sap_ha_cluster_hana_topology_resource_name -- _Type:_ `str` -- _Default:_ `SAPHanaTopology__` - -Customize the cluster resource name of the SAP HANA Topology resource.
- -### sap_ha_cluster_replication_type -- _Type:_ `str` -- _Default:_ `none` - -The type of SAP HANA site replication across multiple hosts.
- -### sap_ha_cluster_sap_type -- _Type:_ `str` -- _Default:_ `scaleup` - -The SAP landscape to be installed.
- -### sap_hana_cluster_nodes required -- _Type:_ `list` - -List of cluster nodes and associated attributes (in dictionary format).
-This is required for the srHook configuration.
- -```text -hana_site: - description: - - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). - - Required for HANA System Replication configuration. - required: true -node_name: - description: - - Name of the cluster node, should match the remote system's hostname. - required: true -node_role: - choices: - - primary - - secondary - description: - - Role of this node in the SAP cluster setup. - required: true -``` - -### sap_hana_instance_number required -- _Alias:_ `sap_ha_cluster_hana_instance_number` -- _Type:_ `str` - -The instance number of the SAP HANA database which is role will configure in the cluster.
- -### sap_hana_sid required -- _Alias:_ `sap_ha_cluster_hana_sid` -- _Type:_ `str` - -The SAP System ID of the instance that will be configured in the cluster.
-The SAP SID must follow SAP specifications - see SAP Note 1979280.
- -### sap_hana_vip required -- _Type:_ `dict` - -Virtual floating IP for SAP HANA DB connections.
-This IP will always run on the promoted HANA node.
- -```text -primary: - aliases: - - main - - promoted - description: - - At least one Virtual IP is required to always reach the promoted SAP HANA DB. - required: true - type: str -secondary: - aliases: - - readonly - - unpromoted - description: - - An additional VIP can be used to run on a secondary node for read-only DB access. - required: false - type: str -``` - - diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index b370f1576..035ce82df 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -29,7 +29,7 @@ sap_ha_cluster_resource_defaults: # The type of SAP landscape and multi-node replication # TODO: variable name update, depending on feedback # sap_ha_cluster_sap_type: "" -sap_ha_cluster_replication_type: none +sap_ha_cluster_replication_type: scaleup # Optional parameters to customize HANA resources # AUTOMATED_REGISTER @@ -59,4 +59,4 @@ sap_ha_cluster_hana_topology_resource_clone_name: "{{ sap_ha_cluster_hana_topolo # TODO: network interface name used for client access sap_ha_cluster_vip_client_interface: "{{ ansible_default_ipv4.interface }}" -sap_ha_cluster_vip_routing_table: [] +sap_ha_cluster_vip_update_rt: [] diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 02381d47d..b6d3fa84d 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -3,8 +3,8 @@ # Argument specifications in this separate file maintain backwards compatibility. argument_specs: -# TODO: make 'ha_cluster' role variables the primary names, but allow aliases -# in the current role namespace +# TODO: make 'ha_cluster' role variables the primary names +# For required variables using aliases do not work and fail the argument validation. main: short_description: SAP HA automated cluster setup requirements @@ -15,7 +15,6 @@ argument_specs: # Ideally sort by key (variable name) alphabetically. # # sap_ha_cluster_ -# alias: # default: # description: # - @@ -28,7 +27,7 @@ argument_specs: ha_cluster: description: - - Optional **host_vars** parameter, if defined it must be set for each node. + - Optional _**host_vars**_ parameter, if defined it must be set for each node. - Definition of node name and IP addresses to be used for the pacemaker cluster. - Required for resilient node communication by providing more than one corosync IP. - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses @@ -38,17 +37,17 @@ argument_specs: corosync_addresses: default: description: - - List of IP addresses used by Corosync. + - List of one or more IP addresses to be used for Corosync. - All nodes must have the same number of addresses. - - The order of the listed addresses matters. + - The order of the listed addresses matters. type: list node_name: - default: + default: description: - The name of the node in the cluster. type: str pcs_address: - default: + default: description: - An address used by pcs to communicate with the node. - Can be a name, FQDN or IP address and can contain a port. @@ -63,7 +62,6 @@ argument_specs: pcs_address: nodeA ha_cluster_cluster_name: - alias: sap_ha_cluster_cluster_name default: my-cluster description: - The name of the pacemaker cluster. @@ -71,7 +69,6 @@ argument_specs: type: str ha_cluster_hacluster_password: - alias: sap_hana_hacluster_password description: - The password of the `hacluster` user which is created during pacemaker installation. no_log: true @@ -185,6 +182,7 @@ argument_specs: default: none description: - The type of SAP HANA site replication across multiple hosts. + - _Not yet supported_ required: false type: str @@ -195,20 +193,48 @@ argument_specs: default: scaleup description: - The SAP landscape to be installed. + - _Currently only scale-up is supported_ required: false type: str + sap_ha_cluster_vip_client_interface: + default: "" + description: + - OS device name of the network interface to use for the Virtual IP configuration. + - This is used for VIP agents that require an interface name, for example in cloud platform environments. + required: false + type: str + + sap_ha_cluster_vip_resource_name: + default: "vip__" + description: + - Customize the name of the resource managing the Virtual IP. + required: false + type: str + + sap_ha_cluster_vip_update_rt: + description: + - List one more routing table IDs for managing Virtual IP failover through routing table changes. + - Required for VIP configuration in AWS EC2 environments. + required: false + type: list + sap_hana_cluster_nodes: description: - - List of cluster nodes and associated attributes (in dictionary format). - - This is required for the srHook configuration. - elements: str + - List of cluster nodes and associated attributes to describe the target SAP HA environment. + - This is required for the HANA System Replication configuration. + elements: dict required: true type: list options: + node_ip: + description: + - IP address of the node used for HANA System Replication. + required: true node_name: description: - - Name of the cluster node, should match the remote system's hostname. + - Name of the cluster node, should match the remote systems' hostnames. + - This is needed by the cluster members to know all their partner nodes. required: true node_role: choices: @@ -216,20 +242,24 @@ argument_specs: - secondary description: - Role of this node in the SAP cluster setup. + - There must be only *one* primary, but there can be multiple secondary nodes. required: true hana_site: description: - Site of the cluster and/or SAP HANA System Replication node (for example 'DC01'). - - Required for HANA System Replication configuration. + - This is required for HANA System Replication configuration. required: true + example: sap_hana_cluster_nodes: - node_name: nodeA node_role: primary hana_site: DC01 + node_ip: 192.168.5.1 - node_name: nodeB node_role: secondary hana_site: DC02 + node_ip: 192.168.5.2 sap_hana_instance_number: description: diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml index c1ddb9ac7..aec75ba22 100644 --- a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml @@ -66,7 +66,7 @@ - name: interface value: "{{ sap_ha_cluster_vip_client_interface }}" - name: routing_table - value: "{{ sap_ha_cluster_vip_routing_table | join(',') }}" + value: "{{ sap_ha_cluster_vip_update_rt | join(',') }}" # Start the VIP(s) only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" From f9bd4a3266e7ae0fcd5b5f4df37ee2ba060424d5 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 14 Oct 2022 14:46:15 +0200 Subject: [PATCH 233/375] sap_general_preconfigure: add compat-sap-c++-11 --- roles/sap_general_preconfigure/vars/RedHat_8.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 8505cb2d8..9e07d0d37 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -58,6 +58,7 @@ __sap_general_preconfigure_packages_x86_64: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 + - compat-sap-c++-11 __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -68,6 +69,7 @@ __sap_general_preconfigure_packages_ppc64le: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 + - compat-sap-c++-11 __sap_general_preconfigure_packages_s390x: - uuidd From 7457deb16dccf302233333ce827600dd430799e4 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 14 Oct 2022 15:17:35 +0200 Subject: [PATCH 234/375] sap_hana_preconfigure: add switch for SELinux relabeling Some more minor changes in this commit: - sap_general_preconfigure: set SELinux permissive by default - sap_general_preconfigure: Only install policycoreutils-python-utils from RHEL 8.0 onwards - sap_general_preconfigure: Add repo ids for RHEL 9.1 and later - sap_hana_install: implement the suggestion from PR #159 - improve the test scripts --- .../defaults/main.yml | 2 +- .../tasks/RedHat/generic/assert-selinux.yml | 4 +- .../run-sap_general_preconfigure-tests.py | 2 +- .../vars/RedHat_8.yml | 2 + .../vars/RedHat_9.yml | 10 +++ roles/sap_hana_install/tasks/post_install.yml | 2 + .../RedHat/generic/configure-selinux.yml | 1 + .../tests/run-sap_hana_preconfigure-tests.py | 2 +- .../run-sap_netweaver_preconfigure-tests.py | 63 ++++--------------- 9 files changed, 32 insertions(+), 56 deletions(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 6e3ed31bd..9cbda356b 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -67,7 +67,7 @@ sap_general_preconfigure_reboot_ok: no sap_general_preconfigure_fail_if_reboot_required: yes -sap_general_preconfigure_selinux_state: disabled +sap_general_preconfigure_selinux_state: permissive # For compatibility of SAP software with SELinux in enforcing mode, the role will recursively add # the 'usr_t' label to directories and files in `/usr/sap`. diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 320b163ca..582a735f4 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -59,7 +59,9 @@ ansible.builtin.package: state: latest name: policycoreutils-python-utils - when: sap_general_preconfigure_modify_selinux_labels + when: + - sap_general_preconfigure_modify_selinux_labels + - ansible_distribution_major_version != '7' - name: Check if the directory '/usr/sap' exists ansible.builtin.stat: diff --git a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py index 25933aba9..b09ea85bc 100755 --- a/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py +++ b/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py @@ -152,7 +152,7 @@ command += str(par2) command += '"' if par1['compact_assert_output']: - command += ' | ../tools/beautify-assert-output.sh' + command += ' | ./beautify-assert-output.sh' print("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc / 256)) diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 2c0b8457d..fe7f472cd 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -58,6 +58,7 @@ __sap_general_preconfigure_packages_x86_64: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 + - compat-sap-c++-11 __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -68,6 +69,7 @@ __sap_general_preconfigure_packages_ppc64le: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 + - compat-sap-c++-11 __sap_general_preconfigure_packages_s390x: - uuidd diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index bb9d7bcee..e6c51b9e6 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -15,6 +15,16 @@ __sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_prec # RHEL 9 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_9_0: '{{ __sap_general_preconfigure_max_repo_type }}-' +__sap_general_preconfigure_max_repo_type_string_9_1: '' +__sap_general_preconfigure_max_repo_type_string_9_2: '{{ __sap_general_preconfigure_max_repo_type }}-' +__sap_general_preconfigure_max_repo_type_string_9_3: '' +__sap_general_preconfigure_max_repo_type_string_9_4: '{{ __sap_general_preconfigure_max_repo_type }}-' +__sap_general_preconfigure_max_repo_type_string_9_5: '' +__sap_general_preconfigure_max_repo_type_string_9_6: '{{ __sap_general_preconfigure_max_repo_type }}-' +__sap_general_preconfigure_max_repo_type_string_9_7: '' +__sap_general_preconfigure_max_repo_type_string_9_8: '{{ __sap_general_preconfigure_max_repo_type }}-' +__sap_general_preconfigure_max_repo_type_string_9_9: '' +__sap_general_preconfigure_max_repo_type_string_9_10: '' __sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 4213575c1..175f2621b 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -50,6 +50,8 @@ mode: '0600' become: false delegate_to: 127.0.0.1 + vars: + ansible_become: false tags: sap_hana_install_generate_input_file ################ diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 43c2c06bb..f1b5f24e3 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -10,3 +10,4 @@ - "{{ sap_hana_preconfigure_fact_targets_setypes }}" selinux_restore_dirs: - "{{ sap_hana_preconfigure_hana_directories }}" + when: sap_hana_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py index 6eecfab70..08bc7f554 100755 --- a/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py +++ b/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py @@ -194,7 +194,7 @@ command += str(par2) command += '"' if par1['compact_assert_output']: - command += ' | ../tools/beautify-assert-output.sh' + command += ' | ./beautify-assert-output.sh' print("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc / 256)) diff --git a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py index 1be108caf..30cc2501d 100755 --- a/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py +++ b/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py @@ -40,36 +40,38 @@ }, { 'number': '2', - 'name': 'Run in assert mode on new system. Ignore a final error.', + 'name': 'Run in assert mode on new system, \ + ignore assert errors.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_netweaver_preconfigure_assert': True + 'sap_netweaver_preconfigure_assert': True, + 'sap_netweaver_preconfigure_assert_ignore_errors': True, } ] }, { 'number': '3', - 'name': 'Run in assert mode on new system, ignore any assert error.', + 'name': 'Run in normal mode on new system. \ + Do not fail in case not enough swap space is configured.', 'command_line_parameter': '', 'ignore_error_final': False, 'compact_assert_output': False, 'rc': '99', 'role_vars': [ { - 'sap_netweaver_preconfigure_assert': True, - 'sap_netweaver_preconfigure_assert_ignore_errors': True + 'sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured': False, } ] }, { 'number': '4', - 'name': 'Run in assert mode on new system, \ + 'name': 'Run in assert mode on modified system, \ compact output, \ - ignore any assert or final error.', + ignore any assert error.', 'command_line_parameter': '', 'ignore_error_final': True, 'compact_assert_output': True, @@ -77,26 +79,12 @@ 'role_vars': [ { 'sap_netweaver_preconfigure_assert': True, - 'sap_netweaver_preconfigure_assert_ignore_errors': True + 'sap_netweaver_preconfigure_assert_ignore_errors': True, } ] }, { 'number': '5', - 'name': 'Run in normal mode on new system. \ - Do not fail in case not enough swap space is configured.', - 'command_line_parameter': '', - 'ignore_error_final': False, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured': False - } - ] - }, - { - 'number': '6', 'name': 'Run in check mode on configured system. Ignore a final error.', 'command_line_parameter': '--check ', 'ignore_error_final': True, @@ -104,35 +92,6 @@ 'rc': '99', 'role_vars': [] }, - { - 'number': '7', - 'name': 'Run in assert mode on modified system. Ignore a final error.', - 'command_line_parameter': '', - 'ignore_error_final': True, - 'compact_assert_output': False, - 'rc': '99', - 'role_vars': [ - { - 'sap_netweaver_preconfigure_assert': True - } - ] - }, - { - 'number': '8', - 'name': 'Run in assert mode on modified system, \ - compact output, \ - ignore any assert error.', - 'command_line_parameter': '', - 'ignore_error_final': True, - 'compact_assert_output': True, - 'rc': '99', - 'role_vars': [ - { - 'sap_netweaver_preconfigure_assert': True, - 'sap_netweaver_preconfigure_assert_ignore_errors': True - } - ] - } ] for par1 in __tests: @@ -147,7 +106,7 @@ command += str(par2) command += '"' if par1['compact_assert_output']: - command += ' | ../tools/beautify-assert-output.sh' + command += ' | ./beautify-assert-output.sh' print("command: " + command) _py_rc = os.system(command) par1['rc'] = str(int(_py_rc / 256)) From 24bfa0150a36caf6f2cad64488ab8d7bc35f44be Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 14 Oct 2022 17:27:08 +0200 Subject: [PATCH 235/375] sap_ha_cluster: support playbooks with gather_facts false; file imports and vars include adjustments --- roles/sap_ha_cluster/README.md | 2 +- roles/sap_ha_cluster/defaults/main.yml | 11 +-- roles/sap_ha_cluster/meta/argument_specs.yml | 2 +- roles/sap_ha_cluster/meta/main.yml | 2 +- .../ascertain_ha_cluster_in_inventory.yml | 4 +- .../ascertain_platform_type.yml | 7 +- .../tasks/ascertain_sap_landscape.yml | 8 +-- .../tasks/include_vars_common.yml | 25 +++++++ .../tasks/include_vars_saphana.yml | 9 +++ roles/sap_ha_cluster/tasks/main.yml | 67 ++++--------------- .../tasks/platform/include_vars_platform.yml | 9 +++ .../tasks/validate_input_parameters.yml | 9 +++ roles/sap_ha_cluster/vars/main.yml | 16 +++++ 13 files changed, 102 insertions(+), 69 deletions(-) rename roles/sap_ha_cluster/tasks/{platform => }/ascertain_platform_type.yml (84%) create mode 100644 roles/sap_ha_cluster/tasks/include_vars_common.yml create mode 100644 roles/sap_ha_cluster/tasks/include_vars_saphana.yml create mode 100644 roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml create mode 100644 roles/sap_ha_cluster/tasks/validate_input_parameters.yml diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 1793662ad..4b706667b 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -175,7 +175,7 @@ _Currently only scale-up is supported_
### sap_ha_cluster_vip_client_interface - _Type:_ `str` -- _Default:_ `` +- _Default:_ `eth0` OS device name of the network interface to use for the Virtual IP configuration.
This is used for VIP agents that require an interface name, for example in cloud platform environments.
diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 035ce82df..29f202b84 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -3,6 +3,9 @@ # The included 'ha_cluster' role will not work with the role variables set # in this role. +# Do NOT USE ANSIBLE FACTS for defaults to be compatible with +# playbooks that disable generic fact gathering! + sap_ha_cluster_cluster_name: my-cluster sap_ha_cluster_create_config_only: false @@ -27,9 +30,9 @@ sap_ha_cluster_resource_defaults: value: 5000 # The type of SAP landscape and multi-node replication -# TODO: variable name update, depending on feedback -# sap_ha_cluster_sap_type: "" -sap_ha_cluster_replication_type: scaleup +# TODO: Type definitions and feature support +# sap_ha_cluster_sap_type: +sap_ha_cluster_replication_type: none # Optional parameters to customize HANA resources # AUTOMATED_REGISTER @@ -58,5 +61,5 @@ sap_ha_cluster_hana_topology_resource_name: "SAPHanaTopology_{{ sap_ha_cluster_h sap_ha_cluster_hana_topology_resource_clone_name: "{{ sap_ha_cluster_hana_topology_resource_name }}-clone" # TODO: network interface name used for client access -sap_ha_cluster_vip_client_interface: "{{ ansible_default_ipv4.interface }}" +sap_ha_cluster_vip_client_interface: eth0 sap_ha_cluster_vip_update_rt: [] diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index b6d3fa84d..16dadd0cd 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -198,7 +198,7 @@ argument_specs: type: str sap_ha_cluster_vip_client_interface: - default: "" + default: eth0 description: - OS device name of the network interface to use for the Virtual IP configuration. - This is used for VIP agents that require an interface name, for example in cloud platform environments. diff --git a/roles/sap_ha_cluster/meta/main.yml b/roles/sap_ha_cluster/meta/main.yml index 4171de5a9..4ee8090fa 100644 --- a/roles/sap_ha_cluster/meta/main.yml +++ b/roles/sap_ha_cluster/meta/main.yml @@ -2,7 +2,7 @@ galaxy_info: namespace: community author: Red Hat for SAP Community of Practice, Janine Fuchs - description: Ansible role for installation and configuration of Pacemaker Cluster for SAP solutions + description: Installation and configuration of Pacemaker Cluster for SAP solutions company: Red Hat, Inc. license: Apache-2.0 diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 5da669759..179c2e69a 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -1,6 +1,6 @@ --- -# If there are 'ha_cluster" role parameters are already defined in the -# inventory, we will use these custom specifications. +# If there are "ha_cluster" linux system role parameters already defined in the +# inventory, we will include these custom specifications. ### Take the following template to add additional parameters to be inherited: # - name: "SAP HA Cluster - Register ha_cluster_" diff --git a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml similarity index 84% rename from roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml rename to roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index c362c856b..196555830 100644 --- a/roles/sap_ha_cluster/tasks/platform/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -20,7 +20,7 @@ # TODO: detection based on multiple facts and providing one standard # name for use as platform type in related include files -- name: "SAP HA Cluster - Check platform = Amazon EC2 Instance" +- name: "SAP HA Cluster - Check if platform is AWS EC2 VM" when: - ansible_system_vendor == 'Amazon EC2' ansible.builtin.set_fact: @@ -29,7 +29,7 @@ # TODO: workaround, pcmk_host_map must be defined before stonith vars are built # Mapping will probably be different on non-AWS platforms. To be adjusted... -- name: "SAP HA Cluster - Construct pcmk_host_map for stonith" +- name: "SAP HA Cluster - Construct pcmk_host_map for stonith on AWS EC2 VM" when: __sap_ha_cluster_platform == 'vm_aws_ec2' ansible.builtin.set_fact: __sap_ha_cluster_pcmk_host_map: >- @@ -38,3 +38,6 @@ {% if hostvars[host].ansible_hostname == entry.node_name -%} {{ entry.node_name }}:{{ hostvars[host].ansible_board_asset_tag }} {%- if not loop.last %};{% endif %}{%- endif %}{%- endfor %}{%- endfor %} + +- name: "SAP HA Cluster - Include platform specific variables" + ansible.builtin.import_tasks: platform/include_vars_platform.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml index fd835450b..5d5e2f344 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -10,12 +10,12 @@ # 2 nodes are also valid for other scenarios. # TODO: collect possible rules for target landscapes -- name: "SAP HA Cluster - Set landscape to scale-up if there are only 2 nodes" +# Currently only 2-node scale-up is supported. +- name: "SAP HA Cluster - Set landscape to scale-up if target is 2 nodes" when: - ansible_play_hosts|length == 2 - - sap_ha_cluster_sap_type is not defined ansible.builtin.set_fact: sap_ha_cluster_sap_type: scaleup -# TODO: validate the value of sap_ha_cluster_sap_type to -# be a supported key (to catch mismatches if it is user-defined) +- name: "SAP HA Cluster - Include HANA specific variables" + ansible.builtin.import_tasks: include_vars_saphana.yml diff --git a/roles/sap_ha_cluster/tasks/include_vars_common.yml b/roles/sap_ha_cluster/tasks/include_vars_common.yml new file mode 100644 index 000000000..45ec36ef5 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/include_vars_common.yml @@ -0,0 +1,25 @@ +--- +# Gather specific subsets of facts if the required facts are not yet available. +- name: "SAP HA Cluster - Collect required facts" + when: + - not ansible_facts.keys() | list | + intersect(__sap_ha_cluster_required_facts) == __sap_ha_cluster_required_facts + ansible.builtin.setup: + gather_subset: hardware,interfaces + +# Include vars files based on the environment. +# Respect order for potential variable precedence. +- name: "SAP HA Cluster - Include environment specific variables" + when: __sap_ha_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + loop: + - "{{ ansible_os_family | lower }}.yml" + - "{{ ansible_distribution | lower }}.yml" + - >- + {{ ansible_distribution | lower ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution | lower ~ '_' ~ + ansible_distribution_version }}.yml + vars: + __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/include_vars_saphana.yml b/roles/sap_ha_cluster/tasks/include_vars_saphana.yml new file mode 100644 index 000000000..d621e182d --- /dev/null +++ b/roles/sap_ha_cluster/tasks/include_vars_saphana.yml @@ -0,0 +1,9 @@ +--- +- name: "SAP HA Cluster - Include HANA landscape specific variables" + when: __sap_ha_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + loop: + - "saphana_{{ sap_ha_cluster_sap_type }}.yml" + - "saphana_{{ sap_ha_cluster_replication_type }}.yml" + vars: + __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 5ea0525ae..6acf40680 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -7,73 +7,33 @@ # (networking, IDs, number of nodes) # 4. Include tasks for building the ha_cluster arguments for the selected solution # * scale-up, scale-out, scale-up + mtr, scale-out + mtr -# 5. Include ha_cluster role with the constructed parameters as role arguments +# 5. Include LSR "ha_cluster" with the constructed parameters as role arguments # 6. Add solution specific config # * srhook -# 7. Save 'ha_cluster' input parameters in .yml file for easy re-use +# 7. Save LSR "ha_cluster" input parameters in .yml file for easy re-use # TODO: Build all resource/constraint configuration variables based on # simpler user input (think: drop-down options in a UI) -# The SAP ID must follow a strict format and not use reserved special values -# TODO: This check may be better placed in a SAP role earlier in the chain... -- name: "SAP HA Cluster - Validate SAP System ID" - ansible.builtin.assert: - that: - - sap_ha_cluster_hana_sid is defined - - sap_ha_cluster_hana_sid|length == 3 - - sap_ha_cluster_hana_sid not in __sap_sid_prohibited - tags: always +- name: "SAP HA Cluster - Include parameter validation tasks" + ansible.builtin.import_tasks: validate_input_parameters.yml # Make sure that all parameters already set for 'ha_cluster' are also inherited. -# Add to the include file a task for each parameter which this SAP cluster role +# Add to this file a task for EACH parameter which this SAP cluster role # supports. - name: "SAP HA Cluster - Include tasks for checking 'ha_cluster' predefinitions" - ansible.builtin.include_tasks: - file: ascertain_ha_cluster_in_inventory.yml - apply: - tags: always - tags: always + ansible.builtin.import_tasks: ascertain_ha_cluster_in_inventory.yml + +- name: "SAP HA Cluster - Include facts and common variables" + ansible.builtin.import_tasks: include_vars_common.yml # Determine which SAP landscape we are going to configure in the cluster. -# This is needed to include the landscape specific parameter values. -# The result will be parameters: -# - sap_ha_cluster_sap_type (values: scaleup, scaleout) -# - sap_ha_cluster_replication_type (values: mtr, ?) - name: "SAP HA Cluster - Include tasks for SAP landscape calculation" - ansible.builtin.include_tasks: - file: ascertain_sap_landscape.yml - apply: - tags: check_sap - tags: check_sap + ansible.builtin.import_tasks: ascertain_sap_landscape.yml # Determine if we are on a cloud platform. - name: "SAP HA Cluster - Include tasks for platform detection" - ansible.builtin.include_tasks: - file: platform/ascertain_platform_type.yml - apply: - tags: check_platform - tags: check_platform - -# Include vars files based on the environment. -# Respect order for potential variable precedence. -- name: "SAP HA Cluster - Set platform/environment specific variables" - when: __sap_ha_cluster_vars_file is file - ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" - loop: - - "{{ ansible_facts['os_family'] | lower }}.yml" - - "{{ ansible_facts['distribution'] | lower }}.yml" - - >- - {{ ansible_facts['distribution'] | lower ~ '_' ~ - ansible_facts['distribution_major_version'] }}.yml - - >- - {{ ansible_facts['distribution'] | lower ~ '_' ~ - ansible_facts['distribution_version'] }}.yml - - "saphana_{{ sap_ha_cluster_sap_type }}.yml" - - "saphana_{{ sap_ha_cluster_replication_type }}.yml" - - "platform_{{ __sap_ha_cluster_platform }}.yml" - vars: - __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + ansible.builtin.import_tasks: ascertain_platform_type.yml - name: "SAP HA Cluster - Include common variable construction tasks" ansible.builtin.import_tasks: construct_vars_common.yml @@ -82,11 +42,10 @@ ansible.builtin.import_tasks: construct_vars_stonith.yml - name: "SAP HA Cluster - Include variable construction for VIP resources" - ansible.builtin.include_tasks: include_construct_vip_resources.yml + ansible.builtin.import_tasks: include_construct_vip_resources.yml - name: "SAP HA Cluster - Include variable construction for SAP HANA common" - ansible.builtin.include_tasks: - file: construct_vars_hana_common.yml + ansible.builtin.import_tasks: construct_vars_hana_common.yml - name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-up" when: sap_ha_cluster_sap_type == 'scaleup' diff --git a/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml b/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml new file mode 100644 index 000000000..9027eb686 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml @@ -0,0 +1,9 @@ +--- +# Include vars files based on the environment. +- name: "SAP HA Cluster - Include platform specific variables" + when: __sap_ha_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + loop: + - "platform_{{ __sap_ha_cluster_platform }}.yml" + vars: + __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/validate_input_parameters.yml b/roles/sap_ha_cluster/tasks/validate_input_parameters.yml new file mode 100644 index 000000000..69d883eb5 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/validate_input_parameters.yml @@ -0,0 +1,9 @@ +--- +# The SAP ID must follow a strict format and not use reserved special values +# TODO: This check may be better placed in a SAP role earlier in the chain... +- name: "SAP HA Cluster - Validate SAP System ID" + ansible.builtin.assert: + that: + - sap_ha_cluster_hana_sid is defined + - sap_ha_cluster_hana_sid|length == 3 + - sap_ha_cluster_hana_sid not in __sap_sid_prohibited diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 15d87c47f..6f5ae700c 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -11,6 +11,22 @@ __sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'SID', 'SQL', 'SUM', 'SYS', 'TMP', 'TOP', 'TRC', 'UID', 'USE', 'USR', 'VAR'] +# ansible_facts required by the role +__sap_ha_cluster_required_facts: + - architecture # subset: min, hardware + - board_asset_tag # subset: hardware + - default_ipv4 # subset: interfaces + - distribution # subset: min, hardware + - distribution_major_version # subset: min, hardware + - distribution_version # subset: min, hardware + - hostname #ubset: min, hardware + - os_family # subset: min, hardware +# - selinux # subset: min, hardware +# - service_mgr # subset: min, hardware + - system_vendor # subset: hardware +# - virtualization_role # subset: virtual +# - virtualization_type # subset: virtual + # Define empty parameters to avoid undefined input variables. # The arguments_spec check complains. # The actual values must be empty, they are set by various tasks! From cec46b43a380b5d19177e4b1c56abcb0eefa3259 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 14 Oct 2022 18:18:59 +0200 Subject: [PATCH 236/375] sap_ha_cluster: LSR support info --- roles/sap_ha_cluster/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 4b706667b..120cef45e 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -11,16 +11,16 @@ The cluster setup is managed through the `ha_cluster` Linux System Role.
## Requirements Target Systems: -- Supported OS: RHEL 8.4+ +- Supported OS: RHEL 8.3+ - RHEL registration and access to High-Availability repository - SAP Hana installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository Ansible Control System: - Ansible 2.9+ -- `Linux System Roles` collection from either source: - - RHEL package: rhel-system-roles-1.16.2 - - Automation Hub: - - Ansible Galaxy: +- `Linux System Roles` collection from either source and minimum version: + - RHEL package: _rhel-system-roles-1.13.0-1_ or later + - Red Hat Automation Hub: _rhel_system_roles 1.12.1_ or later + - Ansible Galaxy: _fedora.linux_system_roles:1.13.0_ or later From d9290cbadb15a2d756cf6c2b0eee879ae51ae568 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 17 Oct 2022 11:46:11 +0200 Subject: [PATCH 237/375] sap_general_preconfigure: Solve issue #219 --- .../tasks/RedHat/generic/assert-nofile-limits.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml index 08c8fa1a7..c915bd3e4 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml @@ -1,7 +1,7 @@ --- - name: Check if the hard limit of nofile for group sapsys is 1048576 - ansible.builtin.command: awk '/sapsys/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf + ansible.builtin.command: awk '!/^#/&&/sapsys/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nofile_hard_assert changed_when: no ignore_errors: yes @@ -22,7 +22,7 @@ - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg - name: Check if the soft limit of nofile for group sapsys is 1048576 - ansible.builtin.command: awk '/sapsys/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf + ansible.builtin.command: awk '!/^#/&&/sapsys/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nofile_soft_assert changed_when: no ignore_errors: yes @@ -43,7 +43,7 @@ - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg - name: Get the hard limit of nofile for the database group - ansible.builtin.command: awk '/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf + ansible.builtin.command: awk '!/^#/&&/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_hard_assert changed_when: no ignore_errors: yes @@ -64,7 +64,7 @@ - sap_general_preconfigure_db_group_name is defined - name: Get the soft limit of nofile for the database group - ansible.builtin.command: awk '/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf + ansible.builtin.command: awk '!/^#/&&/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_soft_assert changed_when: no ignore_errors: yes From 65a9f21d26046f06074773fb36ae9ccd332cbbee Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 17 Oct 2022 16:38:19 +0200 Subject: [PATCH 238/375] sap_ha_cluster: mention AWS required min vars --- roles/sap_ha_cluster/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 120cef45e..a57159bb4 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -27,13 +27,18 @@ Ansible Control System: ## Role Input Parameters -Required parameters: +Minimum required parameters: - [ha_cluster_hacluster_password](#ha_cluster_hacluster_password) - [sap_hana_cluster_nodes](#sap_hana_cluster_nodes) - [sap_hana_instance_number](#sap_hana_instance_number) - [sap_hana_sid](#sap_hana_sid) - [sap_hana_vip](#sap_hana_vip) +On cloud platforms additional parameters are required: + +- AWS: `sap_ha_cluster_aws_*` variables +- `sap_ha_cluster_vip_update_rt` + --- ### ha_cluster From 91a88e1e252961c5495aa30d6d5d5dda16144051 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 18 Oct 2022 11:42:05 +0200 Subject: [PATCH 239/375] sap_*_preconfigure: improve SELinux asserts for directory entries --- .../tasks/RedHat/generic/assert-selinux.yml | 7 ++++--- .../tasks/RedHat/generic/assert-2777782-01-loop-block.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 582a735f4..f00a5f091 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -88,15 +88,16 @@ - name: Assert that there is an entry for '/usr/sap' in the SELinux configuration database ansible.builtin.assert: - that: - __sap_general_preconfigure_register_semanage_fcontext_usr_sap.stdout | int != 0 + that: __sap_general_preconfigure_register_semanage_fcontext_usr_sap.stdout | int != 0 + fail_msg: "FAIL: There is no entry for '/usr/sap' in the SELinux configuration database!" + success_msg: "PASS: There is an entry for '/usr/sap' in the SELinux configuration database." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - sap_general_preconfigure_modify_selinux_labels - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir - name: Count files in '/usr/sap' and below without SELinux 'usr_t' file context - ansible.builtin.shell: set -o pipefail && find /usr/sap -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + ansible.builtin.shell: "set -o pipefail && ls -1RZ /usr/sap | awk 'BEGIN{a=0}!/^$/&&NF>1&&$1!~/usr_t/{a++}END{print a}'" register: __sap_general_preconfigure_register_ls_z_usr_sap when: - sap_general_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml index 9f71c9c90..4dc5b4fb2 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml @@ -28,7 +28,7 @@ when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir - name: Count files in '{{ line_item }}' and below without SELinux 'usr_t' file context - ansible.builtin.shell: set -o pipefail && find /hana -exec ls -ldZ {} \; | awk 'BEGIN{a=0}$5!~/usr_t/{a++}END{print a}' + ansible.builtin.shell: "set -o pipefail && ls -1RZ {{ line_item }} | awk 'BEGIN{a=0}!/^$/&&NF>1&&$1!~/usr_t/{a++}END{print a}'" register: __sap_hana_preconfigure_register_ls_z_hana changed_when: false when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir From abb02b8fd374805e3cef2f3d5b92fd49873e4375 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 18 Oct 2022 21:53:25 +0200 Subject: [PATCH 240/375] sap_*_preconfigure: further improve SELinux asserts for directory entries --- .../tasks/RedHat/generic/assert-selinux.yml | 5 +++-- .../tasks/RedHat/generic/assert-2777782-01-loop-block.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index f00a5f091..446b42ed1 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -105,8 +105,9 @@ - name: Assert that all files in '/usr/sap' and below have the 'usr_t' file context ansible.builtin.assert: - that: - __sap_general_preconfigure_register_selinux_z_usr_sap.stdout | int == 0 + that: __sap_general_preconfigure_register_selinux_z_usr_sap.stdout | int == 0 + fail_msg: "FAIL: There is at least one file in '/usr/sap' or below without the 'usr_t' file context!" + success_msg: "PASS: All files in '/usr/sap' and below have the 'usr_t' file context." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: - sap_general_preconfigure_modify_selinux_labels diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml index 4dc5b4fb2..5a7f625ef 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-2777782-01-loop-block.yml @@ -37,6 +37,6 @@ ansible.builtin.assert: that: __sap_hana_preconfigure_register_ls_z_hana.stdout | int == 0 fail_msg: "FAIL: There is at least one file in '{{ line_item }}' or below without the 'usr_t' file context!" - success_msg: "PASS: All files in '{{ line_item }}' or below have the 'usr_t' file context." + success_msg: "PASS: All files in '{{ line_item }}' and below have the 'usr_t' file context." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_stat_hana.stat.isdir is defined and __sap_hana_preconfigure_register_stat_hana.stat.isdir From d04c174076f674778374edd0ea64e4dbe8aa613b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 18 Oct 2022 22:02:54 +0200 Subject: [PATCH 241/375] sap_general_preconfigure: more modifications for SELinux asserts for directory entries --- .../tasks/RedHat/generic/assert-selinux.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 446b42ed1..cf36ffb05 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -28,7 +28,7 @@ - name: "Check if the permanent configuration of the SELinux state is '{{ sap_general_preconfigure_selinux_state }}'" ansible.builtin.command: awk 'BEGIN{FS="="}/^SELINUX=/{print $NF}' /etc/selinux/config register: __sap_general_preconfigure_register_selinux_conf_assert - changed_when: no + changed_when: false ignore_errors: yes when: __sap_general_preconfigure_register_stat_selinux_conf_assert.stat.isreg @@ -44,7 +44,7 @@ - name: Assert - Determine the current SELinux state ansible.builtin.command: getenforce register: __sap_general_preconfigure_register_getenforce_assert - changed_when: no + changed_when: false - name: Assert that the SELinux state is set correctly ansible.builtin.assert: @@ -82,6 +82,7 @@ - name: Count SELinux configuration database entries for '/usr/sap' ansible.builtin.shell: set -o pipefail && semanage fcontext -l | awk 'BEGIN{a=0}$1=="/usr/sap(/.*)?"&&$NF~/usr_t/{a++}END{print a}' register: __sap_general_preconfigure_register_semanage_fcontext_usr_sap + changed_when: false when: - sap_general_preconfigure_modify_selinux_labels - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir @@ -99,6 +100,7 @@ - name: Count files in '/usr/sap' and below without SELinux 'usr_t' file context ansible.builtin.shell: "set -o pipefail && ls -1RZ /usr/sap | awk 'BEGIN{a=0}!/^$/&&NF>1&&$1!~/usr_t/{a++}END{print a}'" register: __sap_general_preconfigure_register_ls_z_usr_sap + changed_when: false when: - sap_general_preconfigure_modify_selinux_labels - __sap_general_preconfigure_register_stat_usr_sap.stat.isdir is defined and __sap_general_preconfigure_register_stat_usr_sap.stat.isdir From ca105ecfda6df055676f41fe77c9ef55387997c3 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 18 Oct 2022 22:06:14 +0200 Subject: [PATCH 242/375] sap_general_preconfigure: fix wrong variable name for SELinux assert for directory entries --- .../tasks/RedHat/generic/assert-selinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index cf36ffb05..7a41cf16a 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -107,7 +107,7 @@ - name: Assert that all files in '/usr/sap' and below have the 'usr_t' file context ansible.builtin.assert: - that: __sap_general_preconfigure_register_selinux_z_usr_sap.stdout | int == 0 + that: __sap_general_preconfigure_register_ls_z_usr_sap.stdout | int == 0 fail_msg: "FAIL: There is at least one file in '/usr/sap' or below without the 'usr_t' file context!" success_msg: "PASS: All files in '/usr/sap' and below have the 'usr_t' file context." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" From 17a27d8453f3faeec9d39c1aa2231de6747cf258 Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Fri, 21 Oct 2022 11:45:21 +0100 Subject: [PATCH 243/375] Fixed failing SLES15 preconfigure (#220) --- roles/sap_general_preconfigure/vars/SLES_15.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/sap_general_preconfigure/vars/SLES_15.yml b/roles/sap_general_preconfigure/vars/SLES_15.yml index 09bca40c4..750333937 100644 --- a/roles/sap_general_preconfigure/vars/SLES_15.yml +++ b/roles/sap_general_preconfigure/vars/SLES_15.yml @@ -12,3 +12,6 @@ __sap_general_preconfigure_packages: - hostname __sap_general_preconfigure_min_pkgs: +__sap_general_preconfigure_packagegroups: +__sap_general_preconfigure_envgroups: +__sap_general_preconfigure_kernel_parameters_default: \ No newline at end of file From e5b1ee5add5ada0801973db86559c04e8f132c71 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 21 Oct 2022 16:38:47 +0200 Subject: [PATCH 244/375] sap_ha_cluster: ibmcloud first integration and stonith assembly adjustments --- roles/sap_ha_cluster/README.md | 56 +++++++++------ roles/sap_ha_cluster/defaults/main.yml | 13 ++-- roles/sap_ha_cluster/meta/argument_specs.yml | 69 +++++++++++++------ .../tasks/ascertain_platform_type.yml | 31 ++++++--- .../tasks/construct_vars_stonith.yml | 39 ++++++++++- roles/sap_ha_cluster/tasks/main.yml | 8 +-- .../platform/preconfigure_vm_aws_ec2.yml | 41 +++-------- .../platform/register_sysinfo_vm_ibmcloud.yml | 18 +++++ .../vars/platform_vm_aws_ec2.yml | 28 ++------ .../vars/platform_vm_ibmcloud.yml | 8 ++- 10 files changed, 189 insertions(+), 122 deletions(-) create mode 100644 roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index a57159bb4..b39a85d99 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -100,36 +100,38 @@ Required for cluster nodes setup on Amazon cloud.
### sap_ha_cluster_create_config_dest - _Type:_ `str` -- _Default:_ `sap_ha_cluster_resource_config.yml` +- _Default:_ `_resource_config.yml` -The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
+The pacemaker cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
Specify a path/filename to save the file elsewhere.
+The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
-### sap_ha_cluster_create_config_only +### sap_ha_cluster_create_config_varfile - _Type:_ `bool` - _Default:_ `False` -Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role.
-The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role.
+When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
+This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_cluster' role.
+When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
WARNING! This report may include sensitive details like secrets required for certain cluster resources!
-### sap_ha_cluster_fence_power_timeout -- _Type:_ `int` -- _Default:_ `240` - -STONITH resource parameter to test X seconds for status change after ON/OFF.
- -### sap_ha_cluster_fence_reboot_retries -- _Type:_ `int` -- _Default:_ `4` - -STONITH resource parameter to define how often it retries to restart a node.
- -### sap_ha_cluster_fence_reboot_timeout -- _Type:_ `int` -- _Default:_ `400` +### sap_ha_cluster_fence_options +- _Type:_ `dict` -STONITH resource parameter to define after which timeout a node restart is returned as failed.
+STONITH resource common parameters that apply to most fencing agents.
+These options are applied to fencing resources this role uses automatically for pre-defined platforms (like AWS EC2, IBM Cloud VPC).
+The listed options are set by default.
+Additional options can be added by defining this parameter in dictionary format and adding the defaults plus any valid stonith resource key-value pair.
+ + - **pcmk_reboot_retries**
+ _Default:_ `4`
+ STONITH resource parameter to define how often it retries to restart a node. + - **pcmk_reboot_timeout**
+ _Default:_ `400`
+ STONITH resource parameter to define after which timeout a node restart is returned as failed. + - **power_timeout**
+ _Default:_ `240`
+ STONITH resource parameter to test X seconds for status change after ON/OFF. ### sap_ha_cluster_hana_automated_register - _Type:_ `bool` @@ -164,6 +166,18 @@ Customize the cluster resource name of the SAP HANA DB resource.
Customize the cluster resource name of the SAP HANA Topology resource.
+### sap_ha_cluster_ibmcloud_api_key +- _Type:_ `str` + +The API key is required to allow control of instances (for example for fencing operations).
+Required for cluster nodes setup in IBM Cloud VPC.
+ +### sap_ha_cluster_ibmcloud_region +- _Type:_ `str` + +The cloud region key in which the instances are running.
+Required for cluster nodes setup in IBM Cloud VPC.
+ ### sap_ha_cluster_replication_type - _Type:_ `str` - _Default:_ `none` diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index 29f202b84..f2438ab74 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -8,8 +8,8 @@ sap_ha_cluster_cluster_name: my-cluster -sap_ha_cluster_create_config_only: false -sap_ha_cluster_create_config_dest: sap_ha_cluster_resource_config.yml +sap_ha_cluster_create_config_varfile: false +sap_ha_cluster_create_config_dest: "{{ sap_ha_cluster_cluster_name }}_resource_config.yml" # Inherit SAP common parameters sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" @@ -43,11 +43,10 @@ sap_ha_cluster_hana_duplicate_primary_timeout: 900 sap_ha_cluster_hana_prefer_site_takeover: true ### stonith resource parameter defaults -# not all of the defined variables will be needed for all fence types -# ideally this is generic and covers all platform type agents -sap_ha_cluster_fence_power_timeout: 240 -sap_ha_cluster_fence_reboot_retries: 4 -sap_ha_cluster_fence_reboot_timeout: 400 +sap_ha_cluster_fence_options: + pcmk_reboot_retries: 4 + pcmk_reboot_timeout: 400 + power_timeout: 240 ### Resource default patterns sap_ha_cluster_vip_address: "{{ sap_hana_vip }}" diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 16dadd0cd..6e246860e 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -97,42 +97,55 @@ argument_specs: type: str sap_ha_cluster_create_config_dest: - default: sap_ha_cluster_resource_config.yml + default: _resource_config.yml description: - - The cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. + - The pacemaker cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. - Specify a path/filename to save the file elsewhere. + - The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role. required: false type: str - sap_ha_cluster_create_config_only: + sap_ha_cluster_create_config_varfile: default: false description: - - Enable to only create an output of the parameters and values this role will use as input into the 'ha_cluster' role. - - The output is saved in a variables file and used for individual execution of the 'ha_cluster' linux system role. + - When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format. + - This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_cluster' role. + - When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes. - WARNING! This report may include sensitive details like secrets required for certain cluster resources! required: false type: bool - sap_ha_cluster_fence_power_timeout: - default: 240 + sap_ha_cluster_fence_options: description: - - STONITH resource parameter to test X seconds for status change after ON/OFF. + - STONITH resource common parameters that apply to most fencing agents. + - These options are applied to fencing resources this role uses automatically for pre-defined platforms (like AWS EC2, IBM Cloud VPC). + - The listed options are set by default. + - Additional options can be added by defining this parameter in dictionary format and adding the defaults plus any valid stonith resource key-value pair. required: false - type: int + type: dict - sap_ha_cluster_fence_reboot_retries: - default: 4 - description: - - STONITH resource parameter to define how often it retries to restart a node. - required: false - type: int + options: - sap_ha_cluster_fence_reboot_timeout: - default: 400 - description: - - STONITH resource parameter to define after which timeout a node restart is returned as failed. - required: false - type: int + pcmk_reboot_retries: + default: 4 + description: + - STONITH resource parameter to define how often it retries to restart a node. + required: false + type: int + + pcmk_reboot_timeout: + default: 400 + description: + - STONITH resource parameter to define after which timeout a node restart is returned as failed. + required: false + type: int + + power_timeout: + default: 240 + description: + - STONITH resource parameter to test X seconds for status change after ON/OFF. + required: false + type: int sap_ha_cluster_hana_automated_register: default: true @@ -175,6 +188,20 @@ argument_specs: required: false type: str + sap_ha_cluster_ibmcloud_api_key: + description: + - The API key is required to allow control of instances (for example for fencing operations). + - Required for cluster nodes setup in IBM Cloud VPC. + required: false + type: str + + sap_ha_cluster_ibmcloud_region: + description: + - The cloud region key in which the instances are running. + - Required for cluster nodes setup in IBM Cloud VPC. + required: false + type: str + sap_ha_cluster_replication_type: choices: - mtr diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index 196555830..c1ca6e733 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -16,6 +16,10 @@ # ansible_chassis_version: "NA" # ansible_product_name: "r5.8xlarge" # ansible_system_vendor: "Amazon EC2" +# +### IBM Cloud VPC facts +# ansible_chassis_asset_tag: "ibmcloud" +# ansible_chassis_vendor: "IBM:Cloud Compute Server 1.0:mx2-16x128" # TODO: detection based on multiple facts and providing one standard # name for use as platform type in related include files @@ -26,18 +30,23 @@ ansible.builtin.set_fact: __sap_ha_cluster_platform: vm_aws_ec2 - -# TODO: workaround, pcmk_host_map must be defined before stonith vars are built -# Mapping will probably be different on non-AWS platforms. To be adjusted... -- name: "SAP HA Cluster - Construct pcmk_host_map for stonith on AWS EC2 VM" - when: __sap_ha_cluster_platform == 'vm_aws_ec2' +- name: "SAP HA Cluster - Check if platform is IBM VPC VM" + when: + - ansible_chassis_asset_tag == 'ibmcloud' ansible.builtin.set_fact: - __sap_ha_cluster_pcmk_host_map: >- - {% for entry in sap_hana_cluster_nodes -%} - {% for host in ansible_play_hosts -%} - {% if hostvars[host].ansible_hostname == entry.node_name -%} - {{ entry.node_name }}:{{ hostvars[host].ansible_board_asset_tag }} - {%- if not loop.last %};{% endif %}{%- endif %}{%- endfor %}{%- endfor %} + __sap_ha_cluster_platform: vm_ibmcloud + +# Call tasks to discover information that is needed as input for any further steps. +# Run this before including the platform vars in order to build vars based on the +# discovered data. +- name: "SAP HA Cluster - Include platform specific information collection" + when: __sap_ha_cluster_platform_info is file + ansible.builtin.include_tasks: + file: "{{ item }}" + loop: + - "platform/register_sysinfo_{{ __sap_ha_cluster_platform }}.yml" + vars: + __sap_ha_cluster_platform_info: "{{ role_path }}/tasks/{{ item }}" - name: "SAP HA Cluster - Include platform specific variables" ansible.builtin.import_tasks: platform/include_vars_platform.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 067feb5d9..15b594dea 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -18,11 +18,44 @@ - name: concurrent-fencing value: true +# Combine the stonith resource config from +# - assembled pcmk_host_map +# - fence resource defaults +# - fence agent specific required options + +- name: "SAP HA Cluster - Assemble the stonith resource definition" + ansible.builtin.set_fact: + sap_ha_cluster_stonith_resource: + - id: "res_{{ sap_ha_cluster_stonith_required.agent | split(':') | last }}" + agent: "{{ sap_ha_cluster_stonith_required.agent }}" + instance_attrs: + - attrs: |- + {% set attrs = [] -%} + {% set map = attrs.extend([ + { + 'name': 'pcmk_host_map', + 'value': '"' + __sap_ha_cluster_pcmk_host_map + '"' + }]) -%} + {%- for agent_opt in (sap_ha_cluster_stonith_required.options | dict2items) -%} + {% set aopts = attrs.extend([ + { + 'name': agent_opt.key, + 'value': agent_opt.value + }]) -%} + {%- endfor %} + {%- for fence_opt in (sap_ha_cluster_fence_options | dict2items) -%} + {% set fopts = attrs.extend([ + { + 'name': fence_opt.key, + 'value': fence_opt.value + }]) -%} + {%- endfor %} + {{ attrs }} + # The STONITH resource is an element in the cluster_resource_primitives list - name: "SAP HA Cluster - Construct stonith resources definition" when: - - sap_ha_cluster_stonith_resources is defined - - sap_ha_cluster_stonith_resources is iterable + - sap_ha_cluster_stonith_resource is defined ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + sap_ha_cluster_stonith_resources }}" + __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + (sap_ha_cluster_stonith_resource | from_yaml) }}" no_log: true # stonith resources usually contain secrets diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 6acf40680..03c399f58 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -58,16 +58,15 @@ file: construct_vars_hana_scaleout.yml - name: "SAP HA Cluster - Block with actual changes" - when: not sap_ha_cluster_create_config_only block: # Start with prerequisite changes for certain platforms, if applicable - - name: "SAP HA Cluster - Include platform specific fencing prerequisites" + - name: "SAP HA Cluster - Include platform specific prerequisites" when: __sap_ha_cluster_platform_file is file ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "platform/preconfigure_{{ ansible_system_vendor | lower | replace(' ', '_') }}.yml" + - "platform/preconfigure_{{ __sap_ha_cluster_platform }}.yml" vars: __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" @@ -112,7 +111,7 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster - no_log: true # some parameters contain secrets + #no_log: true # some parameters contain secrets no_log: true # some parameters contain secrets vars: __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" @@ -182,6 +181,7 @@ check_mode: false - name: "SAP HA Cluster - Display configuration parameters SAVE FILE location" + when: sap_ha_cluster_create_config_varfile ansible.builtin.debug: msg: | The cluster resource configuration parameters have been saved here: diff --git a/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml b/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml index c41f9118c..5fba15260 100644 --- a/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml @@ -32,35 +32,12 @@ path: /root/.aws/credentials no_log: true -# TODO: find a better way to work with multi-nic instances -# The cluster setup works with the primary interface by default. - -# - name: "SAP HA Cluster - Get VPC info" -# ansible.builtin.shell: | -# aws ec2 describe-vpcs \ -# --output text \ -# --filters "Name=tag:Name,Values={{ sap_ha_cluster_aws_vpc }}" \ -# --query 'Vpcs[*].VpcId' -# register: __sap_ha_cluster_aws_describe_vpcs -# changed_when: false -# run_once: true -# check_mode: false -# -# - name: "SAP HA Cluster - Get instances info" -# ansible.builtin.shell: | -# aws ec2 describe-instances \ -# --output json \ -# --query 'Reservations[].Instances[]' -# register: __sap_ha_cluster_aws_describe_instances -# changed_when: false -# run_once: true -# check_mode: false -# -# - name: "SAP HA Cluster - Combine instance info into a dictionary" -# ansible.builtin.set_fact: -# __sap_ha_cluster_aws_instances: "{{ __sap_ha_cluster_aws_instances + [{'private_ip': item.PrivateIpAddress, 'instance_id': item.InstanceId}] }}" -# loop: "{{ __sap_ha_cluster_aws_describe_instances.stdout }}" -# loop_control: -# label: "{{ item.PrivateIpAddress }}" -# run_once: true -# check_mode: false +# pcmk_host_map format: :;:... +- name: "SAP HA Cluster - Assemble host mapping" + ansible.builtin.set_fact: + __sap_ha_cluster_pcmk_host_map: > + {% for node in ansible_play_hosts_all -%} + {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].ansible_board_asset_tag }} + {%- if not loop.last %}; + {%- endif %} + {%- endfor %} diff --git a/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml b/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml new file mode 100644 index 000000000..2cafb81a9 --- /dev/null +++ b/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml @@ -0,0 +1,18 @@ +--- +# There is no ansible fact with the fully qualified VM instance ID. +# We get this information from the SMBIOS/DMI. +- name: "SAP HA Cluster - Register instance ID" + ansible.builtin.shell: | + dmidecode -s system-family + register: __sap_ha_cluster_register_ibmcloud_instance + changed_when: false + check_mode: false + +- name: "SAP HA Cluster - Assemble host mapping" + ansible.builtin.set_fact: + __sap_ha_cluster_pcmk_host_map: >- + {% for node in ansible_play_hosts_all -%} + {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].__sap_ha_cluster_register_ibmcloud_instance.stdout }} + {%- if not loop.last %}; + {%- endif %} + {% endfor %} diff --git a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml index 3d2111901..eca6b2dba 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml @@ -22,29 +22,13 @@ __sap_ha_cluster_aws_instances: [] # sap_ha_cluster_aws_region: # sap_ha_cluster_aws_vpc: -# TODO: construct parameter -# __sap_ha_cluster_pcmk_host_map - -sap_ha_cluster_stonith_resources: - - id: res_fence_aws - agent: "stonith:fence_aws" - instance_attrs: - - attrs: - - name: access_key - value: "{{ sap_ha_cluster_aws_access_key_id }}" - - name: secret_key - value: "{{ sap_ha_cluster_aws_secret_access_key }}" - - name: region - value: "{{ sap_ha_cluster_aws_region }}" - - name: pcmk_host_map - value: "{{ __sap_ha_cluster_pcmk_host_map }}" - - name: pcmk_reboot_retries - value: "{{ sap_ha_cluster_fence_reboot_retries }}" - - name: pcmk_reboot_timeout - value: "{{ sap_ha_cluster_fence_reboot_timeout }}" - - name: power_timeout - value: "{{ sap_ha_cluster_fence_power_timeout }}" +sap_ha_cluster_stonith_required: + agent: "stonith:fence_aws" + options: + access_key: "{{ sap_ha_cluster_aws_access_key_id }}" + secret_key: "{{ sap_ha_cluster_aws_secret_access_key }}" + region: "{{ sap_ha_cluster_aws_region }}" # Platform specific VIP handling sap_ha_cluster_vip_strategy: aws_vpc_move_ip diff --git a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml index c9daf7497..69835a4fc 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml @@ -7,5 +7,11 @@ sap_ha_cluster_fence_agent_packages: - fence-agents-ibm-vpc # __sap_ha_cluster_repos: -# - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rhui-rpms" +# - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" # name: High Availability + +sap_ha_cluster_stonith_required: + agent: "stonith:fence_ibm_vpc" + options: + apikey: "{{ sap_ha_cluster_ibmcloud_api_key }}" + region: "{{ sap_ha_cluster_ibmcloud_region }}" From 82bffbd1a90c9bc6205592211e90a4b2d56cbf9b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 21 Oct 2022 16:52:51 +0200 Subject: [PATCH 245/375] sap_ha_cluster: ibmcloud specific parameters mentioned --- roles/sap_ha_cluster/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index b39a85d99..87ffc2e18 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -37,7 +37,8 @@ Minimum required parameters: On cloud platforms additional parameters are required: - AWS: `sap_ha_cluster_aws_*` variables -- `sap_ha_cluster_vip_update_rt` +- AWS: `sap_ha_cluster_vip_update_rt` +- IBM Cloud VPC: `sap_ha_cluster_ibmcloud_*` variables --- From bcc22015ebfbf8c565841c1dd6ae4de964863ae6 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 21 Oct 2022 16:58:05 +0200 Subject: [PATCH 246/375] sap_ha_cluster: doc update --- roles/sap_ha_cluster/README.md | 5 +++-- roles/sap_ha_cluster/meta/argument_specs.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 87ffc2e18..341f52b60 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -103,8 +103,9 @@ Required for cluster nodes setup on Amazon cloud.
- _Type:_ `str` - _Default:_ `_resource_config.yml` -The pacemaker cluster resource configuration created by this role will be saved in a Yaml file in the current working directory.
-Specify a path/filename to save the file elsewhere.
+The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
+Requires `sap_ha_cluster_create_config_varfile` to be enabled for generating the output file.
+Specify a path/filename to save the file in a custom location.
The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
### sap_ha_cluster_create_config_varfile diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 6e246860e..23aeecc30 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -99,8 +99,9 @@ argument_specs: sap_ha_cluster_create_config_dest: default: _resource_config.yml description: - - The pacemaker cluster resource configuration created by this role will be saved in a Yaml file in the current working directory. - - Specify a path/filename to save the file elsewhere. + - The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory. + - Requires `sap_ha_cluster_create_config_varfile` to be enabled for generating the output file. + - Specify a path/filename to save the file in a custom location. - The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role. required: false type: str From 7f2fe45b8d4a694280535b33a746d9031fab5028 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 21 Oct 2022 17:01:23 +0200 Subject: [PATCH 247/375] sap_ha_cluster: fixed no_log --- roles/sap_ha_cluster/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 03c399f58..463046115 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -111,7 +111,7 @@ name: linux-system-roles.ha_cluster apply: tags: ha_cluster - #no_log: true # some parameters contain secrets + no_log: true # some parameters contain secrets no_log: true # some parameters contain secrets vars: __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" From 7ae40e27e199959be492135470b0b161dd55d510 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 21 Oct 2022 22:55:36 +0200 Subject: [PATCH 248/375] sap_hana_preconfigure: No longer install package IBMinvscout for RHEL 9 on ppc64le --- roles/sap_hana_install/meta/argument_specs.yml | 2 +- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_hana_install/meta/argument_specs.yml b/roles/sap_hana_install/meta/argument_specs.yml index 76a859b9d..da6e26f14 100644 --- a/roles/sap_hana_install/meta/argument_specs.yml +++ b/roles/sap_hana_install/meta/argument_specs.yml @@ -8,7 +8,7 @@ argument_specs: type: str # str, list, dict, bool, int, float, path, raw, jsonarg, json, bytes, bits required: true no_log: true - sap_hana_install_instance_number: + sap_hana_install_number: description: HANA Instance Number type: str # str, list, dict, bool, int, float, path, raw, jsonarg, json, bytes, bits required: true diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 0fe0aa226..523ec53f9 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -194,7 +194,7 @@ __sap_hana_preconfigure_required_ppc64le: - powerpc-utils # - powerpc-utils-python # this package is no longer available for RHEL8 - ppc64-diag - - IBMinvscout +# - IBMinvscout # this package is no longer available for RHEL 9 # Network related kernel parameters as set in SAP Note 2382421: __sap_hana_preconfigure_kernel_parameters_default: From 00777ff0a953238c8a11116bdc84b9b89a9f72c3 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 23 Oct 2022 18:40:05 +0100 Subject: [PATCH 249/375] sap_install_media_detect: fix sap ase client extract path --- roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml index dca35f20c..fe09f91d8 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -60,7 +60,7 @@ {{ sap_install_media_detect_directory }}/{{ sap_swpm_sapcar_file_name }} \ -xvf {{ item }} \ -manifest SIGNATURE.SMF \ - -R "{{ sap_install_media_detect_directory }}/sapase_extracted" + -R "{{ sap_install_media_detect_directory }}/sapase_client_extracted" args: chdir: "{{ sap_install_media_detect_directory }}" with_items: From dd5adb18ccb294d89ecf51f743f6a8100fe8a159 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 23 Oct 2022 23:18:58 +0100 Subject: [PATCH 250/375] sap_install_media_detect: fix regex for sap ase extract path --- roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml index fe09f91d8..5af040d11 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -71,7 +71,7 @@ paths: "{{ sap_install_media_detect_directory }}/sapase_extracted" recurse: yes file_type: directory - contains: "BD_SYBASE_ASE" + contains: ".*BD_SYBASE_ASE.*SYBASE_LINUX.*" register: detect_directory_sapase_extracted - name: SAP Install Media Detect - SAP ASE - Identify SAP ASE Client extracted From dd0602ec7959ce96a386b415f35eb7607b56c230 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 24 Oct 2022 00:32:41 +0100 Subject: [PATCH 251/375] sap_install_media_detect: fix regex for sap ase extract path to return correct dir --- roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml index 5af040d11..38f3f5b65 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -71,7 +71,7 @@ paths: "{{ sap_install_media_detect_directory }}/sapase_extracted" recurse: yes file_type: directory - contains: ".*BD_SYBASE_ASE.*SYBASE_LINUX.*" + contains: ".*SYBASE_LINUX.*" # Identify directory, containing directory with this string register: detect_directory_sapase_extracted - name: SAP Install Media Detect - SAP ASE - Identify SAP ASE Client extracted From 8a65ace849f34dfcc74ca1f5babe30253d8e3ccc Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 24 Oct 2022 02:09:15 +0100 Subject: [PATCH 252/375] sap_install_media_detect: change contains to patterns for extract path search --- .../tasks/detect_sapanydb_sapase.yml | 5 +++-- .../tasks/detect_sapanydb_sapmaxdb.yml | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml index 38f3f5b65..61d6549d7 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapase.yml @@ -71,7 +71,8 @@ paths: "{{ sap_install_media_detect_directory }}/sapase_extracted" recurse: yes file_type: directory - contains: ".*SYBASE_LINUX.*" # Identify directory, containing directory with this string + patterns: ".*SYBASE_LINUX.*" # Use patterns to identify directory with this string + use_regex: yes register: detect_directory_sapase_extracted - name: SAP Install Media Detect - SAP ASE - Identify SAP ASE Client extracted @@ -79,7 +80,7 @@ paths: "{{ sap_install_media_detect_directory }}/sapase_client_extracted" recurse: yes file_type: directory - contains: "sybodbc" + contains: "sybodbc" # Use contains to find specific filename register: detect_directory_sapase_client_extracted - name: SAP Install Media Detect - SAP ASE - Local Directory source - move SAP ASE compressed archive files diff --git a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml index 5f9a63c76..bad74d3d0 100644 --- a/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml +++ b/roles/sap_install_media_detect/tasks/detect_sapanydb_sapmaxdb.yml @@ -49,8 +49,7 @@ paths: "{{ sap_install_media_detect_directory }}/sapmaxdb_extracted/" recurse: yes file_type: directory -# contains: "MaxDB_7.9" - patterns: '.*MaxDB_7.9.*' + patterns: '.*MaxDB_7.9.*' # Use patterns to identify directory with this string use_regex: yes register: detect_directory_sapmaxdb_extracted From 32933eefc5846e7add98333a83e5f5e93bee0d0d Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 25 Oct 2022 15:25:07 +0100 Subject: [PATCH 253/375] sap_swpm: improve logic and maint plan stack handling --- roles/sap_swpm/defaults/main.yml | 10 +++- roles/sap_swpm/tasks/pre_install.yml | 3 +- .../tasks/pre_install/install_type.yml | 59 +++++++++---------- .../install_type/generic_install.yml | 28 --------- .../pre_install/install_type/ha_install.yml | 2 +- .../install_type/maint_plan_stack_install.yml | 21 +++++++ .../install_type/no_nwas_install.yml | 3 + .../install_type/restore_install.yml | 2 +- .../install_type/standard_install.yml | 28 --------- .../sap_swpm/tasks/swpm/prepare_software.yml | 25 -------- roles/sap_swpm/templates/configfile.j2 | 59 +++++++++++++++---- 11 files changed, 113 insertions(+), 127 deletions(-) delete mode 100644 roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml create mode 100644 roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml create mode 100644 roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml delete mode 100644 roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 4dec4358c..06f5cee99 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -48,13 +48,20 @@ sap_swpm_inifile_list: # - swpm_installation_media_swpm1_oracledb_19 # - swpm_installation_media_swpm1_sapase # - swpm_installation_media_swpm1_sapmaxdb -# - sum_config +# - maintenance_plan_stack_tms_config +# - maintenance_plan_stack_tms_transports +# - maintenance_plan_stack_spam_config +# - maintenance_plan_stack_sum_config +# - maintenance_plan_stack_sum_10_batch_mode +# - +# - - credentials - credentials_hana # - credentials_anydb_ibmdb2 # - credentials_anydb_oracledb # - credentials_anydb_sapase # - credentials_anydb_sapmaxdb +# - credentials_nwas_ssfs - db_config_hana # - db_config_anydb_all # - db_config_anydb_ibmdb2 @@ -142,6 +149,7 @@ sap_swpm_spam_update: 'false' sap_swpm_spam_update_sar: sap_swpm_configure_tms: 'true' sap_swpm_tmsadm_password: +sap_swpm_tms_tr_files_path: # --- Experimental --- # sap_swpm_install_saphostagent: 'true' diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index 8f0c220ee..d2a3cca4f 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -18,7 +18,8 @@ sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank # IF SWPM is running a HA installation, Ansible Variable sap_swpm_swpm_command_virtual_hostname is set and contains "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" - sap_swpm_swpm_command_extra_args: "SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false {{ sap_swpm_swpm_command_virtual_hostname }}" + # If SWPM is running a MP Stack XML installation, Ansible Variable sap_swpm_swpm_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + sap_swpm_swpm_command_extra_args: "SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false {{ sap_swpm_swpm_command_virtual_hostname }} {{ sap_swpm_swpm_command_mp_stack }}" ################ # Pre Install Optional Tasks diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index f79d4ce75..c6e6923e7 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -1,60 +1,55 @@ --- -- name: SAP SWPM Pre Install - Determine if Generic Product - ansible.builtin.set_fact: - sap_swpm_generic: 'true' - when: - - "'Webdispatcher' in sap_swpm_product_catalog_id" -# todo: add items for generic SAP products - -################ -# Determine Installation Type -################ - - name: SAP SWPM Pre Install - Determine Installation Type ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" -# Restore from backup -- name: SAP SWPM Pre Install - Check if Backup Restore +- name: SAP SWPM Pre Install - Determine if SAP Product without SAP NetWeaver AS ansible.builtin.set_fact: - sap_swpm_swpm_installation_type: "restore" - sap_swpm_swpm_installation_header: "Restoring from Backup" + sap_swpm_no_nwas_install: 'true' when: - - "'.CP' in sap_swpm_product_catalog_id" + - "'Webdispatcher' in sap_swpm_product_catalog_id" +# todo: add items for further SAP products without SAP NetWeaver AS -# Standard -- name: SAP SWPM Pre Install - Check if Standard Installation + +################ +# Determine Installation Type +################ + +- name: SAP SWPM Pre Install - Check if SAP Software installation without SAP NetWeaver AS ansible.builtin.set_fact: - sap_swpm_swpm_installation_type: "standard" - sap_swpm_swpm_installation_header: "Installing" + sap_swpm_swpm_installation_type: "no_nwas" + sap_swpm_swpm_installation_header: "Installing without SAP NetWeaver AS" when: - "not '.ABAPHA' in sap_swpm_product_catalog_id" - "not '.CP' in sap_swpm_product_catalog_id" - - "'initial' in sap_swpm_virtual_hostname" - - "not sap_swpm_generic | bool" + - "sap_swpm_no_nwas_install | bool" -# Generic -- name: SAP SWPM Pre Install - Check if Generic SAP Product Installation +- name: SAP SWPM Pre Install - Check if System Copy (Backup/Restore) ansible.builtin.set_fact: - sap_swpm_swpm_installation_type: "generic" - sap_swpm_swpm_installation_header: "Installing Generic SAP Product" + sap_swpm_swpm_installation_type: "restore" + sap_swpm_swpm_installation_header: "System Copy restore from backup" when: - - "not '.CP' in sap_swpm_product_catalog_id" - - "sap_swpm_generic | bool" + - "'.CP' in sap_swpm_product_catalog_id" -# High Availability -- name: SAP SWPM Pre Install - Check if High Availability Installation +- name: SAP SWPM Pre Install - Check if SAP High Availability installation ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "ha" sap_swpm_swpm_installation_header: "High Availability Installation using virtual hostname" sap_swpm_swpm_command_virtual_hostname: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" when: - "'.ABAPHA' in sap_swpm_product_catalog_id" - - "not 'initial' in sap_swpm_virtual_hostname" - - "not sap_swpm_generic | bool" + - "not sap_swpm_standard | bool" + +- name: SAP SWPM Pre Install - Check if installation using SAP Maintenance Planner + ansible.builtin.set_fact: + sap_swpm_swpm_installation_type: "maint_plan_stack" + sap_swpm_swpm_installation_header: "Installing using SAP Maintenance Planner Stack XML" + sap_swpm_swpm_command_mp_stack: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" + when: + - "sap_swpm_mp_stack_path | length > 0" ################ # Run Installation Type Steps diff --git a/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml deleted file mode 100644 index 10dabbfbe..000000000 --- a/roles/sap_swpm/tasks/pre_install/install_type/generic_install.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- - -# Generic Install - -- name: SAP SWPM Pre Install - Generic Install - ansible.builtin.set_fact: - sap_swpm_sum_prepare: 'true' - sap_swpm_sum_start: 'true' - sap_swpm_spam_update: 'false' - sap_swpm_spam_update_sar: - sap_swpm_configure_tms: 'true' - sap_swpm_tmsadm_password: "{{ sap_swpm_master_password }}" -# sap_swpm_sum_batch_file: "/software/swpm20/ConfigInput.xml" - -# 0. MP Stack - -# - name: SAP SWPM Pre Install - Fresh Install - Get MP Stack xml from {{ sap_swpm_software_path }} -# shell: | -# ls MP_Stack_* -# args: -# chdir: "{{ sap_swpm_software_path }}" -# register: sap_swpm_mp_stack_file_get - -# - name: SAP SWPM Pre Install - Set fact for MP Stack -# set_fact: -# sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}" -# sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" -# when: "sap_swpm_mp_stack_file_get.exists" diff --git a/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml index d1d99fef6..f963e252a 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml @@ -1,6 +1,6 @@ --- -# High Availability Install +# High Availability installation - name: SAP SWPM Pre Install - HA Installation - Add virtual hostname in sapinst command ansible.builtin.set_fact: diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml new file mode 100644 index 000000000..cff3a514b --- /dev/null +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -0,0 +1,21 @@ +--- + +# Install using SAP Maintenance Planner Stack XML + +- name: SAP SWPM Pre Install - Fresh Install - Get MP Stack xml from {{ sap_swpm_software_path }} + shell: | + ls MP_Stack_* + args: + chdir: "{{ sap_swpm_software_path }}" + register: sap_swpm_mp_stack_file_get + +- name: SAP SWPM Pre Install - Set fact for MP Stack + set_fact: + sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}" + sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" + when: "sap_swpm_mp_stack_file_get.exists" + +- name: SAP SWPM Pre Install - Set fact for MP Stack SWPM injection + ansible.builtin.set_fact: + sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + when: "sap_swpm_mp_stack_file_get.exists" diff --git a/roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml new file mode 100644 index 000000000..9a31c6eee --- /dev/null +++ b/roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml @@ -0,0 +1,3 @@ +--- + +# Placeholder for future if required diff --git a/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml index 81d9e151c..6dcd13347 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml @@ -1,6 +1,6 @@ --- -# Backup Restore +# System Copy restore installation - name: SAP SWPM Pre Install - Check availability backup location - {{ sap_swpm_backup_location }} ansible.builtin.stat: diff --git a/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml deleted file mode 100644 index d1b1d9335..000000000 --- a/roles/sap_swpm/tasks/pre_install/install_type/standard_install.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- - -# Standard Install - -- name: SAP SWPM Pre Install - Standard Install - ansible.builtin.set_fact: - sap_swpm_sum_prepare: 'true' - sap_swpm_sum_start: 'true' - sap_swpm_spam_update: 'false' - sap_swpm_spam_update_sar: - sap_swpm_configure_tms: 'true' - sap_swpm_tmsadm_password: "{{ sap_swpm_master_password }}" -# sap_swpm_sum_batch_file: "/software/swpm20/ConfigInput.xml" - -# 0. MP Stack - -# - name: SAP SWPM Pre Install - Fresh Install - Get MP Stack xml from {{ sap_swpm_software_path }} -# shell: | -# ls MP_Stack_* -# args: -# chdir: "{{ sap_swpm_software_path }}" -# register: sap_swpm_mp_stack_file_get - -# - name: SAP SWPM Pre Install - Set fact for MP Stack -# set_fact: -# sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}" -# sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" -# when: "sap_swpm_mp_stack_file_get.exists" diff --git a/roles/sap_swpm/tasks/swpm/prepare_software.yml b/roles/sap_swpm/tasks/swpm/prepare_software.yml index 467fd0519..258b8a265 100644 --- a/roles/sap_swpm/tasks/swpm/prepare_software.yml +++ b/roles/sap_swpm/tasks/swpm/prepare_software.yml @@ -21,31 +21,6 @@ owner: root group: root -# Backup Location - this is moved to install_type/restore_install.yml - -# - name: SAP SWPM Pre Instal; - Check backup location - -# block: - -# - name: SAP SWPM Pre Install - Check availability backup location - {{ sap_swpm_backup_location }} -# stat: -# path: "{{ sap_swpm_backup_location }}" -# register: sap_swpm_backup_location_stat -# failed_when: not sap_swpm_backup_location_stat.stat.exists and '.CP' in sap_swpm_product_catalog_id - -# - name: SAP SWPM Pre Install - Change ownership of backup location - {{ sap_swpm_backup_location }} -# ansible.builtin.file: -# path: "{{ sap_swpm_backup_location }}" -# state: directory -# recurse: yes -# mode: '0755' -# owner: root -# group: root -# when: -# - sap_swpm_backup_location_stat.stat.exists and sap_swpm_backup_location_stat.stat.isdir - -# when: -# - "'restore' in sap_swpm_swpm_installation_type" # SAPCAR Path diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index e803d886f..7a34f0f2a 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -123,20 +123,53 @@ SAPINST.CD.PACKAGE.RDBMS-ADA = {{ sap_swpm_cd_sapmaxdb_path }} # DownloadService.planNumber = {% endif %} -{% if 'sum_config' in sap_swpm_inifile_list %} +{% if 'maintenance_plan_stack_tms_config' in sap_swpm_inifile_list %} ###### -# sum_config +# maintenance_plan_stack_tms_config ###### -NW_ABAP_Prepare_SUM.SUMBatchFile = {{ sap_swpm_sum_batch_file }} -NW_ABAP_Prepare_SUM.prepareSUM = {{ sap_swpm_sum_prepare | lower }} -NW_ABAP_Prepare_SUM.startSUM = {{ sap_swpm_sum_start | lower }} -NW_ABAP_SPAM_Update.SPAMUpdateArchive = {{ sap_swpm_spam_update_sar }} -NW_ABAP_SPAM_Update.SPAMUpdateDecision = {{ sap_swpm_spam_update | lower }} -# NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = NW_ABAP_TMSConfig.configureTMS = {{ sap_swpm_configure_tms | lower }} NW_ABAP_TMSConfig.transportPassword = {{ sap_swpm_tmsadm_password }} {% endif %} +{% if 'maintenance_plan_stack_tms_transports' in sap_swpm_inifile_list %} +###### +# maintenance_plan_stack_tms_transports +###### +NW_ABAP_Include_Corrections.includeTransports = true +NW_ABAP_Include_Corrections.transportFilesLocations = {{ sap_swpm_tms_tr_files_path }} +{% endif %} + +{% if 'maintenance_plan_stack_spam_config' in sap_swpm_inifile_list %} +###### +# maintenance_plan_stack_spam_config +###### +NW_ABAP_SPAM_Update.SPAMUpdateDecision = {{ sap_swpm_spam_update | lower }} +{% if sap_swpm_spam_update %} +NW_ABAP_SPAM_Update.SPAMUpdateArchive = {{ sap_swpm_spam_update_sar }} +{% else %} +#NW_ABAP_SPAM_Update.SPAMUpdateArchive = +{% endif %} +{% endif %} + +{% if 'maintenance_plan_stack_sum_config' in sap_swpm_inifile_list %} +###### +# maintenance_plan_stack_sum_config +###### +NW_ABAP_Prepare_SUM.prepareSUM = {{ sap_swpm_sum_prepare | lower }} +NW_ABAP_Prepare_SUM.startSUM = {{ sap_swpm_sum_start | lower }} + +# Password for SUM must be for 'adm' user +NW_ABAP_Prepare_SUM.Password = {{ sap_swpm_sap_sidadm_password }} +{% endif %} + +{% if 'maintenance_plan_stack_sum_10_batch_mode' in sap_swpm_inifile_list %} +###### +# maintenance_plan_stack_sum_10_batch_mode +###### +# Re-run of existing BatchModeInputFile.xml for NWAS JAVA (generated by SUM 1.0 on previous host into the /sdt/param/ subdirectory) +NW_ABAP_Prepare_SUM.SUMBatchFile = {{ sap_swpm_sum_batch_file }} +{% endif %} + {% if 'credentials' in sap_swpm_inifile_list %} ###### # credentials @@ -151,7 +184,6 @@ DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} # 'sapadm' user of the SAP Host Agent hostAgent.sapAdmPassword = {{ sap_swpm_sapadm_password }} -# NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = {% endif %} {% if 'credentials_hana' in sap_swpm_inifile_list %} @@ -212,6 +244,14 @@ Sdb_DBUser.dbmPassword = {{ sap_swpm_db_system_password }} Sdb_Schema_Dialogs.dbSchemaPassword = {{ sap_swpm_db_schema_password }} {% endif %} +{% if 'credentials_nwas_ssfs' in sap_swpm_inifile_list %} +###### +# credentials_nwas_ssfs +###### +# NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = +# HDB_Userstore.useABAPSSFS = false +{% endif %} + {% if 'db_config_hana' in sap_swpm_inifile_list %} ###### # db_config_hana @@ -220,7 +260,6 @@ Sdb_Schema_Dialogs.dbSchemaPassword = {{ sap_swpm_db_schema_password }} HDB_Schema_Check_Dialogs.schemaName = {{ sap_swpm_db_schema }} HDB_Schema_Check_Dialogs.validateSchemaName = false # HDB_Userstore.doNotResolveHostnames = -# HDB_Userstore.useABAPSSFS = false # NW_HDB_DBClient.checkCreateUserstore = true # hdb.create.dbacockpit.user = false # HDB_Userstore.systemDBPort = From 8d344ffcea39caed76e6c427d0ab3dea9240df94 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 25 Oct 2022 18:29:12 +0100 Subject: [PATCH 254/375] sap_swpm: enforce sid in stack xml --- .../tasks/pre_install/install_type.yml | 1 + .../install_type/maint_plan_stack_install.yml | 24 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index c6e6923e7..e8ac05382 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -5,6 +5,7 @@ sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" + sap_swpm_no_nwas_install: false - name: SAP SWPM Pre Install - Determine if SAP Product without SAP NetWeaver AS ansible.builtin.set_fact: diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index cff3a514b..f2686d763 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -2,20 +2,34 @@ # Install using SAP Maintenance Planner Stack XML -- name: SAP SWPM Pre Install - Fresh Install - Get MP Stack xml from {{ sap_swpm_software_path }} +- name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_software_path }} shell: | ls MP_Stack_* args: chdir: "{{ sap_swpm_software_path }}" register: sap_swpm_mp_stack_file_get -- name: SAP SWPM Pre Install - Set fact for MP Stack +- name: SAP SWPM Pre Install - MP Stack XML - Set fact set_fact: sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}" sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" - when: "sap_swpm_mp_stack_file_get.exists" + when: "sap_swpm_mp_stack_file_get.stdout | length > 0" -- name: SAP SWPM Pre Install - Set fact for MP Stack SWPM injection +- name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection ansible.builtin.set_fact: sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" - when: "sap_swpm_mp_stack_file_get.exists" + when: "sap_swpm_mp_stack_file_get.stdout | length > 0" + +- name: SAP SWPM Pre Install - MP Stack XML - Ensure (1 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML + ansible.builtin.replace: + path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + regexp: ' 0" + +- name: SAP SWPM Pre Install - MP Stack XML - Ensure (2 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML + ansible.builtin.replace: + path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + regexp: '([A-Z][0-9])\w' + replace: '{{ sap_swpm_sid | upper }}' + when: "sap_swpm_mp_stack_file_get.stdout | length > 0" From 91998d1db4bd061ac6ad9b10c420e588297abf5c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 13:27:31 +0100 Subject: [PATCH 255/375] sap_swpm: fix typo --- roles/sap_swpm/defaults/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 06f5cee99..1f16f021c 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -53,8 +53,6 @@ sap_swpm_inifile_list: # - maintenance_plan_stack_spam_config # - maintenance_plan_stack_sum_config # - maintenance_plan_stack_sum_10_batch_mode -# - -# - - credentials - credentials_hana # - credentials_anydb_ibmdb2 From 16daa84c40d92a737e356102db6f510b6ad0a022 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 14:06:49 +0100 Subject: [PATCH 256/375] sap_swpm: amend output line --- roles/sap_swpm/tasks/pre_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index d2a3cca4f..e47f59c83 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -67,4 +67,4 @@ - ' ' - ' The installation can take up to 3 hours. Run the following command as root' - ' on {{ ansible_hostname }} to display the installation logs:' - - ' # tail -f $(find /tmp/sapinst_instdir -name sapinst.log)' + - ' # tail -f $(cat /tmp/sapinst_instdir/.lastInstallationLocation)/sapinst.log' From 15749ce8c7bbe4bd8504896c05949337c0c5682c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 14:56:35 +0100 Subject: [PATCH 257/375] sap_swpm: final review of logic --- roles/sap_swpm/defaults/main.yml | 4 +++ .../tasks/pre_install/install_type.yml | 26 ++++++----------- ...o_nwas_install.yml => general_install.yml} | 0 roles/sap_swpm/templates/configfile.j2 | 29 +++++++++++++++++++ 4 files changed, 42 insertions(+), 17 deletions(-) rename roles/sap_swpm/tasks/pre_install/install_type/{no_nwas_install.yml => general_install.yml} (100%) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 1f16f021c..75ab57a0c 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -87,6 +87,10 @@ sap_swpm_inifile_list: # - nw_config_post_abap_reports - sap_os_linux_user +## Not in use +# - swpm_installation_media_download_service +# - solman_daa_swpm1 + ######################################## # SWPM Ansible Role variables diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index e8ac05382..89cad52e9 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -5,28 +5,19 @@ sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" - sap_swpm_no_nwas_install: false - -- name: SAP SWPM Pre Install - Determine if SAP Product without SAP NetWeaver AS - ansible.builtin.set_fact: - sap_swpm_no_nwas_install: 'true' - when: - - "'Webdispatcher' in sap_swpm_product_catalog_id" -# todo: add items for further SAP products without SAP NetWeaver AS ################ # Determine Installation Type ################ -- name: SAP SWPM Pre Install - Check if SAP Software installation without SAP NetWeaver AS - ansible.builtin.set_fact: - sap_swpm_swpm_installation_type: "no_nwas" - sap_swpm_swpm_installation_header: "Installing without SAP NetWeaver AS" - when: - - "not '.ABAPHA' in sap_swpm_product_catalog_id" - - "not '.CP' in sap_swpm_product_catalog_id" - - "sap_swpm_no_nwas_install | bool" +#- name: SAP SWPM Pre Install - Check if general SAP Software installation +# ansible.builtin.set_fact: +# sap_swpm_swpm_installation_type: "general" +# sap_swpm_swpm_installation_header: "General installation of SAP Software" +# when: +# - "not '.ABAPHA' in sap_swpm_product_catalog_id" +# - "not '.CP' in sap_swpm_product_catalog_id" - name: SAP SWPM Pre Install - Check if System Copy (Backup/Restore) ansible.builtin.set_fact: @@ -42,7 +33,6 @@ sap_swpm_swpm_command_virtual_hostname: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" when: - "'.ABAPHA' in sap_swpm_product_catalog_id" - - "not sap_swpm_standard | bool" - name: SAP SWPM Pre Install - Check if installation using SAP Maintenance Planner ansible.builtin.set_fact: @@ -58,3 +48,5 @@ - name: SAP SWPM Pre Install - Run Installation Type Steps ansible.builtin.include_tasks: "install_type/{{ sap_swpm_swpm_installation_type }}_install.yml" + when: + - "sap_swpm_swpm_installation_type | length > 0" diff --git a/roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/general_install.yml similarity index 100% rename from roles/sap_swpm/tasks/pre_install/install_type/no_nwas_install.yml rename to roles/sap_swpm/tasks/pre_install/install_type/general_install.yml diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 7a34f0f2a..7abf00738 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -179,7 +179,9 @@ NW_GetMasterPassword.masterPwd = {{ sap_swpm_master_password }} # 'adm' user nwUsers.sidadmPassword = {{ sap_swpm_sap_sidadm_password }} + NW_DDIC_Password.ddic000Password = {{ sap_swpm_ddic_000_password }} + DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} # 'sapadm' user of the SAP Host Agent @@ -686,3 +688,30 @@ nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} nwUsers.sidAdmUID = {{ sap_swpm_sidadm_uid }} # NW_GetSidNoProfiles.sapmnt = /sapmnt {% endif %} + +{% if 'solman_daa_swpm1' in sap_swpm_inifile_list %} +###### +# solman_daa_swpm1 +# Not in use by sap_swpm Ansible Role +###### +# DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} +# DiagnosticsAgent.InstanceNumber +# DiagnosticsAgent.LogicalHostName +# DiagnosticsAgent.SAPJVMVersion +# DiagnosticsAgent.SID +# DiagnosticsAgent.installSAPHostAgent +# DiagnosticsAgent.SolMan.HostName +# DiagnosticsAgent.SolMan.PortNumber +# DiagnosticsAgent.SolMan.UserName +# DiagnosticsAgent.SolMan.Password +# DiagnosticsAgent.SolMan.UseSSL +# DiagnosticsAgent.SLD.Connection +# DiagnosticsAgent.SolMan.Connection +# DiagnosticsAgent.SLD.HostName +# DiagnosticsAgent.SLD.PortNumber +# DiagnosticsAgent.SLD.UserName +# DiagnosticsAgent.SLD.Password +# DiagnosticsAgent.SLD.UseHTTPS +# DiagnosticsAgent.SAProuter.RouteString +# DiagnosticsAgent.SAProuter.Password +{% endif %} From 54120494aa9d59e778a51894e09342d64e232f93 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 18:17:04 +0100 Subject: [PATCH 258/375] sap_swpm: placeholder for missing param --- roles/sap_swpm/defaults/main.yml | 1 + roles/sap_swpm/templates/configfile.j2 | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 4dec4358c..aed01b4c5 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -67,6 +67,7 @@ sap_swpm_inifile_list: - db_connection_nw_hana # - db_connection_nw_anydb_ibmdb2 # - db_connection_nw_anydb_oracledb +# - db_connection_nw_anydb_sapase - db_restore_hana # - nw_config_anydb - nw_config_other diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index e803d886f..d81790eb1 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -409,6 +409,13 @@ storageBasedCopy.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} storageBasedCopy.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} {% endif %} +{% if 'db_connection_nw_anydb_sapase' in sap_swpm_inifile_list %} +###### +# db_connection_nw_anydb_sapase +###### +# NW_SYB_CIABAP.sapsaPassword = +{% endif %} + {% if 'db_restore_hana' in sap_swpm_inifile_list %} ###### # db_restore_hana From 784dd0f73899fb438fbc0976f42d77d2ab5c9845 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 18:27:32 +0100 Subject: [PATCH 259/375] sap_*_preconfigure: amend loop control for sles --- roles/sap_hana_preconfigure/tasks/SLES/configuration.yml | 4 +++- roles/sap_hana_preconfigure/tasks/SLES/installation.yml | 4 +++- .../tasks/sapnote/2578899/configuration.yml | 6 ++++-- .../tasks/SLES/configuration.yml | 8 ++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 1df42b765..090093b1e 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -9,7 +9,9 @@ var: __sap_hana_preconfigure_sapnotes | difference(['']) - name: include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/configuration.yml" + ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/configuration.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item # - ansible.builtin.include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 7df3f2789..e716680b0 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -9,5 +9,7 @@ var: __sap_hana_preconfigure_sapnotes | difference(['']) - name: include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/installation.yml" + ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/installation.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2578899/configuration.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2578899/configuration.yml index 996d91a7c..140d15bcb 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2578899/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2578899/configuration.yml @@ -6,8 +6,8 @@ backup: yes backrefs: yes state: present - regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=(?!.* {{ item }}).*). *$' - line: "\\1 {{ item }}\"" + regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=(?!.* {{ line_item }}).*). *$' + line: "\\1 {{ line_item }}\"" with_items: - "elevator=noop" notify: __sap_hana_preconfigure_regenerate_grub2_conf_handler @@ -15,6 +15,8 @@ ansible_os_family == 'Suse' and ansible_distribution_major_version == '15' tags: grubconfig + loop_control: + loop_var: line_item - name: 2578899 - sysstat - monitoring data ansible.builtin.service: diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml index 5cb827a8b..af070e27f 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml @@ -5,13 +5,17 @@ var: __sap_netweaver_preconfigure_sapnotes | difference(['']) - name: Include installation actions for required sapnotes - ansible.builtin.include_tasks: "../tasks/sapnote/{{ item }}/installation.yml" + ansible.builtin.include_tasks: "../tasks/sapnote/{{ sap_note_line_item }}/installation.yml" with_items: "{{ __sap_netweaver_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item when: __sap_netweaver_preconfigure_sapnotes is defined - name: Include configuration actions for required sapnotes - ansible.builtin.include_tasks: "../tasks/sapnote/{{ item }}/configuration.yml" + ansible.builtin.include_tasks: "../tasks/sapnote/{{ sap_note_line_item }}/configuration.yml" with_items: "{{ __sap_netweaver_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item when: __sap_netweaver_preconfigure_sapnotes is defined - name: Warn if not enough swap space is configured From e6414cbb5bba0e5762a18844875cb3eb0eb8d567 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 18:52:45 +0100 Subject: [PATCH 260/375] sap_hana_preconfigure: sles using builtin package ansible module in all other roles --- .../tasks/sapnote/1944799/installation.yml | 6 +++--- .../tasks/sapnote/2578899/installation.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml b/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml index 5affd069b..dde76c86c 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml @@ -4,7 +4,7 @@ # show zypper patterns - name: "1944799 - PDF 8.1 Package List Pattern Also 3.5 Software selection" - community.general.zypper: + ansible.builtin.package: name: "{{ pattern }}" type: pattern vars: @@ -23,7 +23,7 @@ # Requires SLE-Module-Legacy15 Module - name: "1944799 - PDF 8.1 Package List Packages (SLE-Module-Legacy15)" - community.general.zypper: + ansible.builtin.package: name: "{{ packages }}" type: package vars: @@ -40,7 +40,7 @@ - unzip - name: 1944799 - Install recommended packages - community.general.zypper: + ansible.builtin.package: type: package state: latest name: "{{ item }}" diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2578899/installation.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2578899/installation.yml index 1429a890f..11508c4e9 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2578899/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2578899/installation.yml @@ -1,7 +1,7 @@ --- # Requires SLE-Module-Legacy15 Module - name: "2578899 - SAP HANA database" - ansible.builtin.zypper: + ansible.builtin.package: name: "{{ packages }}" type: package vars: From cfd8d014c7b0eeeb6ad51f09e01798b2ddb99da4 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 19:03:22 +0100 Subject: [PATCH 261/375] sap_*_preconfigure: rhel using builtin package ansible module in all other roles --- roles/sap_general_preconfigure/tasks/RedHat/installation.yml | 2 +- roles/sap_hana_preconfigure/tasks/RedHat/installation.yml | 4 ++-- .../tasks/sapnote/2292690/10-ibm-energyscale.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 79757d999..060ebe1b8 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -183,7 +183,7 @@ var: __sap_general_preconfigure_register_minpkglist - name: Install minimum packages if required - ansible.builtin.yum: + ansible.builtin.package: name: "{{ line_item.stdout }}" state: present with_items: "{{ __sap_general_preconfigure_register_minpkglist.results }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml index 0a0b4adde..708286b08 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml @@ -68,7 +68,7 @@ ### see https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html for details - name: Install the ibm-power-repo package - ansible.builtin.yum: + ansible.builtin.package: name: "{{ sap_hana_preconfigure_ibm_power_repo_url }}" state: present disable_gpg_check: True @@ -153,7 +153,7 @@ var: __sap_hana_preconfigure_register_minpkglist - name: Install minimum packages if required - ansible.builtin.yum: + ansible.builtin.package: name: "{{ line_item.stdout }}" state: present with_items: "{{ __sap_hana_preconfigure_register_minpkglist.results }}" diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml index c1e155ebf..603021cd1 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml @@ -6,7 +6,7 @@ msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" - name: ensure pseries-energy package is not installed - ansible.builtin.yum: + ansible.builtin.package: name: pseries-energy state: absent when: ansible_architecture == "ppc64le" From 518d7b47594a0fced49e0f5b77c61975e6e1f456 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 26 Oct 2022 21:00:16 +0100 Subject: [PATCH 262/375] sap_*_preconfigure: use package list inject as common approach --- .../tasks/sapnote/1944799/installation.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml b/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml index dde76c86c..6288c9fa8 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/1944799/installation.yml @@ -5,10 +5,10 @@ # show zypper patterns - name: "1944799 - PDF 8.1 Package List Pattern Also 3.5 Software selection" ansible.builtin.package: - name: "{{ pattern }}" + name: "{{ packages }}" type: pattern vars: - pattern: + packages: - gnome_basic - base - enhanced_base @@ -41,8 +41,8 @@ - name: 1944799 - Install recommended packages ansible.builtin.package: + name: "{{ packages }}" type: package - state: latest - name: "{{ item }}" - with_items: - - tcsh + vars: + packages: + - tcsh From 08f814a12d9316080cd32b192a2d5e2fd9519845 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 28 Oct 2022 04:10:41 +0100 Subject: [PATCH 263/375] sap_swpm: amend MP Stack XML search prefix --- .../tasks/pre_install/install_type/maint_plan_stack_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index f2686d763..25c312a4f 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -4,7 +4,7 @@ - name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_software_path }} shell: | - ls MP_Stack_* + ls MP*.xml args: chdir: "{{ sap_swpm_software_path }}" register: sap_swpm_mp_stack_file_get From b8174bc6c3672ae20923420a559699e3414947a7 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 28 Oct 2022 04:23:10 +0100 Subject: [PATCH 264/375] sap_swpm: ensure MP Stack XML filename override --- .../install_type/maint_plan_stack_install.yml | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index 25c312a4f..79688f04c 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -2,34 +2,43 @@ # Install using SAP Maintenance Planner Stack XML -- name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_software_path }} +# Check for MP Stack XML if filename not given +- name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_mp_stack_path }} shell: | ls MP*.xml args: - chdir: "{{ sap_swpm_software_path }}" + chdir: "{{ sap_swpm_mp_stack_path }}" register: sap_swpm_mp_stack_file_get + when: "sap_swpm_mp_stack_file_name | length = 0" - name: SAP SWPM Pre Install - MP Stack XML - Set fact set_fact: - sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}" sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" - when: "sap_swpm_mp_stack_file_get.stdout | length > 0" + when: + - "sap_swpm_mp_stack_file_name | length > 0" + - "sap_swpm_mp_stack_file_get.stdout | length > 0" - name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection ansible.builtin.set_fact: sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" - when: "sap_swpm_mp_stack_file_get.stdout | length > 0" + when: + - "sap_swpm_mp_stack_file_name | length > 0" + - "sap_swpm_mp_stack_file_get.stdout | length > 0" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (1 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" regexp: ' 0" + when: + - "sap_swpm_mp_stack_file_name | length > 0" + - "sap_swpm_mp_stack_file_get.stdout | length > 0" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (2 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" regexp: '([A-Z][0-9])\w' replace: '{{ sap_swpm_sid | upper }}' - when: "sap_swpm_mp_stack_file_get.stdout | length > 0" + when: + - "sap_swpm_mp_stack_file_name | length > 0" + - "sap_swpm_mp_stack_file_get.stdout | length > 0" From cee4628fa6abef50299b2a09cd9bddbf1a2e7cad Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 28 Oct 2022 13:19:54 +0100 Subject: [PATCH 265/375] sap_swpm: amend MP Stack XML filename when statement --- .../install_type/maint_plan_stack_install.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index 79688f04c..80342ccb4 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -9,36 +9,29 @@ args: chdir: "{{ sap_swpm_mp_stack_path }}" register: sap_swpm_mp_stack_file_get - when: "sap_swpm_mp_stack_file_name | length = 0" + when: (sap_swpm_mp_stack_file_name is not defined) or (not sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank - name: SAP SWPM Pre Install - MP Stack XML - Set fact set_fact: sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" - when: - - "sap_swpm_mp_stack_file_name | length > 0" - - "sap_swpm_mp_stack_file_get.stdout | length > 0" + when: (sap_swpm_mp_stack_file_name is not defined) or (not sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank + +- name: SAP SWPM Pre Install - MP Stack XML - Set fact + debug: + msg: "SAP Maintenance Planner Stack XML is {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" - name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection ansible.builtin.set_fact: sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" - when: - - "sap_swpm_mp_stack_file_name | length > 0" - - "sap_swpm_mp_stack_file_get.stdout | length > 0" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (1 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" regexp: ' 0" - - "sap_swpm_mp_stack_file_get.stdout | length > 0" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (2 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" regexp: '([A-Z][0-9])\w' replace: '{{ sap_swpm_sid | upper }}' - when: - - "sap_swpm_mp_stack_file_name | length > 0" - - "sap_swpm_mp_stack_file_get.stdout | length > 0" From a3361c684f8f423ce317d877ab4df5824a2120b7 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 28 Oct 2022 19:13:13 +0100 Subject: [PATCH 266/375] sap_swpm: blank var in defaults --- roles/sap_swpm/defaults/main.yml | 1 + roles/sap_swpm/tasks/pre_install/install_type.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index aed01b4c5..875ba659e 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -310,6 +310,7 @@ sap_swpm_generic: 'false' sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" +sap_swpm_swpm_command_mp_stack: "" # Firewall setup sap_swpm_setup_firewall: 'false' diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index f79d4ce75..f16345551 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -16,6 +16,7 @@ sap_swpm_swpm_installation_type: "" sap_swpm_swpm_installation_header: "" sap_swpm_swpm_command_virtual_hostname: "" + sap_swpm_swpm_command_mp_stack: "" # Restore from backup - name: SAP SWPM Pre Install - Check if Backup Restore From 1b6f5174e68b98975dd01a64097497b3d1bd77c9 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 28 Oct 2022 21:48:38 +0100 Subject: [PATCH 267/375] rename: sap_host_hw and sap_hypervisor_node preconfigure --- ...ansible-lint-sap_host_hw_preconfigure.yml} | 8 +- ...lint-sap_hypervisor_node_preconfigure.yml} | 8 +- ... => yamllint-sap_host_hw_preconfigure.yml} | 8 +- ...lint-sap_hypervisor_node_preconfigure.yml} | 8 +- roles/sap_hana_rhv_guest/defaults/main.yml | 10 -- roles/sap_hana_rhv_guest/handlers/main.yml | 94 ------------- roles/sap_hana_rhv_guest/tasks/main.yml | 18 --- roles/sap_hana_rhv_guest/vars/main.yml | 4 - roles/sap_hana_rhv_hypervisor/README.md | 70 ---------- .../sap_hana_rhv_hypervisor/handlers/main.yml | 100 -------------- .../molecule/default/converge.yml | 7 - .../tasks/assert-configuration.yml | 127 ------------------ roles/sap_hana_rhv_hypervisor/vars/main.yml | 11 -- .../README.md | 12 +- .../defaults/main.yml | 10 ++ .../tuned/sap-hana-kvm-guest/haltpoll.sh | 0 .../files/tuned/sap-hana-kvm-guest/tuned.conf | 0 .../files/tuned/sap-hana/tuned.conf | 0 .../handlers/main.yml | 94 +++++++++++++ .../meta/main.yml | 0 .../tasks/assert-set-tuned-profile.yml | 6 +- roles/sap_host_hw_preconfigure/tasks/main.yml | 18 +++ .../tasks/set-tuned-profile.yml | 0 .../tests/inventory | 0 .../tests/test.yml | 2 +- roles/sap_host_hw_preconfigure/vars/main.yml | 4 + .../.yamllint | 0 .../README.md | 70 ++++++++++ .../defaults/main.yml | 20 +-- .../files/50_hana | 0 .../files/50_iothread_pinning | 0 .../handlers/main.yml | 100 ++++++++++++++ .../meta/main.yml | 2 +- .../molecule/default/INSTALL.rst | 0 .../molecule/default/converge.yml | 7 + .../molecule/default/create.yml | 0 .../molecule/default/defaults/main.yml | 0 .../molecule/default/destroy.yml | 0 .../molecule/default/molecule.yml | 0 .../molecule/default/requirements.yml | 0 .../default/tasks/create_instance.yml | 0 .../default/tasks/destroy_instance.yml | 0 .../molecule/default/verify.yml | 0 .../tasks/allocate-hugepages-at-runtime.yml | 2 +- .../tasks/assert-configuration.yml | 127 ++++++++++++++++++ .../tasks/assert-installation.yml | 4 +- .../tasks/assert-rhv-hooks.yml | 18 +-- .../tasks/assert-set-tuned-profile.yml | 6 +- .../tasks/configuration.yml | 26 ++-- .../tasks/installation.yml | 2 +- .../tasks/main.yml | 4 +- .../tasks/rhv-hooks.yml | 0 .../tasks/set-tuned-profile.yml | 0 .../tests/inventory | 0 .../tests/test.yml | 0 .../vars/main.yml | 11 ++ 56 files changed, 509 insertions(+), 509 deletions(-) rename .github/workflows/{ansible-lint sap_hana_rhv_guest.yml => ansible-lint-sap_host_hw_preconfigure.yml} (71%) rename .github/workflows/{ansible-lint sap_hana_rhv_hypervisor.yml => ansible-lint-sap_hypervisor_node_preconfigure.yml} (68%) rename .github/workflows/{yamllint-sap_hana_rhv_guest.yml => yamllint-sap_host_hw_preconfigure.yml} (79%) rename .github/workflows/{yamllint-sap_hana_rhv_hypervisor.yml => yamllint-sap_hypervisor_node_preconfigure.yml} (76%) delete mode 100644 roles/sap_hana_rhv_guest/defaults/main.yml delete mode 100644 roles/sap_hana_rhv_guest/handlers/main.yml delete mode 100644 roles/sap_hana_rhv_guest/tasks/main.yml delete mode 100644 roles/sap_hana_rhv_guest/vars/main.yml delete mode 100644 roles/sap_hana_rhv_hypervisor/README.md delete mode 100644 roles/sap_hana_rhv_hypervisor/handlers/main.yml delete mode 100644 roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml delete mode 100644 roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml delete mode 100644 roles/sap_hana_rhv_hypervisor/vars/main.yml rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/README.md (86%) create mode 100644 roles/sap_host_hw_preconfigure/defaults/main.yml rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/files/tuned/sap-hana-kvm-guest/haltpoll.sh (100%) rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/files/tuned/sap-hana-kvm-guest/tuned.conf (100%) rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/files/tuned/sap-hana/tuned.conf (100%) create mode 100644 roles/sap_host_hw_preconfigure/handlers/main.yml rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/meta/main.yml (100%) rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/tasks/assert-set-tuned-profile.yml (62%) create mode 100644 roles/sap_host_hw_preconfigure/tasks/main.yml rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/tasks/set-tuned-profile.yml (100%) rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/tests/inventory (100%) rename roles/{sap_hana_rhv_guest => sap_host_hw_preconfigure}/tests/test.yml (62%) create mode 100644 roles/sap_host_hw_preconfigure/vars/main.yml rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/.yamllint (100%) create mode 100644 roles/sap_hypervisor_node_preconfigure/README.md rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/defaults/main.yml (54%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/files/50_hana (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/files/50_iothread_pinning (100%) create mode 100644 roles/sap_hypervisor_node_preconfigure/handlers/main.yml rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/meta/main.yml (97%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/INSTALL.rst (100%) create mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/create.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/defaults/main.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/destroy.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/molecule.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/requirements.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/tasks/create_instance.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/tasks/destroy_instance.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/molecule/default/verify.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/allocate-hugepages-at-runtime.yml (89%) create mode 100644 roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/assert-installation.yml (74%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/assert-rhv-hooks.yml (50%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/assert-set-tuned-profile.yml (63%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/configuration.yml (79%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/installation.yml (69%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/main.yml (83%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/rhv-hooks.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tasks/set-tuned-profile.yml (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tests/inventory (100%) rename roles/{sap_hana_rhv_hypervisor => sap_hypervisor_node_preconfigure}/tests/test.yml (100%) create mode 100644 roles/sap_hypervisor_node_preconfigure/vars/main.yml diff --git a/.github/workflows/ansible-lint sap_hana_rhv_guest.yml b/.github/workflows/ansible-lint-sap_host_hw_preconfigure.yml similarity index 71% rename from .github/workflows/ansible-lint sap_hana_rhv_guest.yml rename to .github/workflows/ansible-lint-sap_host_hw_preconfigure.yml index b3cdcde6d..d42be9a18 100644 --- a/.github/workflows/ansible-lint sap_hana_rhv_guest.yml +++ b/.github/workflows/ansible-lint-sap_host_hw_preconfigure.yml @@ -1,12 +1,12 @@ -name: Ansible Lint for sap_hana_rhv_guest +name: Ansible Lint for sap_host_hw_preconfigure on: push: paths: - - 'roles/sap_hana_rhv_guest/**' + - 'roles/sap_host_hw_preconfigure/**' pull_request: paths: - - 'roles/sap_hana_rhv_guest/**' + - 'roles/sap_host_hw_preconfigure/**' jobs: ansible-lint: @@ -19,7 +19,7 @@ jobs: uses: ansible/ansible-lint-action@main with: targets: | - ./roles/sap_hana_rhv_guest + ./roles/sap_host_hw_preconfigure override-deps: | ansible==5.3.0 ansible-lint==5.3.2 diff --git a/.github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml similarity index 68% rename from .github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml rename to .github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 78bb6c3e8..ddc84a74e 100644 --- a/.github/workflows/ansible-lint sap_hana_rhv_hypervisor.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -1,12 +1,12 @@ -name: Ansible Lint for sap_hana_rhv_hypervisor +name: Ansible Lint for sap_hypervisor_node_preconfigure on: push: paths: - - 'roles/sap_hana_rhv_hypervisor/**' + - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: paths: - - 'roles/sap_hana_rhv_hypervisor/**' + - 'roles/sap_hypervisor_node_preconfigure/**' jobs: ansible-lint: @@ -19,7 +19,7 @@ jobs: uses: ansible/ansible-lint-action@main with: targets: | - ./roles/sap_hana_rhv_hypervisor + ./roles/sap_hypervisor_node_preconfigure override-deps: | ansible==5.3.0 ansible-lint==5.3.2 diff --git a/.github/workflows/yamllint-sap_hana_rhv_guest.yml b/.github/workflows/yamllint-sap_host_hw_preconfigure.yml similarity index 79% rename from .github/workflows/yamllint-sap_hana_rhv_guest.yml rename to .github/workflows/yamllint-sap_host_hw_preconfigure.yml index 652ede1ea..fe1c809fa 100644 --- a/.github/workflows/yamllint-sap_hana_rhv_guest.yml +++ b/.github/workflows/yamllint-sap_host_hw_preconfigure.yml @@ -1,14 +1,14 @@ -name: yamllint-sap_hana_rhv_guest +name: yamllint-sap_host_hw_preconfigure on: push: branches: [ main ] paths: - - 'roles/sap_hana_rhv_guest/**' + - 'roles/sap_host_hw_preconfigure/**' pull_request: branches: [ main ] paths: - - 'roles/sap_hana_rhv_guest/**' + - 'roles/sap_host_hw_preconfigure/**' workflow_dispatch: @@ -29,4 +29,4 @@ jobs: # Runs a set of commands using the runners shell - name: yamllint - run: yamllint ./roles/sap_hana_rhv_guest + run: yamllint ./roles/sap_host_hw_preconfigure diff --git a/.github/workflows/yamllint-sap_hana_rhv_hypervisor.yml b/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml similarity index 76% rename from .github/workflows/yamllint-sap_hana_rhv_hypervisor.yml rename to .github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml index 1d1ee4d86..def66ab8d 100644 --- a/.github/workflows/yamllint-sap_hana_rhv_hypervisor.yml +++ b/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml @@ -1,14 +1,14 @@ -name: yamllint-sap_hana_rhv_hypervisor +name: yamllint-sap_hypervisor_node_preconfigure on: push: branches: [ main ] paths: - - 'roles/sap_hana_rhv_hypervisor/**' + - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: branches: [ main ] paths: - - 'roles/sap_hana_rhv_hypervisor/**' + - 'roles/sap_hypervisor_node_preconfigure/**' workflow_dispatch: @@ -29,4 +29,4 @@ jobs: # Runs a set of commands using the runners shell - name: yamllint - run: yamllint ./roles/sap_hana_rhv_hypervisor + run: yamllint ./roles/sap_hypervisor_node_preconfigure diff --git a/roles/sap_hana_rhv_guest/defaults/main.yml b/roles/sap_hana_rhv_guest/defaults/main.yml deleted file mode 100644 index 938ef8743..000000000 --- a/roles/sap_hana_rhv_guest/defaults/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# defaults file for sap_hana_rhv_guest - -sap_hana_rhv_guest_run_grub2_mkconfig: yes - -# run role in assert mode? -sap_hana_rhv_guest_assert: false - -# fail if assertion is invalid -sap_hana_rhv_guest_ignore_failed_assertion: no diff --git a/roles/sap_hana_rhv_guest/handlers/main.yml b/roles/sap_hana_rhv_guest/handlers/main.yml deleted file mode 100644 index c2f6d38c3..000000000 --- a/roles/sap_hana_rhv_guest/handlers/main.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- - -- name: "Check if server is booted in BIOS or UEFI mode" - stat: - path: /sys/firmware/efi - get_checksum: no - register: __sap_hana_rhv_guest_register_stat_sys_firmware_efi - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - when: - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: Debug BIOS or UEFI - debug: - var: __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - when: - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: "Run grub-mkconfig (BIOS mode)" - command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - notify: __sap_hana_rhv_guest_reboot_handler - when: - - not __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig BIOS mode" - debug: - var: __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode.stdout_lines, - __sap_hana_rhv_guest_register_grub2_mkconfig_bios_mode.stderr_lines - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - when: - - not __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: "Set the grub.cfg location RHEL" - set_fact: - __sap_hana_rhv_guest_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg - when: - - ansible_distribution == 'RedHat' - -- name: "Set the grub.cfg location SLES" - set_fact: - __sap_hana_rhv_guest_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg - when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - -- name: "Run grub-mkconfig (UEFI mode)" - command: "grub2-mkconfig -o {{ __sap_hana_rhv_guest_uefi_boot_dir }}" - register: __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - notify: __sap_hana_rhv_guest_reboot_handler - when: - - __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig UEFI" - debug: - var: __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode.stdout_lines, - __sap_hana_rhv_guest_register_grub2_mkconfig_uefi_mode.stderr_lines - listen: __sap_hana_rhv_guest_regenerate_grub2_conf_handler - when: - - __sap_hana_rhv_guest_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_guest_run_grub2_mkconfig|d(true) - -- name: "Run grubby for enabling TSX" - command: grubby --args="tsx=on" --update-kernel=ALL - register: __sap_hana_rhv_guest_register_grubby_update - listen: __sap_hana_rhv_guest_grubby_update_handler - notify: __sap_hana_rhv_guest_reboot_handler - -- name: Reboot the managed node - reboot: - test_command: /bin/true - listen: __sap_hana_rhv_guest_reboot_handler - when: - - sap_hana_rhv_guest_reboot_ok|d(false) - -- name: Let the role fail if a reboot is required - fail: - msg: Reboot is required! - listen: __sap_hana_rhv_guest_reboot_handler - when: - - sap_hana_rhv_guest_fail_if_reboot_required|d(true) - - not sap_hana_rhv_guest_reboot_ok|d(false) - -- name: Show a warning message if a reboot is required - debug: - msg: "WARN: Reboot is required!" - listen: __sap_hana_rhv_guest_reboot_handler - when: - - not sap_hana_rhv_guest_fail_if_reboot_required|d(true) - - not sap_hana_rhv_guest_reboot_ok|d(false) diff --git a/roles/sap_hana_rhv_guest/tasks/main.yml b/roles/sap_hana_rhv_guest/tasks/main.yml deleted file mode 100644 index 79ffea6c3..000000000 --- a/roles/sap_hana_rhv_guest/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# tasks file for sap_hana_rhv_guest - -- name: Trigger tuned profile sap-hana-kvm-guest activation - include_tasks: set-tuned-profile.yml - -- name: Set filename prefix to empty string if role is run in normal mode - set_fact: - __sap_hana_rhv_guest_fact_assert_prefix: "" - when: not sap_hana_rhv_guest_assert|d(false) - -- name: Prepend filename with assert string if role is run in assert mode - set_fact: - __sap_hana_rhv_guest_fact_assert_prefix: "assert-" - when: sap_hana_rhv_hypervisor_assert|d(false) - -- include_tasks: '{{ __sap_hana_rhv_guest_fact_assert_prefix }}set-tuned-profile.yml' -... diff --git a/roles/sap_hana_rhv_guest/vars/main.yml b/roles/sap_hana_rhv_guest/vars/main.yml deleted file mode 100644 index 85f16f0b9..000000000 --- a/roles/sap_hana_rhv_guest/vars/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# vars file for sap_hana_rhv_guest -# -... diff --git a/roles/sap_hana_rhv_hypervisor/README.md b/roles/sap_hana_rhv_hypervisor/README.md deleted file mode 100644 index cc51db647..000000000 --- a/roles/sap_hana_rhv_hypervisor/README.md +++ /dev/null @@ -1,70 +0,0 @@ -sap_hana_rhv_hypervisor -======================= - -This role will set and check the required settings and parameters for a hypervisor running VMs for SAP HANA. - -Requirements ------------- -A RHV hypervisor. - -Role Variables --------------- - -`sap_hana_rhv_hypervisor_reserved_ram (default: 100)` Reserve memory [GB] for hypervisor host. Depending in the use case should be at least 50-100GB. - -`sap_hana_rhv_hypervisor_reserve_hugepages (default: static)` Hugepage allocation method: {static|runtime}. -static: done at kernel command line which is slow, but safe -runtime: done with hugeadm which is faster, but can in some cases not ensure all HPs are allocated. - -`sap_hana_rhv_hypervisor_kvm_nx_huge_pages (default: "auto")` Setting for the huge page shattering kvm.nx_huge_pages: {"auto"|"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. See https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html for additional information: -``` - kvm.nx_huge_pages= - [KVM] Controls the software workaround for the - X86_BUG_ITLB_MULTIHIT bug. - force : Always deploy workaround. - off : Never deploy workaround. - auto : Deploy workaround based on the presence of - X86_BUG_ITLB_MULTIHIT. - - Default is 'auto'. - - If the software workaround is enabled for the host, - guests do need not to enable it for nested guests. -``` - -`sap_hana_rhv_hypervisor_tsx (default: "off")` Intel Transactional Synchronization Extensions (TSX): {"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. - -`sap_hana_rhv_hypervisor_assert (default: false)` In assert mode, the parameters on the system are checked if the confirm with what this role would set. - -`sap_hana_rhv_hypervisor_ignore_failed_assertion (default: no)` Fail if assertion is invalid. - -`sap_hana_rhv_hypervisor_run_grub2_mkconfig (default: yes)` Update the grub2 config. - - -Example Playbook ----------------- - -Simple example that just sets the parameters. -``` -- hosts: all - roles: - - sap_hana_rhv_hypervisor -``` - -Run in assert mode to verify that parameters have been set. -``` -- hosts: all - roles: - - sap_hana_rhv_hypervisor - vars: - - sap_hana_rhv_hypervisor_assert: yes -``` -License -------- - -Apache 2.0 - -Author Information ------------------- - -Nils Koenig (nkoenig@redhat.com) diff --git a/roles/sap_hana_rhv_hypervisor/handlers/main.yml b/roles/sap_hana_rhv_hypervisor/handlers/main.yml deleted file mode 100644 index d26179283..000000000 --- a/roles/sap_hana_rhv_hypervisor/handlers/main.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- - -- name: "Check if server is booted in BIOS or UEFI mode" - ansible.builtin.stat: - path: /sys/firmware/efi - get_checksum: no - register: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - when: - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - -- name: Debug BIOS or UEFI - ansible.builtin.debug: - var: __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - when: - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - -- name: "Run grub-mkconfig (BIOS mode)" - ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - notify: __sap_hana_rhv_hypervisor_reboot_handler - when: - - not __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - become: true - become_user: root - - -- name: "Debug grub-mkconfig BIOS mode" - ansible.builtin.debug: - var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stdout_lines, - __sap_hana_rhv_hypervisor_register_grub2_mkconfig_bios_mode.stderr_lines - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - when: - - not __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - -- name: "Set the grub.cfg location RHEL" - ansible.builtin.set_fact: - __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg - when: - - ansible_distribution == 'RedHat' - -- name: "Set the grub.cfg location SLES" - ansible.builtin.set_fact: - __sap_hana_rhv_hypervisor_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg - when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - -- name: "Run grub-mkconfig (UEFI mode)" - ansible.builtin.command: "grub2-mkconfig -o {{ __sap_hana_rhv_hypervisor_uefi_boot_dir }}" - register: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - notify: __sap_hana_rhv_hypervisor_reboot_handler - when: - - __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - become: true - become_user: root - - -- name: "Debug grub-mkconfig UEFI" - ansible.builtin.debug: - var: __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stdout_lines, - __sap_hana_rhv_hypervisor_register_grub2_mkconfig_uefi_mode.stderr_lines - listen: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler - when: - - __sap_hana_rhv_hypervisor_register_stat_sys_firmware_efi.stat.exists - - sap_hana_rhv_hypervisor_run_grub2_mkconfig|d(true) - -- name: "Run grubby for enabling TSX" - ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL - register: __sap_hana_rhv_hypervisor_register_grubby_update - listen: __sap_hana_rhv_hypervisor_grubby_update_handler - notify: __sap_hana_rhv_hypervisor_reboot_handler - -- name: Reboot the managed node - ansible.builtin.reboot: - test_command: /bin/true - listen: __sap_hana_rhv_hypervisor_reboot_handler - when: - - sap_hana_rhv_hypervisor_reboot_ok|d(false) - -- name: Let the role fail if a reboot is required - ansible.builtin.fail: - msg: Reboot is required! - listen: __sap_hana_rhv_hypervisor_reboot_handler - when: - - sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) - - not sap_hana_rhv_hypervisor_reboot_ok|d(false) - -- name: Show a warning message if a reboot is required - ansible.builtin.debug: - msg: "WARN: Reboot is required!" - listen: __sap_hana_rhv_hypervisor_reboot_handler - when: - - not sap_hana_rhv_hypervisor_fail_if_reboot_required|d(true) - - not sap_hana_rhv_hypervisor_reboot_ok|d(false) diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml b/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml deleted file mode 100644 index 918a9f742..000000000 --- a/roles/sap_hana_rhv_hypervisor/molecule/default/converge.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Converge - hosts: all - tasks: - - name: "Include sap_hana_rhv_hypervisor" - include_role: - name: "sap_hana_rhv_hypervisor" diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml b/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml deleted file mode 100644 index e8fc8ca2b..000000000 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-configuration.yml +++ /dev/null @@ -1,127 +0,0 @@ ---- -# tasks file for sap_hana_rhv_hypervisor - -- name: Get kernel command line - ansible.builtin.command: cat /proc/cmdline - register: __sap_hana_rhv_hypervisor_kernelcmdline_assert - -- name: "Assert - Kernel same page merging (KSM): Get status" - ansible.builtin.shell: systemctl status ksm - register: __sap_hana_rhv_hypervisor_ksmstatus_assert - ignore_errors: yes - -- name: "Assert - Kernel same page merging (KSM): Check if stopped" - ansible.builtin.assert: - that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmstatus_assert.stdout" - fail_msg: "FAIL: ksm is running" - success_msg: "PASS: ksm not running" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - -- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Get status" - ansible.builtin.shell: systemctl status ksmtuned - register: __sap_hana_rhv_hypervisor_ksmtunedstatus_assert - ignore_errors: yes - -- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Check if stopped" - ansible.builtin.assert: - that: "'Active: inactive (dead)' in __sap_hana_rhv_hypervisor_ksmtunedstatus_assert.stdout" - fail_msg: "FAIL: ksmtuned is running" - success_msg: "PASS: ksmtuned not running" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - -- name: Check CPU Stepping - ansible.builtin.shell: lscpu | awk '/Stepping/{print $2}' - register: __sap_hana_rhv_hypervisor_cpu_stepping_output_assert - -- set_fact: - __sap_hana_rhv_hypervisor_cpu_stepping_assert: "{{ __sap_hana_rhv_hypervisor_cpu_stepping_output_assert.stdout }}" - -- name: Print CPU Stepping - ansible.builtin.debug: - var: __sap_hana_rhv_hypervisor_cpu_stepping_assert - -# skylake: -- name: Assert - Check Intel Skylake CPU Platform - block: - - name: Get ple_gap - ansible.builtin.command: grep -E '^options\s+kvm_intel.*?ple_gap\s*=\s*0.*$' /etc/modprobe.d/kvm.conf - register: __sap_hana_rhv_hypervisor_skylake_plegap_assert - ignore_errors: yes - - - name: Assert - Check if ple_gap=0 - ansible.builtin.assert: - that: "__sap_hana_rhv_hypervisor_skylake_plegap_assert.rc == 0" - fail_msg: "FAIL: ple_gap is not set to 0" - success_msg: "PASS: ple_gap is set to 0" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - - name: Assert - Check for spectre_v2=retpoline - ansible.builtin.assert: - that: "'spectre_v2=retpoline' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" - fail_msg: "FAIL: spectre_v2=retpoline is not on Kernel command line" - success_msg: "PASS: spectre_v2=retpoline is on Kernel command line" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - when: __sap_hana_rhv_hypervisor_cpu_stepping_assert == "4" - -- name: Assert - check sap_hana_rhv_hypervisor_nx_huge_pages - block: - - name: "Assert - Check kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" - ansible.builtin.assert: - that: "'kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_nx_huge_pages }}' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" - fail_msg: "FAIL: kvm.nx_huge_pages is not {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" - success_msg: "PASS: kvm.nx_huge_pages is {{ sap_hana_rhv_hypervisor_nx_huge_pages }}" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - when: sap_hana_rhv_hypervisor_nx_huge_pages is defined - -- name: Assert - check seccomp_sanbox=0 - block: - - command: grep -E '^seccomp_sandbox\s+=\s+0.*$' /etc/libvirt/qemu.conf - register: __sap_hana_rhv_hypervisor_seccomp_assert - ignore_errors: yes - - - name: "Assert - Check seccomp_sanbox=0 is in /etc/libvirt/qemu.conf" - ansible.builtin.assert: - that: "{{ __sap_hana_rhv_hypervisor_seccomp_assert.rc }} == 0" - fail_msg: "FAIL: seccomp_sandbox != 0" - success_msg: "PASS: seccomp_sanbox == 0" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - -- name: Assert - check amount of 1G hugepages - block: - - name: Get amount of 1G hugepages - ansible.builtin.shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' - register: __sap_hana_rhv_hypervisor_1Ghugepages_assert - - - name: "Check that at least {{ sap_hana_rhv_hypervisor_reserved_ram }} GB are available for the hypervisor and the rest are 1G hugepages" - ansible.builtin.assert: - that: "{{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} >= {{ __sap_hana_rhv_hypervisor_1Ghugepages_assert.stdout }}" - fail_msg: "FAIL: Not enough memory reserved for hypervisor" - success_msg: "PASS: Enough memory reserved for hypervisor" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - -- name: Assert - check Kernel command line - block: - - assert: - that: "'intel_iommu=on' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" - fail_msg: "FAIL: intel_iommu=on not on Kernel command line" - success_msg: "PASS: intel_iommu=on on Kernel command line" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - - assert: - that: "'iommu=pt' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" - fail_msg: "FAIL: iommu=pt not on Kernel command line" - success_msg: "PASS: iommu=pt on Kernel command line" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - - assert: - that: "'tsx=off' in __sap_hana_rhv_hypervisor_kernelcmdline_assert.stdout" - fail_msg: "FAIL: tsx=off not on Kernel command line" - success_msg: "PASS: tsx=off on Kernel command line" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" - - -#- name: Trigger tuned profile sap-hana-kvm activation -# include_tasks: set-tuned-profile.yml -# -##### install hooks: HP, cpufreq diff --git a/roles/sap_hana_rhv_hypervisor/vars/main.yml b/roles/sap_hana_rhv_hypervisor/vars/main.yml deleted file mode 100644 index c3c96fe66..000000000 --- a/roles/sap_hana_rhv_hypervisor/vars/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# vars file for sap_hana_rhv_hypervisor -# - -# packages to install -sap_hana_rhv_hypervisor_packages: - - libhugetlbfs-utils - - qemu-kvm - - libvirt - - tuned -... diff --git a/roles/sap_hana_rhv_guest/README.md b/roles/sap_host_hw_preconfigure/README.md similarity index 86% rename from roles/sap_hana_rhv_guest/README.md rename to roles/sap_host_hw_preconfigure/README.md index 9350cfb14..1196c45b8 100644 --- a/roles/sap_hana_rhv_guest/README.md +++ b/roles/sap_host_hw_preconfigure/README.md @@ -1,4 +1,4 @@ -sap_hana_rhv_guest +sap_host_hw_preconfigure ================== This role will set and check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. @@ -16,14 +16,14 @@ Role Variables ### Run the role in assert mode ```yaml -sap_hana_rhv_guest_assert (default: no) +sap_host_hw_preconfigure_assert (default: no) ``` If the following variable is set to `yes`, the role will only check if the configuration of the managed mmachines is according to this role. Default is `no`. ### Behavior of the role in assert mode ```yaml -sap_hana_rhv_guest_assert_ignore_errors (default: no) +sap_host_hw_preconfigure_assert_ignore_errors (default: no) ``` If the role is run in assert mode and the following variable is set to `yes`, assertion errors will not cause the role to fail. This can be useful for creating reports. Default is `no`, meaning that the role will fail for any assertion error which is discovered. This variable has no meaning if the role is not run in assert mode. @@ -45,16 +45,16 @@ Simple example that just sets the parameters. roles: - sap_preconfigure - sap_hana_preconfigure - - sap_hana_rhv_guest + - sap_host_hw_preconfigure ``` Run in assert mode to verify that parameters have been set. ``` - hosts: all roles: - - sap_hana_rhv_guest + - sap_host_hw_preconfigure vars: - - sap_hana_rhv_guest_assert: yes + - sap_host_hw_preconfigure_assert: yes ``` License diff --git a/roles/sap_host_hw_preconfigure/defaults/main.yml b/roles/sap_host_hw_preconfigure/defaults/main.yml new file mode 100644 index 000000000..119def9dc --- /dev/null +++ b/roles/sap_host_hw_preconfigure/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for sap_host_hw_preconfigure + +sap_host_hw_preconfigure_run_grub2_mkconfig: yes + +# run role in assert mode? +sap_host_hw_preconfigure_assert: false + +# fail if assertion is invalid +sap_host_hw_preconfigure_ignore_failed_assertion: no diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh b/roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh similarity index 100% rename from roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/haltpoll.sh rename to roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf b/roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf similarity index 100% rename from roles/sap_hana_rhv_guest/files/tuned/sap-hana-kvm-guest/tuned.conf rename to roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf diff --git a/roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf b/roles/sap_host_hw_preconfigure/files/tuned/sap-hana/tuned.conf similarity index 100% rename from roles/sap_hana_rhv_guest/files/tuned/sap-hana/tuned.conf rename to roles/sap_host_hw_preconfigure/files/tuned/sap-hana/tuned.conf diff --git a/roles/sap_host_hw_preconfigure/handlers/main.yml b/roles/sap_host_hw_preconfigure/handlers/main.yml new file mode 100644 index 000000000..661a91d9e --- /dev/null +++ b/roles/sap_host_hw_preconfigure/handlers/main.yml @@ -0,0 +1,94 @@ +--- + +- name: "Check if server is booted in BIOS or UEFI mode" + stat: + path: /sys/firmware/efi + get_checksum: no + register: __sap_host_hw_preconfigure_register_stat_sys_firmware_efi + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + when: + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: Debug BIOS or UEFI + debug: + var: __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + when: + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + notify: __sap_host_hw_preconfigure_reboot_handler + when: + - not __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig BIOS mode" + debug: + var: __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + when: + - not __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Set the grub.cfg location RHEL" + set_fact: + __sap_host_hw_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + set_fact: + __sap_host_hw_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + +- name: "Run grub-mkconfig (UEFI mode)" + command: "grub2-mkconfig -o {{ __sap_host_hw_preconfigure_uefi_boot_dir }}" + register: __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + notify: __sap_host_hw_preconfigure_reboot_handler + when: + - __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig UEFI" + debug: + var: __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler + when: + - __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grubby for enabling TSX" + command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_host_hw_preconfigure_register_grubby_update + listen: __sap_host_hw_preconfigure_grubby_update_handler + notify: __sap_host_hw_preconfigure_reboot_handler + +- name: Reboot the managed node + reboot: + test_command: /bin/true + listen: __sap_host_hw_preconfigure_reboot_handler + when: + - sap_host_hw_preconfigure_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + fail: + msg: Reboot is required! + listen: __sap_host_hw_preconfigure_reboot_handler + when: + - sap_host_hw_preconfigure_fail_if_reboot_required|d(true) + - not sap_host_hw_preconfigure_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + debug: + msg: "WARN: Reboot is required!" + listen: __sap_host_hw_preconfigure_reboot_handler + when: + - not sap_host_hw_preconfigure_fail_if_reboot_required|d(true) + - not sap_host_hw_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_hana_rhv_guest/meta/main.yml b/roles/sap_host_hw_preconfigure/meta/main.yml similarity index 100% rename from roles/sap_hana_rhv_guest/meta/main.yml rename to roles/sap_host_hw_preconfigure/meta/main.yml diff --git a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml b/roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml similarity index 62% rename from roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml rename to roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml index ac99135da..5830cd0cc 100644 --- a/roles/sap_hana_rhv_guest/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml @@ -3,12 +3,12 @@ block: - name: Get tuned profile command: tuned-adm active - register: __sap_hana_rhv_guest_register_tuned_profile_assert + register: __sap_host_hw_preconfigure_register_tuned_profile_assert - name: Verify tuned profile assert: - that: "'Current active profile: sap-hana-kvm-host' in __sap_hana_rhv_guest_register_tuned_profile_assert.stdout" + that: "'Current active profile: sap-hana-kvm-host' in __sap_host_hw_preconfigure_register_tuned_profile_assert.stdout" fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" success_msg: "PASS: tuned profile is sap-hana-kvm-guest" - ignore_errors: "{{ sap_hana_rhv_guest_ignore_failed_assertion }}" + ignore_errors: "{{ sap_host_hw_preconfigure_ignore_failed_assertion }}" ... diff --git a/roles/sap_host_hw_preconfigure/tasks/main.yml b/roles/sap_host_hw_preconfigure/tasks/main.yml new file mode 100644 index 000000000..56f89a81d --- /dev/null +++ b/roles/sap_host_hw_preconfigure/tasks/main.yml @@ -0,0 +1,18 @@ +--- +# tasks file for sap_host_hw_preconfigure + +- name: Trigger tuned profile sap-hana-kvm-guest activation + include_tasks: set-tuned-profile.yml + +- name: Set filename prefix to empty string if role is run in normal mode + set_fact: + __sap_host_hw_preconfigure_fact_assert_prefix: "" + when: not sap_host_hw_preconfigure_assert|d(false) + +- name: Prepend filename with assert string if role is run in assert mode + set_fact: + __sap_host_hw_preconfigure_fact_assert_prefix: "assert-" + when: sap_hypervisor_node_preconfigure_assert|d(false) + +- include_tasks: '{{ __sap_host_hw_preconfigure_fact_assert_prefix }}set-tuned-profile.yml' +... diff --git a/roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml b/roles/sap_host_hw_preconfigure/tasks/set-tuned-profile.yml similarity index 100% rename from roles/sap_hana_rhv_guest/tasks/set-tuned-profile.yml rename to roles/sap_host_hw_preconfigure/tasks/set-tuned-profile.yml diff --git a/roles/sap_hana_rhv_guest/tests/inventory b/roles/sap_host_hw_preconfigure/tests/inventory similarity index 100% rename from roles/sap_hana_rhv_guest/tests/inventory rename to roles/sap_host_hw_preconfigure/tests/inventory diff --git a/roles/sap_hana_rhv_guest/tests/test.yml b/roles/sap_host_hw_preconfigure/tests/test.yml similarity index 62% rename from roles/sap_hana_rhv_guest/tests/test.yml rename to roles/sap_host_hw_preconfigure/tests/test.yml index 13a0c039c..860b319b2 100644 --- a/roles/sap_hana_rhv_guest/tests/test.yml +++ b/roles/sap_host_hw_preconfigure/tests/test.yml @@ -2,4 +2,4 @@ - hosts: localhost remote_user: root roles: - - sap_hana_rhv_guest + - sap_host_hw_preconfigure diff --git a/roles/sap_host_hw_preconfigure/vars/main.yml b/roles/sap_host_hw_preconfigure/vars/main.yml new file mode 100644 index 000000000..07c57a490 --- /dev/null +++ b/roles/sap_host_hw_preconfigure/vars/main.yml @@ -0,0 +1,4 @@ +--- +# vars file for sap_host_hw_preconfigure +# +... diff --git a/roles/sap_hana_rhv_hypervisor/.yamllint b/roles/sap_hypervisor_node_preconfigure/.yamllint similarity index 100% rename from roles/sap_hana_rhv_hypervisor/.yamllint rename to roles/sap_hypervisor_node_preconfigure/.yamllint diff --git a/roles/sap_hypervisor_node_preconfigure/README.md b/roles/sap_hypervisor_node_preconfigure/README.md new file mode 100644 index 000000000..d862ed326 --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/README.md @@ -0,0 +1,70 @@ +sap_hypervisor_node_preconfigure +======================= + +This role will set and check the required settings and parameters for a hypervisor running VMs for SAP HANA. + +Requirements +------------ +A RHV hypervisor. + +Role Variables +-------------- + +`sap_hypervisor_node_preconfigure_reserved_ram (default: 100)` Reserve memory [GB] for hypervisor host. Depending in the use case should be at least 50-100GB. + +`sap_hypervisor_node_preconfigure_reserve_hugepages (default: static)` Hugepage allocation method: {static|runtime}. +static: done at kernel command line which is slow, but safe +runtime: done with hugeadm which is faster, but can in some cases not ensure all HPs are allocated. + +`sap_hypervisor_node_preconfigure_kvm_nx_huge_pages (default: "auto")` Setting for the huge page shattering kvm.nx_huge_pages: {"auto"|"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. See https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html for additional information: +``` + kvm.nx_huge_pages= + [KVM] Controls the software workaround for the + X86_BUG_ITLB_MULTIHIT bug. + force : Always deploy workaround. + off : Never deploy workaround. + auto : Deploy workaround based on the presence of + X86_BUG_ITLB_MULTIHIT. + + Default is 'auto'. + + If the software workaround is enabled for the host, + guests do need not to enable it for nested guests. +``` + +`sap_hypervisor_node_preconfigure_tsx (default: "off")` Intel Transactional Synchronization Extensions (TSX): {"on"|"off"}. Note the importance of the quotes, otherwise off will be mapped to false. + +`sap_hypervisor_node_preconfigure_assert (default: false)` In assert mode, the parameters on the system are checked if the confirm with what this role would set. + +`sap_hypervisor_node_preconfigure_ignore_failed_assertion (default: no)` Fail if assertion is invalid. + +`sap_hypervisor_node_preconfigure_run_grub2_mkconfig (default: yes)` Update the grub2 config. + + +Example Playbook +---------------- + +Simple example that just sets the parameters. +``` +- hosts: all + roles: + - sap_hypervisor_node_preconfigure +``` + +Run in assert mode to verify that parameters have been set. +``` +- hosts: all + roles: + - sap_hypervisor_node_preconfigure + vars: + - sap_hypervisor_node_preconfigure_assert: yes +``` +License +------- + +Apache 2.0 + +Author Information +------------------ + +Nils Koenig (nkoenig@redhat.com) diff --git a/roles/sap_hana_rhv_hypervisor/defaults/main.yml b/roles/sap_hypervisor_node_preconfigure/defaults/main.yml similarity index 54% rename from roles/sap_hana_rhv_hypervisor/defaults/main.yml rename to roles/sap_hypervisor_node_preconfigure/defaults/main.yml index 7c9678101..d0076e958 100644 --- a/roles/sap_hana_rhv_hypervisor/defaults/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/defaults/main.yml @@ -1,34 +1,34 @@ --- -# defaults file for sap_hana_rhv_hypervisor +# defaults file for sap_hypervisor_node_preconfigure # is it okay to reboot host? -sap_hana_rhv_hypervisor_reboot_ok: true +sap_hypervisor_node_preconfigure_reboot_ok: true # should the role fail if a reboot is required -sap_hana_rhv_hypervisor_fail_if_reboot_required: false +sap_hypervisor_node_preconfigure_fail_if_reboot_required: false # recreate kernel command line with grub2-mkconfig -sap_hana_rhv_hypervisor_run_grub2_mkconfig: yes +sap_hypervisor_node_preconfigure_run_grub2_mkconfig: yes # Reserve memory [GB] for hypervisor host -sap_hana_rhv_hypervisor_reserved_ram: 100 +sap_hypervisor_node_preconfigure_reserved_ram: 100 # allocate hugepages: {static|runtime} # static: done at kernel command line which is slow, but safe # runtime: done through tuned-profile -sap_hana_rhv_hypervisor_reserve_hugepages: static +sap_hypervisor_node_preconfigure_reserve_hugepages: static # kvm.nx_huge_pages: {"auto"|"on"|"off"} # Note the importance of the quotes, otherwise off will be mapped to false -sap_hana_rhv_hypervisor_kvm_nx_huge_pages: "auto" +sap_hypervisor_node_preconfigure_kvm_nx_huge_pages: "auto" # Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} # Note the importance of the quotes, otherwise off will be mapped to false -sap_hana_rhv_hypervisor_tsx: "off" +sap_hypervisor_node_preconfigure_tsx: "off" # run role in assert mode? -sap_hana_rhv_hypervisor_assert: false +sap_hypervisor_node_preconfigure_assert: false # fail if assertion is invalid -sap_hana_rhv_hypervisor_ignore_failed_assertion: no +sap_hypervisor_node_preconfigure_ignore_failed_assertion: no ... diff --git a/roles/sap_hana_rhv_hypervisor/files/50_hana b/roles/sap_hypervisor_node_preconfigure/files/50_hana similarity index 100% rename from roles/sap_hana_rhv_hypervisor/files/50_hana rename to roles/sap_hypervisor_node_preconfigure/files/50_hana diff --git a/roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning b/roles/sap_hypervisor_node_preconfigure/files/50_iothread_pinning similarity index 100% rename from roles/sap_hana_rhv_hypervisor/files/50_iothread_pinning rename to roles/sap_hypervisor_node_preconfigure/files/50_iothread_pinning diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/main.yml b/roles/sap_hypervisor_node_preconfigure/handlers/main.yml new file mode 100644 index 000000000..21c4a5b4e --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/handlers/main.yml @@ -0,0 +1,100 @@ +--- + +- name: "Check if server is booted in BIOS or UEFI mode" + ansible.builtin.stat: + path: /sys/firmware/efi + get_checksum: no + register: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: Debug BIOS or UEFI + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + become: true + become_user: root + + +- name: "Debug grub-mkconfig BIOS mode" + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Set the grub.cfg location RHEL" + ansible.builtin.set_fact: + __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + ansible.builtin.set_fact: + __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + +- name: "Run grub-mkconfig (UEFI mode)" + ansible.builtin.command: "grub2-mkconfig -o {{ __sap_hypervisor_node_preconfigure_uefi_boot_dir }}" + register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + become: true + become_user: root + + +- name: "Debug grub-mkconfig UEFI" + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grubby for enabling TSX" + ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_hypervisor_node_preconfigure_register_grubby_update + listen: __sap_hypervisor_node_preconfigure_grubby_update_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + +- name: Reboot the managed node + ansible.builtin.reboot: + test_command: /bin/true + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - sap_hypervisor_node_preconfigure_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + ansible.builtin.fail: + msg: Reboot is required! + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) + - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + ansible.builtin.debug: + msg: "WARN: Reboot is required!" + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - not sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) + - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_hana_rhv_hypervisor/meta/main.yml b/roles/sap_hypervisor_node_preconfigure/meta/main.yml similarity index 97% rename from roles/sap_hana_rhv_hypervisor/meta/main.yml rename to roles/sap_hypervisor_node_preconfigure/meta/main.yml index de7cb5fa0..80e3143ae 100644 --- a/roles/sap_hana_rhv_hypervisor/meta/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/meta/main.yml @@ -1,7 +1,7 @@ --- galaxy_info: - role_name: sap_hana_rhv_hypervisor + role_name: sap_hypervisor_node_preconfigure author: Nils Koenig namespace: community description: Provide the configuration for a RHV hypervisor for SAP HANA diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst b/roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/INSTALL.rst rename to roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml new file mode 100644 index 000000000..1516dc3cc --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include sap_hypervisor_node_preconfigure" + include_role: + name: "sap_hypervisor_node_preconfigure" diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/create.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/create.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/defaults/main.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/destroy.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/molecule.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/requirements.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/tasks/create_instance.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/tasks/destroy_instance.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml diff --git a/roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/molecule/default/verify.yml rename to roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml diff --git a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml similarity index 89% rename from roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml index 2017dd004..6ed4bdb0e 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/allocate-hugepages-at-runtime.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml @@ -10,7 +10,7 @@ path: /etc/rc.local marker: "" block: | - hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hana_rhv_hypervisor_reserved_ram }}"}') + hugeadm --create-mounts --pool-pages-min 1G:$(free -g | grep "Mem:" | awk '{print $2-"{{ sap_hypervisor_node_preconfigure_reserved_ram }}"}') - name: Set default hugepage size ansible.builtin.lineinfile: diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml b/roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml new file mode 100644 index 000000000..52cd899ce --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml @@ -0,0 +1,127 @@ +--- +# tasks file for sap_hypervisor_node_preconfigure + +- name: Get kernel command line + ansible.builtin.command: cat /proc/cmdline + register: __sap_hypervisor_node_preconfigure_kernelcmdline_assert + +- name: "Assert - Kernel same page merging (KSM): Get status" + ansible.builtin.shell: systemctl status ksm + register: __sap_hypervisor_node_preconfigure_ksmstatus_assert + ignore_errors: yes + +- name: "Assert - Kernel same page merging (KSM): Check if stopped" + ansible.builtin.assert: + that: "'Active: inactive (dead)' in __sap_hypervisor_node_preconfigure_ksmstatus_assert.stdout" + fail_msg: "FAIL: ksm is running" + success_msg: "PASS: ksm not running" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + +- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Get status" + ansible.builtin.shell: systemctl status ksmtuned + register: __sap_hypervisor_node_preconfigure_ksmtunedstatus_assert + ignore_errors: yes + +- name: "Assert - Kernel same page merging (KSM) Tuning Daemon: Check if stopped" + ansible.builtin.assert: + that: "'Active: inactive (dead)' in __sap_hypervisor_node_preconfigure_ksmtunedstatus_assert.stdout" + fail_msg: "FAIL: ksmtuned is running" + success_msg: "PASS: ksmtuned not running" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + +- name: Check CPU Stepping + ansible.builtin.shell: lscpu | awk '/Stepping/{print $2}' + register: __sap_hypervisor_node_preconfigure_cpu_stepping_output_assert + +- set_fact: + __sap_hypervisor_node_preconfigure_cpu_stepping_assert: "{{ __sap_hypervisor_node_preconfigure_cpu_stepping_output_assert.stdout }}" + +- name: Print CPU Stepping + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_cpu_stepping_assert + +# skylake: +- name: Assert - Check Intel Skylake CPU Platform + block: + - name: Get ple_gap + ansible.builtin.command: grep -E '^options\s+kvm_intel.*?ple_gap\s*=\s*0.*$' /etc/modprobe.d/kvm.conf + register: __sap_hypervisor_node_preconfigure_skylake_plegap_assert + ignore_errors: yes + + - name: Assert - Check if ple_gap=0 + ansible.builtin.assert: + that: "__sap_hypervisor_node_preconfigure_skylake_plegap_assert.rc == 0" + fail_msg: "FAIL: ple_gap is not set to 0" + success_msg: "PASS: ple_gap is set to 0" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + + - name: Assert - Check for spectre_v2=retpoline + ansible.builtin.assert: + that: "'spectre_v2=retpoline' in __sap_hypervisor_node_preconfigure_kernelcmdline_assert.stdout" + fail_msg: "FAIL: spectre_v2=retpoline is not on Kernel command line" + success_msg: "PASS: spectre_v2=retpoline is on Kernel command line" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + when: __sap_hypervisor_node_preconfigure_cpu_stepping_assert == "4" + +- name: Assert - check sap_hypervisor_node_preconfigure_nx_huge_pages + block: + - name: "Assert - Check kvm.nx_huge_pages is {{ sap_hypervisor_node_preconfigure_nx_huge_pages }}" + ansible.builtin.assert: + that: "'kvm.nx_huge_pages={{ sap_hypervisor_node_preconfigure_nx_huge_pages }}' in __sap_hypervisor_node_preconfigure_kernelcmdline_assert.stdout" + fail_msg: "FAIL: kvm.nx_huge_pages is not {{ sap_hypervisor_node_preconfigure_nx_huge_pages }}" + success_msg: "PASS: kvm.nx_huge_pages is {{ sap_hypervisor_node_preconfigure_nx_huge_pages }}" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + + when: sap_hypervisor_node_preconfigure_nx_huge_pages is defined + +- name: Assert - check seccomp_sanbox=0 + block: + - command: grep -E '^seccomp_sandbox\s+=\s+0.*$' /etc/libvirt/qemu.conf + register: __sap_hypervisor_node_preconfigure_seccomp_assert + ignore_errors: yes + + - name: "Assert - Check seccomp_sanbox=0 is in /etc/libvirt/qemu.conf" + ansible.builtin.assert: + that: "{{ __sap_hypervisor_node_preconfigure_seccomp_assert.rc }} == 0" + fail_msg: "FAIL: seccomp_sandbox != 0" + success_msg: "PASS: seccomp_sanbox == 0" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + +- name: Assert - check amount of 1G hugepages + block: + - name: Get amount of 1G hugepages + ansible.builtin.shell: hugeadm --pool-list | grep 1073741824 | awk '{print $3}' + register: __sap_hypervisor_node_preconfigure_1Ghugepages_assert + + - name: "Check that at least {{ sap_hypervisor_node_preconfigure_reserved_ram }} GB are available for the hypervisor and the rest are 1G hugepages" + ansible.builtin.assert: + that: "{{ ( ansible_memtotal_mb / 1024 )|int - sap_hypervisor_node_preconfigure_reserved_ram }} >= {{ __sap_hypervisor_node_preconfigure_1Ghugepages_assert.stdout }}" + fail_msg: "FAIL: Not enough memory reserved for hypervisor" + success_msg: "PASS: Enough memory reserved for hypervisor" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + +- name: Assert - check Kernel command line + block: + - assert: + that: "'intel_iommu=on' in __sap_hypervisor_node_preconfigure_kernelcmdline_assert.stdout" + fail_msg: "FAIL: intel_iommu=on not on Kernel command line" + success_msg: "PASS: intel_iommu=on on Kernel command line" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + + - assert: + that: "'iommu=pt' in __sap_hypervisor_node_preconfigure_kernelcmdline_assert.stdout" + fail_msg: "FAIL: iommu=pt not on Kernel command line" + success_msg: "PASS: iommu=pt on Kernel command line" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + + - assert: + that: "'tsx=off' in __sap_hypervisor_node_preconfigure_kernelcmdline_assert.stdout" + fail_msg: "FAIL: tsx=off not on Kernel command line" + success_msg: "PASS: tsx=off on Kernel command line" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" + + +#- name: Trigger tuned profile sap-hana-kvm activation +# include_tasks: set-tuned-profile.yml +# +##### install hooks: HP, cpufreq diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml b/roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml similarity index 74% rename from roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml index 089b6b3b6..5d60138e3 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-installation.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml @@ -8,8 +8,8 @@ fail_msg: "FAIL: Package '{{ line_item }}' is not installed!" success_msg: "PASS: Package '{{ line_item }}' is installed." with_items: - - "{{ sap_hana_rhv_hypervisor_packages }}" + - "{{ sap_hypervisor_node_preconfigure_packages }}" loop_control: loop_var: line_item - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml b/roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml similarity index 50% rename from roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml index 32b159795..d81ffe953 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml @@ -1,34 +1,34 @@ --- - name: Check file permissions ansible.builtin.command: "stat -c%a /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" - register: __sap_hana_rhv_hypervisor_register_file_permissions_assert + register: __sap_hypervisor_node_preconfigure_register_file_permissions_assert - name: Assert hook file permissions ansible.builtin.assert: - that: "__sap_hana_rhv_hypervisor_register_file_permissions_assert.stdout == '755'" + that: "__sap_hypervisor_node_preconfigure_register_file_permissions_assert.stdout == '755'" fail_msg: "FAIL: Hook {{ item }} does not have the correct file permissions (!= 755)." success_msg: "PASS: Hook {{ item }} does have the correct file permissions (755)." - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" - name: Create tmp dir ansible.builtin.file: - path: /tmp/sap_hana_rhv_hypervisor + path: /tmp/sap_hypervisor_node_preconfigure state: directory - name: Copy hook for checking ansible.builtin.copy: - dest: "/tmp/sap_hana_rhv_hypervisor/{{ item }}" + dest: "/tmp/sap_hypervisor_node_preconfigure/{{ item }}" src: "{{ item }}" - name: Diff hook - ansible.builtin.command: "diff -uw /tmp/sap_hana_rhv_hypervisor/{{ item }} /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" - register: __sap_hana_rhv_hypervisor_register_hook_diff_assert + ansible.builtin.command: "diff -uw /tmp/sap_hypervisor_node_preconfigure/{{ item }} /usr/libexec/vdsm/hooks/before_vm_start/{{ item }}" + register: __sap_hypervisor_node_preconfigure_register_hook_diff_assert ignore_errors: yes - name: Assert hook content ansible.builtin.assert: - that: "__sap_hana_rhv_hypervisor_register_hook_diff_assert.rc == 0" + that: "__sap_hypervisor_node_preconfigure_register_hook_diff_assert.rc == 0" fail_msg: "FAIL: Hook {{ item }} has been modified, please investigate manually." success_msg: "PASS: Hook {{ item }} not modified" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml b/roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml similarity index 63% rename from roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml index 9825381e1..175629669 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml @@ -3,12 +3,12 @@ block: - name: Get tuned profile ansible.builtin.command: tuned-adm active - register: __sap_hana_rhv_hypervisor_tuned_profile_assert + register: __sap_hypervisor_node_preconfigure_tuned_profile_assert - name: Verify tuned profile ansible.builtin.assert: - that: "'Current active profile: sap-hana-kvm-host' in __sap_hana_rhv_hypervisor_tuned_profile_assert.stdout" + that: "'Current active profile: sap-hana-kvm-host' in __sap_hypervisor_node_preconfigure_tuned_profile_assert.stdout" fail_msg: "FAIL: tuned profile is not sap-hana-kvm-host" success_msg: "PASS: tuned profile is sap-hana-kvm-host" - ignore_errors: "{{ sap_hana_rhv_hypervisor_ignore_failed_assertion }}" + ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml b/roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml similarity index 79% rename from roles/sap_hana_rhv_hypervisor/tasks/configuration.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml index 7fd6da704..0d2e556be 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/configuration.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml @@ -1,5 +1,5 @@ --- -# tasks file for sap_hana_rhv_hypervisor +# tasks file for sap_hypervisor_node_preconfigure - name: Test if kernel same page merging (KSM) exists ansible.builtin.shell: systemctl cat ksm @@ -75,13 +75,13 @@ line: "\\1 {{ item }}\"" with_items: - "spectre_v2=retpoline" - notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler tags: grubconfig when: cpu_stepping == "4" become: true become_user: root -- name: "Set kvm.nx_huge_pages to {{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" +- name: "Set kvm.nx_huge_pages to {{ sap_hypervisor_node_preconfigure_kvm_nx_huge_pages }}" ansible.builtin.lineinfile: path: /etc/default/grub backup: yes @@ -90,10 +90,10 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "kvm.nx_huge_pages={{ sap_hana_rhv_hypervisor_kvm_nx_huge_pages }}" - notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + - "kvm.nx_huge_pages={{ sap_hypervisor_node_preconfigure_kvm_nx_huge_pages }}" + notify: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler tags: grubconfig - when: sap_hana_rhv_hypervisor_kvm_nx_huge_pages is defined + when: sap_hypervisor_node_preconfigure_kvm_nx_huge_pages is defined become: true become_user: root @@ -110,7 +110,7 @@ - name: Trigger tuned profile sap-hana-kvm activation ansible.builtin.include_tasks: allocate-hugepages-at-runtime.yml - when: sap_hana_rhv_hypervisor_reserve_hugepages == "runtime" + when: sap_hypervisor_node_preconfigure_reserve_hugepages == "runtime" - name: Reserve Hugepages statically ansible.builtin.lineinfile: @@ -123,10 +123,10 @@ with_items: - default_hugepagesz=1GB - hugepagesz=1GB - - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hana_rhv_hypervisor_reserved_ram }} - notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + - hugepages={{ ( ansible_memtotal_mb / 1024 )|int - sap_hypervisor_node_preconfigure_reserved_ram }} + notify: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler tags: grubconfig - when: sap_hana_rhv_hypervisor_reserve_hugepages == "static" + when: sap_hypervisor_node_preconfigure_reserve_hugepages == "static" become: true become_user: root @@ -141,7 +141,7 @@ with_items: - intel_iommu=on - iommu=pt - notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler tags: grubconfig become: true become_user: root @@ -155,8 +155,8 @@ regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ item }}).*). *$' line: "\\1 {{ item }}\"" with_items: - - "tsx={{ sap_hana_rhv_hypervisor_tsx }}" - notify: __sap_hana_rhv_hypervisor_regenerate_grub2_conf_handler + - "tsx={{ sap_hypervisor_node_preconfigure_tsx }}" + notify: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler tags: grubconfig become: true become_user: root diff --git a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml b/roles/sap_hypervisor_node_preconfigure/tasks/installation.yml similarity index 69% rename from roles/sap_hana_rhv_hypervisor/tasks/installation.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/installation.yml index 89b902a52..95d153a3d 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/installation.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/installation.yml @@ -2,7 +2,7 @@ - name: Ensure required packages are installed ansible.builtin.package: state: present - name: "{{ sap_hana_rhv_hypervisor_packages }}" + name: "{{ sap_hypervisor_node_preconfigure_packages }}" become: true become_user: root ... diff --git a/roles/sap_hana_rhv_hypervisor/tasks/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml similarity index 83% rename from roles/sap_hana_rhv_hypervisor/tasks/main.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/main.yml index dc88a53a9..639964c90 100644 --- a/roles/sap_hana_rhv_hypervisor/tasks/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml @@ -6,12 +6,12 @@ - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: assert_prefix: "" - when: not sap_hana_rhv_hypervisor_assert|d(false) + when: not sap_hypervisor_node_preconfigure_assert|d(false) - name: Prepend filename with assert string if role is run in assert mode ansible.builtin.set_fact: assert_prefix: "assert-" - when: sap_hana_rhv_hypervisor_assert|d(false) + when: sap_hypervisor_node_preconfigure_assert|d(false) - include_tasks: '{{ assert_prefix }}installation.yml' diff --git a/roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml b/roles/sap_hypervisor_node_preconfigure/tasks/rhv-hooks.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/tasks/rhv-hooks.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/rhv-hooks.yml diff --git a/roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml b/roles/sap_hypervisor_node_preconfigure/tasks/set-tuned-profile.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/tasks/set-tuned-profile.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/set-tuned-profile.yml diff --git a/roles/sap_hana_rhv_hypervisor/tests/inventory b/roles/sap_hypervisor_node_preconfigure/tests/inventory similarity index 100% rename from roles/sap_hana_rhv_hypervisor/tests/inventory rename to roles/sap_hypervisor_node_preconfigure/tests/inventory diff --git a/roles/sap_hana_rhv_hypervisor/tests/test.yml b/roles/sap_hypervisor_node_preconfigure/tests/test.yml similarity index 100% rename from roles/sap_hana_rhv_hypervisor/tests/test.yml rename to roles/sap_hypervisor_node_preconfigure/tests/test.yml diff --git a/roles/sap_hypervisor_node_preconfigure/vars/main.yml b/roles/sap_hypervisor_node_preconfigure/vars/main.yml new file mode 100644 index 000000000..bd0b651c4 --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/vars/main.yml @@ -0,0 +1,11 @@ +--- +# vars file for sap_hypervisor_node_preconfigure +# + +# packages to install +sap_hypervisor_node_preconfigure_packages: + - libhugetlbfs-utils + - qemu-kvm + - libvirt + - tuned +... From 59b5181eec1fe6f779285756aca45ed054bc1388 Mon Sep 17 00:00:00 2001 From: "steven.stringer@suse.com" Date: Fri, 21 Oct 2022 16:19:08 +0100 Subject: [PATCH 268/375] Added saptune support for SLES --- roles/sap_hana_preconfigure/README.md | 80 ++++++++++++++----- roles/sap_hana_preconfigure/defaults/main.yml | 21 ++++- .../tasks/SLES/assert-configuration.yml | 76 ++++++++++++++++++ .../tasks/SLES/assert-installation.yml | 24 ++++++ .../tasks/SLES/configuration.yml | 77 ++++++++++++++++-- .../tasks/SLES/installation.yml | 26 ++++-- roles/sap_hana_preconfigure/vars/SLES_15.yml | 5 ++ roles/sap_netweaver_preconfigure/README.md | 35 ++++++-- .../defaults/main.yml | 16 ++++ .../tasks/SLES/assert-configuration.yml | 64 +++++++++++++++ .../tasks/SLES/assert-installation.yml | 19 +++++ .../tasks/SLES/configuration.yml | 55 ++++++++++--- .../tasks/SLES/installation.yml | 8 ++ .../vars/SLES_15.yml | 9 ++- 14 files changed, 458 insertions(+), 57 deletions(-) create mode 100644 roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml create mode 100644 roles/sap_hana_preconfigure/tasks/SLES/assert-installation.yml create mode 100644 roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml create mode 100644 roles/sap_netweaver_preconfigure/tasks/SLES/assert-installation.yml diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index 63b841686..99e9b65c6 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -1,17 +1,17 @@ # sap_hana_preconfigure Ansible Role This role installs additional required packages and performs additional configuration steps for installing and running SAP HANA. -If you want to configure a RHEL system for the installation and later usage of SAP HANA, you have to first run role sap_general_preconfigure -and then role sap_hana_preconfigure. +If you want to configure a RHELsystem for the installation and later usage of SAP HANA, you have to first run role sap_general_preconfigure +and then role sap_hana_preconfigure. However, if we wish to run SLES for HANA, you may run only this role. ## Requirements -To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by running +To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. For RHEL, this typically done by running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system time, before or after running role sap_hana_preconfigure. -Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessable (see also example playbook): +Managed nodes need to be properly registered to a repository source and have at least the following repositories accessible (see also example playbook): for RHEL 7.x: - rhel-7-[server|for-power-le]-e4s-rpms @@ -22,7 +22,13 @@ for RHEL 8.x: - rhel-8-for-[x86_64|ppc64le]-appstream-e4s-rpms - rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms -For details, see the Red Hat knowledge base article: [How to subscribe SAP HANA systems to the Update Services for SAP Solutions](https://access.redhat.com/solutions/3075991)). If you set role parameter sap_hana_preconfigure_enable_sap_hana_repos to `yes`, the role can enable these repos. +for SLES 15.x: +- SLE-Module-SAP-Applications15-[SP number]-Pool +- SLE-Module-SAP-Applications15-[SP number]-Updates +- SLE-Product-SLES_SAP15-[SP number]-Pool +- SLE-Product-SLES_SAP15-[SP number]-Updates + +For details on configuring Red Hat, see the knowledge base article: [How to subscribe SAP HANA systems to the Update Services for SAP Solutions](https://access.redhat.com/solutions/3075991)). If you set role parameter sap_hana_preconfigure_enable_sap_hana_repos to `yes`, the role can enable these repos. To install HANA on Red Hat Enterprise Linux 6, 7, or 8, you need some additional packages which are contained in the rhel-sap-hana-for-rhel-7-[server|for-power-le]-e4s-rpms or rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms repo. @@ -47,6 +53,9 @@ To get a personal developer edition of RHEL for SAP solutions, please register a For supported RHEL releases [click here](https://access.redhat.com/solutions/2479121). +Details on configuring SLES repositories can be found on the following articles for [on-premise systems](https://www.suse.com/support/kb/doc/?id=000018564) or [BYOS cloud images](https://www.suse.com/c/byos-instances-and-the-suse-public-cloud-update-infrastructure/) + + It is also important that your disks are setup according to the [SAP storage requirements for SAP HANA](https://www.sap.com/documents/2015/03/74cdb554-5a7c-0010-8F2c7-eda71af511fa.html). This [BLOG](https://blogs.sap.com/2017/03/07/the-ultimate-guide-to-effective-sizing-of-sap-hana/) is also quite helpful when sizing HANA systems. You can use the [storage](https://galaxy.ansible.com/linux-system-roles/storage) role to automate this process @@ -54,7 +63,9 @@ If you want to use this system in production, make sure that the time service is Note ---- -For finding out which SAP notes will be used by this role, please check the contents of variable `__sap_hana_preconfigure_sapnotes` in files `vars/*.yml` (choose the file which matches your OS distribution and version). +For finding out which SAP notes will be used by this role for Red Hat systems, please check the contents of variable `__sap_hana_preconfigure_sapnotes` in files `vars/*.yml` (choose the file which matches your OS distribution and version). + +For SLES, notes are applied using the saptune service. Saptune supports a number of solutions. A solution implements several SAP notes. The default solution for this role is 'HANA'. To see a list of supported solutions and the notes that they implement, you can run `saptune solution list` on the command line. Do not run this role against an SAP HANA or other production system. The role will enforce a certain configuration on the managed node(s), which might not be intended. @@ -74,24 +85,26 @@ sap_general_preconfigure is run before sap_hana_preconfigure, there is no need a Same applies to the assertion of the SELinux state. Because of this, variable sap_hana_preconfigure_selinux_state has been removed from this role and tasks 2292690/08-disable-selinux.yml and 2777782/01-assert-selinux.yml have been commented out. +3) SLES systems are now configured using saptune rather than the ansible implementation of the notes. + ## Role Variables - set in `defaults/main.yml`: -### Execute only certain steps of SAP notes +### Execute only certain steps of SAP notes (RHEL only) If the following variable is set to `no`, only certain steps of SAP notes will be executed or checked as per setting of variable `sap_hana_preconfigure__`. If this variable is undefined or set to `yes`, all installation and configuration steps of applicable SAP notes will be executed. ```yaml sap_hana_preconfigure_config_all ``` -### Perform installation or configuration steps, or both +### Perform installation or configuration steps, or both (RHEL only) If you have set `sap_hana_preconfigure_config_all` (see above) to `no`, you can limit the scope of the role to only execute the installation or the configuration steps. For this purpose, set one of the following variables, or both, to `yes`. The default for both is `no`. ```yaml sap_hana_preconfigure_installation sap_hana_preconfigure_configuration ``` -### Define configuration steps of SAP notes +### Define configuration steps of SAP notes (RHEL only) For defining one or more configuration steps of SAP notes to be executed or checked only, set variable `sap_hana_preconfigure_config_all` to `no`, `sap_hana_preconfigure_configuration` to `yes`, and one or more of the following variables to `yes`: ```yaml sap_hana_preconfigure_2777782_[02...10], example: sap_hana_preconfigure_2777782_05 @@ -125,7 +138,8 @@ has been modified according to this role. sap_hana_preconfigure_assert_all_config ``` -### Perform a RHEL minor release check for SAP HANA +### Perform a RHEL minor release check for SAP HANA (RHEL only) + If the following variable is set to `no`, the role will install packages and modify settings on the managed node even if the RHEL release is not contained in the list of supported RHEL releases. Default is `yes`. In assert mode (`sap_hana_preconfigure_assert` = `yes`), the role will always perform the RHEL release check but will display display "WARN" or "INFO" if the variable is set to `no`, instead of the default "FAIL" or "PASS". @@ -133,19 +147,20 @@ display display "WARN" or "INFO" if the variable is set to `no`, instead of the sap_hana_preconfigure_min_rhel_release_check ``` -### Override the supported RHEL minor release list for SAP HANA +### Override the supported RHEL minor release list for SAP HANA (RHEL only) + If you want to provide you own list of supported RHEL releases (e.g. for testing), override the variable. Otherwise, the defaults as set in vars/RedHat_*.yml will be used. ```yaml sap_hana_preconfigure_supported_rhel_minor_releases ``` -### Repo checking and enabling +### Repo checking and enabling (RHEL only) If you want the role to check and if necessary enable SAP HANA repos, set the following variable to `yes`. Default is `no`. ```yaml sap_hana_preconfigure_enable_sap_hana_repos ``` -### Override default repo list(s) +### Override default repo list(s) (RHEL only) If you want to provide you own list(s) of repositories for checking and enabling, override one or more of the following variables. Otherwise, the defaults as set in vars/RedHat_*.yml will be used. ```yaml sap_hana_preconfigure_req_repos_RedHat_7_x86_64 @@ -154,7 +169,7 @@ sap_hana_preconfigure_req_repos_RedHat_8_x86_64 sap_hana_preconfigure_req_repos_RedHat_8_ppc64le ``` -### Set the RHEL release to a certain fixed minor release +### Set the RHEL release to a certain fixed minor release (RHEL only) If you want the role to set the RHEL release to a certain fixed minor release (according to installed RHEL release), set the following variable to `yes`. Default is `no`. ```yaml sap_hana_preconfigure_set_minor_release @@ -166,8 +181,8 @@ The following variable will make sure packages are installed at minimum required sap_hana_preconfigure_min_package_check ``` -### Perform a yum update -If the following variable is set to `yes`, the role will run a `yum update` before performing configuration changes. Default is `no`. \ +### Perform a package update +If the following variable is set to `yes`, the role will run a `yum update` for RHEL or a `zypper update` for SLES, before performing configuration changes. Default is `no`. \ *Note*: The outcome of a `yum update` depends on the managed node's configuration for sticky OS minor version, see the description of the release option in `man subscription-manager`. For SAP HANA installations, setting a certain minor version with `subscription-manager release --set=X.Y` is a strict requirement. ```yaml sap_hana_preconfigure_update @@ -187,6 +202,8 @@ sap_hana_preconfigure_kernel_parameters: - { name: net.ipv4.tcp_slow_start_after_idle, value: 0 } ``` +Note that kernel parameters for SLES systems are automatically handled by saptune. + ### HANA kernel parameters for IBM POWER servers [SAP Note 2055470](https://launchpad.support.sap.com/#/notes/2055470) contains links to IBM documents for SAP HANA on POWER. Among these is a document which contains certain recommended Linux kernel settings for SAP HANA on POWER: @@ -198,7 +215,9 @@ The default parameter recommendations are defined in ./vars/{{ansible_os_release for your system, copy these parameters from the vars file into the variable sap_hana_preconfigure_kernel_parameters_ppc64le and add or change your settings, similar to the previous example. -### HANA kernel parameters for NetApp NFS +Note that kernel parameters for SLES systems are automatically handled by saptune. + +### HANA kernel parameters for NetApp NFS (RHEL only) [SAP Note 3024346](https://launchpad.support.sap.com/#/notes/3024346) defines kernel parameter settings for NetApp NFS. In case you want the role to set or check these parameters, set the following variable to `yes`. Default is `no`. @@ -206,7 +225,7 @@ In case you want the role to set or check these parameters, set the following va sap_hana_preconfigure_use_netapp_settings_nfs ``` -### HANA kernel parameters for NetApp NFSv3 +### HANA kernel parameters for NetApp NFSv3 (RHEL only) [SAP Note 3024346](https://launchpad.support.sap.com/#/notes/3024346) also contains an additional parameter setting for NetApp when using NFSv3. In case you want the role to set or check this parameter, set the following variable to `yes`. Default is `no`. @@ -214,13 +233,13 @@ In case you want the role to set or check this parameter, set the following vari sap_hana_preconfigure_use_netapp_settings_nfsv3 ``` -### Add the repository for IBM service and productivity tools for POWER (ppc64le only) +### Add the repository for IBM service and productivity tools for POWER (RHEL ppc64le only) In case you do *not* want to automatically add the repository for the IBM service and productivity tools, set the following variable to `no`. Default is `yes`, meaning that the role will download and install the package specified in variable sap_hana_preconfigure_ibm_power_repo_url (see below) and also run the command /opt/ibm/lop/configure to accept the license. ```yaml sap_hana_preconfigure_add_ibm_power_repo ``` -### URL for IBM service and productivity tools for POWER (ppc64le only) +### URL for IBM service and productivity tools for POWER (RHEL ppc64le only) The following variable is set to the location of package ibm-power-repo-lastest.noarch.rpm or a package with similar contents, as defined by variable __sap_hana_preconfigure_ibm_power_repo_url in vars/RedHat_7.yml and vars/RedHat_8.yml. You can replace it by your own URL by setting this variable to a different URL. ```yaml @@ -241,7 +260,7 @@ By setting the variable to `no`, the role will not fail if a reboot is required sap_hana_preconfigure_fail_if_reboot_required ``` -### Use tuned profile sap-hana +### Use tuned profile sap-hana (RHEL only) By default, the role will activate tuned profile `sap-hana` for configuring kernel parameters (where possible). If you do not want to use the tuned profile sap-hana, set the following variable to `no`. In this case, the role will also modify GRUB_CMDLINE_LINUX, no matter how variable `sap_hana_preconfigure_modify_grub_cmdline_linux` (see below) is set. @@ -251,7 +270,7 @@ Note: If this variable is set to `yes`, the role may still modify GRUB_CMDLINE_L sap_hana_preconfigure_use_tuned ``` -### Specify your own tuned profile +### Specify your own tuned profile (RHEL only) Use the following variable to set a tuned profile string other than the default `sap-hana`. The tuned profile must reside in directory `/etc/tuned/my_own_profile`, as file named `tuned.conf` (example for a tuned profile named `my_own_profile`). ```yaml @@ -265,12 +284,29 @@ Note: If variable sap_hana_preconfigure_use_tuned (see above) is set to `no`, GR sap_hana_preconfigure_modify_grub_cmdline_linux ``` +For SLES users any required changes to grub for SLES are automatically handled by saptune. + ### Run grub2-mkconfig If you do not want to run grub2-mkconfig to regenerate the grub2 config file after a change to /etc/default/grub (see the desciption of the two previous parameters), set the following variable to `no`. The default is `yes`. ```yaml sap_hana_preconfigure_run_grub2_mkconfig ``` +For SLES users any required changes to grub for SLES are automatically handled by saptune. + +## Select saptune solution (SLES only) +You can specify the saptune solution you want to implement. For HANA, there are a number of possible solutions depending on the deployment: + +- HANA, for when HANA is installed with no other applications +- NETWEAVER+HANA, for when HANA is installed on the same host as netweaver solution +- S4HANA-APP+DB, for when HANA is installed on the same host as an S4 solution + +The default is `HANA` + +```yaml +sap_hana_preconfigure_saptune_solution +``` + ### HANA Major and minor version These variables are used in all sap-hana roles so that they are only prefixed with `sap-hana`. If you use `sap-hana-mediacheck` role, these variables are read in automatically. The variable is used in the checks for [SAP Note 2235581](https://launchpad.support.sap.com/#/notes/2235581). diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index 4a0db3291..d604b7bcf 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -66,7 +66,7 @@ sap_hana_sps: "0" sap_hana_preconfigure_packages: "{{ __sap_hana_preconfigure_packages }}" #sap_hana_preconfigure_packages: "{{ __sap_hana_preconfigure_packages_min_install }}" -# SAP HANA requires certain minimum package versions to be supported. These mininum levels are listed in SAP Note 2235581. +# SAP HANA requires certain minimum package versions to be supported. These minium levels are listed in SAP Note 2235581. # Set to no if you want to ignore these requirements. sap_hana_preconfigure_min_package_check: yes @@ -93,7 +93,7 @@ sap_hana_preconfigure_fail_if_reboot_required: yes ## HANA kernel parameters # [SAP Note 2382421](https://launchpad.support.sap.com/#/notes/2382421) defines kernel parameters that all Linux systems need to set. -# The default parameter recomendations are dependent on the OS release. Hence the OS dependant default setting is defined in +# The default parameter recommendations are dependent on the OS release. Hence the OS dependant default setting is defined in # ./vars/{{ansible_os_release}}.yml. If you need to add or change parameters for your system, copy these parameters from the vars file # into the variable sap_hana_preconfigure_kernel_parameters and add or change your settings: @@ -134,3 +134,20 @@ sap_hana_preconfigure_run_grub2_mkconfig: "{{ __sap_hana_preconfigure_run_grub2_ # (if it exists, it will be used to configure process limits as per step # "Configuring Process Resource Limits" of SAP note 2772999): # sap_hana_preconfigure_db_group_name: dba + +## The following variables control aspects of saptune and are only relevant for SLES for SAP Application + +# Version of saptune to install this will replace the current installed version if present, downgrading if necessary +sap_hana_preconfigure_saptune_version: 3.0.2 + +# The saptune solution to apply. For HANA, the only appropriate options are: +# * HANA +# * NETWEAVER+HANA +# * S4HANA-APP+DB +# * S4HANA-DBSERVER +# * The default option is HANA +sap_hana_preconfigure_saptune_solution: HANA + +# When running on Azure, TCP timestamps, reuse and recycle should be disabled +# set to yes when running on Azure +sap_hana_preconfigure_saptune_azure: false diff --git a/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml new file mode 100644 index 000000000..32fcf9893 --- /dev/null +++ b/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml @@ -0,0 +1,76 @@ +--- +#- name: Enable Debugging +# debug: +# verbosity: "{{ debuglevel }}" +# + +- name: Populate service facts + ansible.builtin.service_facts: + +- name: Assert that saptune conflicting services are stopped + ansible.builtin.assert: + that: + - "ansible_facts.services['{{ service }}.service'].state == 'inactive' or ansible_facts.services['{{ service }}.service'].state == 'stopped'" + - "ansible_facts.services['{{ service }}.service'].status == 'disabled'" + fail_msg: "FAIL: the service '{{ service }}' is not configured as expected" + success_msg: "PASS: the service '{{ service }}' is configured as expected" + loop: "{{ __sap_hana_preconfigure_saptune_conflicting_services }}" + loop_control: + loop_var: service + +- name: Assert that saptune is running and enabled + ansible.builtin.assert: + that: + - "ansible_facts.services['saptune.service'].state == 'running'" + - "ansible_facts.services['saptune.service'].status == 'enabled'" + fail_msg: "FAIL: the service 'saptune' is not configured as expected" + success_msg: "PASS: the service 'saptune' is configured as expected" + +- name: Run saptune_check + ansible.builtin.command: saptune_check + register: __sap_hana_preconfigure_register_saptune_check + changed_when: false + failed_when: false + +- name: Assert that saptune_check executed correctly + ansible.builtin.assert: + that: "__sap_hana_preconfigure_register_saptune_check.rc == 0" + fail_msg: "FAIL: the command saptune_check fails" + success_msg: "PASS: the command saptune_check executes as expected" + +- name: Discover active solution + ansible.builtin.command: saptune solution enabled + register: __sap_hana_preconfigure_register_saptune_status + changed_when: no + +- name: Set solution fact + ansible.builtin.set_fact: + __sap_hana_preconfigure_saptune_configured_solution: "{{ (__sap_hana_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1' ))[0] | default('NONE') }}" + +- name: Assert that active solution is the expected solution + ansible.builtin.assert: + that: __sap_hana_preconfigure_saptune_configured_solution == sap_hana_preconfigure_saptune_solution + fail_msg: "FAIL: the configured saptune solution is '{{ __sap_hana_preconfigure_saptune_configured_solution }}'' and does not match the expected solution '{{ sap_hana_preconfigure_saptune_solution }}'" + success_msg: "PASS: the configured saptune solution matches the expected solution '{{ sap_hana_preconfigure_saptune_solution }}'" + +# If this is a cluster node on Azure, we need to override to disable tcp timestamps, reuse and recycle. +# This can be done by copying the sapnote file 2382421 from /usr/share/saptune/notes to /etc/saptune/override +# The value can then override in the in the new file + +#- name: Disable TCP timestamps, recycle & reuse +# ansible.builtin.blockinfile: +# path: /etc/saptune/override/2382421 +# create: yes +# backup: yes +# owner: root +# group: root +# mode: '0640' +# marker: "" +# block: | +# [sysctl] +# net.ipv4.tcp_timestamps = 0 +# net.ipv4.tcp_tw_reuse = 0 +# net.ipv4.tcp_tw_recycle = 0 +# when: +# - sap_hana_preconfigure_saptune_azure + diff --git a/roles/sap_hana_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/assert-installation.yml new file mode 100644 index 000000000..da532ecee --- /dev/null +++ b/roles/sap_hana_preconfigure/tasks/SLES/assert-installation.yml @@ -0,0 +1,24 @@ +--- +#- name: Enable Debugging +# debug: +# verbosity: "{{ debuglevel }}" +# +#Capture all patterns along with their install status +- name: Get zypper pattern information + ansible.builtin.command: zypper patterns + register: __sap_hana_preconfigure_zypper_patterns + changed_when: false + +# Count the number of times the sap-hana pattern appears to be installed in the output. +# It is OK for it to appear more than once +- name: Assert the sap-hana pattern is installed + ansible.builtin.assert: + that: __sap_hana_preconfigure_zypper_patterns.stdout_lines | select('match', 'i.*sap-hana.*') | length != 0 + fail_msg: "FAIL: the sap-hana pattern is not installed" + success_msg: "PASS: the sap-hana pattern is installed" + +- name: Assert saptune is at requested version + ansible.builtin.assert: + that: ansible_facts.packages['saptune'][0]['version'] == sap_hana_preconfigure_saptune_version + fail_msg: "FAIL: saptune version installed is {{ ansible_facts.packages['saptune'][0]['version'] }} but the version {{ sap_hana_preconfigure_saptune_version }} was expected" + success_msg: "PASS: the installed version of saptune meets the expected version: {{ sap_hana_preconfigure_saptune_version }}" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 1df42b765..048b9173a 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -4,12 +4,77 @@ # debug: # verbosity: "{{ debuglevel }}" # -- name: list of required SAP Notes +- name: Ensure conflicting services are stopped and disabled + ansible.builtin.systemd: + name: "{{ service }}" + state: stopped + enabled: no + loop: "{{ __sap_hana_preconfigure_saptune_conflicting_services }}" + loop_control: + loop_var: service + +- name: Ensure saptune is running and enabled + ansible.builtin.systemd: + name: saptune + state: started + enabled: yes + +- name: Ensure saptune_check executes correctly + ansible.builtin.command: saptune_check + changed_when: no + +- name: Discover active solution + ansible.builtin.command: saptune solution enabled + register: __sap_hana_preconfigure_register_saptune_status + changed_when: no + +- name: Set fact for active solution + ansible.builtin.set_fact: + __sap_hana_preconfigure_fact_solution_configured: "{{ (__sap_hana_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1'))[0] | default('NONE') }}" # Capture the first block on none whitespace + +- name: Show configured solution ansible.builtin.debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) + var: __sap_hana_preconfigure_fact_solution_configured + +# If this is a cluster node on Azure, we need to override to disable tcp timestamps, reuse and recycle. +# This can be done by copying the sapnote file 2382421 from /usr/share/saptune/notes to /etc/saptune/override +# The value can then override in the in the new file + +- name: Disable TCP timestamps, recycle & reuse + ansible.builtin.blockinfile: + path: /etc/saptune/override/2382421 + create: yes + backup: yes + owner: root + group: root + mode: '0640' + marker: "" + block: | + [sysctl] + net.ipv4.tcp_timestamps = 0 + net.ipv4.tcp_tw_reuse = 0 + net.ipv4.tcp_tw_recycle = 0 + when: + - sap_hana_preconfigure_saptune_azure + +- name: Check if saptune solution needs to be applied + ansible.builtin.command: "saptune solution verify {{ sap_hana_preconfigure_saptune_solution }}" + register: __sap_hana_preconfigure_register_saptune_verify + changed_when: no # We're only checking, not changing! + failed_when: no # We expect this to fail if it has not previously been applied + +- name: Ensure no solution is currently applied + ansible.builtin.command: "saptune solution revert {{ __sap_hana_preconfigure_fact_solution_configured }}" + when: + - __sap_hana_preconfigure_fact_solution_configured != 'NONE' + - __sap_hana_preconfigure_register_saptune_verify.rc != 0 + +- name: Ensure saptune solution is applied + ansible.builtin.command: "saptune solution apply {{ sap_hana_preconfigure_saptune_solution }}" + when: __sap_hana_preconfigure_register_saptune_verify.rc != 0 + +- name: Ensure solution was successful + ansible.builtin.command: "saptune solution verify {{ sap_hana_preconfigure_saptune_solution }}" + changed_when: no # We're only checking, not changing! -- name: include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/configuration.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" -# - ansible.builtin.include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 7df3f2789..4139c4413 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -1,13 +1,25 @@ --- - #- name: Enable Debugging # debug: # verbosity: "{{ debuglevel }}" # -- name: list of required SAP Notes - ansible.builtin.debug: - var: __sap_hana_preconfigure_sapnotes | difference(['']) +# Reason for noqa: Both yum and dnf support "state: latest" +- name: Ensure that the system is updated to the latest patchlevel # noqa package-latest + ansible.builtin.package: + state: latest + name: "*" + when: sap_hana_preconfigure_update|bool + +- name: Ensure saphana pattern is installed + ansible.builtin.zypper: + type: pattern + name: sap-hana + state: present + force: yes -- name: include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/installation.yml" - with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" +- name: Ensure saptune is installed + ansible.builtin.zypper: + type: package + name: "saptune={{ sap_hana_preconfigure_saptune_version }}" + state: present + force: yes diff --git a/roles/sap_hana_preconfigure/vars/SLES_15.yml b/roles/sap_hana_preconfigure/vars/SLES_15.yml index a69c294bd..7bb60c5dd 100644 --- a/roles/sap_hana_preconfigure/vars/SLES_15.yml +++ b/roles/sap_hana_preconfigure/vars/SLES_15.yml @@ -24,3 +24,8 @@ __sap_hana_preconfigure_packages: # __sap_hana_preconfigure_grub_file: /tmp/grub + +# Services that conflict with saptune +__sap_hana_preconfigure_saptune_conflicting_services: + - sapconf + - tuned \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/README.md b/roles/sap_netweaver_preconfigure/README.md index 02dd575eb..7a415f285 100644 --- a/roles/sap_netweaver_preconfigure/README.md +++ b/roles/sap_netweaver_preconfigure/README.md @@ -1,21 +1,24 @@ # sap_netweaver_preconfigure Ansible Role This role installs additional required packages and performs additional configuration steps for installing and running SAP NetWeaver. -If you want to configure a RHEL system for the installation and later usage of SAP NetWeaver, you have to first run role sap_general_preconfigure -and then role sap_netweaver_preconfigure. +If you want to configure a RHEL system for the installation and later usage of SAP NetWeaver, you have to first run role `sap_general_preconfigure` and then role sap_netweaver_preconfigure. +For SLES, running the `sap_general_preconfigure` role is not necessary. ## Requirements To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by -running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). +running role `sap_general_preconfigure` (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP NetWeaver, to maintain an identical system time, before or after running role sap_netweaver_preconfigure. -Note +Note ---- -As per SAP notes 2002167 and 2772999, the role will switch to tuned profile sap-netweaver no matter if another tuned profile +On RHEL, as per SAP notes 2002167 and 2772999, the role will switch to tuned profile sap-netweaver no matter if another tuned profile (e.g. virtual-guest) had been active before or not. +On SLES, this role will switch the saptune solution to the one specified by the configuration and will override any previously set solution. +The default solution is + The role can check if enough swap space - as per the prerequisite checker in sapinst - has been configured on the managed node. Please check the SAP NetWeaver installation guide for swap space requirements. @@ -24,7 +27,7 @@ node(s), which might not be intended. ## Role Variables -### Execute only certain steps of SAP notes +### Execute only certain steps of SAP notes (RHEL only) If the following variable is set to `no`, only the installation or configuration steps of SAP notes will be executed or checked. If this variable is undefined or set to `yes`, all installation and configuration steps of applicable SAP notes will be executed. ```yaml sap_netweaver_preconfigure_config_all @@ -37,7 +40,7 @@ sap_netweaver_preconfigure_installation sap_netweaver_preconfigure_configuration ``` -### Install required packages for Adobe Document Services +### Install required packages for Adobe Document Services (RHEL Only) If the following variable is set to `yes`, required packages for Adobe Document Services according to SAP note 2135057 (RHEL 7) or 2920407 (RHEL 8) will be installed. Default is `no`. ```yaml sap_netweaver_preconfigure_use_adobe_doc_services @@ -69,6 +72,24 @@ If the following variable is set to `no`, the role will not fail if less than 20 sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured ``` +## Select saptune solution (SLES only) +You can specify the saptune solution you want to implement. For Netweaver, there are a number of possible solutions depending on the deployment: + +* NETWEAVER +* NETWEAVER+HANA +* S4HANA-APP+DB +* S4HANA-APPSERVER +* S4HANA-DBSERVER +The default vaule is NETWEAVER + +sap_netweaver_preconfigure_saptune_solution: NETWEAVER + +The default is `NETWEAVER` + +```yaml +sap_hana_preconfigure_saptune_solution +``` + ## Example Playbook Simple playbook, named sap+netweaver.yml: diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index b69ef77a9..5c8f566fd 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -12,3 +12,19 @@ sap_netweaver_preconfigure_min_swap_space_mb: "{{ __sap_netweaver_preconfigure_m sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: yes sap_netweaver_preconfigure_use_adobe_doc_services: no + +#SLES Only +sap_netweaver_preconfigure_saptune_version: 3.0.2 + +## The following variables control aspects of saptune and are only relevant for SLES for SAP Application + +# The saptune solution to apply. For netweaver, the only appropriate options are: +#NETWEAVER +#NETWEAVER+HANA +#S4HANA-APP+DB +#S4HANA-APPSERVER +#S4HANA-DBSERVER +# The default vaule is NETWEAVER + +sap_netweaver_preconfigure_saptune_solution: NETWEAVER + diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml new file mode 100644 index 000000000..49ece622f --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml @@ -0,0 +1,64 @@ +--- +- name: Populate service facts + ansible.builtin.service_facts: + +- name: Assert that saptune conflicting services are stopped + ansible.builtin.assert: + that: + - "ansible_facts.services['{{ service }}.service'].state == 'inactive' or ansible_facts.services['{{ service }}.service'].state == 'stopped'" + - "ansible_facts.services['{{ service }}.service'].status == 'disabled'" + fail_msg: "FAIL: the service '{{ service }}' is not configured as expected" + success_msg: "PASS: the service '{{ service }}' is configured as expected" + loop: "{{ __sap_netweaver_preconfigure_saptune_conflicting_services }}" + loop_control: + loop_var: service + +- name: Assert that saptune is running and enabled + ansible.builtin.assert: + that: + - "ansible_facts.services['saptune.service'].state == 'running'" + - "ansible_facts.services['saptune.service'].status == 'enabled'" + fail_msg: "FAIL: the service 'saptune' is not configured as expected" + success_msg: "PASS: the service 'saptune' is configured as expected" + +- name: Run saptune_check + ansible.builtin.command: saptune_check + register: __sap_netweaver_preconfigure_register_saptune_check + changed_when: false + failed_when: false + +- name: Assert that saptune_check executed correctly + ansible.builtin.assert: + that: "__sap_netweaver_preconfigure_register_saptune_check.rc == 0" + fail_msg: "FAIL: the command saptune_check fails" + success_msg: "PASS: the command saptune_check executes as expected" + +- name: Discover active solution + ansible.builtin.command: saptune solution enabled + register: __sap_netweaver_preconfigure_register_saptune_status + changed_when: no + +- name: Set solution fact + ansible.builtin.set_fact: + __sap_netweaver_preconfigure_saptune_configured_solution: "{{ (__sap_netweaver_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1' ))[0] | default('NONE') }}" + +- name: Discover active solution + ansible.builtin.command: saptune solution enabled + register: __sap_netweaver_preconfigure_register_saptune_status + changed_when: no + +- name: Set fact for active solution + ansible.builtin.set_fact: + __sap_netweaver_preconfigure_fact_solution_configured: "{{ (__sap_netweaver_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1'))[0] | default('NONE') }}" # Capture the first block on none whitespace + +- name: Assert that active solution is the expected solution + ansible.builtin.assert: + that: __sap_netweaver_preconfigure_fact_solution_configured == sap_netweaver_preconfigure_saptune_solution + fail_msg: "FAIL: the configured saptune solution is '{{ __sap_netweaver_preconfigure_saptune_configured_solution }}'' and does not match the expected solution '{{ sap_netweaver_preconfigure_saptune_solution }}'" + success_msg: "PASS: the configured saptune solution matches the expected solution '{{ sap_netweaver_preconfigure_saptune_solution }}'" + +- name: Assert that adequate swap is configured + ansible.builtin.assert: + that: ansible_swaptotal_mb > sap_netweaver_preconfigure_min_swap_space_mb|int + fail_msg: "FAIL: A minimum of {{ sap_netweaver_preconfigure_min_swap_space_mb }}MiB is required but only {{ ansible_swaptotal_mb }}MiB was discovered" + success_msg: "PASS: the system has at least {{ sap_netweaver_preconfigure_min_swap_space_mb }}MiB of swap configured" diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-installation.yml new file mode 100644 index 000000000..ed69f0de8 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-installation.yml @@ -0,0 +1,19 @@ +--- +#- name: Enable Debugging +# debug: +# verbosity: "{{ debuglevel }}" +# +#Capture all patterns along with their install status + +- name: Ensure required packages for SAP NetWeaver are installed + ansible.builtin.assert: + that: "'{{ package }}' in ansible_facts.packages" + loop: "{{ __sap_netweaver_preconfigure_packages }}" + loop_control: + loop_var: package + +- name: Assert saptune is at requested version + ansible.builtin.assert: + that: ansible_facts.packages['saptune'][0]['version'] == sap_netweaver_preconfigure_saptune_version + fail_msg: "FAIL: saptune version installed is {{ ansible_facts.packages['saptune'][0]['version'] }} but the version {{ sap_netweaver_preconfigure_saptune_version }} was expected" + success_msg: "PASS: the installed version of saptune meets the expected version: {{ sap_netweaver_preconfigure_saptune_version }}" diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml index 5cb827a8b..ec989dea7 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml @@ -1,18 +1,51 @@ --- +- name: Ensure conflicting services are stopped and disabled + ansible.builtin.systemd: + name: "{{ service }}" + state: stopped + enabled: no + loop: "{{ __sap_netweaver_preconfigure_saptune_conflicting_services }}" + loop_control: + loop_var: service -- name: Configure - List required SAP Notes - ansible.builtin.debug: - var: __sap_netweaver_preconfigure_sapnotes | difference(['']) +- name: Ensure saptune is running and enabled + ansible.builtin.systemd: + name: saptune + state: started + enabled: yes -- name: Include installation actions for required sapnotes - ansible.builtin.include_tasks: "../tasks/sapnote/{{ item }}/installation.yml" - with_items: "{{ __sap_netweaver_preconfigure_sapnotes | difference(['']) }}" - when: __sap_netweaver_preconfigure_sapnotes is defined +- name: Ensure saptune_check executes correctly + ansible.builtin.command: saptune_check + changed_when: no -- name: Include configuration actions for required sapnotes - ansible.builtin.include_tasks: "../tasks/sapnote/{{ item }}/configuration.yml" - with_items: "{{ __sap_netweaver_preconfigure_sapnotes | difference(['']) }}" - when: __sap_netweaver_preconfigure_sapnotes is defined +- name: Discover active solution + ansible.builtin.command: saptune solution enabled + register: __sap_netweaver_preconfigure_register_saptune_status + changed_when: no + +- name: Set fact for active solution + ansible.builtin.set_fact: + __sap_netweaver_preconfigure_fact_solution_configured: "{{ (__sap_netweaver_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1'))[0] | default('NONE') }}" # Capture the first block on none whitespace + +- name: Check if saptune solution needs to be applied + ansible.builtin.command: "saptune solution verify {{ sap_netweaver_preconfigure_saptune_solution }}" + register: __sap_netweaver_preconfigure_register_saptune_verify + changed_when: no # We're only checking, not changing! + failed_when: no # We expect this to fail if it has not previously been applied + +- name: Ensure no solution is currently applied + ansible.builtin.command: "saptune solution revert {{ __sap_netweaver_preconfigure_fact_solution_configured }}" + when: + - __sap_netweaver_preconfigure_fact_solution_configured != 'NONE' + - __sap_netweaver_preconfigure_register_saptune_verify.rc != 0 + +- name: Ensure saptune solution is applied + ansible.builtin.command: "saptune solution apply {{ sap_netweaver_preconfigure_saptune_solution }}" + when: __sap_netweaver_preconfigure_register_saptune_verify.rc != 0 + +- name: Ensure solution was successful + ansible.builtin.command: "saptune solution verify {{ sap_netweaver_preconfigure_saptune_solution }}" + changed_when: no # We're only checking, not changing! - name: Warn if not enough swap space is configured ansible.builtin.fail: diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml index d7d3390e2..ad8710a9c 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml @@ -4,3 +4,11 @@ ansible.builtin.package: state: present name: "{{ __sap_netweaver_preconfigure_packages }}" + +#The use of zypper here allows exact saptune version to be declared and used. +- name: Ensure saptune is installed + ansible.builtin.zypper: + type: package + name: "saptune={{ sap_netweaver_preconfigure_saptune_version }}" + state: present + force: yes \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml index 055642e5f..41ba34cbf 100644 --- a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml +++ b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml @@ -10,7 +10,7 @@ __sap_netweaver_preconfigure_packages: - libatomic1 - libgcc_s1 - libltdl7 - - insserv + - insserv-compat - cpupower - hicolor-icon-theme - libcpupower0 @@ -19,7 +19,6 @@ __sap_netweaver_preconfigure_packages: - patterns-server-enterprise-sap_server - patterns-yast-yast2_basis - procmail - - saptune - sysstat - system-user-uuidd - uuidd @@ -31,3 +30,9 @@ __sap_netweaver_preconfigure_packages: - acl __sap_netweaver_preconfigure_min_swap_space_mb: '20480' + +__sap_netweaver_preconfigure_saptune_conflicting_services: + - sapconf + - tuned + + From 3b1ca545682c14e9a4f1dc3410040f04277df946 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 31 Oct 2022 17:41:10 +0000 Subject: [PATCH 269/375] sap_swpm: fix and or logic for maint plan file --- roles/sap_swpm/tasks/pre_install/install_type.yml | 3 ++- .../pre_install/install_type/maint_plan_stack_install.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index baf079b2b..61b063c64 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -41,7 +41,8 @@ sap_swpm_swpm_installation_header: "Installing using SAP Maintenance Planner Stack XML" sap_swpm_swpm_command_mp_stack: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" when: - - "sap_swpm_mp_stack_path | length > 0" + - (sap_swpm_mp_stack_path is defined) or (not sap_swpm_mp_stack_path | default(None)) # Test if variable string is defined or not None / blank + - "sap_swpm_mp_stack_path | length > 0" # And, test if variable string has a value ################ # Run Installation Type Steps diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index 80342ccb4..122fa6f97 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -9,12 +9,12 @@ args: chdir: "{{ sap_swpm_mp_stack_path }}" register: sap_swpm_mp_stack_file_get - when: (sap_swpm_mp_stack_file_name is not defined) or (not sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank + when: (sap_swpm_mp_stack_file_name is not defined) or (sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank - name: SAP SWPM Pre Install - MP Stack XML - Set fact set_fact: sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" - when: (sap_swpm_mp_stack_file_name is not defined) or (not sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank + when: (sap_swpm_mp_stack_file_name is not defined) or (sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank - name: SAP SWPM Pre Install - MP Stack XML - Set fact debug: From 730794aad173e8c0c1f4f997d9fa83e233c26ee9 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 31 Oct 2022 20:21:45 +0000 Subject: [PATCH 270/375] sap_swpm: amend not logic --- roles/sap_swpm/tasks/pre_install/install_type.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index 61b063c64..549f8fb06 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -41,8 +41,7 @@ sap_swpm_swpm_installation_header: "Installing using SAP Maintenance Planner Stack XML" sap_swpm_swpm_command_mp_stack: "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" when: - - (sap_swpm_mp_stack_path is defined) or (not sap_swpm_mp_stack_path | default(None)) # Test if variable string is defined or not None / blank - - "sap_swpm_mp_stack_path | length > 0" # And, test if variable string has a value + - sap_swpm_mp_stack_path is defined and not sap_swpm_mp_stack_path is none ################ # Run Installation Type Steps From a1662546383075fe18f2303391e0fe7d80d82aaa Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 4 Nov 2022 15:20:17 +0100 Subject: [PATCH 271/375] preconfigure and sap_hana_install: Update README.md --- roles/sap_general_preconfigure/README.md | 5 ++ roles/sap_hana_install/README.md | 3 +- roles/sap_hana_preconfigure/README.DEV.md | 62 ---------------------- roles/sap_hana_preconfigure/README.md | 14 +++-- roles/sap_netweaver_preconfigure/README.md | 4 +- 5 files changed, 15 insertions(+), 73 deletions(-) delete mode 100644 roles/sap_hana_preconfigure/README.DEV.md diff --git a/roles/sap_general_preconfigure/README.md b/roles/sap_general_preconfigure/README.md index 4da0485e9..4268fec0b 100644 --- a/roles/sap_general_preconfigure/README.md +++ b/roles/sap_general_preconfigure/README.md @@ -4,6 +4,11 @@ This role installs required packages and performs configuration steps which are ## Requirements +The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, +make sure that the required collections are installed, for example by using the following command: + +`ansible-galaxy install -vv -r meta/collection-requirements.yml` + To use this role, your system needs to be installed according to: - RHEL 7: SAP note 2002167, Red Hat Enterprise Linux 7.x: Installation and Upgrade, section "Installing Red Hat Enterprise Linux 7" - RHEL 8: SAP note 2772999, Red Hat Enterprise Linux 8.x: Installation and Configuration, section "Installing Red Hat Enterprise Linux 8". diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 2dfb77a0f..ec1812a8f 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -4,7 +4,8 @@ Ansible role for SAP HANA Installation ## Requirements -The role requires additional collections which are specified in `meta/collection-requirements.yml`. These are not automatically installed. You must install them like this: +The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, +make sure that the required collections are installed, for example by using the following command: `ansible-galaxy install -vv -r meta/collection-requirements.yml` diff --git a/roles/sap_hana_preconfigure/README.DEV.md b/roles/sap_hana_preconfigure/README.DEV.md deleted file mode 100644 index a41daacdc..000000000 --- a/roles/sap_hana_preconfigure/README.DEV.md +++ /dev/null @@ -1,62 +0,0 @@ -# Developer Guide Lines - -## Directory Structure - -``` -. -├── defaults -│   └── main.yml -├── example.yml -├── files -│   └── etc -│   └── tmpfiles.d -│   └── sap.conf -├── handlers -│   └── main.yml -├── LICENSE -├── meta -│   └── main.yml -├── README.DEV.md -├── README.md -├── tasks -│   ├── configuration.yml -│   ├── installation.yml -│   ├── main.yml -│   ├── RedHat6 -│   │   └── recommendations.yml -│   ├── RedHat7 -│   │   └── recommendations.yml -│   └── sapnotes -│   ├── 2009879_7.yml -│   ├── 2009879.yml -│   ├── 2013638.yml -│   ├── 2055470.yml -│   ├── 2136965.yml -│   ├── 2235581.yml -│   ├── 2247020.yml -│   ├── 2292690.yml -│   ├── 2382421.yml -│   └── 2455582.yml -└── vars - ├── main.yml - ├── RedHat_6.5.yml - ├── RedHat_6.6.yml - ├── RedHat_6.7.yml - └── RedHat_7.yml - -11 directories, 28 files -``` - -The deployment of this role follows the style guide from Adfinis Sygroup. [Click Here](https://docs.adfinis-sygroup.ch/public/ansible-guide/styling_guide.html) for more info - -## Where/How to make change/additions - -All required packages are installed by installation.yml, all configuration required in SAP Notes is done by configuration.yml. - -The configuration is then done and commented in the sapnotes subdirectory. -If you want to add content from a particular SAP note, e.g. for certain hardware vendor, please make your changes in `vars/OS_Release.yml` - -- Add the packages required by a sapnote to the packages section and make a comment to which SAP Note it belongs -- add the sapnote number to the the sapnotes list -- Add the configuration that needs to be done to a separate file in the sapnotes subdirectory with the name of the SAP Note. -- If you figure out certain requirements that are not documented in a SAP note but mentioned in knowledge base articles or other sources, add them with a proper comment to `OS_release/recommendations.yml` diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index a372d4035..2518a5b51 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -6,18 +6,16 @@ and then role sap_hana_preconfigure. ## Requirements -The role requires additional collections which are specified in `meta/collection-requirements.yml`. These are not automatically installed. -You must install them like this: +The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, +make sure that the required collections are installed, for example by using the following command: `ansible-galaxy install -vv -r meta/collection-requirements.yml` -To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by -running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). -It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system -time, before or after running role sap_hana_preconfigure. +To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). -Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessible -(see also example playbook): +It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system time, before or after running role sap_hana_preconfigure. + +Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessible (see also example playbook): for RHEL 7.x: - rhel-7-[server|for-power-le]-e4s-rpms diff --git a/roles/sap_netweaver_preconfigure/README.md b/roles/sap_netweaver_preconfigure/README.md index 02dd575eb..1ba22086c 100644 --- a/roles/sap_netweaver_preconfigure/README.md +++ b/roles/sap_netweaver_preconfigure/README.md @@ -8,8 +8,8 @@ and then role sap_netweaver_preconfigure. To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). -It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP NetWeaver, to maintain an identical system time, -before or after running role sap_netweaver_preconfigure. +It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP NetWeaver, to maintain an identical +system time, before or after running role sap_netweaver_preconfigure. Note ---- From 0441c2e3274675a37e31cd916501abf4345fc583 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 13:43:34 +0000 Subject: [PATCH 272/375] rename: sap_vm_preconfigure --- ...l => ansible-lint-sap_vm_preconfigure.yml} | 8 +- ...e.yml => yamllint-sap_vm_preconfigure.yml} | 8 +- .../defaults/main.yml | 10 -- .../handlers/main.yml | 94 ------------------- .../sap_host_hw_preconfigure/tests/inventory | 2 - roles/sap_host_hw_preconfigure/tests/test.yml | 5 - roles/sap_host_hw_preconfigure/vars/main.yml | 4 - .../tests/inventory | 2 - .../tests/test.yml | 6 -- .../README.md | 12 +-- roles/sap_vm_preconfigure/defaults/main.yml | 10 ++ .../tuned/sap-hana-kvm-guest/haltpoll.sh | 0 .../files/tuned/sap-hana-kvm-guest/tuned.conf | 0 .../files/tuned/sap-hana/tuned.conf | 0 roles/sap_vm_preconfigure/handlers/main.yml | 94 +++++++++++++++++++ .../meta/main.yml | 0 .../tasks/assert-set-tuned-profile.yml | 6 +- .../tasks/main.yml | 10 +- .../tasks/set-tuned-profile.yml | 0 roles/sap_vm_preconfigure/vars/main.yml | 4 + 20 files changed, 130 insertions(+), 145 deletions(-) rename .github/workflows/{ansible-lint-sap_host_hw_preconfigure.yml => ansible-lint-sap_vm_preconfigure.yml} (71%) rename .github/workflows/{yamllint-sap_host_hw_preconfigure.yml => yamllint-sap_vm_preconfigure.yml} (79%) delete mode 100644 roles/sap_host_hw_preconfigure/defaults/main.yml delete mode 100644 roles/sap_host_hw_preconfigure/handlers/main.yml delete mode 100644 roles/sap_host_hw_preconfigure/tests/inventory delete mode 100644 roles/sap_host_hw_preconfigure/tests/test.yml delete mode 100644 roles/sap_host_hw_preconfigure/vars/main.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/tests/inventory delete mode 100644 roles/sap_hypervisor_node_preconfigure/tests/test.yml rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/README.md (86%) create mode 100644 roles/sap_vm_preconfigure/defaults/main.yml rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/files/tuned/sap-hana-kvm-guest/haltpoll.sh (100%) rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/files/tuned/sap-hana-kvm-guest/tuned.conf (100%) rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/files/tuned/sap-hana/tuned.conf (100%) create mode 100644 roles/sap_vm_preconfigure/handlers/main.yml rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/meta/main.yml (100%) rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/tasks/assert-set-tuned-profile.yml (62%) rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/tasks/main.yml (52%) rename roles/{sap_host_hw_preconfigure => sap_vm_preconfigure}/tasks/set-tuned-profile.yml (100%) create mode 100644 roles/sap_vm_preconfigure/vars/main.yml diff --git a/.github/workflows/ansible-lint-sap_host_hw_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml similarity index 71% rename from .github/workflows/ansible-lint-sap_host_hw_preconfigure.yml rename to .github/workflows/ansible-lint-sap_vm_preconfigure.yml index d42be9a18..025dc5657 100644 --- a/.github/workflows/ansible-lint-sap_host_hw_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -1,12 +1,12 @@ -name: Ansible Lint for sap_host_hw_preconfigure +name: Ansible Lint for sap_vm_preconfigure on: push: paths: - - 'roles/sap_host_hw_preconfigure/**' + - 'roles/sap_vm_preconfigure/**' pull_request: paths: - - 'roles/sap_host_hw_preconfigure/**' + - 'roles/sap_vm_preconfigure/**' jobs: ansible-lint: @@ -19,7 +19,7 @@ jobs: uses: ansible/ansible-lint-action@main with: targets: | - ./roles/sap_host_hw_preconfigure + ./roles/sap_vm_preconfigure override-deps: | ansible==5.3.0 ansible-lint==5.3.2 diff --git a/.github/workflows/yamllint-sap_host_hw_preconfigure.yml b/.github/workflows/yamllint-sap_vm_preconfigure.yml similarity index 79% rename from .github/workflows/yamllint-sap_host_hw_preconfigure.yml rename to .github/workflows/yamllint-sap_vm_preconfigure.yml index fe1c809fa..6dc8352fb 100644 --- a/.github/workflows/yamllint-sap_host_hw_preconfigure.yml +++ b/.github/workflows/yamllint-sap_vm_preconfigure.yml @@ -1,14 +1,14 @@ -name: yamllint-sap_host_hw_preconfigure +name: yamllint-sap_vm_preconfigure on: push: branches: [ main ] paths: - - 'roles/sap_host_hw_preconfigure/**' + - 'roles/sap_vm_preconfigure/**' pull_request: branches: [ main ] paths: - - 'roles/sap_host_hw_preconfigure/**' + - 'roles/sap_vm_preconfigure/**' workflow_dispatch: @@ -29,4 +29,4 @@ jobs: # Runs a set of commands using the runners shell - name: yamllint - run: yamllint ./roles/sap_host_hw_preconfigure + run: yamllint ./roles/sap_vm_preconfigure diff --git a/roles/sap_host_hw_preconfigure/defaults/main.yml b/roles/sap_host_hw_preconfigure/defaults/main.yml deleted file mode 100644 index 119def9dc..000000000 --- a/roles/sap_host_hw_preconfigure/defaults/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# defaults file for sap_host_hw_preconfigure - -sap_host_hw_preconfigure_run_grub2_mkconfig: yes - -# run role in assert mode? -sap_host_hw_preconfigure_assert: false - -# fail if assertion is invalid -sap_host_hw_preconfigure_ignore_failed_assertion: no diff --git a/roles/sap_host_hw_preconfigure/handlers/main.yml b/roles/sap_host_hw_preconfigure/handlers/main.yml deleted file mode 100644 index 661a91d9e..000000000 --- a/roles/sap_host_hw_preconfigure/handlers/main.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- - -- name: "Check if server is booted in BIOS or UEFI mode" - stat: - path: /sys/firmware/efi - get_checksum: no - register: __sap_host_hw_preconfigure_register_stat_sys_firmware_efi - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - when: - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: Debug BIOS or UEFI - debug: - var: __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - when: - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grub-mkconfig (BIOS mode)" - command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - notify: __sap_host_hw_preconfigure_reboot_handler - when: - - not __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig BIOS mode" - debug: - var: __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, - __sap_host_hw_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - when: - - not __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Set the grub.cfg location RHEL" - set_fact: - __sap_host_hw_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg - when: - - ansible_distribution == 'RedHat' - -- name: "Set the grub.cfg location SLES" - set_fact: - __sap_host_hw_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg - when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - -- name: "Run grub-mkconfig (UEFI mode)" - command: "grub2-mkconfig -o {{ __sap_host_hw_preconfigure_uefi_boot_dir }}" - register: __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - notify: __sap_host_hw_preconfigure_reboot_handler - when: - - __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig UEFI" - debug: - var: __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, - __sap_host_hw_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines - listen: __sap_host_hw_preconfigure_regenerate_grub2_conf_handler - when: - - __sap_host_hw_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_host_hw_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grubby for enabling TSX" - command: grubby --args="tsx=on" --update-kernel=ALL - register: __sap_host_hw_preconfigure_register_grubby_update - listen: __sap_host_hw_preconfigure_grubby_update_handler - notify: __sap_host_hw_preconfigure_reboot_handler - -- name: Reboot the managed node - reboot: - test_command: /bin/true - listen: __sap_host_hw_preconfigure_reboot_handler - when: - - sap_host_hw_preconfigure_reboot_ok|d(false) - -- name: Let the role fail if a reboot is required - fail: - msg: Reboot is required! - listen: __sap_host_hw_preconfigure_reboot_handler - when: - - sap_host_hw_preconfigure_fail_if_reboot_required|d(true) - - not sap_host_hw_preconfigure_reboot_ok|d(false) - -- name: Show a warning message if a reboot is required - debug: - msg: "WARN: Reboot is required!" - listen: __sap_host_hw_preconfigure_reboot_handler - when: - - not sap_host_hw_preconfigure_fail_if_reboot_required|d(true) - - not sap_host_hw_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_host_hw_preconfigure/tests/inventory b/roles/sap_host_hw_preconfigure/tests/inventory deleted file mode 100644 index 878877b07..000000000 --- a/roles/sap_host_hw_preconfigure/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/sap_host_hw_preconfigure/tests/test.yml b/roles/sap_host_hw_preconfigure/tests/test.yml deleted file mode 100644 index 860b319b2..000000000 --- a/roles/sap_host_hw_preconfigure/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - sap_host_hw_preconfigure diff --git a/roles/sap_host_hw_preconfigure/vars/main.yml b/roles/sap_host_hw_preconfigure/vars/main.yml deleted file mode 100644 index 07c57a490..000000000 --- a/roles/sap_host_hw_preconfigure/vars/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# vars file for sap_host_hw_preconfigure -# -... diff --git a/roles/sap_hypervisor_node_preconfigure/tests/inventory b/roles/sap_hypervisor_node_preconfigure/tests/inventory deleted file mode 100644 index 878877b07..000000000 --- a/roles/sap_hypervisor_node_preconfigure/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/sap_hypervisor_node_preconfigure/tests/test.yml b/roles/sap_hypervisor_node_preconfigure/tests/test.yml deleted file mode 100644 index 8b44f052f..000000000 --- a/roles/sap_hypervisor_node_preconfigure/tests/test.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - sap-hana-rhv-hypervisor -... diff --git a/roles/sap_host_hw_preconfigure/README.md b/roles/sap_vm_preconfigure/README.md similarity index 86% rename from roles/sap_host_hw_preconfigure/README.md rename to roles/sap_vm_preconfigure/README.md index 1196c45b8..7422cfbf2 100644 --- a/roles/sap_host_hw_preconfigure/README.md +++ b/roles/sap_vm_preconfigure/README.md @@ -1,4 +1,4 @@ -sap_host_hw_preconfigure +sap_vm_preconfigure ================== This role will set and check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. @@ -16,14 +16,14 @@ Role Variables ### Run the role in assert mode ```yaml -sap_host_hw_preconfigure_assert (default: no) +sap_vm_preconfigure_assert (default: no) ``` If the following variable is set to `yes`, the role will only check if the configuration of the managed mmachines is according to this role. Default is `no`. ### Behavior of the role in assert mode ```yaml -sap_host_hw_preconfigure_assert_ignore_errors (default: no) +sap_vm_preconfigure_assert_ignore_errors (default: no) ``` If the role is run in assert mode and the following variable is set to `yes`, assertion errors will not cause the role to fail. This can be useful for creating reports. Default is `no`, meaning that the role will fail for any assertion error which is discovered. This variable has no meaning if the role is not run in assert mode. @@ -45,16 +45,16 @@ Simple example that just sets the parameters. roles: - sap_preconfigure - sap_hana_preconfigure - - sap_host_hw_preconfigure + - sap_vm_preconfigure ``` Run in assert mode to verify that parameters have been set. ``` - hosts: all roles: - - sap_host_hw_preconfigure + - sap_vm_preconfigure vars: - - sap_host_hw_preconfigure_assert: yes + - sap_vm_preconfigure_assert: yes ``` License diff --git a/roles/sap_vm_preconfigure/defaults/main.yml b/roles/sap_vm_preconfigure/defaults/main.yml new file mode 100644 index 000000000..621acbdf0 --- /dev/null +++ b/roles/sap_vm_preconfigure/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for sap_vm_preconfigure + +sap_vm_preconfigure_run_grub2_mkconfig: yes + +# run role in assert mode? +sap_vm_preconfigure_assert: false + +# fail if assertion is invalid +sap_vm_preconfigure_ignore_failed_assertion: no diff --git a/roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh b/roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh similarity index 100% rename from roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh rename to roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh diff --git a/roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf b/roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf similarity index 100% rename from roles/sap_host_hw_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf rename to roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf diff --git a/roles/sap_host_hw_preconfigure/files/tuned/sap-hana/tuned.conf b/roles/sap_vm_preconfigure/files/tuned/sap-hana/tuned.conf similarity index 100% rename from roles/sap_host_hw_preconfigure/files/tuned/sap-hana/tuned.conf rename to roles/sap_vm_preconfigure/files/tuned/sap-hana/tuned.conf diff --git a/roles/sap_vm_preconfigure/handlers/main.yml b/roles/sap_vm_preconfigure/handlers/main.yml new file mode 100644 index 000000000..158adaf4f --- /dev/null +++ b/roles/sap_vm_preconfigure/handlers/main.yml @@ -0,0 +1,94 @@ +--- + +- name: "Check if server is booted in BIOS or UEFI mode" + stat: + path: /sys/firmware/efi + get_checksum: no + register: __sap_vm_preconfigure_register_stat_sys_firmware_efi + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: Debug BIOS or UEFI + debug: + var: __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + notify: __sap_vm_preconfigure_reboot_handler + when: + - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig BIOS mode" + debug: + var: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Set the grub.cfg location RHEL" + set_fact: + __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + set_fact: + __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + +- name: "Run grub-mkconfig (UEFI mode)" + command: "grub2-mkconfig -o {{ __sap_vm_preconfigure_uefi_boot_dir }}" + register: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + notify: __sap_vm_preconfigure_reboot_handler + when: + - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig UEFI" + debug: + var: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grubby for enabling TSX" + command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_vm_preconfigure_register_grubby_update + listen: __sap_vm_preconfigure_grubby_update_handler + notify: __sap_vm_preconfigure_reboot_handler + +- name: Reboot the managed node + reboot: + test_command: /bin/true + listen: __sap_vm_preconfigure_reboot_handler + when: + - sap_vm_preconfigure_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + fail: + msg: Reboot is required! + listen: __sap_vm_preconfigure_reboot_handler + when: + - sap_vm_preconfigure_fail_if_reboot_required|d(true) + - not sap_vm_preconfigure_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + debug: + msg: "WARN: Reboot is required!" + listen: __sap_vm_preconfigure_reboot_handler + when: + - not sap_vm_preconfigure_fail_if_reboot_required|d(true) + - not sap_vm_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_host_hw_preconfigure/meta/main.yml b/roles/sap_vm_preconfigure/meta/main.yml similarity index 100% rename from roles/sap_host_hw_preconfigure/meta/main.yml rename to roles/sap_vm_preconfigure/meta/main.yml diff --git a/roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml b/roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml similarity index 62% rename from roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml rename to roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml index 5830cd0cc..a354972fc 100644 --- a/roles/sap_host_hw_preconfigure/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml @@ -3,12 +3,12 @@ block: - name: Get tuned profile command: tuned-adm active - register: __sap_host_hw_preconfigure_register_tuned_profile_assert + register: __sap_vm_preconfigure_register_tuned_profile_assert - name: Verify tuned profile assert: - that: "'Current active profile: sap-hana-kvm-host' in __sap_host_hw_preconfigure_register_tuned_profile_assert.stdout" + that: "'Current active profile: sap-hana-kvm-host' in __sap_vm_preconfigure_register_tuned_profile_assert.stdout" fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" success_msg: "PASS: tuned profile is sap-hana-kvm-guest" - ignore_errors: "{{ sap_host_hw_preconfigure_ignore_failed_assertion }}" + ignore_errors: "{{ sap_vm_preconfigure_ignore_failed_assertion }}" ... diff --git a/roles/sap_host_hw_preconfigure/tasks/main.yml b/roles/sap_vm_preconfigure/tasks/main.yml similarity index 52% rename from roles/sap_host_hw_preconfigure/tasks/main.yml rename to roles/sap_vm_preconfigure/tasks/main.yml index 56f89a81d..2d6bb2a61 100644 --- a/roles/sap_host_hw_preconfigure/tasks/main.yml +++ b/roles/sap_vm_preconfigure/tasks/main.yml @@ -1,18 +1,18 @@ --- -# tasks file for sap_host_hw_preconfigure +# tasks file for sap_vm_preconfigure - name: Trigger tuned profile sap-hana-kvm-guest activation include_tasks: set-tuned-profile.yml - name: Set filename prefix to empty string if role is run in normal mode set_fact: - __sap_host_hw_preconfigure_fact_assert_prefix: "" - when: not sap_host_hw_preconfigure_assert|d(false) + __sap_vm_preconfigure_fact_assert_prefix: "" + when: not sap_vm_preconfigure_assert|d(false) - name: Prepend filename with assert string if role is run in assert mode set_fact: - __sap_host_hw_preconfigure_fact_assert_prefix: "assert-" + __sap_vm_preconfigure_fact_assert_prefix: "assert-" when: sap_hypervisor_node_preconfigure_assert|d(false) -- include_tasks: '{{ __sap_host_hw_preconfigure_fact_assert_prefix }}set-tuned-profile.yml' +- include_tasks: '{{ __sap_vm_preconfigure_fact_assert_prefix }}set-tuned-profile.yml' ... diff --git a/roles/sap_host_hw_preconfigure/tasks/set-tuned-profile.yml b/roles/sap_vm_preconfigure/tasks/set-tuned-profile.yml similarity index 100% rename from roles/sap_host_hw_preconfigure/tasks/set-tuned-profile.yml rename to roles/sap_vm_preconfigure/tasks/set-tuned-profile.yml diff --git a/roles/sap_vm_preconfigure/vars/main.yml b/roles/sap_vm_preconfigure/vars/main.yml new file mode 100644 index 000000000..6e72127ee --- /dev/null +++ b/roles/sap_vm_preconfigure/vars/main.yml @@ -0,0 +1,4 @@ +--- +# vars file for sap_vm_preconfigure +# +... From c47be4346f853d84feec585ccd77c9af4a2082a2 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 14:13:44 +0000 Subject: [PATCH 273/375] sap_hypervisor_node_preconfigure: modularise for different platforms --- .../defaults/main.yml | 34 +----- .../files/platform/ibmpower_phyp/.gitkeep | 0 .../files/platform/redhat_ocp_virt/.gitkeep | 0 .../{ => platform/redhat_rhel_kvm}/50_hana | 0 .../redhat_rhel_kvm}/50_iothread_pinning | 0 .../files/platform/vmware_vsphere/.gitkeep | 0 .../handlers/main.yml | 100 +----------------- .../handlers/platform/ibmpower_phyp/.gitkeep | 0 .../platform/redhat_ocp_virt/.gitkeep | 0 .../platform/redhat_rhel_kvm/main.yml | 100 ++++++++++++++++++ .../handlers/platform/vmware_vsphere/.gitkeep | 0 .../meta/main.yml | 58 +--------- .../tasks/main.yml | 27 +---- .../tasks/platform/ibmpower_phyp/.gitkeep | 0 .../tasks/platform/redhat_ocp_virt/.gitkeep | 0 .../allocate-hugepages-at-runtime.yml | 1 - .../redhat_rhel_kvm}/assert-configuration.yml | 0 .../redhat_rhel_kvm}/assert-installation.yml | 1 - .../redhat_rhel_kvm}/assert-rhv-hooks.yml | 1 - .../assert-set-tuned-profile.yml | 1 - .../redhat_rhel_kvm}/configuration.yml | 1 - .../redhat_rhel_kvm}/installation.yml | 1 - .../tasks/platform/redhat_rhel_kvm/main.yml | 25 +++++ .../redhat_rhel_kvm}/rhv-hooks.yml | 1 - .../redhat_rhel_kvm}/set-tuned-profile.yml | 1 - .../tasks/platform/vmware_vsphere/.gitkeep | 0 .../vars/main.yml | 10 -- .../platform_defaults_redhat_rhel_kvm.yml | 41 +++++++ 28 files changed, 179 insertions(+), 224 deletions(-) create mode 100644 roles/sap_hypervisor_node_preconfigure/files/platform/ibmpower_phyp/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/files/platform/redhat_ocp_virt/.gitkeep rename roles/sap_hypervisor_node_preconfigure/files/{ => platform/redhat_rhel_kvm}/50_hana (100%) rename roles/sap_hypervisor_node_preconfigure/files/{ => platform/redhat_rhel_kvm}/50_iothread_pinning (100%) create mode 100644 roles/sap_hypervisor_node_preconfigure/files/platform/vmware_vsphere/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/handlers/platform/ibmpower_phyp/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_ocp_virt/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_rhel_kvm/main.yml create mode 100644 roles/sap_hypervisor_node_preconfigure/handlers/platform/vmware_vsphere/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/tasks/platform/ibmpower_phyp/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/.gitkeep rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/allocate-hugepages-at-runtime.yml (99%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/assert-configuration.yml (100%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/assert-installation.yml (99%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/assert-rhv-hooks.yml (99%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/assert-set-tuned-profile.yml (99%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/configuration.yml (99%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/installation.yml (97%) create mode 100644 roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/main.yml rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/rhv-hooks.yml (98%) rename roles/sap_hypervisor_node_preconfigure/tasks/{ => platform/redhat_rhel_kvm}/set-tuned-profile.yml (99%) create mode 100644 roles/sap_hypervisor_node_preconfigure/tasks/platform/vmware_vsphere/.gitkeep create mode 100644 roles/sap_hypervisor_node_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml diff --git a/roles/sap_hypervisor_node_preconfigure/defaults/main.yml b/roles/sap_hypervisor_node_preconfigure/defaults/main.yml index d0076e958..d083000e2 100644 --- a/roles/sap_hypervisor_node_preconfigure/defaults/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/defaults/main.yml @@ -1,34 +1,4 @@ --- -# defaults file for sap_hypervisor_node_preconfigure -# is it okay to reboot host? -sap_hypervisor_node_preconfigure_reboot_ok: true - -# should the role fail if a reboot is required -sap_hypervisor_node_preconfigure_fail_if_reboot_required: false - -# recreate kernel command line with grub2-mkconfig -sap_hypervisor_node_preconfigure_run_grub2_mkconfig: yes - -# Reserve memory [GB] for hypervisor host -sap_hypervisor_node_preconfigure_reserved_ram: 100 - -# allocate hugepages: {static|runtime} -# static: done at kernel command line which is slow, but safe -# runtime: done through tuned-profile -sap_hypervisor_node_preconfigure_reserve_hugepages: static - -# kvm.nx_huge_pages: {"auto"|"on"|"off"} -# Note the importance of the quotes, otherwise off will be mapped to false -sap_hypervisor_node_preconfigure_kvm_nx_huge_pages: "auto" - -# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} -# Note the importance of the quotes, otherwise off will be mapped to false -sap_hypervisor_node_preconfigure_tsx: "off" - -# run role in assert mode? -sap_hypervisor_node_preconfigure_assert: false - -# fail if assertion is invalid -sap_hypervisor_node_preconfigure_ignore_failed_assertion: no -... +# ibmpower_phyp, redhat_ocp_virt, redhat_rhel_kvm, vmware_vsphere +sap_hypervisor_node_platform: diff --git a/roles/sap_hypervisor_node_preconfigure/files/platform/ibmpower_phyp/.gitkeep b/roles/sap_hypervisor_node_preconfigure/files/platform/ibmpower_phyp/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/files/platform/redhat_ocp_virt/.gitkeep b/roles/sap_hypervisor_node_preconfigure/files/platform/redhat_ocp_virt/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/files/50_hana b/roles/sap_hypervisor_node_preconfigure/files/platform/redhat_rhel_kvm/50_hana similarity index 100% rename from roles/sap_hypervisor_node_preconfigure/files/50_hana rename to roles/sap_hypervisor_node_preconfigure/files/platform/redhat_rhel_kvm/50_hana diff --git a/roles/sap_hypervisor_node_preconfigure/files/50_iothread_pinning b/roles/sap_hypervisor_node_preconfigure/files/platform/redhat_rhel_kvm/50_iothread_pinning similarity index 100% rename from roles/sap_hypervisor_node_preconfigure/files/50_iothread_pinning rename to roles/sap_hypervisor_node_preconfigure/files/platform/redhat_rhel_kvm/50_iothread_pinning diff --git a/roles/sap_hypervisor_node_preconfigure/files/platform/vmware_vsphere/.gitkeep b/roles/sap_hypervisor_node_preconfigure/files/platform/vmware_vsphere/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/main.yml b/roles/sap_hypervisor_node_preconfigure/handlers/main.yml index 21c4a5b4e..f920c7196 100644 --- a/roles/sap_hypervisor_node_preconfigure/handlers/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/handlers/main.yml @@ -1,100 +1,4 @@ --- -- name: "Check if server is booted in BIOS or UEFI mode" - ansible.builtin.stat: - path: /sys/firmware/efi - get_checksum: no - register: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - when: - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - -- name: Debug BIOS or UEFI - ansible.builtin.debug: - var: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - when: - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grub-mkconfig (BIOS mode)" - ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - notify: __sap_hypervisor_node_preconfigure_reboot_handler - when: - - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - become: true - become_user: root - - -- name: "Debug grub-mkconfig BIOS mode" - ansible.builtin.debug: - var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, - __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - when: - - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Set the grub.cfg location RHEL" - ansible.builtin.set_fact: - __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg - when: - - ansible_distribution == 'RedHat' - -- name: "Set the grub.cfg location SLES" - ansible.builtin.set_fact: - __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg - when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - -- name: "Run grub-mkconfig (UEFI mode)" - ansible.builtin.command: "grub2-mkconfig -o {{ __sap_hypervisor_node_preconfigure_uefi_boot_dir }}" - register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - notify: __sap_hypervisor_node_preconfigure_reboot_handler - when: - - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - become: true - become_user: root - - -- name: "Debug grub-mkconfig UEFI" - ansible.builtin.debug: - var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, - __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines - listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler - when: - - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grubby for enabling TSX" - ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL - register: __sap_hypervisor_node_preconfigure_register_grubby_update - listen: __sap_hypervisor_node_preconfigure_grubby_update_handler - notify: __sap_hypervisor_node_preconfigure_reboot_handler - -- name: Reboot the managed node - ansible.builtin.reboot: - test_command: /bin/true - listen: __sap_hypervisor_node_preconfigure_reboot_handler - when: - - sap_hypervisor_node_preconfigure_reboot_ok|d(false) - -- name: Let the role fail if a reboot is required - ansible.builtin.fail: - msg: Reboot is required! - listen: __sap_hypervisor_node_preconfigure_reboot_handler - when: - - sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) - - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) - -- name: Show a warning message if a reboot is required - ansible.builtin.debug: - msg: "WARN: Reboot is required!" - listen: __sap_hypervisor_node_preconfigure_reboot_handler - when: - - not sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) - - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) +- name: SAP certified hypervisor node preconfigure - Include Handler Tasks for {{ sap_hypervisor_node_platform }} + ansible.builtin.include_tasks: "{{ role_path }}/handlers/platform/{{ sap_hypervisor_node_platform }}/main.yml" diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/platform/ibmpower_phyp/.gitkeep b/roles/sap_hypervisor_node_preconfigure/handlers/platform/ibmpower_phyp/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_ocp_virt/.gitkeep b/roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_ocp_virt/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_rhel_kvm/main.yml b/roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_rhel_kvm/main.yml new file mode 100644 index 000000000..21c4a5b4e --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/handlers/platform/redhat_rhel_kvm/main.yml @@ -0,0 +1,100 @@ +--- + +- name: "Check if server is booted in BIOS or UEFI mode" + ansible.builtin.stat: + path: /sys/firmware/efi + get_checksum: no + register: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: Debug BIOS or UEFI + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + ansible.builtin.command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + become: true + become_user: root + + +- name: "Debug grub-mkconfig BIOS mode" + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - not __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Set the grub.cfg location RHEL" + ansible.builtin.set_fact: + __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + ansible.builtin.set_fact: + __sap_hypervisor_node_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + +- name: "Run grub-mkconfig (UEFI mode)" + ansible.builtin.command: "grub2-mkconfig -o {{ __sap_hypervisor_node_preconfigure_uefi_boot_dir }}" + register: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + become: true + become_user: root + + +- name: "Debug grub-mkconfig UEFI" + ansible.builtin.debug: + var: __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_hypervisor_node_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_hypervisor_node_preconfigure_regenerate_grub2_conf_handler + when: + - __sap_hypervisor_node_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_hypervisor_node_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grubby for enabling TSX" + ansible.builtin.command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_hypervisor_node_preconfigure_register_grubby_update + listen: __sap_hypervisor_node_preconfigure_grubby_update_handler + notify: __sap_hypervisor_node_preconfigure_reboot_handler + +- name: Reboot the managed node + ansible.builtin.reboot: + test_command: /bin/true + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - sap_hypervisor_node_preconfigure_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + ansible.builtin.fail: + msg: Reboot is required! + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) + - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + ansible.builtin.debug: + msg: "WARN: Reboot is required!" + listen: __sap_hypervisor_node_preconfigure_reboot_handler + when: + - not sap_hypervisor_node_preconfigure_fail_if_reboot_required|d(true) + - not sap_hypervisor_node_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_hypervisor_node_preconfigure/handlers/platform/vmware_vsphere/.gitkeep b/roles/sap_hypervisor_node_preconfigure/handlers/platform/vmware_vsphere/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/meta/main.yml b/roles/sap_hypervisor_node_preconfigure/meta/main.yml index 80e3143ae..0b4c2c801 100644 --- a/roles/sap_hypervisor_node_preconfigure/meta/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/meta/main.yml @@ -1,58 +1,10 @@ --- galaxy_info: - + namespace: community role_name: sap_hypervisor_node_preconfigure author: Nils Koenig - namespace: community - description: Provide the configuration for a RHV hypervisor for SAP HANA - company: Red Hat - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: GPL-2.0-or-later - - min_ansible_version: "2.9" - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - platforms: - - name: EL - versions: - - "7" - - "8" - - "9" - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - + description: Provide the configuration of SAP-certified hypervisors + license: Apache-2.0 + min_ansible_version: 2.9 + galaxy_tags: [ 'sap', 'hana', 'rhel', 'redhat', 'sles', 'suse' ] dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml index 639964c90..ba71f1f87 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml @@ -1,26 +1,7 @@ --- -- name: Display the role path - ansible.builtin.debug: - var: role_path -- name: Set filename prefix to empty string if role is run in normal mode - ansible.builtin.set_fact: - assert_prefix: "" - when: not sap_hypervisor_node_preconfigure_assert|d(false) +- name: SAP certified hypervisor node preconfigure - Include Vars for {{ sap_hypervisor_node_platform }} + ansible.builtin.include_vars: "{{ role_path }}/vars/platform_defaults_{{ sap_hypervisor_node_platform }}.yml" -- name: Prepend filename with assert string if role is run in assert mode - ansible.builtin.set_fact: - assert_prefix: "assert-" - when: sap_hypervisor_node_preconfigure_assert|d(false) - -- include_tasks: '{{ assert_prefix }}installation.yml' - -- include_tasks: '{{ assert_prefix }}configuration.yml' - -- include_tasks: '{{ assert_prefix }}set-tuned-profile.yml' - -- include_tasks: "{{ assert_prefix }}rhv-hooks.yml" - loop: - - 50_hana - - 50_iothread_pinning -... +- name: SAP certified hypervisor node preconfigure - Include Tasks for {{ sap_hypervisor_node_platform }} + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/main.yml" diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/ibmpower_phyp/.gitkeep b/roles/sap_hypervisor_node_preconfigure/tasks/platform/ibmpower_phyp/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/.gitkeep b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/allocate-hugepages-at-runtime.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/allocate-hugepages-at-runtime.yml index 6ed4bdb0e..8c30bc771 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/allocate-hugepages-at-runtime.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/allocate-hugepages-at-runtime.yml @@ -25,4 +25,3 @@ - hugepagesz=1GB notify: "Regenerate grub2 conf handler" tags: grubconfig -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-configuration.yml similarity index 100% rename from roles/sap_hypervisor_node_preconfigure/tasks/assert-configuration.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-configuration.yml diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-installation.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-installation.yml index 5d60138e3..227d7e998 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/assert-installation.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-installation.yml @@ -12,4 +12,3 @@ loop_control: loop_var: line_item ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-rhv-hooks.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-rhv-hooks.yml index d81ffe953..2abf6750e 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/assert-rhv-hooks.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-rhv-hooks.yml @@ -31,4 +31,3 @@ fail_msg: "FAIL: Hook {{ item }} has been modified, please investigate manually." success_msg: "PASS: Hook {{ item }} not modified" ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-set-tuned-profile.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-set-tuned-profile.yml index 175629669..cb6508c2f 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/assert-set-tuned-profile.yml @@ -11,4 +11,3 @@ fail_msg: "FAIL: tuned profile is not sap-hana-kvm-host" success_msg: "PASS: tuned profile is sap-hana-kvm-host" ignore_errors: "{{ sap_hypervisor_node_preconfigure_ignore_failed_assertion }}" -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/configuration.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/configuration.yml index 0d2e556be..e7ae07c18 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/configuration.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/configuration.yml @@ -160,4 +160,3 @@ tags: grubconfig become: true become_user: root -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/installation.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/installation.yml similarity index 97% rename from roles/sap_hypervisor_node_preconfigure/tasks/installation.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/installation.yml index 95d153a3d..c38cf3aba 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/installation.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/installation.yml @@ -5,4 +5,3 @@ name: "{{ sap_hypervisor_node_preconfigure_packages }}" become: true become_user: root -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/main.yml new file mode 100644 index 000000000..213a45bca --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/main.yml @@ -0,0 +1,25 @@ +--- +- name: Display the role path + ansible.builtin.debug: + var: role_path + +- name: Set filename prefix to empty string if role is run in normal mode + ansible.builtin.set_fact: + assert_prefix: "" + when: not sap_hypervisor_node_preconfigure_assert|d(false) + +- name: Prepend filename with assert string if role is run in assert mode + ansible.builtin.set_fact: + assert_prefix: "assert-" + when: sap_hypervisor_node_preconfigure_assert|d(false) + +- include_tasks: '{{ assert_prefix }}installation.yml' + +- include_tasks: '{{ assert_prefix }}configuration.yml' + +- include_tasks: '{{ assert_prefix }}set-tuned-profile.yml' + +- include_tasks: "{{ assert_prefix }}rhv-hooks.yml" + loop: + - "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/50_hana" + - "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/50_iothread_pinning" diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/rhv-hooks.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/rhv-hooks.yml similarity index 98% rename from roles/sap_hypervisor_node_preconfigure/tasks/rhv-hooks.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/rhv-hooks.yml index 09a5b0ddd..045b55069 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/rhv-hooks.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/rhv-hooks.yml @@ -13,4 +13,3 @@ mode: '0755' become: true become_user: root -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/set-tuned-profile.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/set-tuned-profile.yml similarity index 99% rename from roles/sap_hypervisor_node_preconfigure/tasks/set-tuned-profile.yml rename to roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/set-tuned-profile.yml index 305050cc3..415c4a194 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/set-tuned-profile.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_rhel_kvm/set-tuned-profile.yml @@ -38,4 +38,3 @@ ansible.builtin.command: tuned-adm profile sap-hana-kvm-host become: true become_user: root -... diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/vmware_vsphere/.gitkeep b/roles/sap_hypervisor_node_preconfigure/tasks/platform/vmware_vsphere/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_hypervisor_node_preconfigure/vars/main.yml b/roles/sap_hypervisor_node_preconfigure/vars/main.yml index bd0b651c4..ed97d539c 100644 --- a/roles/sap_hypervisor_node_preconfigure/vars/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/vars/main.yml @@ -1,11 +1 @@ --- -# vars file for sap_hypervisor_node_preconfigure -# - -# packages to install -sap_hypervisor_node_preconfigure_packages: - - libhugetlbfs-utils - - qemu-kvm - - libvirt - - tuned -... diff --git a/roles/sap_hypervisor_node_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml b/roles/sap_hypervisor_node_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml new file mode 100644 index 000000000..db5407d19 --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml @@ -0,0 +1,41 @@ +--- + +# defaults file for sap_hypervisor_node_preconfigure + +# packages to install +sap_hypervisor_node_preconfigure_packages: + - libhugetlbfs-utils + - qemu-kvm + - libvirt + - tuned + +# is it okay to reboot host? +sap_hypervisor_node_preconfigure_reboot_ok: true + +# should the role fail if a reboot is required +sap_hypervisor_node_preconfigure_fail_if_reboot_required: false + +# recreate kernel command line with grub2-mkconfig +sap_hypervisor_node_preconfigure_run_grub2_mkconfig: yes + +# Reserve memory [GB] for hypervisor host +sap_hypervisor_node_preconfigure_reserved_ram: 100 + +# allocate hugepages: {static|runtime} +# static: done at kernel command line which is slow, but safe +# runtime: done through tuned-profile +sap_hypervisor_node_preconfigure_reserve_hugepages: static + +# kvm.nx_huge_pages: {"auto"|"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hypervisor_node_preconfigure_kvm_nx_huge_pages: "auto" + +# Intel Transactional Synchronization Extensions (TSX): {"on"|"off"} +# Note the importance of the quotes, otherwise off will be mapped to false +sap_hypervisor_node_preconfigure_tsx: "off" + +# run role in assert mode? +sap_hypervisor_node_preconfigure_assert: false + +# fail if assertion is invalid +sap_hypervisor_node_preconfigure_ignore_failed_assertion: no From 2f863dc0df15460c0c6cd89c4938be611b16af60 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 14:14:30 +0000 Subject: [PATCH 274/375] sap_hypervisor_node_preconfigure: remove erroneous molecule --- .../molecule/default/INSTALL.rst | 15 -- .../molecule/default/converge.yml | 7 - .../molecule/default/create.yml | 52 ----- .../molecule/default/defaults/main.yml | 13 -- .../molecule/default/destroy.yml | 27 --- .../molecule/default/molecule.yml | 36 ---- .../molecule/default/requirements.yml | 2 - .../default/tasks/create_instance.yml | 187 ------------------ .../default/tasks/destroy_instance.yml | 80 -------- .../molecule/default/verify.yml | 10 - 10 files changed, 429 deletions(-) delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml delete mode 100644 roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst b/roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst deleted file mode 100644 index c615318ef..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/INSTALL.rst +++ /dev/null @@ -1,15 +0,0 @@ -******* -Delegated driver installation guide -******* - -Requirements -============ - -This driver is delegated to the developer. Up to the developer to implement -requirements. - -Install -======= - -This driver is delegated to the developer. Up to the developer to implement -requirements. diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml deleted file mode 100644 index 1516dc3cc..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/converge.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Converge - hosts: all - tasks: - - name: "Include sap_hypervisor_node_preconfigure" - include_role: - name: "sap_hypervisor_node_preconfigure" diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml deleted file mode 100644 index 5d8768f14..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/create.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -# based on example from IBM -# https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/examples/simple-vm-ssh/create.yml - -- name: Create - hosts: localhost - connection: local - gather_facts: false - no_log: "{{ molecule_no_log }}" - - vars: - ibm_molecule_servers: - results: [] - changed: false - - tasks: - - name: Include default variables - ansible.builtin.include_vars: - file: defaults/main.yml - - - name: Create instances - ansible.builtin.include_tasks: tasks/create_instance.yml - with_items: "{{ molecule_yml.platforms }}" - - - # TODO: Developer must implement and populate 'server' variable - - - when: ibm_molecule_servers.changed | default(false) | bool - block: - - name: Populate instance config dict - set_fact: - instance_conf_dict: { - 'instance': "{{ item.instance }}", - 'address': "{{ item.address }}", - 'user': "{{ item.user }}", - 'port': "{{ item.port }}", - 'identity_file': "{{ item.identity_file }}", } - with_items: "{{ ibm_molecule_servers.results }}" - register: instance_config_dict - - - name: Convert instance config dict to a list - set_fact: - instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" - - - name: Dump instance config - copy: - content: | - # Molecule managed - - {{ instance_conf | to_json | from_json | to_yaml }} - dest: "{{ molecule_instance_config }}" - mode: 0600 diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml deleted file mode 100644 index 5be8882de..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/defaults/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -resource_group_name_default: "rh-pacemaker" -ibm_is_vpc_name_default: "molecule" -ibm_is_subnet_name_default: "molecule-subnet" -total_ipv4_address_count_const: 256 -ibm_is_ssh_public_key_path_default: "~/.ssh/id_rsa.pub" -ibm_is_ssh_private_key_path_default: "~/.ssh/id_rsa" -ibm_is_floating_ip_create_default: true -ibm_molecule_user_const: vpcuser -ibm_molecule_port_const: 22 -instance_tcp_allowed_ports_default: - - port_max: 22 - port_min: 22 \ No newline at end of file diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml deleted file mode 100644 index e4e2b38a8..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/destroy.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Destroy - hosts: localhost - connection: local - gather_facts: false - no_log: "{{ molecule_no_log }}" - tasks: - - name: Create instances - ansible.builtin.include_tasks: - file: tasks/destroy_instance.yml - with_items: "{{ molecule_yml.platforms }}" - - # Mandatory configuration for Molecule to function. - - - name: Populate instance config - set_fact: - instance_conf: {} - - - name: Dump instance config - copy: - content: | - # Molecule managed - - {{ instance_conf | to_json | from_json | to_yaml }} - dest: "{{ molecule_instance_config }}" - mode: 0600 - when: server.changed | default(false) | bool diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml deleted file mode 100644 index fd25be96b..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/molecule.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -dependency: - name: shell - command: | - ansible-galaxy install -r $MOLECULE_SCENARIO_DIRECTORY/requirements.yml - # pip install -r $MOLECULE_SCENARIO_DIRECTORY/requirements.txt - -driver: - name: delegated -platforms: - - name: "sap-hana-rhv-hypervisor-default" - # placement_group: - # name: sap-ppg - # placement_strategy: host - # TODO: add management of proximity placement group - # see https://github.com/IBM-Cloud/ansible-collection-ibm/blob/bcea72c9b1cb2b7792259d66655b01c6a6d650fb/docs/ibm_compute_placement_group.rst - - # resource_group_name: "rh-pacemaker" - # ibm_is_vpc_name: "molecule" - # ibm_is_subnet_name: "molecule-subnet" - # ibm_is_ssh_public_key_path: "~/.ssh/id_rsa.pub" - # ibm_is_ssh_private_key_path: "~/.ssh/id_rsa" - instance_profile: "bx2d-16x64" # 64 Gb - instance_image_name: "ibm-redhat-8-4-amd64-sap-hana-2" - instance_zone: "us-south-3" - # https://cloud.ibm.com/docs/overview?topic=overview-locations - - # ibm_is_floating_ip_create: true - # instance_tcp_allowed_ports: - # - port_max: 22 - # port_min: 22 - -provisioner: - name: ansible -verifier: - name: ansible diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml deleted file mode 100644 index 606556e25..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/requirements.yml +++ /dev/null @@ -1,2 +0,0 @@ -collections: - - ibm.cloudcollection \ No newline at end of file diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml deleted file mode 100644 index 87175d6a7..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/create_instance.yml +++ /dev/null @@ -1,187 +0,0 @@ ---- - # - name: Check resource group exists - # ibm.cloudcollection.ibm_resource_group_info: - # name: "{{ item.resource_group_name }}" - # failed_when: - # - ibm_molecule_resource_group.rc != 0 - # - '"ResourceGroupDoesnotExist" not in ibm_molecule_resource_group.stderr' - # register: ibm_molecule_resource_group - - # - name: Print ibm_molecule_resource_group - # ansible.builtin.debug: - # msg: "{{ ibm_molecule_resource_group }}" - - - name: Create resource group - ibm.cloudcollection.ibm_resource_group: - name: "{{ item.resource_group_name | - default (resource_group_name_default) }}" - register: ibm_molecule_resource_group - - # - name: Print ibm_molecule_resource_group - # ansible.builtin.debug: - # msg: "{{ ibm_molecule_resource_group }}" - - # - name: Checking for existing VPC - # ibm.cloudcollection.ibm_is_vpc_info: - # name: "{{ item.ibm_is_vpc_name }}" - # failed_when: - # - ibm_molecule_vpc.rc != 0 - # - '"No VPC found" not in ibm_molecule_vpc.stderr' - # register: ibm_molecule_vpc - - - name: Configure VPC - ibm.cloudcollection.ibm_is_vpc: - name: "{{ item.ibm_is_vpc_name | - default(ibm_is_vpc_name_default) }}" - resource_group: "{{ ibm_molecule_resource_group.resource.id }}" - state: available - id: "{{ ibm_molecule_vpc.resource.id | default(omit) }}" - register: ibm_molecule_vpc - - # - name: Checking for existing VPC Subnet - # ibm.cloudcollection.ibm_is_subnet_info: - # name: "{{ item.ibm_is_subnet_name }}" - # failed_when: - # - ibm_molecule_subnet.rc != 0 - # - '"No subnet found" not in subnet.stderr' - # register: ibm_molecule_subnet - - - name: Configure VPC Subnet - ibm.cloudcollection.ibm_is_subnet: - name: "{{ item.ibm_is_subnet_name | - default(ibm_is_subnet_name_default) }}" - resource_group: "{{ ibm_molecule_resource_group.resource.id }}" - state: available - id: "{{ ibm_molecule_subnet.id | default(omit) }}" - vpc: "{{ ibm_molecule_vpc.resource.id }}" - total_ipv4_address_count: "{{ total_ipv4_address_count_const | int }}" - zone: "{{ item.instance_zone }}" - register: ibm_molecule_subnet - - - name: Checking for existing SSH key - ibm.cloudcollection.ibm_is_ssh_key_info: - name: "key-{{ lookup('file', ibm_is_ssh_public_key_path | - default(ibm_is_ssh_public_key_path_default) ) | b64encode | hash('md5') }}" - failed_when: - - ibm_molecule_ssh_key.rc != 0 - - '"No SSH Key found" not in ibm_molecule_ssh_key.stderr' - register: ibm_molecule_ssh_key -# TODO: do not create key if it already exists -# if key is used by at least one machine it cannot be recreated, and this tasks actually recreates the key - - name: Configure SSH Key - ibm.cloudcollection.ibm_is_ssh_key: - name: "key-{{ lookup('file', ibm_is_ssh_public_key_path | - default(ibm_is_ssh_public_key_path_default) ) | b64encode | hash('md5') }}" - resource_group: "{{ ibm_molecule_resource_group.resource.id }}" - public_key: "{{ lookup('file', ibm_is_ssh_public_key_path | - default(ibm_is_ssh_public_key_path_default) ) }}" - id: "{{ ibm_molecule_ssh_key.resource.id | default(omit) }}" - register: ibm_molecule_ssh_key_create - when: ibm_molecule_ssh_key.resource.id is not defined -# See how to create ssh key fingerprint - it should be used as key name when key is created -# https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated -# https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html -# To work with Base64 encoded strings: -# {{ encoded | b64decode }} -# {{ decoded | string | b64encode }} -# To get the md5 hash of a string: -# {{ 'test1' | hash('md5') }} -# # => "5a105e8b9d40e1329780d62ea2265d8a" -# "key-5a105e8b9d40e1329780d62ea2265d8a" - key name cannot start with number - - - name: Retrieve image list for mapping - ibm.cloudcollection.ibm_is_images_info: - register: ibm_molecule_images_list - changed_when: false - - - name: Set VM image name/id dictionary fact - set_fact: - ibm_molecule_image_dict: - "{{ ibm_molecule_images_list.resource.images | - items2dict(key_name='name', value_name='id') }}" - changed_when: false - - - name: Check for existing VSI - ibm.cloudcollection.ibm_is_instance_info: - name: "{{ item.name }}" - failed_when: - - ibm_molecule_vsi.rc != 0 - - '"No Instance found" not in ibm_molecule_vsi.stderr' - register: ibm_molecule_vsi - - - name: Configure VSI - ibm.cloudcollection.ibm_is_instance: - name: "{{ item.name }}" - resource_group: "{{ ibm_molecule_resource_group.resource.id }}" - state: available - id: "{{ ibm_molecule_vsi.resource.id | default(omit) }}" - vpc: "{{ ibm_molecule_vpc.resource.id }}" - profile: "{{ item.instance_profile }}" - image: "{{ ibm_molecule_image_dict[item.instance_image_name] }}" - keys: - - "{{ ibm_molecule_ssh_key_create.resource.id | - default(ibm_molecule_ssh_key.resource.id) }}" - primary_network_interface: - - subnet: "{{ ibm_molecule_subnet.resource.id }}" - zone: "{{ item.instance_zone }}" - register: ibm_molecule_vsi - - # - name: Print ibm_molecule_vsi - # ansible.builtin.debug: - # msg: "{{ ibm_molecule_vsi }}" - - - name: Check for existing Floating IP - ibm.cloudcollection.ibm_is_floating_ip_info: - name: "{{ item.name }}-fip" - failed_when: - - ibm_molecule_fip.rc != 0 - - '"No floatingIP found" not in ibm_molecule_fip.stderr' - register: ibm_molecule_fip - - - name: Configure Floating IP Address - ibm.cloudcollection.ibm_is_floating_ip: - name: "{{ item.name }}-fip" - resource_group: "{{ ibm_molecule_resource_group.resource.id }}" - state: available - id: "{{ ibm_molecule_fip.id | default(omit) }}" - target: "{{ ibm_molecule_vsi.resource.primary_network_interface[0]['id'] }}" - register: ibm_molecule_fip - when: - - item.ibm_is_floating_ip_create | - default (ibm_is_floating_ip_create_default) - - # - name: Print Floating IP Address - # debug: - # msg: - # - "IP Address: {{ ibm_molecule_fip.resource.address }}" - - - name: Configure Security Group Rule to open SSH on the VSI - ibm.cloudcollection.ibm_is_security_group_rule: - state: available - group: "{{ ibm_molecule_vpc.resource.default_security_group }}" - direction: inbound - remote: 0.0.0.0/0 - tcp: "{{ item.instance_tcp_allowed_ports | - default(instance_tcp_allowed_ports_default) }}" - - - name: Return array with inventory parameters - ansible.builtin.set_fact: - ibm_molecule_servers: - results: "{{ ibm_molecule_servers.results }} + - [{ - 'instance': '{{ item.name }}', - 'address': '{{ ibm_molecule_fip.resource.address }}', - 'user': '{{ ibm_molecule_user_const }}', - 'port': '{{ ibm_molecule_port_const }}', - 'identity_file': '{{ item.ibm_is_ssh_private_key_path | - default (ibm_is_ssh_private_key_path_default) }}' - }]" - changed: true - - # - name: Set ibm_molecule_servers.changed to true - # ansible.builtin.set_fact: - # ibm_molecule_servers.changed: true - - - name: Print ibm_molecule_servers - ansible.builtin.debug: - msg: "{{ ibm_molecule_servers }}" \ No newline at end of file diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml deleted file mode 100644 index db4592f01..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/tasks/destroy_instance.yml +++ /dev/null @@ -1,80 +0,0 @@ ---- - - # Developer must implement. - # https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/examples/simple-vm-ssh/destroy.yml - - name: Check for existing Floating IP - ibm.cloudcollection.ibm_is_floating_ip_info: - name: "{{ item.name }}-fip" - failed_when: - - ibm_molecule_fip.rc != 0 - - '"No floating IP found" not in ibm_molecule_fip.stderr' - register: ibm_molecule_fip - - - name: Release Floating IP - ibm.cloudcollection.ibm_is_floating_ip: - state: absent - id: "{{ ibm_molecule_fip.resource.id }}" - when: ibm_molecule_fip.resource.id is defined - - - name: Check for existing VSI - ibm.cloudcollection.ibm_is_instance_info: - name: "{{ item.name }}" - failed_when: - - ibm_molecule_vsi.rc != 0 - - '"No Instance found" not in ibm_molecule_vsi.stderr' - register: ibm_molecule_vsi - - - name: Remove VSI - ibm.cloudcollection.ibm_is_instance: - state: absent - id: "{{ ibm_molecule_vsi.resource.id }}" - vpc: "{{ ibm_molecule_vsi.resource.vpc }}" - keys: [] - image: "{{ ibm_molecule_vsi.resource.image }}" - profile: "{{ ibm_molecule_vsi.resource.profile }}" - zone: "{{ ibm_molecule_vsi.resource.zone }}" - primary_network_interface: - - subnet: "{{ ibm_molecule_vsi.resource.primary_network_interface[0].subnet }}" - when: ibm_molecule_vsi.resource.id is defined - - # - name: Checking for existing SSH key - # ibm.cloudcollection.ibm_is_ssh_key_info: - # name: "{{ ssh_key_name }}" - # failed_when: - # - ssh_key.rc != 0 - # - '"No SSH Key found" not in ssh_key.stderr' - # register: ssh_key - - # - name: Remove SSH Key - # ibm.cloudcollection.ibm_is_ssh_key: - # state: absent - # id: "{{ ssh_key.resource.id }}" - # when: ssh_key.resource.id is defined - - # - name: Checking for existing VPC Subnet - # ibm.cloudcollection.ibm_is_subnet_info: - # name: "{{ subnet_name }}" - # failed_when: - # - subnet.rc != 0 - # - '"No subnet found" not in subnet.stderr' - # register: subnet - - # - name: Remove VPC Subnet - # ibm.cloudcollection.ibm_is_subnet: - # state: absent - # id: "{{ subnet.resource.id }}" - # when: subnet.resource.id is defined - - # - name: Checking for existing VPC - # ibm.cloudcollection.ibm_is_vpc_info: - # name: "{{ vpc_name }}" - # failed_when: - # - vpc.rc != 0 - # - '"No VPC found" not in vpc.stderr' - # register: vpc - - # - name: Remove VPC - # ibm.cloudcollection.ibm_is_vpc: - # state: absent - # id: "{{ vpc.resource.id }}" - # when: vpc.resource.id is defined \ No newline at end of file diff --git a/roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml b/roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml deleted file mode 100644 index 79044cd06..000000000 --- a/roles/sap_hypervisor_node_preconfigure/molecule/default/verify.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# This is an example playbook to execute Ansible tests. - -- name: Verify - hosts: all - gather_facts: false - tasks: - - name: Example assertion - assert: - that: true From b3bac3e2539be077b5a35e01fb3b7ed4ccefbaf6 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 14:15:28 +0000 Subject: [PATCH 275/375] sap_hypervisor_node_preconfigure: add prefix heading to README --- roles/sap_hypervisor_node_preconfigure/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/sap_hypervisor_node_preconfigure/README.md b/roles/sap_hypervisor_node_preconfigure/README.md index d862ed326..cc26e0917 100644 --- a/roles/sap_hypervisor_node_preconfigure/README.md +++ b/roles/sap_hypervisor_node_preconfigure/README.md @@ -1,3 +1,5 @@ +`EXPERIMENTAL` + sap_hypervisor_node_preconfigure ======================= From 20851c288a237252950e41f2f73da1588ef70a50 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 14:46:05 +0000 Subject: [PATCH 276/375] sap_vm_preconfigure: modularise for different platforms --- roles/sap_vm_preconfigure/README.md | 2 + roles/sap_vm_preconfigure/defaults/main.yml | 12 +-- .../platform/cloud_aliyun_ecs_vm/.gitkeep | 0 .../files/platform/cloud_aws_ec2_vs/.gitkeep | 0 .../files/platform/cloud_gcp_ce_vm/.gitkeep | 0 .../platform/cloud_ibmcloud_powervs/.gitkeep | 0 .../files/platform/cloud_ibmcloud_vs/.gitkeep | 0 .../files/platform/cloud_msazure_vm/.gitkeep | 0 .../files/platform/ibmpower_lpar/.gitkeep | 0 .../platform/redhat_ocp_virt_vm/.gitkeep | 0 .../tuned/sap-hana-kvm-guest/haltpoll.sh | 0 .../tuned/sap-hana-kvm-guest/tuned.conf | 0 .../tuned/sap-hana/tuned.conf | 0 .../files/platform/vmware_vsphere_vm/.gitkeep | 0 roles/sap_vm_preconfigure/handlers/main.yml | 94 +------------------ .../platform/cloud_aliyun_ecs_vm/.gitkeep | 0 .../platform/cloud_aws_ec2_vs/.gitkeep | 0 .../platform/cloud_gcp_ce_vm/.gitkeep | 0 .../platform/cloud_ibmcloud_powervs/.gitkeep | 0 .../platform/cloud_ibmcloud_vs/.gitkeep | 0 .../platform/cloud_msazure_vm/.gitkeep | 0 .../handlers/platform/ibmpower_lpar/.gitkeep | 0 .../platform/redhat_ocp_virt_vm/.gitkeep | 0 .../platform/redhat_rhel_kvm_vm/main.yml | 94 +++++++++++++++++++ .../platform/vmware_vsphere_vm/.gitkeep | 0 roles/sap_vm_preconfigure/meta/main.yml | 52 +--------- .../tasks/detect_platform/main.yml | 1 + roles/sap_vm_preconfigure/tasks/main.yml | 23 ++--- .../platform/cloud_aliyun_ecs_vm/.gitkeep | 0 .../tasks/platform/cloud_aws_ec2_vs/.gitkeep | 0 .../tasks/platform/cloud_gcp_ce_vm/.gitkeep | 0 .../platform/cloud_ibmcloud_powervs/.gitkeep | 0 .../tasks/platform/cloud_ibmcloud_vs/.gitkeep | 0 .../tasks/platform/cloud_msazure_vm/.gitkeep | 0 .../tasks/platform/ibmpower_lpar/.gitkeep | 0 .../platform/redhat_ocp_virt_vm/.gitkeep | 0 .../assert-set-tuned-profile.yml | 1 - .../platform/redhat_rhel_kvm_vm/main.yml | 17 ++++ .../redhat_rhel_kvm_vm}/set-tuned-profile.yml | 1 - .../tasks/platform/vmware_vsphere_vm/.gitkeep | 0 roles/sap_vm_preconfigure/vars/main.yml | 3 - .../platform_defaults_redhat_rhel_kvm.yml | 11 +++ 42 files changed, 146 insertions(+), 165 deletions(-) create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_aliyun_ecs_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_aws_ec2_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_gcp_ce_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_powervs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/cloud_msazure_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/ibmpower_lpar/.gitkeep create mode 100644 roles/sap_vm_preconfigure/files/platform/redhat_ocp_virt_vm/.gitkeep rename roles/sap_vm_preconfigure/files/{ => platform/redhat_rhel_kvm_vm}/tuned/sap-hana-kvm-guest/haltpoll.sh (100%) rename roles/sap_vm_preconfigure/files/{ => platform/redhat_rhel_kvm_vm}/tuned/sap-hana-kvm-guest/tuned.conf (100%) rename roles/sap_vm_preconfigure/files/{ => platform/redhat_rhel_kvm_vm}/tuned/sap-hana/tuned.conf (100%) create mode 100644 roles/sap_vm_preconfigure/files/platform/vmware_vsphere_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_aliyun_ecs_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_aws_ec2_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_gcp_ce_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_powervs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/cloud_msazure_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/ibmpower_lpar/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/redhat_ocp_virt_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/handlers/platform/redhat_rhel_kvm_vm/main.yml create mode 100644 roles/sap_vm_preconfigure/handlers/platform/vmware_vsphere_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/detect_platform/main.yml create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_aliyun_ecs_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_aws_ec2_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_gcp_ce_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_powervs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_vs/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/cloud_msazure_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/ibmpower_lpar/.gitkeep create mode 100644 roles/sap_vm_preconfigure/tasks/platform/redhat_ocp_virt_vm/.gitkeep rename roles/sap_vm_preconfigure/tasks/{ => platform/redhat_rhel_kvm_vm}/assert-set-tuned-profile.yml (99%) create mode 100644 roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/main.yml rename roles/sap_vm_preconfigure/tasks/{ => platform/redhat_rhel_kvm_vm}/set-tuned-profile.yml (99%) create mode 100644 roles/sap_vm_preconfigure/tasks/platform/vmware_vsphere_vm/.gitkeep create mode 100644 roles/sap_vm_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml diff --git a/roles/sap_vm_preconfigure/README.md b/roles/sap_vm_preconfigure/README.md index 7422cfbf2..3c61772ad 100644 --- a/roles/sap_vm_preconfigure/README.md +++ b/roles/sap_vm_preconfigure/README.md @@ -1,3 +1,5 @@ +`EXPERIMENTAL` + sap_vm_preconfigure ================== diff --git a/roles/sap_vm_preconfigure/defaults/main.yml b/roles/sap_vm_preconfigure/defaults/main.yml index 621acbdf0..c91a392cb 100644 --- a/roles/sap_vm_preconfigure/defaults/main.yml +++ b/roles/sap_vm_preconfigure/defaults/main.yml @@ -1,10 +1,10 @@ --- -# defaults file for sap_vm_preconfigure -sap_vm_preconfigure_run_grub2_mkconfig: yes +# For setting Ansible Var sap_vm_platform, unless overriden +sap_vm_platform_detect: false -# run role in assert mode? -sap_vm_preconfigure_assert: false +# For re-use of this Ansible Role to establish which platform, without running any of the preconfigure Ansible Tasks for that platform +sap_vm_platform_detect_only: false -# fail if assertion is invalid -sap_vm_preconfigure_ignore_failed_assertion: no +# cloud_aliyun_ecs_vm, cloud_aws_ec2_vs, cloud_gcp_ce_vm, cloud_ibmcloud_powervs, cloud_ibmcloud_vs, cloud_msazure_vm, ibmpower_lpar, redhat_ocp_virt_vm, redhat_rhel_kvm_vm, vmware_vsphere_vm +sap_vm_platform: diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_aliyun_ecs_vm/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_aliyun_ecs_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_aws_ec2_vs/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_aws_ec2_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_gcp_ce_vm/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_gcp_ce_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_powervs/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_powervs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_vs/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_ibmcloud_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/cloud_msazure_vm/.gitkeep b/roles/sap_vm_preconfigure/files/platform/cloud_msazure_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/ibmpower_lpar/.gitkeep b/roles/sap_vm_preconfigure/files/platform/ibmpower_lpar/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/platform/redhat_ocp_virt_vm/.gitkeep b/roles/sap_vm_preconfigure/files/platform/redhat_ocp_virt_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh b/roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana-kvm-guest/haltpoll.sh similarity index 100% rename from roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/haltpoll.sh rename to roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana-kvm-guest/haltpoll.sh diff --git a/roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf b/roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana-kvm-guest/tuned.conf similarity index 100% rename from roles/sap_vm_preconfigure/files/tuned/sap-hana-kvm-guest/tuned.conf rename to roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana-kvm-guest/tuned.conf diff --git a/roles/sap_vm_preconfigure/files/tuned/sap-hana/tuned.conf b/roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana/tuned.conf similarity index 100% rename from roles/sap_vm_preconfigure/files/tuned/sap-hana/tuned.conf rename to roles/sap_vm_preconfigure/files/platform/redhat_rhel_kvm_vm/tuned/sap-hana/tuned.conf diff --git a/roles/sap_vm_preconfigure/files/platform/vmware_vsphere_vm/.gitkeep b/roles/sap_vm_preconfigure/files/platform/vmware_vsphere_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/main.yml b/roles/sap_vm_preconfigure/handlers/main.yml index 158adaf4f..c3d3be107 100644 --- a/roles/sap_vm_preconfigure/handlers/main.yml +++ b/roles/sap_vm_preconfigure/handlers/main.yml @@ -1,94 +1,4 @@ --- -- name: "Check if server is booted in BIOS or UEFI mode" - stat: - path: /sys/firmware/efi - get_checksum: no - register: __sap_vm_preconfigure_register_stat_sys_firmware_efi - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - when: - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: Debug BIOS or UEFI - debug: - var: __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - when: - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grub-mkconfig (BIOS mode)" - command: grub2-mkconfig -o /boot/grub2/grub.cfg - register: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - notify: __sap_vm_preconfigure_reboot_handler - when: - - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig BIOS mode" - debug: - var: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, - __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - when: - - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Set the grub.cfg location RHEL" - set_fact: - __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg - when: - - ansible_distribution == 'RedHat' - -- name: "Set the grub.cfg location SLES" - set_fact: - __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg - when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' - -- name: "Run grub-mkconfig (UEFI mode)" - command: "grub2-mkconfig -o {{ __sap_vm_preconfigure_uefi_boot_dir }}" - register: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - notify: __sap_vm_preconfigure_reboot_handler - when: - - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Debug grub-mkconfig UEFI" - debug: - var: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, - __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines - listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler - when: - - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists - - sap_vm_preconfigure_run_grub2_mkconfig|d(true) - -- name: "Run grubby for enabling TSX" - command: grubby --args="tsx=on" --update-kernel=ALL - register: __sap_vm_preconfigure_register_grubby_update - listen: __sap_vm_preconfigure_grubby_update_handler - notify: __sap_vm_preconfigure_reboot_handler - -- name: Reboot the managed node - reboot: - test_command: /bin/true - listen: __sap_vm_preconfigure_reboot_handler - when: - - sap_vm_preconfigure_reboot_ok|d(false) - -- name: Let the role fail if a reboot is required - fail: - msg: Reboot is required! - listen: __sap_vm_preconfigure_reboot_handler - when: - - sap_vm_preconfigure_fail_if_reboot_required|d(true) - - not sap_vm_preconfigure_reboot_ok|d(false) - -- name: Show a warning message if a reboot is required - debug: - msg: "WARN: Reboot is required!" - listen: __sap_vm_preconfigure_reboot_handler - when: - - not sap_vm_preconfigure_fail_if_reboot_required|d(true) - - not sap_vm_preconfigure_reboot_ok|d(false) +- name: SAP virtual machine preconfigure - Include Handler Tasks for {{ sap_vm_platform }} + ansible.builtin.include_tasks: "{{ role_path }}/handlers/platform/{{ sap_vm_platform }}/main.yml" diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_aliyun_ecs_vm/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_aliyun_ecs_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_aws_ec2_vs/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_aws_ec2_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_gcp_ce_vm/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_gcp_ce_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_powervs/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_powervs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_vs/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_ibmcloud_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/cloud_msazure_vm/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/cloud_msazure_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/ibmpower_lpar/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/ibmpower_lpar/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/redhat_ocp_virt_vm/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/redhat_ocp_virt_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/handlers/platform/redhat_rhel_kvm_vm/main.yml b/roles/sap_vm_preconfigure/handlers/platform/redhat_rhel_kvm_vm/main.yml new file mode 100644 index 000000000..158adaf4f --- /dev/null +++ b/roles/sap_vm_preconfigure/handlers/platform/redhat_rhel_kvm_vm/main.yml @@ -0,0 +1,94 @@ +--- + +- name: "Check if server is booted in BIOS or UEFI mode" + stat: + path: /sys/firmware/efi + get_checksum: no + register: __sap_vm_preconfigure_register_stat_sys_firmware_efi + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: Debug BIOS or UEFI + debug: + var: __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grub-mkconfig (BIOS mode)" + command: grub2-mkconfig -o /boot/grub2/grub.cfg + register: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + notify: __sap_vm_preconfigure_reboot_handler + when: + - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig BIOS mode" + debug: + var: __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines, + __sap_vm_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - not __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Set the grub.cfg location RHEL" + set_fact: + __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg + when: + - ansible_distribution == 'RedHat' + +- name: "Set the grub.cfg location SLES" + set_fact: + __sap_vm_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + +- name: "Run grub-mkconfig (UEFI mode)" + command: "grub2-mkconfig -o {{ __sap_vm_preconfigure_uefi_boot_dir }}" + register: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + notify: __sap_vm_preconfigure_reboot_handler + when: + - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Debug grub-mkconfig UEFI" + debug: + var: __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines, + __sap_vm_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines + listen: __sap_vm_preconfigure_regenerate_grub2_conf_handler + when: + - __sap_vm_preconfigure_register_stat_sys_firmware_efi.stat.exists + - sap_vm_preconfigure_run_grub2_mkconfig|d(true) + +- name: "Run grubby for enabling TSX" + command: grubby --args="tsx=on" --update-kernel=ALL + register: __sap_vm_preconfigure_register_grubby_update + listen: __sap_vm_preconfigure_grubby_update_handler + notify: __sap_vm_preconfigure_reboot_handler + +- name: Reboot the managed node + reboot: + test_command: /bin/true + listen: __sap_vm_preconfigure_reboot_handler + when: + - sap_vm_preconfigure_reboot_ok|d(false) + +- name: Let the role fail if a reboot is required + fail: + msg: Reboot is required! + listen: __sap_vm_preconfigure_reboot_handler + when: + - sap_vm_preconfigure_fail_if_reboot_required|d(true) + - not sap_vm_preconfigure_reboot_ok|d(false) + +- name: Show a warning message if a reboot is required + debug: + msg: "WARN: Reboot is required!" + listen: __sap_vm_preconfigure_reboot_handler + when: + - not sap_vm_preconfigure_fail_if_reboot_required|d(true) + - not sap_vm_preconfigure_reboot_ok|d(false) diff --git a/roles/sap_vm_preconfigure/handlers/platform/vmware_vsphere_vm/.gitkeep b/roles/sap_vm_preconfigure/handlers/platform/vmware_vsphere_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/meta/main.yml b/roles/sap_vm_preconfigure/meta/main.yml index 2544d8b09..8078ca342 100644 --- a/roles/sap_vm_preconfigure/meta/main.yml +++ b/roles/sap_vm_preconfigure/meta/main.yml @@ -1,54 +1,10 @@ --- galaxy_info: + namespace: community + role_name: sap_vm_preconfigure author: Nils Koenig - description: Provide the configuration for a SAP HANA guest on RHV - company: Red Hat - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 + description: Provide the configuration of Virtual Machines running on SAP certified Cloud IaaS or SAP certified Hypervisors license: Apache-2.0 - min_ansible_version: 2.9 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - + galaxy_tags: [ 'sap', 'hana', 'rhel', 'redhat', 'sles', 'suse' ] dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml b/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml @@ -0,0 +1 @@ +--- diff --git a/roles/sap_vm_preconfigure/tasks/main.yml b/roles/sap_vm_preconfigure/tasks/main.yml index 2d6bb2a61..30323e51e 100644 --- a/roles/sap_vm_preconfigure/tasks/main.yml +++ b/roles/sap_vm_preconfigure/tasks/main.yml @@ -1,18 +1,13 @@ --- -# tasks file for sap_vm_preconfigure -- name: Trigger tuned profile sap-hana-kvm-guest activation - include_tasks: set-tuned-profile.yml +- name: SAP virtual machine detect platform + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_vm_platform }}/main.yml" + when: sap_vm_platform_detect or sap_vm_platform_detect_only -- name: Set filename prefix to empty string if role is run in normal mode - set_fact: - __sap_vm_preconfigure_fact_assert_prefix: "" - when: not sap_vm_preconfigure_assert|d(false) +- name: SAP virtual machine preconfigure - Include Defaults Vars for {{ sap_vm_platform }} + ansible.builtin.include_vars: "{{ role_path }}/vars/platform_defaults_{{ sap_vm_platform }}.yml" + when: not sap_vm_platform_detect_only -- name: Prepend filename with assert string if role is run in assert mode - set_fact: - __sap_vm_preconfigure_fact_assert_prefix: "assert-" - when: sap_hypervisor_node_preconfigure_assert|d(false) - -- include_tasks: '{{ __sap_vm_preconfigure_fact_assert_prefix }}set-tuned-profile.yml' -... +- name: SAP virtual machine preconfigure - Include Tasks for {{ sap_vm_platform }} + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_vm_platform }}/main.yml" + when: not sap_vm_platform_detect_only diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_aliyun_ecs_vm/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_aliyun_ecs_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_aws_ec2_vs/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_aws_ec2_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_gcp_ce_vm/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_gcp_ce_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_powervs/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_powervs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_vs/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_ibmcloud_vs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/cloud_msazure_vm/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/cloud_msazure_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/ibmpower_lpar/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/ibmpower_lpar/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/platform/redhat_ocp_virt_vm/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/redhat_ocp_virt_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/assert-set-tuned-profile.yml similarity index 99% rename from roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml rename to roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/assert-set-tuned-profile.yml index a354972fc..b0c443fab 100644 --- a/roles/sap_vm_preconfigure/tasks/assert-set-tuned-profile.yml +++ b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/assert-set-tuned-profile.yml @@ -11,4 +11,3 @@ fail_msg: "FAIL: tuned profile is not sap-hana-kvm-guest" success_msg: "PASS: tuned profile is sap-hana-kvm-guest" ignore_errors: "{{ sap_vm_preconfigure_ignore_failed_assertion }}" -... diff --git a/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/main.yml b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/main.yml new file mode 100644 index 000000000..0c14a0015 --- /dev/null +++ b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/main.yml @@ -0,0 +1,17 @@ +--- +# tasks file for sap_vm_preconfigure + +- name: Trigger tuned profile sap-hana-kvm-guest activation + include_tasks: set-tuned-profile.yml + +- name: Set filename prefix to empty string if role is run in normal mode + set_fact: + __sap_vm_preconfigure_fact_assert_prefix: "" + when: not sap_vm_preconfigure_assert|d(false) + +- name: Prepend filename with assert string if role is run in assert mode + set_fact: + __sap_vm_preconfigure_fact_assert_prefix: "assert-" + when: sap_hypervisor_node_preconfigure_assert|d(false) + +- include_tasks: '{{ __sap_vm_preconfigure_fact_assert_prefix }}set-tuned-profile.yml' diff --git a/roles/sap_vm_preconfigure/tasks/set-tuned-profile.yml b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/set-tuned-profile.yml similarity index 99% rename from roles/sap_vm_preconfigure/tasks/set-tuned-profile.yml rename to roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/set-tuned-profile.yml index dc54bd316..9bbceea27 100644 --- a/roles/sap_vm_preconfigure/tasks/set-tuned-profile.yml +++ b/roles/sap_vm_preconfigure/tasks/platform/redhat_rhel_kvm_vm/set-tuned-profile.yml @@ -83,4 +83,3 @@ - name: Activate tuned profile command: tuned-adm profile sap-hana-kvm-guest -... diff --git a/roles/sap_vm_preconfigure/tasks/platform/vmware_vsphere_vm/.gitkeep b/roles/sap_vm_preconfigure/tasks/platform/vmware_vsphere_vm/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/roles/sap_vm_preconfigure/vars/main.yml b/roles/sap_vm_preconfigure/vars/main.yml index 6e72127ee..ed97d539c 100644 --- a/roles/sap_vm_preconfigure/vars/main.yml +++ b/roles/sap_vm_preconfigure/vars/main.yml @@ -1,4 +1 @@ --- -# vars file for sap_vm_preconfigure -# -... diff --git a/roles/sap_vm_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml b/roles/sap_vm_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml new file mode 100644 index 000000000..db93406e4 --- /dev/null +++ b/roles/sap_vm_preconfigure/vars/platform_defaults_redhat_rhel_kvm.yml @@ -0,0 +1,11 @@ +--- + +# defaults file for sap_vm_preconfigure + +sap_vm_preconfigure_run_grub2_mkconfig: yes + +# run role in assert mode? +sap_vm_preconfigure_assert: false + +# fail if assertion is invalid +sap_vm_preconfigure_ignore_failed_assertion: no From 551c9f7f4e3c84f5184ab171fef1f33325c37cc6 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sun, 6 Nov 2022 14:57:12 +0000 Subject: [PATCH 277/375] sap_vm_preconfigure: add stub code for detect platform --- .../tasks/detect_platform/main.yml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml b/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml index ed97d539c..c92653310 100644 --- a/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml +++ b/roles/sap_vm_preconfigure/tasks/detect_platform/main.yml @@ -1 +1,82 @@ --- +# Platform detection for cloud and other infrastructure platforms. + +### AWS facts already available in Ansible +# +# ansible_bios_vendor: "Amazon EC2" +# ansible_bios_version: "1.0" +# ansible_board_asset_tag: "i-043d3c1a889ed9016" +# ansible_board_name: "NA" +# ansible_board_serial: "NA" +# ansible_board_vendor: "Amazon EC2" +# ansible_board_version: "NA" +# ansible_chassis_asset_tag: "Amazon EC2" +# ansible_chassis_serial: "NA" +# ansible_chassis_vendor: "Amazon EC2" +# ansible_chassis_version: "NA" +# ansible_product_name: "r5.8xlarge" +# ansible_system_vendor: "Amazon EC2" + +# TODO: detection based on multiple facts and providing one standard +# name for use as platform type in related include files + + +- name: SAP virtual machine detect platform - decision set fact + set_fact: + sap_vm_platform: "{{ sap_vm_platform_detection_decision }}" + # cloud_aliyun_ecs_vm, cloud_aws_ec2_vs, cloud_gcp_ce_vm, cloud_ibmcloud_powervs, cloud_ibmcloud_vs, cloud_msazure_vm, ibmpower_lpar, redhat_ocp_virt_vm, redhat_rhel_kvm_vm, vmware_vsphere_vm + + +- name: SAP virtual machine detect platform - confirm AWS EC2 Virtual Server + when: sap_vm_platform == cloud_aws_ec2_vs + block: + + - name: (AWS) Get instance metadata token + ansible.builtin.uri: + headers: + X-aws-ec2-metadata-token-ttl-seconds: 21600 + method: PUT + return_content: true + url: http://169.254.169.254/latest/api/token + register: detect_cloud_provider_aws_token + changed_when: false + ignore_errors: true + + - name: (AWS) Get instance metadata ami-id + ansible.builtin.uri: + headers: + X-aws-ec2-metadata-token: "{{ detect_cloud_provider_aws_token.content }}" + method: GET + return_content: true + url: http://169.254.169.254/latest/meta-data/ami-id + register: detect_cloud_provider_aws_ami_id + changed_when: false + ignore_errors: true + + - name: (AWS) Set detect_cloud_provider_cloud_provider + ansible.builtin.set_fact: + sap_detect_cloud_provider_cloud_provider: "aws" + when: + - not detect_cloud_provider_aws_ami_id.failed + + +- name: SAP virtual machine detect platform - confirm MicrosofT Azure Virtual Machine + when: sap_vm_platform == cloud_msazure_vm + block: + + - name: (Azure) Get instance metadata + ansible.builtin.uri: + headers: + Metadata: true + method: GET + url: http://169.254.169.254/metadata/instance/compute?api-version=2021-10-01 + register: detect_cloud_provider_azure_instance_metadata + changed_when: false + ignore_errors: true + + - name: (Azure) Set detect_cloud_provider_cloud_provider + ansible.builtin.set_fact: + sap_detect_cloud_provider_cloud_provider: "azure" + when: + - detect_cloud_provider_azure_instance_metadata.json.azEnvironment is defined + - detect_cloud_provider_azure_instance_metadata.json.azEnvironment == "AzurePublicCloud" From b87edf1aa692c57b2a29742445a5c7f20fd47f8b Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 8 Nov 2022 16:30:13 +0100 Subject: [PATCH 278/375] sap_swpm: feat nwas java template ids --- roles/sap_swpm/defaults/main.yml | 48 ++++++++++++++++++++++++++ roles/sap_swpm/templates/configfile.j2 | 19 ++++++++++ 2 files changed, 67 insertions(+) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index c51540050..54341604a 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -186,6 +186,54 @@ sap_swpm_ddic_000_password: sap_swpm_virtual_hostname: "initial" +######################################## +# SWPM Ansible Role variables +# for Default Mode +# - Lookup list of Feature Template IDs +######################################## + +sap_swpm_java_template_id_selected_list: + - java_engine_ee + - java_nwas_as + - java_adobe_document_services + +sap_swpm_java_template_id_lookup_dictionary: + java_nwas_as: + - 01200615324800000135 # Application Server Java +# - 01200615324800002844 # !!! Ignore, SAP NWAS 7.40 JAVA only + java_engine_se: + - 01200615324800000125 # Adapter Engine (Java SE) + java_engine_ee: + - 01200615324800000165 # Adapter Engine (Java EE) + java_nwdi: + - 01200615324800000129 # Development Infrastructure + - 01200615324800003960 # Developer Studio + java_composition_environment: + - 01200615324800002968 # Composition Platform + - 01200615324800002888 # Guided Procedures +# - 01200615324800002884 # !!! Ignore, SAP NWAS 7.40 JAVA only + java_enterprise_portal: + - 01200615324800000164 # EP Core - Application Portal + - 01200615324800000174 # Enterprise Portal + java_enterprise_service_repository: + - 01200615324800002887 # Enterprise Services Repository + - 01200615324800000149 # ESR Content + java_adobe_document_services: + - 01200615324800000128 # Adobe Document Services + - 01200314694800005225 # PDF Export + java_pi_aex: + - 01200615324800003841 # Advanced Adapter Engine Extnd + java_bi_bpm: + - 01200615324800000150 # BI Java + - 01200615324800002897 # BPM + java_scheduling_cps: + - 01200615324800000153 # Central Process Scheduling + java_solman: + - 01200615324800001035 # Solution Manager + java_demo: + - 01200615324800002898 # Demo Applications + + ######################################## # SWPM Ansible Role variables # for Default Mode diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 858d2ccf2..9691163d7 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -588,6 +588,25 @@ UmeConfiguration.umeInstance = {{ sap_swpm_ume_instance_nr }} UmeConfiguration.umeType = {{ sap_swpm_ume_type }} {% endif %} +{% if 'nw_config_java_feature_template_ids' in sap_swpm_inifile_list %} +###### +# nw_config_java_feature_template_ids +###### +NW_internal.useProductVersionDescriptor = true + +# If use PV = true +# SAP SWPM 1.0 for SAP NetWeaver AS (JAVA), Product Version Software Instance **Feature Template IDs** comma-separated list +Select_PPMS_Instances.ListOfSelectedInstances = {% set selected_ids = [] %}{%- for item_selected in sap_swpm_java_template_id_selected_list %} +{%- if item_selected in sap_swpm_java_template_id_lookup_dictionary -%} +{{ selected_ids.append(sap_swpm_java_template_id_lookup_dictionary[item_selected]) }} +{%- endif %} +{%- endfor %}{{ selected_ids | flatten | join(',') }} + +## If use PV = false [LEGACY for before NWAS JAVA 7.40] +## Comma-separated value list containing which product instances (former usage types) are installed. Used for handling product instances in unattended mode. +## SAP_Software_Features_Select.selectedInstancesForInstallation = AS,AAS,BASIC,NW-MODEL,ESR,PI,PI-AF +{%- endif %} + {% if 'nw_config_webdisp_generic' in sap_swpm_inifile_list %} ###### # nw_config_webdisp_generic From d876abda191ddb4ca774d96b8a9c0cc4815213b4 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Tue, 8 Nov 2022 16:32:46 +0100 Subject: [PATCH 279/375] sap_swpm: add new option to inifile generator --- roles/sap_swpm/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 54341604a..b8cc677a0 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -82,6 +82,7 @@ sap_swpm_inifile_list: # - nw_config_ers - nw_config_ports # - nw_config_java_ume +# - nw_config_java_feature_template_ids # - nw_config_webdisp_generic # - nw_config_webdisp_gateway - nw_config_host_agent From 8b1a10f954a71a6ba2cd98a66d202e015219246d Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Thu, 10 Nov 2022 08:25:31 +0100 Subject: [PATCH 280/375] sap_swpm: append java when using role default templates mode --- .../tasks/swpm/swpm_inifile_generate_default_templates.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml index 4f8a05054..2abebaf21 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml @@ -6,6 +6,11 @@ sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" sap_swpm_inifile_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] }}" +- name: SAP SWPM default_templates mode - Set product_catalog_id and inifile_list + ansible.builtin.set_fact: + sap_swpm_java_template_id_selected_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_java_template_id_selected_list'] }}" + when: "'java' in sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] | lower" + - name: SAP SWPM default_templates mode - If not already defined, use the default variable for the template ansible.builtin.set_fact: "{{ item.key }}": "{{ item.value }}" From 2265c019cd3b807d4f0bfb5fca3eb9727e7d388f Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 10 Nov 2022 10:25:09 +0100 Subject: [PATCH 281/375] sap_ha_pacemaker_cluster: rename role variables --- roles/sap_ha_cluster/README.md | 10 +- roles/sap_ha_cluster/defaults/main.yml | 48 +++++----- roles/sap_ha_cluster/meta/argument_specs.yml | 48 ++++++---- .../ascertain_ha_cluster_in_inventory.yml | 20 ++-- .../tasks/ascertain_platform_type.yml | 10 +- .../tasks/ascertain_sap_landscape.yml | 2 +- .../sap_ha_cluster/tasks/configure_srhook.yml | 22 ++--- .../tasks/construct_vars_common.yml | 18 ++-- .../tasks/construct_vars_hana_common.yml | 48 +++++----- .../tasks/construct_vars_stonith.yml | 20 ++-- .../construct_vars_vip_resources_default.yml | 28 +++--- .../tasks/include_construct_vip_resources.yml | 10 +- .../tasks/include_vars_common.yml | 8 +- .../tasks/include_vars_saphana.yml | 10 +- roles/sap_ha_cluster/tasks/main.yml | 68 ++++++------- ...onstruct_vars_vip_resources_vm_aws_ec2.yml | 96 +++++++++---------- .../tasks/platform/include_vars_platform.yml | 8 +- .../platform/preconfigure_vm_aws_ec2.yml | 8 +- .../platform/register_sysinfo_vm_ibmcloud.yml | 6 +- .../tasks/validate_input_parameters.yml | 6 +- .../templates/cluster_create_config.j2 | 42 ++++---- .../templates/sudofile_20-saphana.j2 | 10 +- roles/sap_ha_cluster/vars/main.yml | 36 +++---- .../vars/platform_vm_aws_ec2.yml | 30 +++--- .../vars/platform_vm_ibmcloud.yml | 10 +- .../vars/platform_vm_ibmcloud_power.yml | 2 +- roles/sap_ha_cluster/vars/redhat.yml | 2 +- .../sap_ha_cluster/vars/saphana_scaleout.yml | 8 +- roles/sap_ha_cluster/vars/saphana_scaleup.yml | 8 +- 29 files changed, 324 insertions(+), 318 deletions(-) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_cluster/README.md index 341f52b60..e15697fd3 100644 --- a/roles/sap_ha_cluster/README.md +++ b/roles/sap_ha_cluster/README.md @@ -1,9 +1,9 @@ -# sap_ha_cluster Ansible Role +# sap_ha_pacemaker_cluster Ansible Role This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources. The cluster setup is managed through the `ha_cluster` Linux System Role.
-`sap_ha_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. +`sap_ha_pacemaker_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. @@ -36,9 +36,9 @@ Minimum required parameters: On cloud platforms additional parameters are required: -- AWS: `sap_ha_cluster_aws_*` variables -- AWS: `sap_ha_cluster_vip_update_rt` -- IBM Cloud VPC: `sap_ha_cluster_ibmcloud_*` variables +- AWS: `sap_ha_pacemaker_cluster_aws_*` variables +- AWS: `sap_ha_pacemaker_cluster_vip_update_rt` +- IBM Cloud VPC: `sap_ha_pacemaker_cluster_ibmcloud_*` variables --- diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_cluster/defaults/main.yml index f2438ab74..4ddd9f071 100644 --- a/roles/sap_ha_cluster/defaults/main.yml +++ b/roles/sap_ha_cluster/defaults/main.yml @@ -6,24 +6,24 @@ # Do NOT USE ANSIBLE FACTS for defaults to be compatible with # playbooks that disable generic fact gathering! -sap_ha_cluster_cluster_name: my-cluster +sap_ha_pacemaker_cluster_cluster_name: my-cluster -sap_ha_cluster_create_config_varfile: false -sap_ha_cluster_create_config_dest: "{{ sap_ha_cluster_cluster_name }}_resource_config.yml" +sap_ha_pacemaker_cluster_create_config_varfile: false +sap_ha_pacemaker_cluster_create_config_dest: "{{ sap_ha_pacemaker_cluster_cluster_name }}_resource_config.yml" # Inherit SAP common parameters -sap_ha_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" -sap_ha_cluster_hana_sid: "{{ sap_hana_sid }}" -sap_ha_cluster_hana_instance_number: "{{ sap_hana_instance_number }}" +sap_ha_pacemaker_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" +sap_ha_pacemaker_cluster_hana_sid: "{{ sap_hana_sid }}" +sap_ha_pacemaker_cluster_hana_instance_number: "{{ sap_hana_instance_number }}" # Make sure that there is always the default fed into the included role -sap_ha_cluster_fence_agent_packages: +sap_ha_pacemaker_cluster_fence_agent_packages: - fence-agents-all -sap_ha_cluster_extra_packages: "{{ ha_cluster_extra_packages | default([]) }}" +sap_ha_pacemaker_cluster_extra_packages: "{{ ha_cluster_extra_packages | default([]) }}" # Adjusting resource defaults -sap_ha_cluster_resource_defaults: +sap_ha_pacemaker_cluster_resource_defaults: - name: resource-stickiness value: 1000 - name: migration-threshold @@ -31,34 +31,34 @@ sap_ha_cluster_resource_defaults: # The type of SAP landscape and multi-node replication # TODO: Type definitions and feature support -# sap_ha_cluster_sap_type: -sap_ha_cluster_replication_type: none +# sap_ha_pacemaker_cluster_sap_type: +sap_ha_pacemaker_cluster_replication_type: none # Optional parameters to customize HANA resources # AUTOMATED_REGISTER -sap_ha_cluster_hana_automated_register: true +sap_ha_pacemaker_cluster_hana_automated_register: true # DUPLICATE_PRIMARY_TIMEOUT -sap_ha_cluster_hana_duplicate_primary_timeout: 900 +sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout: 900 # PREFER_SITE_TAKEOVER -sap_ha_cluster_hana_prefer_site_takeover: true +sap_ha_pacemaker_cluster_hana_prefer_site_takeover: true ### stonith resource parameter defaults -sap_ha_cluster_fence_options: +sap_ha_pacemaker_cluster_fence_options: pcmk_reboot_retries: 4 pcmk_reboot_timeout: 400 power_timeout: 240 ### Resource default patterns -sap_ha_cluster_vip_address: "{{ sap_hana_vip }}" -sap_ha_cluster_vip_resource_agent: "ocf:heartbeat:IPaddr2" -sap_ha_cluster_vip_resource_name: "vip_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" +sap_ha_pacemaker_cluster_vip_address: "{{ sap_hana_vip }}" +sap_ha_pacemaker_cluster_vip_resource_agent: "ocf:heartbeat:IPaddr2" +sap_ha_pacemaker_cluster_vip_resource_name: "vip_{{ sap_ha_pacemaker_cluster_hana_sid }}_{{ sap_ha_pacemaker_cluster_hana_instance_number }}" # Resource IDs (names) as convenience parameters. -sap_ha_cluster_hana_resource_name: "SAPHana_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" -sap_ha_cluster_hana_resource_clone_name: "{{ sap_ha_cluster_hana_resource_name }}-clone" -sap_ha_cluster_hana_topology_resource_name: "SAPHanaTopology_{{ sap_ha_cluster_hana_sid }}_{{ sap_ha_cluster_hana_instance_number }}" -sap_ha_cluster_hana_topology_resource_clone_name: "{{ sap_ha_cluster_hana_topology_resource_name }}-clone" +sap_ha_pacemaker_cluster_hana_resource_name: "SAPHana_{{ sap_ha_pacemaker_cluster_hana_sid }}_{{ sap_ha_pacemaker_cluster_hana_instance_number }}" +sap_ha_pacemaker_cluster_hana_resource_clone_name: "{{ sap_ha_pacemaker_cluster_hana_resource_name }}-clone" +sap_ha_pacemaker_cluster_hana_topology_resource_name: "SAPHanaTopology_{{ sap_ha_pacemaker_cluster_hana_sid }}_{{ sap_ha_pacemaker_cluster_hana_instance_number }}" +sap_ha_pacemaker_cluster_hana_topology_resource_clone_name: "{{ sap_ha_pacemaker_cluster_hana_topology_resource_name }}-clone" # TODO: network interface name used for client access -sap_ha_cluster_vip_client_interface: eth0 -sap_ha_cluster_vip_update_rt: [] +sap_ha_pacemaker_cluster_vip_client_interface: eth0 +sap_ha_pacemaker_cluster_vip_update_rt: [] diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_cluster/meta/argument_specs.yml index 23aeecc30..079551470 100644 --- a/roles/sap_ha_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_cluster/meta/argument_specs.yml @@ -14,7 +14,7 @@ argument_specs: # Add content and remove placeholders that are not needed. # Ideally sort by key (variable name) alphabetically. # -# sap_ha_cluster_ +# sap_ha_pacemaker_cluster_ # default: # description: # - @@ -75,48 +75,48 @@ argument_specs: required: true type: str - sap_ha_cluster_aws_region: + sap_ha_pacemaker_cluster_aws_region: description: - The AWS region in which the instances to be used for the cluster setup are located. - Required for cluster nodes setup on Amazon cloud. required: false type: str - sap_ha_cluster_aws_access_key_id: + sap_ha_pacemaker_cluster_aws_access_key_id: description: - AWS access key to allow control of instances (for example for fencing operations). - Required for cluster nodes setup on Amazon cloud. required: false type: str - sap_ha_cluster_aws_secret_access_key: + sap_ha_pacemaker_cluster_aws_secret_access_key: description: - AWS secret key, paired with the access key for instance control. - Required for cluster nodes setup on Amazon cloud. required: false type: str - sap_ha_cluster_create_config_dest: + sap_ha_pacemaker_cluster_create_config_dest: default: _resource_config.yml description: - The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory. - - Requires `sap_ha_cluster_create_config_varfile` to be enabled for generating the output file. + - Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file. - Specify a path/filename to save the file in a custom location. - The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role. required: false type: str - sap_ha_cluster_create_config_varfile: + sap_ha_pacemaker_cluster_create_config_varfile: default: false description: - When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format. - - This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_cluster' role. + - This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role. - When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes. - WARNING! This report may include sensitive details like secrets required for certain cluster resources! required: false type: bool - sap_ha_cluster_fence_options: + sap_ha_pacemaker_cluster_fence_options: description: - STONITH resource common parameters that apply to most fencing agents. - These options are applied to fencing resources this role uses automatically for pre-defined platforms (like AWS EC2, IBM Cloud VPC). @@ -148,14 +148,20 @@ argument_specs: required: false type: int - sap_ha_cluster_hana_automated_register: + example: + sap_ha_pacemaker_cluster_fence_options: + pcmk_reboot_retries: 4 + pcmk_reboot_timeout: 400 + power_timeout: 240 + + sap_ha_pacemaker_cluster_hana_automated_register: default: true description: - Define if a former primary should be re-registered automatically as secondary. required: false type: bool - sap_ha_cluster_hana_duplicate_primary_timeout: + sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout: default: 900 description: - Time difference needed between to primary time stamps, if a dual-primary situation occurs. @@ -164,7 +170,7 @@ argument_specs: required: false type: int - sap_ha_cluster_hana_prefer_site_takeover: + sap_ha_pacemaker_cluster_hana_prefer_site_takeover: choices: - true - false @@ -175,35 +181,35 @@ argument_specs: required: false type: bool - sap_ha_cluster_hana_resource_name: + sap_ha_pacemaker_cluster_hana_resource_name: default: "SAPHana__" description: - Customize the cluster resource name of the SAP HANA DB resource. required: false type: str - sap_ha_cluster_hana_topology_resource_name: + sap_ha_pacemaker_cluster_hana_topology_resource_name: default: "SAPHanaTopology__" description: - Customize the cluster resource name of the SAP HANA Topology resource. required: false type: str - sap_ha_cluster_ibmcloud_api_key: + sap_ha_pacemaker_cluster_ibmcloud_api_key: description: - The API key is required to allow control of instances (for example for fencing operations). - Required for cluster nodes setup in IBM Cloud VPC. required: false type: str - sap_ha_cluster_ibmcloud_region: + sap_ha_pacemaker_cluster_ibmcloud_region: description: - The cloud region key in which the instances are running. - Required for cluster nodes setup in IBM Cloud VPC. required: false type: str - sap_ha_cluster_replication_type: + sap_ha_pacemaker_cluster_replication_type: choices: - mtr - none @@ -214,7 +220,7 @@ argument_specs: required: false type: str - sap_ha_cluster_sap_type: + sap_ha_pacemaker_cluster_sap_type: choices: - scaleup - scaleout @@ -225,7 +231,7 @@ argument_specs: required: false type: str - sap_ha_cluster_vip_client_interface: + sap_ha_pacemaker_cluster_vip_client_interface: default: eth0 description: - OS device name of the network interface to use for the Virtual IP configuration. @@ -233,14 +239,14 @@ argument_specs: required: false type: str - sap_ha_cluster_vip_resource_name: + sap_ha_pacemaker_cluster_vip_resource_name: default: "vip__" description: - Customize the name of the resource managing the Virtual IP. required: false type: str - sap_ha_cluster_vip_update_rt: + sap_ha_pacemaker_cluster_vip_update_rt: description: - List one more routing table IDs for managing Virtual IP failover through routing table changes. - Required for VIP configuration in AWS EC2 environments. diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 179c2e69a..89bbc8534 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -5,50 +5,50 @@ ### Take the following template to add additional parameters to be inherited: # - name: "SAP HA Cluster - Register ha_cluster_" # ansible.builtin.set_fact: -# __sap_ha_cluster_: "{{ ha_cluster_ }}" +# __sap_ha_pacemaker_cluster_: "{{ ha_cluster_ }}" # when: ha_cluster_ is defined - name: "SAP HA Cluster - Register ha_cluster_cluster_properties" when: ha_cluster_cluster_properties is defined ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" + __sap_ha_pacemaker_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" - name: "SAP HA Cluster - Register ha_cluster_constraints_colocation" when: ha_cluster_constraints_colocation is defined ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" + __sap_ha_pacemaker_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" - name: "SAP HA Cluster - Register ha_cluster_constraints_location" when: ha_cluster_constraints_location is defined ansible.builtin.set_fact: - __sap_ha_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" + __sap_ha_pacemaker_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" - name: "SAP HA Cluster - Register ha_cluster_constraints_order" when: ha_cluster_constraints_order is defined ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" + __sap_ha_pacemaker_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" - name: "SAP HA Cluster - Register ha_cluster_fence_agent_packages" when: ha_cluster_fence_agent_packages is defined ansible.builtin.set_fact: - __sap_ha_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" + __sap_ha_pacemaker_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" - name: "SAP HA Cluster - Register ha_cluster_repos" when: ha_cluster_repos is defined ansible.builtin.set_fact: - __sap_ha_cluster_repos: "{{ ha_cluster_repos }}" + __sap_ha_pacemaker_cluster_repos: "{{ ha_cluster_repos }}" - name: "SAP HA Cluster - Register ha_cluster_resource_clones" when: ha_cluster_resource_clones is defined ansible.builtin.set_fact: - __sap_ha_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" + __sap_ha_pacemaker_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" - name: "SAP HA Cluster - Register ha_cluster_resource_groups" when: ha_cluster_resource_groups is defined ansible.builtin.set_fact: - __sap_ha_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" + __sap_ha_pacemaker_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" - name: "SAP HA Cluster - Register ha_cluster_resource_primitives" when: ha_cluster_resource_primitives is defined ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml index c1ca6e733..d8760b893 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml @@ -28,25 +28,25 @@ when: - ansible_system_vendor == 'Amazon EC2' ansible.builtin.set_fact: - __sap_ha_cluster_platform: vm_aws_ec2 + __sap_ha_pacemaker_cluster_platform: vm_aws_ec2 - name: "SAP HA Cluster - Check if platform is IBM VPC VM" when: - ansible_chassis_asset_tag == 'ibmcloud' ansible.builtin.set_fact: - __sap_ha_cluster_platform: vm_ibmcloud + __sap_ha_pacemaker_cluster_platform: vm_ibmcloud # Call tasks to discover information that is needed as input for any further steps. # Run this before including the platform vars in order to build vars based on the # discovered data. - name: "SAP HA Cluster - Include platform specific information collection" - when: __sap_ha_cluster_platform_info is file + when: __sap_ha_pacemaker_cluster_platform_info is file ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "platform/register_sysinfo_{{ __sap_ha_cluster_platform }}.yml" + - "platform/register_sysinfo_{{ __sap_ha_pacemaker_cluster_platform }}.yml" vars: - __sap_ha_cluster_platform_info: "{{ role_path }}/tasks/{{ item }}" + __sap_ha_pacemaker_cluster_platform_info: "{{ role_path }}/tasks/{{ item }}" - name: "SAP HA Cluster - Include platform specific variables" ansible.builtin.import_tasks: platform/include_vars_platform.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml index 5d5e2f344..0248072d3 100644 --- a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml @@ -15,7 +15,7 @@ when: - ansible_play_hosts|length == 2 ansible.builtin.set_fact: - sap_ha_cluster_sap_type: scaleup + sap_ha_pacemaker_cluster_sap_type: scaleup - name: "SAP HA Cluster - Include HANA specific variables" ansible.builtin.import_tasks: include_vars_saphana.yml diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_cluster/tasks/configure_srhook.yml index 699f7ab8c..529d6710c 100644 --- a/roles/sap_ha_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_cluster/tasks/configure_srhook.yml @@ -1,27 +1,27 @@ --- - name: "SAP HA Cluster - Create srHook shared directory" ansible.builtin.file: - path: "{{ sap_ha_cluster_hadr_provider_path }}" + path: "{{ sap_ha_pacemaker_cluster_hadr_provider_path }}" state: directory mode: "0755" - owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" + owner: "{{ sap_ha_pacemaker_cluster_hana_sid | lower }}adm" group: sapsys - name: "SAP HA Cluster - Copy srHook to shared directory" ansible.builtin.copy: remote_src: true src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py - dest: "{{ sap_ha_cluster_hadr_provider_path }}/{{ sap_ha_cluster_hadr_provider_name }}.py" + dest: "{{ sap_ha_pacemaker_cluster_hadr_provider_path }}/{{ sap_ha_pacemaker_cluster_hadr_provider_name }}.py" mode: "0755" - owner: "{{ sap_ha_cluster_hana_sid | lower }}adm" + owner: "{{ sap_ha_pacemaker_cluster_hana_sid | lower }}adm" group: sapsys # Do not run in check mode because the path is created in the previous step when: not ansible_check_mode - name: "SAP HA Cluster - Check global.ini for 'ha_dr_saphanasr'" ansible.builtin.shell: | - grep ha_dr_saphanasr /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini - register: __sap_ha_cluster_srhook_trace_global + grep ha_dr_saphanasr /usr/sap/{{ sap_ha_pacemaker_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini + register: __sap_ha_pacemaker_cluster_srhook_trace_global failed_when: false # This command should always run, even in check mode. # It never does a change, but the return code is required for the next task. @@ -30,17 +30,17 @@ - name: "SAP HA Cluster - Update srHook in global.ini" ansible.builtin.blockinfile: - path: /usr/sap/{{ sap_ha_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini + path: /usr/sap/{{ sap_ha_pacemaker_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini marker: "" block: | - [ha_dr_provider_{{ sap_ha_cluster_hadr_provider_name }}] - provider = {{ sap_ha_cluster_hadr_provider_name }} - path = {{ sap_ha_cluster_hadr_provider_path }} + [ha_dr_provider_{{ sap_ha_pacemaker_cluster_hadr_provider_name }}] + provider = {{ sap_ha_pacemaker_cluster_hadr_provider_name }} + path = {{ sap_ha_pacemaker_cluster_hadr_provider_path }} execution_order = 1 [trace] ha_dr_saphanasr = info - when: __sap_ha_cluster_srhook_trace_global.rc == 1 + when: __sap_ha_pacemaker_cluster_srhook_trace_global.rc == 1 - name: "SAP HA Cluster - Add srHook sudo entries" ansible.builtin.template: diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_common.yml index a597378f8..d5e6d909b 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_common.yml @@ -3,27 +3,27 @@ - name: "SAP HA Cluster - Set cluster name" ansible.builtin.set_fact: - __sap_ha_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_cluster_cluster_name) }}" + __sap_ha_pacemaker_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_pacemaker_cluster_cluster_name) }}" - name: "SAP HA Cluster - Register the 'hacluster' user password" ansible.builtin.set_fact: - __sap_ha_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_cluster_hacluster_password) }}" + __sap_ha_pacemaker_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_pacemaker_cluster_hacluster_password) }}" no_log: true - name: "SAP HA Cluster - Combine extra packages lists" ansible.builtin.set_fact: - __sap_ha_cluster_extra_packages: "{{ - sap_ha_cluster_extra_packages + __sap_ha_pacemaker_cluster_extra_packages: "{{ + sap_ha_pacemaker_cluster_extra_packages + - sap_ha_cluster_sap_extra_packages | default([]) + sap_ha_pacemaker_cluster_sap_extra_packages | default([]) + - sap_ha_cluster_platform_extra_packages | default([]) + sap_ha_pacemaker_cluster_platform_extra_packages | default([]) }}" - name: "SAP HA Cluster - Combine fence agent packages lists" ansible.builtin.set_fact: - __sap_ha_cluster_fence_agent_packages: "{{ - sap_ha_cluster_fence_agent_packages + __sap_ha_pacemaker_cluster_fence_agent_packages: "{{ + sap_ha_pacemaker_cluster_fence_agent_packages + - __sap_ha_cluster_fence_agent_packages + __sap_ha_pacemaker_cluster_fence_agent_packages }}" diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml index 09b9b00d6..bf9adce99 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml @@ -11,17 +11,17 @@ - name: "SAP HA Cluster - Add resource: SAP HANA Topology" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_topology] }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_topology] }}" vars: __resource_topology: - id: "{{ sap_ha_cluster_hana_topology_resource_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_topology_resource_name }}" agent: "ocf:heartbeat:SAPHanaTopology" instance_attrs: - attrs: - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" + value: "{{ sap_ha_pacemaker_cluster_hana_sid }}" - name: InstanceNumber - value: "{{ sap_ha_cluster_hana_instance_number }}" + value: "{{ sap_ha_pacemaker_cluster_hana_instance_number }}" operations: - action: start attrs: @@ -38,27 +38,27 @@ - name: timeout value: 600 when: - - __resource_topology.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) + - __resource_topology.agent not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='agent')) - name: "SAP HA Cluster - Add resource: SAP HANA DB" ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_hana] }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_hana] }}" vars: __resource_hana: - id: "{{ sap_ha_cluster_hana_resource_name }}" - agent: "ocf:heartbeat:{{ sap_ha_cluster_ra_hana }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_name }}" + agent: "ocf:heartbeat:{{ sap_ha_pacemaker_cluster_ra_hana }}" instance_attrs: - attrs: - name: SID - value: "{{ sap_ha_cluster_hana_sid }}" + value: "{{ sap_ha_pacemaker_cluster_hana_sid }}" - name: InstanceNumber - value: "{{ sap_ha_cluster_hana_instance_number }}" + value: "{{ sap_ha_pacemaker_cluster_hana_instance_number }}" - name: AUTOMATED_REGISTER - value: "{{ sap_ha_cluster_hana_automated_register | string }}" + value: "{{ sap_ha_pacemaker_cluster_hana_automated_register | string }}" - name: DUPLICATE_PRIMARY_TIMEOUT - value: "{{ sap_ha_cluster_hana_duplicate_primary_timeout | string }}" + value: "{{ sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout | string }}" - name: PREFER_SITE_TAKEOVER - value: "{{ sap_ha_cluster_hana_prefer_site_takeover | string }}" + value: "{{ sap_ha_pacemaker_cluster_hana_prefer_site_takeover | string }}" operations: - action: start attrs: @@ -93,14 +93,14 @@ - name: timeout value: 3600 when: - - __resource_hana.agent not in (__sap_ha_cluster_resource_primitives | map(attribute='agent')) + - __resource_hana.agent not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='agent')) - name: "SAP HA Cluster - Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: - __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_topology] }}" + __sap_ha_pacemaker_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones + [__clone_topology] }}" vars: __clone_topology: - resource_id: "{{ sap_ha_cluster_hana_topology_resource_name }}" + resource_id: "{{ sap_ha_pacemaker_cluster_hana_topology_resource_name }}" promotable: "no" meta_attrs: - attrs: @@ -111,14 +111,14 @@ - name: interleave value: "true" when: - - __clone_topology.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) + - __clone_topology.resource_id not in (__sap_ha_pacemaker_cluster_resource_clones | map(attribute='resource_id')) - name: "SAP HA Cluster - Add resource clone: SAP HANA DB" ansible.builtin.set_fact: - __sap_ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones + [__clone_hana] }}" + __sap_ha_pacemaker_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones + [__clone_hana] }}" vars: __clone_hana: - resource_id: "{{ sap_ha_cluster_hana_resource_name }}" + resource_id: "{{ sap_ha_pacemaker_cluster_hana_resource_name }}" promotable: "yes" meta_attrs: - attrs: @@ -129,22 +129,22 @@ - name: interleave value: "true" when: - - __clone_hana.resource_id not in (__sap_ha_cluster_resource_clones | map(attribute='resource_id')) + - __clone_hana.resource_id not in (__sap_ha_pacemaker_cluster_resource_clones | map(attribute='resource_id')) # First start Topology, then HANA (automatically stops in reverse order) - name: "SAP HA Cluster - Add order constraint: Topology starts before DB" ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_topology] }}" + __sap_ha_pacemaker_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + [__constraint_order_topology] }}" vars: __constraint_order_topology: resource_first: - id: "{{ sap_ha_cluster_hana_topology_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_topology_resource_clone_name }}" action: start resource_then: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: start options: - name: symmetrical value: "false" when: - - __constraint_order_topology.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) + - __constraint_order_topology.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml index 15b594dea..5bfe1b91e 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml @@ -5,9 +5,9 @@ - name: "SAP HA Cluster - Define cluster properties" when: - item.name not in - (__sap_ha_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + (__sap_ha_pacemaker_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) ansible.builtin.set_fact: - __sap_ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties + [{'attr': item}] }}" + __sap_ha_pacemaker_cluster_cluster_properties: "{{ __sap_ha_pacemaker_cluster_cluster_properties + [{'attr': item}] }}" loop_control: label: "{{ item.name }}" loop: @@ -25,25 +25,25 @@ - name: "SAP HA Cluster - Assemble the stonith resource definition" ansible.builtin.set_fact: - sap_ha_cluster_stonith_resource: - - id: "res_{{ sap_ha_cluster_stonith_required.agent | split(':') | last }}" - agent: "{{ sap_ha_cluster_stonith_required.agent }}" + sap_ha_pacemaker_cluster_stonith_resource: + - id: "res_{{ sap_ha_pacemaker_cluster_stonith_required.agent | split(':') | last }}" + agent: "{{ sap_ha_pacemaker_cluster_stonith_required.agent }}" instance_attrs: - attrs: |- {% set attrs = [] -%} {% set map = attrs.extend([ { 'name': 'pcmk_host_map', - 'value': '"' + __sap_ha_cluster_pcmk_host_map + '"' + 'value': '"' + __sap_ha_pacemaker_cluster_pcmk_host_map + '"' }]) -%} - {%- for agent_opt in (sap_ha_cluster_stonith_required.options | dict2items) -%} + {%- for agent_opt in (sap_ha_pacemaker_cluster_stonith_required.options | dict2items) -%} {% set aopts = attrs.extend([ { 'name': agent_opt.key, 'value': agent_opt.value }]) -%} {%- endfor %} - {%- for fence_opt in (sap_ha_cluster_fence_options | dict2items) -%} + {%- for fence_opt in (sap_ha_pacemaker_cluster_fence_options | dict2items) -%} {% set fopts = attrs.extend([ { 'name': fence_opt.key, @@ -55,7 +55,7 @@ # The STONITH resource is an element in the cluster_resource_primitives list - name: "SAP HA Cluster - Construct stonith resources definition" when: - - sap_ha_cluster_stonith_resource is defined + - sap_ha_pacemaker_cluster_stonith_resource is defined ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + (sap_ha_cluster_stonith_resource | from_yaml) }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + (sap_ha_pacemaker_cluster_stonith_resource | from_yaml) }}" no_log: true # stonith resources usually contain secrets diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml index 2751fb5ca..ab033ff34 100644 --- a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml +++ b/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml @@ -4,13 +4,13 @@ # VIP resource definition itself - name: "SAP HA Cluster - Add resource: VIP {{ vip_list_item.key }}" when: - - sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) + - sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ sap_ha_cluster_vip_resource_agent }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "{{ sap_ha_pacemaker_cluster_vip_resource_agent }}" instance_attrs: - attrs: - name: ip @@ -19,33 +19,33 @@ # Start the VIP(s) only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" when: - - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - - vip_list_item.key in __sap_ha_cluster_primary_synonyms + - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + __sap_ha_pacemaker_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + [__constraint_order_vip] }}" vars: __constraint_order_vip: resource_first: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: promote resource_then: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" action: start # The VIP only runs where HANA is promoted - name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) - - vip_list_item.key in __sap_ha_cluster_primary_synonyms + - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + __sap_ha_pacemaker_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: __constraint_colo_vip: resource_leader: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" role: promoted resource_follower: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" options: - name: score value: 2000 diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml index 3c74605c3..1f53f548b 100644 --- a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml @@ -4,20 +4,20 @@ - name: "SAP HA Cluster - Include variable construction for standard VIP resources" when: - - __sap_ha_cluster_platform not in __sap_ha_cluster_supported_platforms + - __sap_ha_pacemaker_cluster_platform not in __sap_ha_pacemaker_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') ansible.builtin.include_tasks: construct_vars_vip_resources_default.yml - loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" + loop: "{{ query('dict', sap_ha_pacemaker_cluster_vip_address) }}" loop_control: index_var: loop_index loop_var: vip_list_item - name: "SAP HA Cluster - Include variable construction for platform VIP resources" when: - - __sap_ha_cluster_platform in __sap_ha_cluster_supported_platforms + - __sap_ha_pacemaker_cluster_platform in __sap_ha_pacemaker_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') - ansible.builtin.include_tasks: "platform/construct_vars_vip_resources_{{ __sap_ha_cluster_platform }}.yml" - loop: "{{ query('dict', sap_ha_cluster_vip_address) }}" + ansible.builtin.include_tasks: "platform/construct_vars_vip_resources_{{ __sap_ha_pacemaker_cluster_platform }}.yml" + loop: "{{ query('dict', sap_ha_pacemaker_cluster_vip_address) }}" loop_control: index_var: loop_index loop_var: vip_list_item diff --git a/roles/sap_ha_cluster/tasks/include_vars_common.yml b/roles/sap_ha_cluster/tasks/include_vars_common.yml index 45ec36ef5..0f62f9dca 100644 --- a/roles/sap_ha_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_cluster/tasks/include_vars_common.yml @@ -3,15 +3,15 @@ - name: "SAP HA Cluster - Collect required facts" when: - not ansible_facts.keys() | list | - intersect(__sap_ha_cluster_required_facts) == __sap_ha_cluster_required_facts + intersect(__sap_ha_pacemaker_cluster_required_facts) == __sap_ha_pacemaker_cluster_required_facts ansible.builtin.setup: gather_subset: hardware,interfaces # Include vars files based on the environment. # Respect order for potential variable precedence. - name: "SAP HA Cluster - Include environment specific variables" - when: __sap_ha_cluster_vars_file is file - ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + when: __sap_ha_pacemaker_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: - "{{ ansible_os_family | lower }}.yml" - "{{ ansible_distribution | lower }}.yml" @@ -22,4 +22,4 @@ {{ ansible_distribution | lower ~ '_' ~ ansible_distribution_version }}.yml vars: - __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + __sap_ha_pacemaker_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/include_vars_saphana.yml b/roles/sap_ha_cluster/tasks/include_vars_saphana.yml index d621e182d..5a02dc9ec 100644 --- a/roles/sap_ha_cluster/tasks/include_vars_saphana.yml +++ b/roles/sap_ha_cluster/tasks/include_vars_saphana.yml @@ -1,9 +1,9 @@ --- - name: "SAP HA Cluster - Include HANA landscape specific variables" - when: __sap_ha_cluster_vars_file is file - ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + when: __sap_ha_pacemaker_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: - - "saphana_{{ sap_ha_cluster_sap_type }}.yml" - - "saphana_{{ sap_ha_cluster_replication_type }}.yml" + - "saphana_{{ sap_ha_pacemaker_cluster_sap_type }}.yml" + - "saphana_{{ sap_ha_pacemaker_cluster_replication_type }}.yml" vars: - __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + __sap_ha_pacemaker_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_cluster/tasks/main.yml index 463046115..90a342d79 100644 --- a/roles/sap_ha_cluster/tasks/main.yml +++ b/roles/sap_ha_cluster/tasks/main.yml @@ -48,12 +48,12 @@ ansible.builtin.import_tasks: construct_vars_hana_common.yml - name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-up" - when: sap_ha_cluster_sap_type == 'scaleup' + when: sap_ha_pacemaker_cluster_sap_type == 'scaleup' ansible.builtin.include_tasks: file: construct_vars_hana_scaleup.yml - name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-out" - when: sap_ha_cluster_sap_type == 'scaleout' + when: sap_ha_pacemaker_cluster_sap_type == 'scaleout' ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml @@ -62,13 +62,13 @@ # Start with prerequisite changes for certain platforms, if applicable - name: "SAP HA Cluster - Include platform specific prerequisites" - when: __sap_ha_cluster_platform_file is file + when: __sap_ha_pacemaker_cluster_platform_file is file ansible.builtin.include_tasks: file: "{{ item }}" loop: - - "platform/preconfigure_{{ __sap_ha_cluster_platform }}.yml" + - "platform/preconfigure_{{ __sap_ha_pacemaker_cluster_platform }}.yml" vars: - __sap_ha_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" + __sap_ha_pacemaker_cluster_platform_file: "{{ role_path }}/tasks/{{ item }}" # Before we are ready to call the ha_cluster role, we want to validate # that the minimum required parameters are defined and not empty. @@ -76,29 +76,29 @@ - name: "SAP HA Cluster - Validate parameters for 'ha_cluster' role input" ansible.builtin.assert: that: - - __sap_ha_cluster_cluster_properties is defined - - __sap_ha_cluster_extra_packages is defined - - __sap_ha_cluster_resource_primitives is defined - - __sap_ha_cluster_resource_clones is defined - - __sap_ha_cluster_constraints_order is defined - - __sap_ha_cluster_constraints_colocation is defined + - __sap_ha_pacemaker_cluster_cluster_properties is defined + - __sap_ha_pacemaker_cluster_extra_packages is defined + - __sap_ha_pacemaker_cluster_resource_primitives is defined + - __sap_ha_pacemaker_cluster_resource_clones is defined + - __sap_ha_pacemaker_cluster_constraints_order is defined + - __sap_ha_pacemaker_cluster_constraints_colocation is defined fail_msg: "Cluster build parameter construction has failed for this parameter." - name: "SAP HA Cluster - Query if CIB already exists" ansible.builtin.command: cmd: cibadmin --query - register: __sap_ha_cluster_cib_query + register: __sap_ha_pacemaker_cluster_cib_query check_mode: false changed_when: false failed_when: false - name: "SAP HA Cluster - Create backup of existing CIB" when: - - __sap_ha_cluster_cib_query.stdout is defined - - __sap_ha_cluster_cib_query.stdout|length > 0 + - __sap_ha_pacemaker_cluster_cib_query.stdout is defined + - __sap_ha_pacemaker_cluster_cib_query.stdout|length > 0 ansible.builtin.copy: # noqa template-instead-of-copy backup: true - content: "{{ __sap_ha_cluster_cib_query.stdout }}" + content: "{{ __sap_ha_pacemaker_cluster_cib_query.stdout }}" dest: /root/cib_backup.xml group: root owner: root @@ -114,18 +114,18 @@ no_log: true # some parameters contain secrets no_log: true # some parameters contain secrets vars: - __ha_cluster_repos: "{{ __sap_ha_cluster_repos }}" - ha_cluster_cluster_name: "{{ __sap_ha_cluster_cluster_name }}" - ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order }}" - ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation }}" - ha_cluster_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" - ha_cluster_extra_packages: "{{ __sap_ha_cluster_extra_packages }}" - ha_cluster_fence_agent_packages: "{{ __sap_ha_cluster_fence_agent_packages }}" - ha_cluster_hacluster_password: "{{ __sap_ha_cluster_hacluster_password }}" - ha_cluster_properties: "{{ __sap_ha_cluster_cluster_properties }}" - ha_cluster_resource_clones: "{{ __sap_ha_cluster_resource_clones }}" - ha_cluster_resource_groups: "{{ __sap_ha_cluster_resource_groups }}" - ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives }}" + __ha_cluster_repos: "{{ __sap_ha_pacemaker_cluster_repos }}" + ha_cluster_cluster_name: "{{ __sap_ha_pacemaker_cluster_cluster_name }}" + ha_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order }}" + ha_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation }}" + ha_cluster_cluster_properties: "{{ __sap_ha_pacemaker_cluster_cluster_properties }}" + ha_cluster_extra_packages: "{{ __sap_ha_pacemaker_cluster_extra_packages }}" + ha_cluster_fence_agent_packages: "{{ __sap_ha_pacemaker_cluster_fence_agent_packages }}" + ha_cluster_hacluster_password: "{{ __sap_ha_pacemaker_cluster_hacluster_password }}" + ha_cluster_properties: "{{ __sap_ha_pacemaker_cluster_cluster_properties }}" + ha_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones }}" + ha_cluster_resource_groups: "{{ __sap_ha_pacemaker_cluster_resource_groups }}" + ha_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives }}" tags: ha_cluster # Resource defaults can currently not be updated through ha_cluster @@ -133,17 +133,17 @@ - name: "SAP HA Cluster - Check resource defaults" ansible.builtin.command: cmd: pcs resource defaults config - register: __sap_ha_cluster_check_resource_defaults + register: __sap_ha_pacemaker_cluster_check_resource_defaults run_once: true changed_when: false check_mode: false - name: "SAP HA Cluster - Update resource default attributes" when: - - item.name ~ '=' ~ item.value not in __sap_ha_cluster_check_resource_defaults.stdout + - item.name ~ '=' ~ item.value not in __sap_ha_pacemaker_cluster_check_resource_defaults.stdout ansible.builtin.command: cmd: pcs resource defaults update {{ item.name }}={{ item.value }} - loop: "{{ sap_ha_cluster_resource_defaults }}" + loop: "{{ sap_ha_pacemaker_cluster_resource_defaults }}" run_once: true - name: "SAP HA Cluster - Include srHook configuration" @@ -167,10 +167,10 @@ # their user provided variables? - name: "SAP HA Cluster - Create cluster configuration parameters file" - when: sap_ha_cluster_create_config_dest is defined + when: sap_ha_pacemaker_cluster_create_config_dest is defined ansible.builtin.template: backup: true - dest: "{{ sap_ha_cluster_create_config_dest }}" + dest: "{{ sap_ha_pacemaker_cluster_create_config_dest }}" mode: 0600 src: cluster_create_config.j2 trim_blocks: true @@ -181,11 +181,11 @@ check_mode: false - name: "SAP HA Cluster - Display configuration parameters SAVE FILE location" - when: sap_ha_cluster_create_config_varfile + when: sap_ha_pacemaker_cluster_create_config_varfile ansible.builtin.debug: msg: | The cluster resource configuration parameters have been saved here: - >>>>> {{ sap_ha_cluster_create_config_dest }} <<<<< + >>>>> {{ sap_ha_pacemaker_cluster_create_config_dest }} <<<<< Please include these variable definitions if you run the 'ha_cluster' linux system role separately. diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml index aec75ba22..49001885e 100644 --- a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml @@ -3,17 +3,17 @@ - name: "SAP HA Cluster - Add resource: OS floating IP (dev/test only)" when: - - sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) - - (sap_ha_cluster_vip_strategy == 'ipaddr') or - (__sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].with is defined and - 'ipaddr' in __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].with) + - sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) + - (sap_ha_pacemaker_cluster_vip_strategy == 'ipaddr') or + (__sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].with is defined and + 'ipaddr' in __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].with) ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" - __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" vars: __resource_vip: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" instance_attrs: - attrs: - name: ip @@ -21,14 +21,14 @@ - name: "SAP HA Cluster - Add resource: AWS floating IP (dev/test only)" when: - - ('pri' ~ sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) - - sap_ha_cluster_vip_strategy == 'awsvip' + - ('pri' ~ sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) + - sap_ha_pacemaker_cluster_vip_strategy == 'awsvip' ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: - id: "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" + id: "pri{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" instance_attrs: - attrs: - name: secondary_private_ip @@ -36,68 +36,68 @@ - name: "SAP HA Cluster - Add resource group for VIP resources" when: - - __vip_group.id is not in (__sap_ha_cluster_resource_groups | map(attribute='id')) - - sap_ha_cluster_vip_strategy in ['awsvip'] + - __vip_group.id is not in (__sap_ha_pacemaker_cluster_resource_groups | map(attribute='id')) + - sap_ha_pacemaker_cluster_vip_strategy in ['awsvip'] ansible.builtin.set_fact: - __sap_ha_cluster_resource_groups: "{{ __sap_ha_cluster_resource_groups + [__vip_group] }}" - __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + __sap_ha_pacemaker_cluster_resource_groups: "{{ __sap_ha_pacemaker_cluster_resource_groups + [__vip_group] }}" + __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" vars: __vip_group: - id: "{{ sap_ha_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" resource_ids: - - "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - - "pri{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + - "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + - "pri{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - name: "SAP HA Cluster - Add resource: AWS VIP routing" when: - - (sap_ha_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_cluster_resource_primitives | map(attribute='id')) - - sap_ha_cluster_vip_strategy == 'aws_vpc_move_ip' + - (sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) + - sap_ha_pacemaker_cluster_vip_strategy == 'aws_vpc_move_ip' ansible.builtin.set_fact: - __sap_ha_cluster_resource_primitives: "{{ __sap_ha_cluster_resource_primitives + [__resource_vip] }}" - __sap_ha_cluster_vip_contraint_id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" + __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" vars: __resource_vip: - id: "{{ sap_ha_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_cluster_available_vip_agents[sap_ha_cluster_vip_strategy].agent }}" + id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" instance_attrs: - attrs: - name: ip value: "{{ vip_list_item.value }}" - name: interface - value: "{{ sap_ha_cluster_vip_client_interface }}" + value: "{{ sap_ha_pacemaker_cluster_vip_client_interface }}" - name: routing_table - value: "{{ sap_ha_cluster_vip_update_rt | join(',') }}" + value: "{{ sap_ha_pacemaker_cluster_vip_update_rt | join(',') }}" # Start the VIP(s) only after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" when: - - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - - vip_list_item.key in __sap_ha_cluster_primary_synonyms + - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + __sap_ha_pacemaker_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + [__constraint_order_vip] }}" vars: __constraint_order_vip: resource_first: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: promote resource_then: - id: "{{ __sap_ha_cluster_vip_contraint_id }}" + id: "{{ __sap_ha_pacemaker_cluster_vip_contraint_id }}" action: start # The VIP only runs where HANA is promoted - name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) - - vip_list_item.key in __sap_ha_cluster_primary_synonyms + - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + __sap_ha_pacemaker_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: __constraint_colo_vip: resource_leader: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" role: promoted resource_follower: - id: "{{ __sap_ha_cluster_vip_contraint_id }}" + id: "{{ __sap_ha_pacemaker_cluster_vip_contraint_id }}" options: - name: score value: 2000 @@ -105,33 +105,33 @@ # Start the secondary VIP after the HANA resource has been promoted - name: "SAP HA Cluster - Add order constraint: Read-only VIP starts after DB is promoted" when: - - __constraint_order_vip.resource_then not in (__sap_ha_cluster_constraints_order | map(attribute='resource_then')) - - vip_list_item.key in __sap_ha_cluster_secondary_synonyms + - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_secondary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_order: "{{ __sap_ha_cluster_constraints_order + [__constraint_order_vip] }}" + __sap_ha_pacemaker_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + [__constraint_order_vip] }}" vars: __constraint_order_vip: resource_first: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: promote resource_then: - id: "{{ __sap_ha_cluster_vip_contraint_id }}" + id: "{{ __sap_ha_pacemaker_cluster_vip_contraint_id }}" action: start # The secondary VIP only runs where HANA is UNpromoted - name: "SAP HA Cluster - Add colocation constraint: Read-only VIP runs where HANA is not promoted" when: - - __constraint_colo_vip.resource_follower not in (__sap_ha_cluster_constraints_colocation | map(attribute='resource_follower')) - - vip_list_item.key in __sap_ha_cluster_secondary_synonyms + - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) + - vip_list_item.key in __sap_ha_pacemaker_cluster_secondary_synonyms ansible.builtin.set_fact: - __sap_ha_cluster_constraints_colocation: "{{ __sap_ha_cluster_constraints_colocation + [__constraint_colo_vip] }}" + __sap_ha_pacemaker_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation + [__constraint_colo_vip] }}" vars: __constraint_colo_vip: resource_leader: - id: "{{ sap_ha_cluster_hana_resource_clone_name }}" + id: "{{ sap_ha_pacemaker_cluster_hana_resource_clone_name }}" role: promoted resource_follower: - id: "{{ __sap_ha_cluster_vip_contraint_id }}" + id: "{{ __sap_ha_pacemaker_cluster_vip_contraint_id }}" options: - name: score value: 2000 diff --git a/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml b/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml index 9027eb686..52719920f 100644 --- a/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml +++ b/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml @@ -1,9 +1,9 @@ --- # Include vars files based on the environment. - name: "SAP HA Cluster - Include platform specific variables" - when: __sap_ha_cluster_vars_file is file - ansible.builtin.include_vars: "{{ __sap_ha_cluster_vars_file }}" + when: __sap_ha_pacemaker_cluster_vars_file is file + ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: - - "platform_{{ __sap_ha_cluster_platform }}.yml" + - "platform_{{ __sap_ha_pacemaker_cluster_platform }}.yml" vars: - __sap_ha_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + __sap_ha_pacemaker_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml b/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml index 5fba15260..5b3421a30 100644 --- a/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml @@ -13,7 +13,7 @@ backup: true block: | [default] - region = {{ sap_ha_cluster_aws_region }} + region = {{ sap_ha_pacemaker_cluster_aws_region }} create: true mode: 0600 owner: root @@ -24,8 +24,8 @@ backup: true block: | [default] - aws_access_key_id = {{ sap_ha_cluster_aws_access_key_id }} - aws_secret_access_key = {{ sap_ha_cluster_aws_secret_access_key }} + aws_access_key_id = {{ sap_ha_pacemaker_cluster_aws_access_key_id }} + aws_secret_access_key = {{ sap_ha_pacemaker_cluster_aws_secret_access_key }} create: true mode: 0600 owner: root @@ -35,7 +35,7 @@ # pcmk_host_map format: :;:... - name: "SAP HA Cluster - Assemble host mapping" ansible.builtin.set_fact: - __sap_ha_cluster_pcmk_host_map: > + __sap_ha_pacemaker_cluster_pcmk_host_map: > {% for node in ansible_play_hosts_all -%} {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].ansible_board_asset_tag }} {%- if not loop.last %}; diff --git a/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml b/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml index 2cafb81a9..16a83eb47 100644 --- a/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml +++ b/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml @@ -4,15 +4,15 @@ - name: "SAP HA Cluster - Register instance ID" ansible.builtin.shell: | dmidecode -s system-family - register: __sap_ha_cluster_register_ibmcloud_instance + register: __sap_ha_pacemaker_cluster_register_ibmcloud_instance changed_when: false check_mode: false - name: "SAP HA Cluster - Assemble host mapping" ansible.builtin.set_fact: - __sap_ha_cluster_pcmk_host_map: >- + __sap_ha_pacemaker_cluster_pcmk_host_map: >- {% for node in ansible_play_hosts_all -%} - {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].__sap_ha_cluster_register_ibmcloud_instance.stdout }} + {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].__sap_ha_pacemaker_cluster_register_ibmcloud_instance.stdout }} {%- if not loop.last %}; {%- endif %} {% endfor %} diff --git a/roles/sap_ha_cluster/tasks/validate_input_parameters.yml b/roles/sap_ha_cluster/tasks/validate_input_parameters.yml index 69d883eb5..54ba06b87 100644 --- a/roles/sap_ha_cluster/tasks/validate_input_parameters.yml +++ b/roles/sap_ha_cluster/tasks/validate_input_parameters.yml @@ -4,6 +4,6 @@ - name: "SAP HA Cluster - Validate SAP System ID" ansible.builtin.assert: that: - - sap_ha_cluster_hana_sid is defined - - sap_ha_cluster_hana_sid|length == 3 - - sap_ha_cluster_hana_sid not in __sap_sid_prohibited + - sap_ha_pacemaker_cluster_hana_sid is defined + - sap_ha_pacemaker_cluster_hana_sid|length == 3 + - sap_ha_pacemaker_cluster_hana_sid not in __sap_sid_prohibited diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_cluster/templates/cluster_create_config.j2 index e567d611d..5f35649d0 100644 --- a/roles/sap_ha_cluster/templates/cluster_create_config.j2 +++ b/roles/sap_ha_cluster/templates/cluster_create_config.j2 @@ -5,66 +5,66 @@ # Created by: {{ ansible_role_name }} # The name of the cluster -ha_cluster_cluster_name: {{ __sap_ha_cluster_cluster_name }} +ha_cluster_cluster_name: {{ __sap_ha_pacemaker_cluster_cluster_name }} -{% if __sap_ha_cluster_cluster_properties is defined and __sap_ha_cluster_cluster_properties|length > 0 %} +{% if __sap_ha_pacemaker_cluster_cluster_properties is defined and __sap_ha_pacemaker_cluster_cluster_properties|length > 0 %} # Properties that enable and control cluster behavior ha_cluster_cluster_properties: -{{ __sap_ha_cluster_cluster_properties | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_cluster_properties | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_constraints_colocation is defined and __sap_ha_cluster_constraints_colocation|length > 0 %} +{% if __sap_ha_pacemaker_cluster_constraints_colocation is defined and __sap_ha_pacemaker_cluster_constraints_colocation|length > 0 %} # Definition of resources which depend on other resources ha_cluster_constraints_colocation: -{{ __sap_ha_cluster_constraints_colocation | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_constraints_colocation | to_nice_yaml(indent=2) }} {%- endif -%} -{% if __sap_ha_cluster_constraints_location is defined and __sap_ha_cluster_constraints_location|length > 0 %} +{% if __sap_ha_pacemaker_cluster_constraints_location is defined and __sap_ha_pacemaker_cluster_constraints_location|length > 0 %} # Definition of resources which have specific location dependencies or preferences ha_cluster_constraints_location: -{{ __sap_ha_cluster_constraints_location | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_constraints_location | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_constraints_order is defined and __sap_ha_cluster_constraints_order|length > 0 %} +{% if __sap_ha_pacemaker_cluster_constraints_order is defined and __sap_ha_pacemaker_cluster_constraints_order|length > 0 %} # Definition of an order in which resources must be started. # They are automatically stopped in reverse order. ha_cluster_constraints_order: -{{ __sap_ha_cluster_constraints_order | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_constraints_order | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_extra_packages is defined and __sap_ha_cluster_extra_packages|length > 0 %} +{% if __sap_ha_pacemaker_cluster_extra_packages is defined and __sap_ha_pacemaker_cluster_extra_packages|length > 0 %} # Extra packages that are needed for this HA environment ha_cluster_extra_packages: -{{ __sap_ha_cluster_extra_packages | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_extra_packages | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_fence_agent_packages is defined and __sap_ha_cluster_fence_agent_packages|length > 0 %} +{% if __sap_ha_pacemaker_cluster_fence_agent_packages is defined and __sap_ha_pacemaker_cluster_fence_agent_packages|length > 0 %} # Fence agent package(s) for this HA environment ha_cluster_fence_agent_packages: -{{ __sap_ha_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_fence_agent_packages | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_repos is defined and __sap_ha_cluster_repos|length > 0 %} +{% if __sap_ha_pacemaker_cluster_repos is defined and __sap_ha_pacemaker_cluster_repos|length > 0 %} # Definition of repositories to enable (if disable) to ensure # access to all required packages __ha_cluster_repos: -{{ __sap_ha_cluster_repos | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_repos | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_resource_clones is defined and __sap_ha_cluster_resource_clones|length > 0 %} +{% if __sap_ha_pacemaker_cluster_resource_clones is defined and __sap_ha_pacemaker_cluster_resource_clones|length > 0 %} # Definition of resources that are cloned and monitored on all nodes ha_cluster_resource_clones: -{{ __sap_ha_cluster_resource_clones | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_resource_clones | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_resource_groups is defined and __sap_ha_cluster_resource_groups|length > 0 %} +{% if __sap_ha_pacemaker_cluster_resource_groups is defined and __sap_ha_pacemaker_cluster_resource_groups|length > 0 %} # Definition of resources that are grouped together ha_cluster_resource_groups: -{{ __sap_ha_cluster_resource_groups | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_resource_groups | to_nice_yaml(indent=2) }} {%- endif %} -{% if __sap_ha_cluster_resource_primitives is defined and __sap_ha_cluster_resource_primitives|length > 0 %} +{% if __sap_ha_pacemaker_cluster_resource_primitives is defined and __sap_ha_pacemaker_cluster_resource_primitives|length > 0 %} # Definition of all cluster resources ha_cluster_resource_primitives: -{{ __sap_ha_cluster_resource_primitives | to_nice_yaml(indent=2) }} +{{ __sap_ha_pacemaker_cluster_resource_primitives | to_nice_yaml(indent=2) }} {%- endif %} diff --git a/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 b/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 index ed917e91a..a4f2fe08d 100644 --- a/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 +++ b/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 @@ -5,11 +5,11 @@ # The following are sudo entries which are required for the pacemaker cluster # to update the SAP HANA cluster resource status. -{% for node in sap_ha_cluster_cluster_nodes %} -Cmnd_Alias {{ node.hana_site }}_SOK = /usr/sbin/crm_attribute -n hana_{{ sap_ha_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SOK -t crm_config -s {{ sap_ha_cluster_hadr_provider_name }} -Cmnd_Alias {{ node.hana_site }}_SFAIL = /usr/sbin/crm_attribute -n hana_{{ sap_ha_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SFAIL -t crm_config -s {{ sap_ha_cluster_hadr_provider_name }} +{% for node in sap_ha_pacemaker_cluster_cluster_nodes %} +Cmnd_Alias {{ node.hana_site }}_SOK = /usr/sbin/crm_attribute -n hana_{{ sap_ha_pacemaker_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SOK -t crm_config -s {{ sap_ha_pacemaker_cluster_hadr_provider_name }} +Cmnd_Alias {{ node.hana_site }}_SFAIL = /usr/sbin/crm_attribute -n hana_{{ sap_ha_pacemaker_cluster_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SFAIL -t crm_config -s {{ sap_ha_pacemaker_cluster_hadr_provider_name }} {% endfor %} -{{ sap_ha_cluster_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} +{{ sap_ha_pacemaker_cluster_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_pacemaker_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} -Defaults!{% for node in sap_ha_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} !requiretty +Defaults!{% for node in sap_ha_pacemaker_cluster_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} !requiretty diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_cluster/vars/main.yml index 6f5ae700c..9bd46cbac 100644 --- a/roles/sap_ha_cluster/vars/main.yml +++ b/roles/sap_ha_cluster/vars/main.yml @@ -12,7 +12,7 @@ __sap_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'ARE', 'ASC', 'USE', 'USR', 'VAR'] # ansible_facts required by the role -__sap_ha_cluster_required_facts: +__sap_ha_pacemaker_cluster_required_facts: - architecture # subset: min, hardware - board_asset_tag # subset: hardware - default_ipv4 # subset: interfaces @@ -31,20 +31,20 @@ __sap_ha_cluster_required_facts: # The arguments_spec check complains. # The actual values must be empty, they are set by various tasks! -__sap_ha_cluster_primary_synonyms: +__sap_ha_pacemaker_cluster_primary_synonyms: - primary - main - promoted - rw -__sap_ha_cluster_secondary_synonyms: +__sap_ha_pacemaker_cluster_secondary_synonyms: - secondary - unpromoted - ro # (cloud) platform helper variable - leave empty for default = not cloud -__sap_ha_cluster_platform: '' -__sap_ha_cluster_supported_platforms: +__sap_ha_pacemaker_cluster_platform: '' +__sap_ha_pacemaker_cluster_supported_platforms: - vm_aws_ec2 # ATTENTION: @@ -54,18 +54,18 @@ __sap_ha_cluster_supported_platforms: # - conditionals (if applicable) # - config report template # -__sap_ha_cluster_cluster_name: '' -__sap_ha_cluster_cluster_properties: [] -__sap_ha_cluster_constraints_colocation: [] -__sap_ha_cluster_constraints_location: [] -__sap_ha_cluster_constraints_order: [] -__sap_ha_cluster_extra_packages: [] -__sap_ha_cluster_fence_agent_packages: [] -__sap_ha_cluster_hacluster_password: -__sap_ha_cluster_repos: [] -__sap_ha_cluster_resource_primitives: [] -__sap_ha_cluster_resource_groups: [] -__sap_ha_cluster_resource_clones: [] +__sap_ha_pacemaker_cluster_cluster_name: '' +__sap_ha_pacemaker_cluster_cluster_properties: [] +__sap_ha_pacemaker_cluster_constraints_colocation: [] +__sap_ha_pacemaker_cluster_constraints_location: [] +__sap_ha_pacemaker_cluster_constraints_order: [] +__sap_ha_pacemaker_cluster_extra_packages: [] +__sap_ha_pacemaker_cluster_fence_agent_packages: [] +__sap_ha_pacemaker_cluster_hacluster_password: +__sap_ha_pacemaker_cluster_repos: [] +__sap_ha_pacemaker_cluster_resource_primitives: [] +__sap_ha_pacemaker_cluster_resource_groups: [] +__sap_ha_pacemaker_cluster_resource_clones: [] # Predefine host_map for variable construction -__sap_ha_cluster_pcmk_host_map: '' +__sap_ha_pacemaker_cluster_pcmk_host_map: '' diff --git a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml index eca6b2dba..7b13c5fd7 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml @@ -2,39 +2,39 @@ # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_fence_agent_packages: +sap_ha_pacemaker_cluster_fence_agent_packages: - fence-agents-aws -sap_ha_cluster_platform_extra_packages: +sap_ha_pacemaker_cluster_platform_extra_packages: - awscli -__sap_ha_cluster_repos: +__sap_ha_pacemaker_cluster_repos: - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rhui-rpms" name: High Availability # Predefine -__sap_ha_cluster_aws_instances: [] +__sap_ha_pacemaker_cluster_aws_instances: [] ## Requires: # TODO: decide where to define these vars -# sap_ha_cluster_aws_access_key_id: -# sap_ha_cluster_aws_secret_access_key: -# sap_ha_cluster_aws_region: -# sap_ha_cluster_aws_vpc: +# sap_ha_pacemaker_cluster_aws_access_key_id: +# sap_ha_pacemaker_cluster_aws_secret_access_key: +# sap_ha_pacemaker_cluster_aws_region: +# sap_ha_pacemaker_cluster_aws_vpc: -sap_ha_cluster_stonith_required: +sap_ha_pacemaker_cluster_stonith_required: agent: "stonith:fence_aws" options: - access_key: "{{ sap_ha_cluster_aws_access_key_id }}" - secret_key: "{{ sap_ha_cluster_aws_secret_access_key }}" - region: "{{ sap_ha_cluster_aws_region }}" + access_key: "{{ sap_ha_pacemaker_cluster_aws_access_key_id }}" + secret_key: "{{ sap_ha_pacemaker_cluster_aws_secret_access_key }}" + region: "{{ sap_ha_pacemaker_cluster_aws_region }}" # Platform specific VIP handling -sap_ha_cluster_vip_strategy: aws_vpc_move_ip -sap_ha_cluster_vip_resource_group_name: vipgroup +sap_ha_pacemaker_cluster_vip_strategy: aws_vpc_move_ip +sap_ha_pacemaker_cluster_vip_resource_group_name: vipgroup -__sap_ha_cluster_available_vip_agents: +__sap_ha_pacemaker_cluster_available_vip_agents: # Testing only! Not officially supported for SAP on AWS. ipaddr: agent: "ocf:heartbeat:IPAddr2" diff --git a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml index 69835a4fc..ad506ce96 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml @@ -3,15 +3,15 @@ # # TODO: make sure to first respect 'ha_cluster' native variables # -sap_ha_cluster_fence_agent_packages: +sap_ha_pacemaker_cluster_fence_agent_packages: - fence-agents-ibm-vpc -# __sap_ha_cluster_repos: +# __sap_ha_pacemaker_cluster_repos: # - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" # name: High Availability -sap_ha_cluster_stonith_required: +sap_ha_pacemaker_cluster_stonith_required: agent: "stonith:fence_ibm_vpc" options: - apikey: "{{ sap_ha_cluster_ibmcloud_api_key }}" - region: "{{ sap_ha_cluster_ibmcloud_region }}" + apikey: "{{ sap_ha_pacemaker_cluster_ibmcloud_api_key }}" + region: "{{ sap_ha_pacemaker_cluster_ibmcloud_region }}" diff --git a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml index 647403bc3..681078979 100644 --- a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml +++ b/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml @@ -2,5 +2,5 @@ # Variables specific on IBM Power platforms # TODO: rename this file to match the actual "chassis_asset_tag" output # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_fence_agent_packages: +sap_ha_pacemaker_cluster_fence_agent_packages: - fence-agents-ibm-powervs diff --git a/roles/sap_ha_cluster/vars/redhat.yml b/roles/sap_ha_cluster/vars/redhat.yml index 1be4e1ab6..a65619099 100644 --- a/roles/sap_ha_cluster/vars/redhat.yml +++ b/roles/sap_ha_cluster/vars/redhat.yml @@ -1,6 +1,6 @@ --- # Overwrite HA_CLUSTER repository ID to use E4S repository # - an alternative logic could be to enable the repo before running ha_cluster -__sap_ha_cluster_repos: +__sap_ha_pacemaker_cluster_repos: - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" name: High Availability diff --git a/roles/sap_ha_cluster/vars/saphana_scaleout.yml b/roles/sap_ha_cluster/vars/saphana_scaleout.yml index fab558d23..4a049a6e9 100644 --- a/roles/sap_ha_cluster/vars/saphana_scaleout.yml +++ b/roles/sap_ha_cluster/vars/saphana_scaleout.yml @@ -3,9 +3,9 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_sap_extra_packages: +sap_ha_pacemaker_cluster_sap_extra_packages: - resource-agents-sap-hana-scaleout -sap_ha_cluster_ra_hana: SAPHanaController -sap_ha_cluster_hadr_provider_name: SAPHanaSR -sap_ha_cluster_hadr_provider_path: /hana/shared/myhooks +sap_ha_pacemaker_cluster_ra_hana: SAPHanaController +sap_ha_pacemaker_cluster_hadr_provider_name: SAPHanaSR +sap_ha_pacemaker_cluster_hadr_provider_path: /hana/shared/myhooks diff --git a/roles/sap_ha_cluster/vars/saphana_scaleup.yml b/roles/sap_ha_cluster/vars/saphana_scaleup.yml index bd04a7e39..de1d90519 100644 --- a/roles/sap_ha_cluster/vars/saphana_scaleup.yml +++ b/roles/sap_ha_cluster/vars/saphana_scaleup.yml @@ -3,9 +3,9 @@ # # TODO: make sure to first respect 'ha_cluster' native variables -sap_ha_cluster_sap_extra_packages: +sap_ha_pacemaker_cluster_sap_extra_packages: - resource-agents-sap-hana -sap_ha_cluster_ra_hana: SAPHana -sap_ha_cluster_hadr_provider_name: SAPHanaSR -sap_ha_cluster_hadr_provider_path: /hana/shared/myhooks +sap_ha_pacemaker_cluster_ra_hana: SAPHana +sap_ha_pacemaker_cluster_hadr_provider_name: SAPHanaSR +sap_ha_pacemaker_cluster_hadr_provider_path: /hana/shared/myhooks From 399904b1f86506a0ab097c2e46cbc439f99891d8 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 10 Nov 2022 10:26:24 +0100 Subject: [PATCH 282/375] sap_ha_pacemaker_cluster: rename role from sap_ha_cluster to sap_ha_pacemaker_cluster --- roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/README.md | 0 .../defaults/main.yml | 0 .../meta/argument_specs.yml | 0 roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/meta/main.yml | 0 .../tasks/ascertain_ha_cluster_in_inventory.yml | 0 .../tasks/ascertain_platform_type.yml | 0 .../tasks/ascertain_sap_landscape.yml | 0 .../tasks/configure_srhook.yml | 0 .../tasks/construct_vars_common.yml | 0 .../tasks/construct_vars_hana_common.yml | 0 .../tasks/construct_vars_hana_scaleout.yml | 0 .../tasks/construct_vars_hana_scaleup.yml | 0 .../tasks/construct_vars_stonith.yml | 0 .../tasks/construct_vars_vip_resources_default.yml | 0 .../tasks/include_construct_vip_resources.yml | 0 .../tasks/include_vars_common.yml | 0 .../tasks/include_vars_saphana.yml | 0 roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/main.yml | 0 .../tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml | 0 .../tasks/platform/include_vars_platform.yml | 0 .../tasks/platform/preconfigure_vm_aws_ec2.yml | 0 .../tasks/platform/register_sysinfo_vm_ibmcloud.yml | 0 .../tasks/validate_input_parameters.yml | 0 .../templates/cluster_create_config.j2 | 0 .../templates/sudofile_20-saphana.j2 | 0 roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/main.yml | 0 .../vars/platform_vm_aws_ec2.yml | 0 .../vars/platform_vm_ibmcloud.yml | 0 .../vars/platform_vm_ibmcloud_power.yml | 0 .../{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/redhat.yml | 0 .../vars/saphana_scaleout.yml | 0 .../vars/saphana_scaleup.yml | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/README.md (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/defaults/main.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/meta/argument_specs.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/meta/main.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/ascertain_ha_cluster_in_inventory.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/ascertain_platform_type.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/ascertain_sap_landscape.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/configure_srhook.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_common.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_hana_common.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_hana_scaleout.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_hana_scaleup.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_stonith.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/construct_vars_vip_resources_default.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/include_construct_vip_resources.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/include_vars_common.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/include_vars_saphana.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/main.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/platform/include_vars_platform.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/platform/preconfigure_vm_aws_ec2.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/platform/register_sysinfo_vm_ibmcloud.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/tasks/validate_input_parameters.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/templates/cluster_create_config.j2 (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/templates/sudofile_20-saphana.j2 (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/main.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/platform_vm_aws_ec2.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/platform_vm_ibmcloud.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/platform_vm_ibmcloud_power.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/redhat.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/saphana_scaleout.yml (100%) rename roles/{sap_ha_cluster => sap_ha_pacemaker_cluster}/vars/saphana_scaleup.yml (100%) diff --git a/roles/sap_ha_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md similarity index 100% rename from roles/sap_ha_cluster/README.md rename to roles/sap_ha_pacemaker_cluster/README.md diff --git a/roles/sap_ha_cluster/defaults/main.yml b/roles/sap_ha_pacemaker_cluster/defaults/main.yml similarity index 100% rename from roles/sap_ha_cluster/defaults/main.yml rename to roles/sap_ha_pacemaker_cluster/defaults/main.yml diff --git a/roles/sap_ha_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml similarity index 100% rename from roles/sap_ha_cluster/meta/argument_specs.yml rename to roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml diff --git a/roles/sap_ha_cluster/meta/main.yml b/roles/sap_ha_pacemaker_cluster/meta/main.yml similarity index 100% rename from roles/sap_ha_cluster/meta/main.yml rename to roles/sap_ha_pacemaker_cluster/meta/main.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/ascertain_ha_cluster_in_inventory.yml rename to roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/ascertain_platform_type.yml rename to roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml diff --git a/roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/ascertain_sap_landscape.yml rename to roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml diff --git a/roles/sap_ha_cluster/tasks/configure_srhook.yml b/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/configure_srhook.yml rename to roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_common.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_hana_common.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_hana_scaleout.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_hana_scaleup.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_stonith.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml diff --git a/roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/construct_vars_vip_resources_default.yml rename to roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml diff --git a/roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/include_construct_vip_resources.yml rename to roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml diff --git a/roles/sap_ha_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/include_vars_common.yml rename to roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml diff --git a/roles/sap_ha_cluster/tasks/include_vars_saphana.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/include_vars_saphana.yml rename to roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml diff --git a/roles/sap_ha_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/main.yml rename to roles/sap_ha_pacemaker_cluster/tasks/main.yml diff --git a/roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml rename to roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/include_vars_platform.yml rename to roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml diff --git a/roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml rename to roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml rename to roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml diff --git a/roles/sap_ha_cluster/tasks/validate_input_parameters.yml b/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml similarity index 100% rename from roles/sap_ha_cluster/tasks/validate_input_parameters.yml rename to roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml diff --git a/roles/sap_ha_cluster/templates/cluster_create_config.j2 b/roles/sap_ha_pacemaker_cluster/templates/cluster_create_config.j2 similarity index 100% rename from roles/sap_ha_cluster/templates/cluster_create_config.j2 rename to roles/sap_ha_pacemaker_cluster/templates/cluster_create_config.j2 diff --git a/roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 b/roles/sap_ha_pacemaker_cluster/templates/sudofile_20-saphana.j2 similarity index 100% rename from roles/sap_ha_cluster/templates/sudofile_20-saphana.j2 rename to roles/sap_ha_pacemaker_cluster/templates/sudofile_20-saphana.j2 diff --git a/roles/sap_ha_cluster/vars/main.yml b/roles/sap_ha_pacemaker_cluster/vars/main.yml similarity index 100% rename from roles/sap_ha_cluster/vars/main.yml rename to roles/sap_ha_pacemaker_cluster/vars/main.yml diff --git a/roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml similarity index 100% rename from roles/sap_ha_cluster/vars/platform_vm_aws_ec2.yml rename to roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml diff --git a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml similarity index 100% rename from roles/sap_ha_cluster/vars/platform_vm_ibmcloud.yml rename to roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml diff --git a/roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud_power.yml similarity index 100% rename from roles/sap_ha_cluster/vars/platform_vm_ibmcloud_power.yml rename to roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud_power.yml diff --git a/roles/sap_ha_cluster/vars/redhat.yml b/roles/sap_ha_pacemaker_cluster/vars/redhat.yml similarity index 100% rename from roles/sap_ha_cluster/vars/redhat.yml rename to roles/sap_ha_pacemaker_cluster/vars/redhat.yml diff --git a/roles/sap_ha_cluster/vars/saphana_scaleout.yml b/roles/sap_ha_pacemaker_cluster/vars/saphana_scaleout.yml similarity index 100% rename from roles/sap_ha_cluster/vars/saphana_scaleout.yml rename to roles/sap_ha_pacemaker_cluster/vars/saphana_scaleout.yml diff --git a/roles/sap_ha_cluster/vars/saphana_scaleup.yml b/roles/sap_ha_pacemaker_cluster/vars/saphana_scaleup.yml similarity index 100% rename from roles/sap_ha_cluster/vars/saphana_scaleup.yml rename to roles/sap_ha_pacemaker_cluster/vars/saphana_scaleup.yml From 7b992d8ce1b4158eec5510931b041a17dcac5f4b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 10 Nov 2022 10:58:18 +0100 Subject: [PATCH 283/375] sap_ha_pacemaker_cluster: adjust task title prefixes --- .../ascertain_ha_cluster_in_inventory.yml | 20 ++++----- .../tasks/ascertain_platform_type.yml | 8 ++-- .../tasks/ascertain_sap_landscape.yml | 4 +- .../tasks/configure_srhook.yml | 10 ++--- .../tasks/construct_vars_common.yml | 8 ++-- .../tasks/construct_vars_hana_common.yml | 10 ++--- .../tasks/construct_vars_hana_scaleout.yml | 4 +- .../tasks/construct_vars_hana_scaleup.yml | 4 +- .../tasks/construct_vars_stonith.yml | 6 +-- .../construct_vars_vip_resources_default.yml | 6 +-- .../tasks/include_construct_vip_resources.yml | 4 +- .../tasks/include_vars_common.yml | 4 +- .../tasks/include_vars_saphana.yml | 2 +- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 44 +++++++++---------- ...onstruct_vars_vip_resources_vm_aws_ec2.yml | 16 +++---- .../tasks/platform/include_vars_platform.yml | 2 +- .../platform/preconfigure_vm_aws_ec2.yml | 8 ++-- .../platform/register_sysinfo_vm_ibmcloud.yml | 4 +- .../tasks/validate_input_parameters.yml | 2 +- 19 files changed, 83 insertions(+), 83 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml index 89bbc8534..408bb89e6 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_ha_cluster_in_inventory.yml @@ -3,52 +3,52 @@ # inventory, we will include these custom specifications. ### Take the following template to add additional parameters to be inherited: -# - name: "SAP HA Cluster - Register ha_cluster_" +# - name: "SAP HA Prepare Pacemaker - Register ha_cluster_" # ansible.builtin.set_fact: # __sap_ha_pacemaker_cluster_: "{{ ha_cluster_ }}" # when: ha_cluster_ is defined -- name: "SAP HA Cluster - Register ha_cluster_cluster_properties" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_cluster_properties" when: ha_cluster_cluster_properties is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_cluster_properties: "{{ ha_cluster_cluster_properties }}" -- name: "SAP HA Cluster - Register ha_cluster_constraints_colocation" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_constraints_colocation" when: ha_cluster_constraints_colocation is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_constraints_colocation: "{{ ha_cluster_constraints_colocation }}" -- name: "SAP HA Cluster - Register ha_cluster_constraints_location" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_constraints_location" when: ha_cluster_constraints_location is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_constraints_location: "{{ ha_cluster_constraints_location }}" -- name: "SAP HA Cluster - Register ha_cluster_constraints_order" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_constraints_order" when: ha_cluster_constraints_order is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_constraints_order: "{{ ha_cluster_constraints_order }}" -- name: "SAP HA Cluster - Register ha_cluster_fence_agent_packages" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_fence_agent_packages" when: ha_cluster_fence_agent_packages is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_fence_agent_packages: "{{ ha_cluster_fence_agent_packages }}" -- name: "SAP HA Cluster - Register ha_cluster_repos" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_repos" when: ha_cluster_repos is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_repos: "{{ ha_cluster_repos }}" -- name: "SAP HA Cluster - Register ha_cluster_resource_clones" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_resource_clones" when: ha_cluster_resource_clones is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_clones: "{{ ha_cluster_resource_clones }}" -- name: "SAP HA Cluster - Register ha_cluster_resource_groups" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_resource_groups" when: ha_cluster_resource_groups is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_groups: "{{ ha_cluster_resource_groups }}" -- name: "SAP HA Cluster - Register ha_cluster_resource_primitives" +- name: "SAP HA Prepare Pacemaker - Register ha_cluster_resource_primitives" when: ha_cluster_resource_primitives is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ ha_cluster_resource_primitives }}" diff --git a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml index d8760b893..ca95a85fc 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_platform_type.yml @@ -24,13 +24,13 @@ # TODO: detection based on multiple facts and providing one standard # name for use as platform type in related include files -- name: "SAP HA Cluster - Check if platform is AWS EC2 VM" +- name: "SAP HA Prepare Pacemaker - Check if platform is AWS EC2 VM" when: - ansible_system_vendor == 'Amazon EC2' ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_platform: vm_aws_ec2 -- name: "SAP HA Cluster - Check if platform is IBM VPC VM" +- name: "SAP HA Prepare Pacemaker - Check if platform is IBM VPC VM" when: - ansible_chassis_asset_tag == 'ibmcloud' ansible.builtin.set_fact: @@ -39,7 +39,7 @@ # Call tasks to discover information that is needed as input for any further steps. # Run this before including the platform vars in order to build vars based on the # discovered data. -- name: "SAP HA Cluster - Include platform specific information collection" +- name: "SAP HA Prepare Pacemaker - Include platform specific information collection" when: __sap_ha_pacemaker_cluster_platform_info is file ansible.builtin.include_tasks: file: "{{ item }}" @@ -48,5 +48,5 @@ vars: __sap_ha_pacemaker_cluster_platform_info: "{{ role_path }}/tasks/{{ item }}" -- name: "SAP HA Cluster - Include platform specific variables" +- name: "SAP HA Prepare Pacemaker - Include platform specific variables" ansible.builtin.import_tasks: platform/include_vars_platform.yml diff --git a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml index 0248072d3..e386b1852 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/ascertain_sap_landscape.yml @@ -11,11 +11,11 @@ # TODO: collect possible rules for target landscapes # Currently only 2-node scale-up is supported. -- name: "SAP HA Cluster - Set landscape to scale-up if target is 2 nodes" +- name: "SAP HA Prepare Pacemaker - Set landscape to scale-up if target is 2 nodes" when: - ansible_play_hosts|length == 2 ansible.builtin.set_fact: sap_ha_pacemaker_cluster_sap_type: scaleup -- name: "SAP HA Cluster - Include HANA specific variables" +- name: "SAP HA Prepare Pacemaker - Include HANA specific variables" ansible.builtin.import_tasks: include_vars_saphana.yml diff --git a/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml b/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml index 529d6710c..1abcd3293 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml @@ -1,5 +1,5 @@ --- -- name: "SAP HA Cluster - Create srHook shared directory" +- name: "SAP HA Pacemaker srHook - Create srHook shared directory" ansible.builtin.file: path: "{{ sap_ha_pacemaker_cluster_hadr_provider_path }}" state: directory @@ -7,7 +7,7 @@ owner: "{{ sap_ha_pacemaker_cluster_hana_sid | lower }}adm" group: sapsys -- name: "SAP HA Cluster - Copy srHook to shared directory" +- name: "SAP HA Pacemaker srHook - Copy srHook to shared directory" ansible.builtin.copy: remote_src: true src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py @@ -18,7 +18,7 @@ # Do not run in check mode because the path is created in the previous step when: not ansible_check_mode -- name: "SAP HA Cluster - Check global.ini for 'ha_dr_saphanasr'" +- name: "SAP HA Pacemaker srHook - Check global.ini for 'ha_dr_saphanasr'" ansible.builtin.shell: | grep ha_dr_saphanasr /usr/sap/{{ sap_ha_pacemaker_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini register: __sap_ha_pacemaker_cluster_srhook_trace_global @@ -28,7 +28,7 @@ check_mode: false changed_when: false -- name: "SAP HA Cluster - Update srHook in global.ini" +- name: "SAP HA Pacemaker srHook - Update srHook in global.ini" ansible.builtin.blockinfile: path: /usr/sap/{{ sap_ha_pacemaker_cluster_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini marker: "" @@ -42,7 +42,7 @@ ha_dr_saphanasr = info when: __sap_ha_pacemaker_cluster_srhook_trace_global.rc == 1 -- name: "SAP HA Cluster - Add srHook sudo entries" +- name: "SAP HA Pacemaker srHook - Add srHook sudo entries" ansible.builtin.template: backup: true dest: /etc/sudoers.d/20-saphana diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml index d5e6d909b..96a4bdb63 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml @@ -1,16 +1,16 @@ --- # Create or combine input parameters for the ha_cluster role. -- name: "SAP HA Cluster - Set cluster name" +- name: "SAP HA Prepare Pacemaker - Set cluster name" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_cluster_name: "{{ ha_cluster_cluster_name | default(sap_ha_pacemaker_cluster_cluster_name) }}" -- name: "SAP HA Cluster - Register the 'hacluster' user password" +- name: "SAP HA Prepare Pacemaker - Register the 'hacluster' user password" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_hacluster_password: "{{ ha_cluster_hacluster_password | default(sap_ha_pacemaker_cluster_hacluster_password) }}" no_log: true -- name: "SAP HA Cluster - Combine extra packages lists" +- name: "SAP HA Prepare Pacemaker - Combine extra packages lists" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_extra_packages: "{{ sap_ha_pacemaker_cluster_extra_packages @@ -20,7 +20,7 @@ sap_ha_pacemaker_cluster_platform_extra_packages | default([]) }}" -- name: "SAP HA Cluster - Combine fence agent packages lists" +- name: "SAP HA Prepare Pacemaker - Combine fence agent packages lists" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_fence_agent_packages: "{{ sap_ha_pacemaker_cluster_fence_agent_packages diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml index bf9adce99..aff797867 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_common.yml @@ -9,7 +9,7 @@ # TODO: add conditionals to verify that the same resource agent is not already # defined in user input variables. Conflicting user input should take precedence. -- name: "SAP HA Cluster - Add resource: SAP HANA Topology" +- name: "SAP HA Prepare Pacemaker - Add resource: SAP HANA Topology" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_topology] }}" vars: @@ -40,7 +40,7 @@ when: - __resource_topology.agent not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='agent')) -- name: "SAP HA Cluster - Add resource: SAP HANA DB" +- name: "SAP HA Prepare Pacemaker - Add resource: SAP HANA DB" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_hana] }}" vars: @@ -95,7 +95,7 @@ when: - __resource_hana.agent not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='agent')) -- name: "SAP HA Cluster - Add resource clone: SAP HANA Topology" +- name: "SAP HA Prepare Pacemaker - Add resource clone: SAP HANA Topology" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones + [__clone_topology] }}" vars: @@ -113,7 +113,7 @@ when: - __clone_topology.resource_id not in (__sap_ha_pacemaker_cluster_resource_clones | map(attribute='resource_id')) -- name: "SAP HA Cluster - Add resource clone: SAP HANA DB" +- name: "SAP HA Prepare Pacemaker - Add resource clone: SAP HANA DB" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones + [__clone_hana] }}" vars: @@ -132,7 +132,7 @@ - __clone_hana.resource_id not in (__sap_ha_pacemaker_cluster_resource_clones | map(attribute='resource_id')) # First start Topology, then HANA (automatically stops in reverse order) -- name: "SAP HA Cluster - Add order constraint: Topology starts before DB" +- name: "SAP HA Prepare Pacemaker - Add order constraint: Topology starts before DB" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + [__constraint_order_topology] }}" vars: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml index 15accd5b0..03df61fb8 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleout.yml @@ -5,9 +5,9 @@ # TODO: add here any scale-out special variable constructions # Make sure to first respect 'ha_cluster' native variables -# - name: "SAP HA Cluster - Construct cluster vars for SAP HANA Scale-out" +# - name: "SAP HA Prepare Pacemaker - Construct cluster vars for SAP HANA Scale-out" # ansible.builtin.set_fact: -- name: "SAP HA Cluster - Info" +- name: "SAP HA Prepare Pacemaker - Info" ansible.builtin.debug: msg: "INFO: There is currently no Scale-out specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml index 376e4b46c..b9215eb1f 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_hana_scaleup.yml @@ -5,9 +5,9 @@ # TODO: add here any scale-up special variable constructions # Make sure to first respect 'ha_cluster' native variables -# - name: "SAP HA Cluster - Construct cluster vars for SAP HANA Scale-up" +# - name: "SAP HA Prepare Pacemaker - Construct cluster vars for SAP HANA Scale-up" # ansible.builtin.set_fact: # -- name: "SAP HA Cluster - Info" +- name: "SAP HA Prepare Pacemaker - Info" ansible.builtin.debug: msg: "INFO: There is currently no Scale-up specific construction, in addition to the SAP HANA common definitions." diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml index 5bfe1b91e..5bbfc7003 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml @@ -2,7 +2,7 @@ # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. -- name: "SAP HA Cluster - Define cluster properties" +- name: "SAP HA Prepare Pacemaker - Define cluster properties" when: - item.name not in (__sap_ha_pacemaker_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) @@ -23,7 +23,7 @@ # - fence resource defaults # - fence agent specific required options -- name: "SAP HA Cluster - Assemble the stonith resource definition" +- name: "SAP HA Prepare Pacemaker - Assemble the stonith resource definition" ansible.builtin.set_fact: sap_ha_pacemaker_cluster_stonith_resource: - id: "res_{{ sap_ha_pacemaker_cluster_stonith_required.agent | split(':') | last }}" @@ -53,7 +53,7 @@ {{ attrs }} # The STONITH resource is an element in the cluster_resource_primitives list -- name: "SAP HA Cluster - Construct stonith resources definition" +- name: "SAP HA Prepare Pacemaker - Construct stonith resources definition" when: - sap_ha_pacemaker_cluster_stonith_resource is defined ansible.builtin.set_fact: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml index ab033ff34..1bd4f6d42 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_resources_default.yml @@ -2,7 +2,7 @@ # Reminder: This file is included in a loop over a dictionary. # VIP resource definition itself -- name: "SAP HA Cluster - Add resource: VIP {{ vip_list_item.key }}" +- name: "SAP HA Prepare Pacemaker - Add resource: VIP {{ vip_list_item.key }}" when: - sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) ansible.builtin.set_fact: @@ -17,7 +17,7 @@ value: "{{ vip_list_item.value | quote }}" # Start the VIP(s) only after the HANA resource has been promoted -- name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" +- name: "SAP HA Prepare Pacemaker - Add order constraint: Primary VIP starts after DB is promoted" when: - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms @@ -33,7 +33,7 @@ action: start # The VIP only runs where HANA is promoted -- name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" +- name: "SAP HA Prepare Pacemaker - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml index 1f53f548b..9fabe905f 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_construct_vip_resources.yml @@ -2,7 +2,7 @@ # The VIP resource construction files are included in a loop to allow # for multiple IPs to be configured in cluster resources -- name: "SAP HA Cluster - Include variable construction for standard VIP resources" +- name: "SAP HA Prepare Pacemaker - Include variable construction for standard VIP resources" when: - __sap_ha_pacemaker_cluster_platform not in __sap_ha_pacemaker_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') @@ -12,7 +12,7 @@ index_var: loop_index loop_var: vip_list_item -- name: "SAP HA Cluster - Include variable construction for platform VIP resources" +- name: "SAP HA Prepare Pacemaker - Include variable construction for platform VIP resources" when: - __sap_ha_pacemaker_cluster_platform in __sap_ha_pacemaker_cluster_supported_platforms - (vip_list_item.value is defined) and (vip_list_item.value != '') diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml index 0f62f9dca..ab3e1bb74 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml @@ -1,6 +1,6 @@ --- # Gather specific subsets of facts if the required facts are not yet available. -- name: "SAP HA Cluster - Collect required facts" +- name: "SAP HA Prepare Pacemaker - Collect required facts" when: - not ansible_facts.keys() | list | intersect(__sap_ha_pacemaker_cluster_required_facts) == __sap_ha_pacemaker_cluster_required_facts @@ -9,7 +9,7 @@ # Include vars files based on the environment. # Respect order for potential variable precedence. -- name: "SAP HA Cluster - Include environment specific variables" +- name: "SAP HA Prepare Pacemaker - Include environment specific variables" when: __sap_ha_pacemaker_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml index 5a02dc9ec..3d0014df5 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_saphana.yml @@ -1,5 +1,5 @@ --- -- name: "SAP HA Cluster - Include HANA landscape specific variables" +- name: "SAP HA Prepare Pacemaker - Include HANA landscape specific variables" when: __sap_ha_pacemaker_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index 90a342d79..e81a24164 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -15,53 +15,53 @@ # TODO: Build all resource/constraint configuration variables based on # simpler user input (think: drop-down options in a UI) -- name: "SAP HA Cluster - Include parameter validation tasks" +- name: "SAP HA Prepare Pacemaker - Include parameter validation tasks" ansible.builtin.import_tasks: validate_input_parameters.yml # Make sure that all parameters already set for 'ha_cluster' are also inherited. # Add to this file a task for EACH parameter which this SAP cluster role # supports. -- name: "SAP HA Cluster - Include tasks for checking 'ha_cluster' predefinitions" +- name: "SAP HA Prepare Pacemaker - Include tasks for checking 'ha_cluster' predefinitions" ansible.builtin.import_tasks: ascertain_ha_cluster_in_inventory.yml -- name: "SAP HA Cluster - Include facts and common variables" +- name: "SAP HA Prepare Pacemaker - Include facts and common variables" ansible.builtin.import_tasks: include_vars_common.yml # Determine which SAP landscape we are going to configure in the cluster. -- name: "SAP HA Cluster - Include tasks for SAP landscape calculation" +- name: "SAP HA Prepare Pacemaker - Include tasks for SAP landscape calculation" ansible.builtin.import_tasks: ascertain_sap_landscape.yml # Determine if we are on a cloud platform. -- name: "SAP HA Cluster - Include tasks for platform detection" +- name: "SAP HA Prepare Pacemaker - Include tasks for platform detection" ansible.builtin.import_tasks: ascertain_platform_type.yml -- name: "SAP HA Cluster - Include common variable construction tasks" +- name: "SAP HA Prepare Pacemaker - Include common variable construction tasks" ansible.builtin.import_tasks: construct_vars_common.yml -- name: "SAP HA Cluster - Include variable construction for STONITH resources" +- name: "SAP HA Prepare Pacemaker - Include variable construction for STONITH resources" ansible.builtin.import_tasks: construct_vars_stonith.yml -- name: "SAP HA Cluster - Include variable construction for VIP resources" +- name: "SAP HA Prepare Pacemaker - Include variable construction for VIP resources" ansible.builtin.import_tasks: include_construct_vip_resources.yml -- name: "SAP HA Cluster - Include variable construction for SAP HANA common" +- name: "SAP HA Prepare Pacemaker - Include variable construction for SAP HANA common" ansible.builtin.import_tasks: construct_vars_hana_common.yml -- name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-up" +- name: "SAP HA Prepare Pacemaker - Include variable construction for SAP HANA Scale-up" when: sap_ha_pacemaker_cluster_sap_type == 'scaleup' ansible.builtin.include_tasks: file: construct_vars_hana_scaleup.yml -- name: "SAP HA Cluster - Include variable construction for SAP HANA Scale-out" +- name: "SAP HA Prepare Pacemaker - Include variable construction for SAP HANA Scale-out" when: sap_ha_pacemaker_cluster_sap_type == 'scaleout' ansible.builtin.include_tasks: file: construct_vars_hana_scaleout.yml -- name: "SAP HA Cluster - Block with actual changes" +- name: "SAP HA Install Pacemaker - Block with actual changes" block: # Start with prerequisite changes for certain platforms, if applicable - - name: "SAP HA Cluster - Include platform specific prerequisites" + - name: "SAP HA Install Pacemaker - Include platform specific prerequisites" when: __sap_ha_pacemaker_cluster_platform_file is file ansible.builtin.include_tasks: file: "{{ item }}" @@ -73,7 +73,7 @@ # Before we are ready to call the ha_cluster role, we want to validate # that the minimum required parameters are defined and not empty. # TODO: make this smarter, currently all these vars are pre-defined anyway - - name: "SAP HA Cluster - Validate parameters for 'ha_cluster' role input" + - name: "SAP HA Install Pacemaker - Validate parameters for 'ha_cluster' role input" ansible.builtin.assert: that: - __sap_ha_pacemaker_cluster_cluster_properties is defined @@ -84,7 +84,7 @@ - __sap_ha_pacemaker_cluster_constraints_colocation is defined fail_msg: "Cluster build parameter construction has failed for this parameter." - - name: "SAP HA Cluster - Query if CIB already exists" + - name: "SAP HA Install Pacemaker - Query if CIB already exists" ansible.builtin.command: cmd: cibadmin --query register: __sap_ha_pacemaker_cluster_cib_query @@ -92,7 +92,7 @@ changed_when: false failed_when: false - - name: "SAP HA Cluster - Create backup of existing CIB" + - name: "SAP HA Install Pacemaker - Create backup of existing CIB" when: - __sap_ha_pacemaker_cluster_cib_query.stdout is defined - __sap_ha_pacemaker_cluster_cib_query.stdout|length > 0 @@ -106,7 +106,7 @@ # Cluster installation and configuration through the dedicated # linux system role 'ha_cluster' - - name: "SAP HA Cluster - Include System Role 'ha_cluster'" + - name: "SAP HA Install Pacemaker - Include System Role 'ha_cluster'" ansible.builtin.include_role: name: linux-system-roles.ha_cluster apply: @@ -130,7 +130,7 @@ # Resource defaults can currently not be updated through ha_cluster # role parameters, and thus need to be added. - - name: "SAP HA Cluster - Check resource defaults" + - name: "SAP HA Install Pacemaker - Check resource defaults" ansible.builtin.command: cmd: pcs resource defaults config register: __sap_ha_pacemaker_cluster_check_resource_defaults @@ -138,7 +138,7 @@ changed_when: false check_mode: false - - name: "SAP HA Cluster - Update resource default attributes" + - name: "SAP HA Install Pacemaker - Update resource default attributes" when: - item.name ~ '=' ~ item.value not in __sap_ha_pacemaker_cluster_check_resource_defaults.stdout ansible.builtin.command: @@ -146,7 +146,7 @@ loop: "{{ sap_ha_pacemaker_cluster_resource_defaults }}" run_once: true - - name: "SAP HA Cluster - Include srHook configuration" + - name: "SAP HA Install Pacemaker - Include srHook configuration" ansible.builtin.include_tasks: file: configure_srhook.yml apply: @@ -166,7 +166,7 @@ # TODO: Deal with secrets in output. They should be masked, maybe with # their user provided variables? -- name: "SAP HA Cluster - Create cluster configuration parameters file" +- name: "SAP HA Install Pacemaker - Create cluster configuration parameters file" when: sap_ha_pacemaker_cluster_create_config_dest is defined ansible.builtin.template: backup: true @@ -180,7 +180,7 @@ become: false check_mode: false -- name: "SAP HA Cluster - Display configuration parameters SAVE FILE location" +- name: "SAP HA Install Pacemaker - Display configuration parameters SAVE FILE location" when: sap_ha_pacemaker_cluster_create_config_varfile ansible.builtin.debug: msg: | diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml index 49001885e..a82b059d1 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml @@ -1,7 +1,7 @@ --- # Reminder: This file is included in a loop over a dictionary. -- name: "SAP HA Cluster - Add resource: OS floating IP (dev/test only)" +- name: "SAP HA Prepare Pacemaker - Add resource: OS floating IP (dev/test only)" when: - sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - (sap_ha_pacemaker_cluster_vip_strategy == 'ipaddr') or @@ -19,7 +19,7 @@ - name: ip value: "{{ vip_list_item.value }}" -- name: "SAP HA Cluster - Add resource: AWS floating IP (dev/test only)" +- name: "SAP HA Prepare Pacemaker - Add resource: AWS floating IP (dev/test only)" when: - ('pri' ~ sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - sap_ha_pacemaker_cluster_vip_strategy == 'awsvip' @@ -34,7 +34,7 @@ - name: secondary_private_ip value: "{{ vip_list_item.value }}" -- name: "SAP HA Cluster - Add resource group for VIP resources" +- name: "SAP HA Prepare Pacemaker - Add resource group for VIP resources" when: - __vip_group.id is not in (__sap_ha_pacemaker_cluster_resource_groups | map(attribute='id')) - sap_ha_pacemaker_cluster_vip_strategy in ['awsvip'] @@ -48,7 +48,7 @@ - "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - "pri{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" -- name: "SAP HA Cluster - Add resource: AWS VIP routing" +- name: "SAP HA Prepare Pacemaker - Add resource: AWS VIP routing" when: - (sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - sap_ha_pacemaker_cluster_vip_strategy == 'aws_vpc_move_ip' @@ -69,7 +69,7 @@ value: "{{ sap_ha_pacemaker_cluster_vip_update_rt | join(',') }}" # Start the VIP(s) only after the HANA resource has been promoted -- name: "SAP HA Cluster - Add order constraint: Primary VIP starts after DB is promoted" +- name: "SAP HA Prepare Pacemaker - Add order constraint: Primary VIP starts after DB is promoted" when: - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms @@ -85,7 +85,7 @@ action: start # The VIP only runs where HANA is promoted -- name: "SAP HA Cluster - Add colocation constraint: Primary VIP runs where HANA is promoted" +- name: "SAP HA Prepare Pacemaker - Add colocation constraint: Primary VIP runs where HANA is promoted" when: - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) - vip_list_item.key in __sap_ha_pacemaker_cluster_primary_synonyms @@ -103,7 +103,7 @@ value: 2000 # Start the secondary VIP after the HANA resource has been promoted -- name: "SAP HA Cluster - Add order constraint: Read-only VIP starts after DB is promoted" +- name: "SAP HA Prepare Pacemaker - Add order constraint: Read-only VIP starts after DB is promoted" when: - __constraint_order_vip.resource_then not in (__sap_ha_pacemaker_cluster_constraints_order | map(attribute='resource_then')) - vip_list_item.key in __sap_ha_pacemaker_cluster_secondary_synonyms @@ -119,7 +119,7 @@ action: start # The secondary VIP only runs where HANA is UNpromoted -- name: "SAP HA Cluster - Add colocation constraint: Read-only VIP runs where HANA is not promoted" +- name: "SAP HA Prepare Pacemaker - Add colocation constraint: Read-only VIP runs where HANA is not promoted" when: - __constraint_colo_vip.resource_follower not in (__sap_ha_pacemaker_cluster_constraints_colocation | map(attribute='resource_follower')) - vip_list_item.key in __sap_ha_pacemaker_cluster_secondary_synonyms diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml index 52719920f..67ae184c0 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml @@ -1,6 +1,6 @@ --- # Include vars files based on the environment. -- name: "SAP HA Cluster - Include platform specific variables" +- name: "SAP HA Prepare Pacemaker - Include platform specific variables" when: __sap_ha_pacemaker_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml index 5b3421a30..a179123ce 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml @@ -1,14 +1,14 @@ --- # Requirement to enable the fencing resource to function. -- name: "SAP HA Cluster - Create awscli config directory" +- name: "SAP HA Prepare Pacemaker - Create awscli config directory" ansible.builtin.file: mode: 0755 owner: root path: /root/.aws state: directory -- name: "SAP HA Cluster - Create awscli config" +- name: "SAP HA Prepare Pacemaker - Create awscli config" ansible.builtin.blockinfile: backup: true block: | @@ -19,7 +19,7 @@ owner: root path: /root/.aws/config -- name: "SAP HA Cluster - Store awscli credentials" +- name: "SAP HA Prepare Pacemaker - Store awscli credentials" ansible.builtin.blockinfile: backup: true block: | @@ -33,7 +33,7 @@ no_log: true # pcmk_host_map format: :;:... -- name: "SAP HA Cluster - Assemble host mapping" +- name: "SAP HA Prepare Pacemaker - Assemble host mapping" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_pcmk_host_map: > {% for node in ansible_play_hosts_all -%} diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml index 16a83eb47..e21dd9673 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml @@ -1,14 +1,14 @@ --- # There is no ansible fact with the fully qualified VM instance ID. # We get this information from the SMBIOS/DMI. -- name: "SAP HA Cluster - Register instance ID" +- name: "SAP HA Prepare Pacemaker - Register instance ID" ansible.builtin.shell: | dmidecode -s system-family register: __sap_ha_pacemaker_cluster_register_ibmcloud_instance changed_when: false check_mode: false -- name: "SAP HA Cluster - Assemble host mapping" +- name: "SAP HA Prepare Pacemaker - Assemble host mapping" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_pcmk_host_map: >- {% for node in ansible_play_hosts_all -%} diff --git a/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml b/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml index 54ba06b87..4c5cce2a8 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml @@ -1,7 +1,7 @@ --- # The SAP ID must follow a strict format and not use reserved special values # TODO: This check may be better placed in a SAP role earlier in the chain... -- name: "SAP HA Cluster - Validate SAP System ID" +- name: "SAP HA Prepare Pacemaker - Validate SAP System ID" ansible.builtin.assert: that: - sap_ha_pacemaker_cluster_hana_sid is defined From df2fdd3686d771cafd378ccd941a452e7f27a14d Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 10 Nov 2022 11:52:34 +0100 Subject: [PATCH 284/375] sap_ha_pacemaker_cluster: role var rename update --- roles/sap_ha_pacemaker_cluster/README.md | 48 ++++++++------ .../meta/argument_specs.yml | 62 ++++++++++--------- 2 files changed, 62 insertions(+), 48 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index e15697fd3..b62a30edf 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -81,43 +81,43 @@ The name of the pacemaker cluster.
The password of the `hacluster` user which is created during pacemaker installation.
-### sap_ha_cluster_aws_access_key_id +### sap_ha_pacemaker_cluster_aws_access_key_id - _Type:_ `str` AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud.
-### sap_ha_cluster_aws_region +### sap_ha_pacemaker_cluster_aws_region - _Type:_ `str` The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud.
-### sap_ha_cluster_aws_secret_access_key +### sap_ha_pacemaker_cluster_aws_secret_access_key - _Type:_ `str` AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud.
-### sap_ha_cluster_create_config_dest +### sap_ha_pacemaker_cluster_create_config_dest - _Type:_ `str` - _Default:_ `_resource_config.yml` The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
-Requires `sap_ha_cluster_create_config_varfile` to be enabled for generating the output file.
+Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file.
Specify a path/filename to save the file in a custom location.
The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
-### sap_ha_cluster_create_config_varfile +### sap_ha_pacemaker_cluster_create_config_varfile - _Type:_ `bool` - _Default:_ `False` When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
-This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_cluster' role.
+This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role.
When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
WARNING! This report may include sensitive details like secrets required for certain cluster resources!
-### sap_ha_cluster_fence_options +### sap_ha_pacemaker_cluster_fence_options - _Type:_ `dict` STONITH resource common parameters that apply to most fencing agents.
@@ -135,13 +135,21 @@ Additional options can be added by defining this parameter in dictionary format _Default:_ `240`
STONITH resource parameter to test X seconds for status change after ON/OFF. -### sap_ha_cluster_hana_automated_register +Example: +```yaml +sap_ha_pacemaker_cluster_fence_options: + pcmk_reboot_retries: 4 + pcmk_reboot_timeout: 400 + power_timeout: 240 +``` + +### sap_ha_pacemaker_cluster_hana_automated_register - _Type:_ `bool` - _Default:_ `True` Define if a former primary should be re-registered automatically as secondary.
-### sap_ha_cluster_hana_duplicate_primary_timeout +### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout - _Type:_ `int` - _Default:_ `900` @@ -149,65 +157,65 @@ Time difference needed between to primary time stamps, if a dual-primary situati If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
-### sap_ha_cluster_hana_prefer_site_takeover +### sap_ha_pacemaker_cluster_hana_prefer_site_takeover - _Type:_ `bool` - _Default:_ `True` Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure.
-### sap_ha_cluster_hana_resource_name +### sap_ha_pacemaker_cluster_hana_resource_name - _Type:_ `str` - _Default:_ `SAPHana__` Customize the cluster resource name of the SAP HANA DB resource.
-### sap_ha_cluster_hana_topology_resource_name +### sap_ha_pacemaker_cluster_hana_topology_resource_name - _Type:_ `str` - _Default:_ `SAPHanaTopology__` Customize the cluster resource name of the SAP HANA Topology resource.
-### sap_ha_cluster_ibmcloud_api_key +### sap_ha_pacemaker_cluster_ibmcloud_api_key - _Type:_ `str` The API key is required to allow control of instances (for example for fencing operations).
Required for cluster nodes setup in IBM Cloud VPC.
-### sap_ha_cluster_ibmcloud_region +### sap_ha_pacemaker_cluster_ibmcloud_region - _Type:_ `str` The cloud region key in which the instances are running.
Required for cluster nodes setup in IBM Cloud VPC.
-### sap_ha_cluster_replication_type +### sap_ha_pacemaker_cluster_replication_type - _Type:_ `str` - _Default:_ `none` The type of SAP HANA site replication across multiple hosts.
_Not yet supported_
-### sap_ha_cluster_sap_type +### sap_ha_pacemaker_cluster_sap_type - _Type:_ `str` - _Default:_ `scaleup` The SAP landscape to be installed.
_Currently only scale-up is supported_
-### sap_ha_cluster_vip_client_interface +### sap_ha_pacemaker_cluster_vip_client_interface - _Type:_ `str` - _Default:_ `eth0` OS device name of the network interface to use for the Virtual IP configuration.
This is used for VIP agents that require an interface name, for example in cloud platform environments.
-### sap_ha_cluster_vip_resource_name +### sap_ha_pacemaker_cluster_vip_resource_name - _Type:_ `str` - _Default:_ `vip__` Customize the name of the resource managing the Virtual IP.
-### sap_ha_cluster_vip_update_rt +### sap_ha_pacemaker_cluster_vip_update_rt - _Type:_ `list` List one more routing table IDs for managing Virtual IP failover through routing table changes.
diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index 079551470..d447915c5 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -18,6 +18,8 @@ argument_specs: # default: # description: # - +# example: +# # required: false # type: # options: # additional options for lists and dicts @@ -31,6 +33,14 @@ argument_specs: - Definition of node name and IP addresses to be used for the pacemaker cluster. - Required for resilient node communication by providing more than one corosync IP. - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses + example: + ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA + pcs_address: nodeA + required: false type: dict options: @@ -53,14 +63,6 @@ argument_specs: - Can be a name, FQDN or IP address and can contain a port. type: str - example: - ha_cluster: - corosync_addresses: - - 192.168.1.10 - - 192.168.2.10 - node_name: nodeA - pcs_address: nodeA - ha_cluster_cluster_name: default: my-cluster description: @@ -122,6 +124,13 @@ argument_specs: - These options are applied to fencing resources this role uses automatically for pre-defined platforms (like AWS EC2, IBM Cloud VPC). - The listed options are set by default. - Additional options can be added by defining this parameter in dictionary format and adding the defaults plus any valid stonith resource key-value pair. + + example: + sap_ha_pacemaker_cluster_fence_options: + pcmk_reboot_retries: 4 + pcmk_reboot_timeout: 400 + power_timeout: 240 + required: false type: dict @@ -148,12 +157,6 @@ argument_specs: required: false type: int - example: - sap_ha_pacemaker_cluster_fence_options: - pcmk_reboot_retries: 4 - pcmk_reboot_timeout: 400 - power_timeout: 240 - sap_ha_pacemaker_cluster_hana_automated_register: default: true description: @@ -257,6 +260,18 @@ argument_specs: description: - List of cluster nodes and associated attributes to describe the target SAP HA environment. - This is required for the HANA System Replication configuration. + + example: + sap_hana_cluster_nodes: + - node_name: nodeA + node_role: primary + hana_site: DC01 + node_ip: 192.168.5.1 + - node_name: nodeB + node_role: secondary + hana_site: DC02 + node_ip: 192.168.5.2 + elements: dict required: true type: list @@ -284,17 +299,6 @@ argument_specs: - This is required for HANA System Replication configuration. required: true - example: - sap_hana_cluster_nodes: - - node_name: nodeA - node_role: primary - hana_site: DC01 - node_ip: 192.168.5.1 - - node_name: nodeB - node_role: secondary - hana_site: DC02 - node_ip: 192.168.5.2 - sap_hana_instance_number: description: - The instance number of the SAP HANA database which is role will configure in the cluster. @@ -312,9 +316,11 @@ argument_specs: description: - One floating IP is required for SAP HANA DB connection by clients. - This main VIP will always run on the promoted HANA node and be moved with it during a failover. - required: true - type: dict - required_one_of: [{ primary, main, rw, promoted }] + example: sap_hana_vip: primary: 192.168.10.100 + + required: true + type: dict + required_one_of: [{ primary, main, rw, promoted }] From 98802f73cd3061c905438a7bd4857fc350701e7c Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Sat, 12 Nov 2022 04:10:37 +0000 Subject: [PATCH 285/375] sap_swpm: working java installs --- docs/developer_notes/sap_swmp_dev.md | 146 +++++++++++++++++++++++++ roles/sap_swpm/templates/configfile.j2 | 1 + 2 files changed, 147 insertions(+) create mode 100644 docs/developer_notes/sap_swmp_dev.md diff --git a/docs/developer_notes/sap_swmp_dev.md b/docs/developer_notes/sap_swmp_dev.md new file mode 100644 index 000000000..937bb2b7e --- /dev/null +++ b/docs/developer_notes/sap_swmp_dev.md @@ -0,0 +1,146 @@ +# sap_swpm Ansible Role DEVELOPER NOTES + +## SAP SWPM for SAP NWAS JAVA installations + +There are two deployment methods executed for SAP SWPM for SAP NWAS JAVA, which uses two sequential executions: +- Method 1 ***(nw_java_import.buildJEEusingExtraMileTool = `false`)***: + 1. JLoad: `com.sap.engine.offline.OfflineToolStart com.sap.inst.jload.Jload` + 2. Deploy Controller Runner tool: `com.sap.engine.services.dc.api.cmd.Runner deploy` +- Method 2 ***(nw_java_import.buildJEEusingExtraMileTool = `true`)***: + 1. BatchDeployer (ExtraMile) Tool: `com.sap.engine.offline.OfflineToolStart com.sap.engine.extramile.BatchDeployer` + 2. Deploy Controller Runner tool: `com.sap.engine.services.dc.api.cmd.Runner deploy` + +The BatchDeployer (ExtraMile) Tool for SAP NetWeaver JAVA notes (see SNote 1715441), has some restrictions: +- Core SCAs (e.g. SERVERCORE) are deployed sequentially in a specific order +- J2EEAPPS cannot be deployed with this tool +- Only for offline deployments, does not support online deployments + + +### SAP SWPM for SAP NWAS JAVA - JLoad with IMPORT.XML + +**Example command:** +```shell +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/sapjvm/sapjvm_8/bin/java \ +-classpath \ +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/install/lib/sap.com~tc~bl~offline_launcher~impl.jar \ +-Xmx2048m \ +-XX:+HeapDumpOnOutOfMemoryError \ +com.sap.engine.offline.OfflineToolStart com.sap.inst.jload.Jload \ +-dataDir /software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_EXPORT_JDMP \ +-job /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/IMPORT.XML +``` + +**Example IMPORT.XML file (from JAVA_EXPORT_JDMP):** +```xml + + + + + + + + + + +``` + + +### SAP SWPM for SAP NWAS JAVA - BatchDeployer (ExtraMile) with list files + +**Example command (run for each list file):** +```shell +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/sapjvm/sapjvm_8/bin/java \ +-classpath \ +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/install/lib/sap.com~tc~bl~offline_launcher~impl.jar \ +-Xmx256m \ +com.sap.engine.offline.OfflineToolStart com.sap.engine.extramile.BatchDeployer \ +-pf /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/extramileconfig.properties \ +-rd /software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT \ +-list /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/deployJDD.lst +# -list /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/deployFS.lst +# -list /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/deployOffline.lst +``` + +**Example deployJDD.lst file:** +``` +BASETABLES22_0.SCA +``` + +**Example deployFS.lst file:** +``` +CORETOOLS22_0.SCA +JSPM22_0.SCA +``` + +**Example deployOffline.lst file:** +``` +J2EEFRMW22_0.SCA +CFGZACE22_0.SCA +SERVERCORE22_0.SCA +ENGINEAPI22_0.SCA +CFGZA22_0.SCA +``` + + +### SAP SWPM for SAP NWAS JAVA - Deploy Controller Runner tool + +The Deploy Controller Runner tool (deploycontroller) for the Java 'offline deployment' of SCA files will: + +- import of various JAR files, including '-classpath /tmp/sapinst_instdir/NW750/xxx/INSTALL/STD/install/lib/`tc~je~cl_deploy.jar`' and many others +- with system property values '-Ddc.api.verbose=false' +- with JVM heap size as '-Xmx256m' +- and executing to the P4 Port using Java Class `com.sap.engine.services.dc.api.cmd.Runner` calling the function `deploy` and operator `-l` with deployment list file `/tmp/sapinst_instdir/NW750/xxx/INSTALL/STD/deploy.lst` and other function operators (e.g. `--port 5 ** 04`) + +> For further details, see /tmp/sapinst_instdir/NW750/xxx/INSTALL/STD/log/dc_log/deploy_api.0.log + +**Example command:** +```shell +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/sapjvm/sapjvm_8/bin/java \ +-classpath \ +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/install/lib/tc~je~cl_deploy.jar:\ +/tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/j2eeclient/sap.com~tc~je~clientlib~impl.jar \ +-Xmx256m \ +-Ddc.api.verbose=false \ +com.sap.engine.services.dc.api.cmd.Runner deploy \ +-l /tmp/sapinst_instdir/NW750/SYB/INSTALL/STD/deploy.lst \ +-e stop \ +-u lower \ +-w safety \ +--lcm bulk \ +-t 14400000 \ +--host nw01 \ +--port 52004 +``` + +**Example deploy.lst file:** +``` +/software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/SERVERCORE22_0.SCA +/software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/J2EEAPPS22_0.SCA +/software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/JSPM22_0.SCA +etc +``` + +#### Error with the Deploy Controller Runner tool + +When setting inifile.params `nw_java_import.buildJEEusingExtraMileTool = false` an error will occur with the Deploy Controller Runner tool: + +```log +[ LOG EXCEPTION ] :: Exception while generating ID: [[ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized] +com.sap.engine.services.dc.cm.DCNotAvailableException: [ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized + +[ Error ] Exception while generating ID: [[ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized] + +[ LOG EXCEPTION ] :: com.sap.engine.services.dc.api.deploy.DeployException: [ERROR CODE DPL.DCAPI.1023] DCNotAvailableException. +Reason: [ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized +Caused by: com.sap.engine.services.dc.cm.DCNotAvailableException: [ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized + +[ LOG EXCEPTION ] :: java.lang.NullPointerException: while trying to get the length of a null array loaded from a local variable at slot 4 + +[ Error ] +104 +Component:n/a +Status:Initial +Description: +DeployException: [ERROR CODE DPL.DCAPI.1023] DCNotAvailableException. +Reason: [ERROR CODE DPL.DC.3218] Deploy controller is not ready to serve yet. Probably a un/deploy operation after offline phase is in progress at the moment. DC state is Initialized +``` diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index 9691163d7..cc0fccc38 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -593,6 +593,7 @@ UmeConfiguration.umeType = {{ sap_swpm_ume_type }} # nw_config_java_feature_template_ids ###### NW_internal.useProductVersionDescriptor = true +nw_java_import.buildJEEusingExtraMileTool = true # If use PV = true # SAP SWPM 1.0 for SAP NetWeaver AS (JAVA), Product Version Software Instance **Feature Template IDs** comma-separated list From ce0f8138acc1f473c55df50d3669a9cb9c3ad89c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 14 Nov 2022 13:15:22 +0000 Subject: [PATCH 286/375] sap_ha_pacemaker_cluster: variable construction fixes and defaults adjustments --- .../defaults/main.yml | 22 +++-- .../meta/argument_specs.yml | 25 ++++++ .../tasks/construct_vars_stonith.yml | 85 ++++++++++++++----- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 12 ++- ...onstruct_vars_vip_resources_vm_aws_ec2.yml | 18 ++-- .../vars/platform_vm_aws_ec2.yml | 4 +- .../vars/platform_vm_ibmcloud.yml | 2 +- 7 files changed, 125 insertions(+), 43 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/defaults/main.yml b/roles/sap_ha_pacemaker_cluster/defaults/main.yml index 4ddd9f071..4bba69ae5 100644 --- a/roles/sap_ha_pacemaker_cluster/defaults/main.yml +++ b/roles/sap_ha_pacemaker_cluster/defaults/main.yml @@ -24,14 +24,12 @@ sap_ha_pacemaker_cluster_extra_packages: "{{ ha_cluster_extra_packages | default # Adjusting resource defaults sap_ha_pacemaker_cluster_resource_defaults: - - name: resource-stickiness - value: 1000 - - name: migration-threshold - value: 5000 + resource-stickiness: 1000 + migration-threshold: 5000 # The type of SAP landscape and multi-node replication # TODO: Type definitions and feature support -# sap_ha_pacemaker_cluster_sap_type: +sap_ha_pacemaker_cluster_sap_type: scaleup sap_ha_pacemaker_cluster_replication_type: none # Optional parameters to customize HANA resources @@ -62,3 +60,17 @@ sap_ha_pacemaker_cluster_hana_topology_resource_clone_name: "{{ sap_ha_pacemaker # TODO: network interface name used for client access sap_ha_pacemaker_cluster_vip_client_interface: eth0 sap_ha_pacemaker_cluster_vip_update_rt: [] + +## A custom stonith definition that takes precedence over platform defaults. +# sap_ha_pacemaker_cluster_stonith_custom: +# - name: "" +# agent: "stonith:" +# options: +# pcmk_host_list: "" + +# Simpler format translated into 'ha_cluster_cluster_properties' format of +# 'ha_cluster' LSR. +sap_ha_pacemaker_cluster_cluster_properties: + stonith-enabled: true + stonith-timeout: 900 + concurrent-fencing: true diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index d447915c5..2dae592dc 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -98,6 +98,19 @@ argument_specs: required: false type: str + sap_ha_pacemaker_cluster_cluster_properties: + default: see example + description: + - Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing. + example: + sap_ha_pacemaker_cluster_cluster_properties: + stonith-enabled: true + stonith-timeout: 900 + concurrent-fencing: true + + required: false + type: dict + sap_ha_pacemaker_cluster_create_config_dest: default: _resource_config.yml description: @@ -223,6 +236,18 @@ argument_specs: required: false type: str + sap_ha_pacemaker_cluster_resource_defaults: + default: See example + description: + - Set default parameters in the cluster that will be valid for all pacemaker resources. + example: + sap_ha_pacemaker_cluster_resource_defaults: + resource-stickiness: 1000 + migration-threshold: 5000 + + required: false + type: dict + sap_ha_pacemaker_cluster_sap_type: choices: - scaleup diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml index 5bbfc7003..f1f696e6f 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_stonith.yml @@ -2,32 +2,44 @@ # The following variables are constructed here in order to be provided as # input for the included 'ha_cluster' system role. -- name: "SAP HA Prepare Pacemaker - Define cluster properties" +- name: "SAP HA Prepare Pacemaker - Define cluster stonith properties" when: - - item.name not in - (__sap_ha_pacemaker_cluster_cluster_properties | map(attribute='attr') | flatten | map(attribute='name')) + - sap_ha_pacemaker_cluster_cluster_properties is defined + - sap_ha_pacemaker_cluster_cluster_properties is iterable + - sap_ha_pacemaker_cluster_cluster_properties | length > 0 ansible.builtin.set_fact: - __sap_ha_pacemaker_cluster_cluster_properties: "{{ __sap_ha_pacemaker_cluster_cluster_properties + [{'attr': item}] }}" - loop_control: - label: "{{ item.name }}" - loop: - - name: stonith-enabled - value: true - - name: stonith-timeout - value: 900 - - name: concurrent-fencing - value: true + __sap_ha_pacemaker_cluster_cluster_properties: + - attrs: |- + {% set attrs = __sap_ha_pacemaker_cluster_cluster_properties | map(attribute='attrs') | flatten -%} + {%- for default_cluster_properties in (sap_ha_pacemaker_cluster_cluster_properties | dict2items) -%} + {% if default_cluster_properties.key not in + (__sap_ha_pacemaker_cluster_cluster_properties | map(attribute='attrs') | flatten | map(attribute='name')) -%} + {% set role_attrs = attrs.extend([ + { + 'name': default_cluster_properties.key, + 'value': default_cluster_properties.value + } + ]) -%} + {%- endif %} + {%- endfor %} + {{ attrs }} -# Combine the stonith resource config from +# Combine the default stonith resource config from # - assembled pcmk_host_map -# - fence resource defaults +# (see platform tasks: __sap_ha_pacemaker_cluster_pcmk_host_map) # - fence agent specific required options +# (see platform vars: sap_ha_pacemaker_cluster_stonith_default) +# - generic pacemaker fence resource options +# (see defaults: sap_ha_pacemaker_cluster_fence_options) -- name: "SAP HA Prepare Pacemaker - Assemble the stonith resource definition" +- name: "SAP HA Prepare Pacemaker - Assemble the stonith resource definition from platform default" + when: + - sap_ha_pacemaker_cluster_stonith_default is defined + - sap_ha_pacemaker_cluster_stonith_custom is not defined ansible.builtin.set_fact: - sap_ha_pacemaker_cluster_stonith_resource: - - id: "res_{{ sap_ha_pacemaker_cluster_stonith_required.agent | split(':') | last }}" - agent: "{{ sap_ha_pacemaker_cluster_stonith_required.agent }}" + __sap_ha_pacemaker_cluster_stonith_resource: + - id: "res_{{ sap_ha_pacemaker_cluster_stonith_default.agent | split(':') | last }}" + agent: "{{ sap_ha_pacemaker_cluster_stonith_default.agent }}" instance_attrs: - attrs: |- {% set attrs = [] -%} @@ -36,7 +48,7 @@ 'name': 'pcmk_host_map', 'value': '"' + __sap_ha_pacemaker_cluster_pcmk_host_map + '"' }]) -%} - {%- for agent_opt in (sap_ha_pacemaker_cluster_stonith_required.options | dict2items) -%} + {%- for agent_opt in (sap_ha_pacemaker_cluster_stonith_default.options | dict2items) -%} {% set aopts = attrs.extend([ { 'name': agent_opt.key, @@ -52,10 +64,39 @@ {%- endfor %} {{ attrs }} +- name: "SAP HA Prepare Pacemaker - Assemble the stonith resources from custom definition" + when: + - sap_ha_pacemaker_cluster_stonith_custom is defined + ansible.builtin.set_fact: + __sap_ha_pacemaker_cluster_stonith_resource: + - id: "res_{{ item.name }}" + agent: "{{ item.agent }}" + instance_attrs: + - attrs: |- + {% set attrs = [] -%} + {%- for option in (item.options | dict2items) -%} + {% set aopts = attrs.extend([ + { + 'name': option.key, + 'value': option.value + } + ]) -%} + {%- endfor %} + {{ attrs }} + loop: "{{ sap_ha_pacemaker_cluster_stonith_custom }}" + loop_control: + label: "{{ item.name }}" + + # The STONITH resource is an element in the cluster_resource_primitives list - name: "SAP HA Prepare Pacemaker - Construct stonith resources definition" when: - - sap_ha_pacemaker_cluster_stonith_resource is defined + - __sap_ha_pacemaker_cluster_stonith_resource is defined ansible.builtin.set_fact: - __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + (sap_ha_pacemaker_cluster_stonith_resource | from_yaml) }}" + __sap_ha_pacemaker_cluster_resource_primitives: |- + {{ + __sap_ha_pacemaker_cluster_resource_primitives + + + (__sap_ha_pacemaker_cluster_stonith_resource | from_yaml) + }} no_log: true # stonith resources usually contain secrets diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index e81a24164..ee26dd8b2 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -132,7 +132,8 @@ # role parameters, and thus need to be added. - name: "SAP HA Install Pacemaker - Check resource defaults" ansible.builtin.command: - cmd: pcs resource defaults config + cmd: | + pcs resource defaults config register: __sap_ha_pacemaker_cluster_check_resource_defaults run_once: true changed_when: false @@ -140,10 +141,13 @@ - name: "SAP HA Install Pacemaker - Update resource default attributes" when: - - item.name ~ '=' ~ item.value not in __sap_ha_pacemaker_cluster_check_resource_defaults.stdout + - item.key ~ '=' ~ item.value not in __sap_ha_pacemaker_cluster_check_resource_defaults.stdout ansible.builtin.command: - cmd: pcs resource defaults update {{ item.name }}={{ item.value }} - loop: "{{ sap_ha_pacemaker_cluster_resource_defaults }}" + cmd: | + pcs resource defaults update {{ item.key }}={{ item.value }} + loop: "{{ sap_ha_pacemaker_cluster_resource_defaults | dict2items }}" + loop_control: + label: "{{ item.key }}={{ item.value }}" run_once: true - name: "SAP HA Install Pacemaker - Include srHook configuration" diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml index a82b059d1..ea1dd239d 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/construct_vars_vip_resources_vm_aws_ec2.yml @@ -4,16 +4,16 @@ - name: "SAP HA Prepare Pacemaker - Add resource: OS floating IP (dev/test only)" when: - sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - - (sap_ha_pacemaker_cluster_vip_strategy == 'ipaddr') or - (__sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].with is defined and - 'ipaddr' in __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].with) + - (sap_ha_pacemaker_cluster_vip_method == 'ipaddr') or + (__sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_method].with is defined and + 'ipaddr' in __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_method].with) ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" vars: __resource_vip: id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_method].agent }}" instance_attrs: - attrs: - name: ip @@ -22,13 +22,13 @@ - name: "SAP HA Prepare Pacemaker - Add resource: AWS floating IP (dev/test only)" when: - ('pri' ~ sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - - sap_ha_pacemaker_cluster_vip_strategy == 'awsvip' + - sap_ha_pacemaker_cluster_vip_method == 'awsvip' ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" vars: __resource_vip: id: "pri{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_method].agent }}" instance_attrs: - attrs: - name: secondary_private_ip @@ -37,7 +37,7 @@ - name: "SAP HA Prepare Pacemaker - Add resource group for VIP resources" when: - __vip_group.id is not in (__sap_ha_pacemaker_cluster_resource_groups | map(attribute='id')) - - sap_ha_pacemaker_cluster_vip_strategy in ['awsvip'] + - sap_ha_pacemaker_cluster_vip_method in ['awsvip'] ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_groups: "{{ __sap_ha_pacemaker_cluster_resource_groups + [__vip_group] }}" __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_group_name }}_{{ vip_list_item.key }}" @@ -51,14 +51,14 @@ - name: "SAP HA Prepare Pacemaker - Add resource: AWS VIP routing" when: - (sap_ha_pacemaker_cluster_vip_resource_name ~ '_' ~ vip_list_item.key) not in (__sap_ha_pacemaker_cluster_resource_primitives | map(attribute='id')) - - sap_ha_pacemaker_cluster_vip_strategy == 'aws_vpc_move_ip' + - sap_ha_pacemaker_cluster_vip_method == 'aws_vpc_move_ip' ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + [__resource_vip] }}" __sap_ha_pacemaker_cluster_vip_contraint_id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" vars: __resource_vip: id: "{{ sap_ha_pacemaker_cluster_vip_resource_name }}_{{ vip_list_item.key }}" - agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_strategy].agent }}" + agent: "{{ __sap_ha_pacemaker_cluster_available_vip_agents[sap_ha_pacemaker_cluster_vip_method].agent }}" instance_attrs: - attrs: - name: ip diff --git a/roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml index 7b13c5fd7..540ec53d1 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_aws_ec2.yml @@ -23,7 +23,7 @@ __sap_ha_pacemaker_cluster_aws_instances: [] # sap_ha_pacemaker_cluster_aws_vpc: -sap_ha_pacemaker_cluster_stonith_required: +sap_ha_pacemaker_cluster_stonith_default: agent: "stonith:fence_aws" options: access_key: "{{ sap_ha_pacemaker_cluster_aws_access_key_id }}" @@ -31,7 +31,7 @@ sap_ha_pacemaker_cluster_stonith_required: region: "{{ sap_ha_pacemaker_cluster_aws_region }}" # Platform specific VIP handling -sap_ha_pacemaker_cluster_vip_strategy: aws_vpc_move_ip +sap_ha_pacemaker_cluster_vip_method: aws_vpc_move_ip sap_ha_pacemaker_cluster_vip_resource_group_name: vipgroup __sap_ha_pacemaker_cluster_available_vip_agents: diff --git a/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml index ad506ce96..b2672aced 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/platform_vm_ibmcloud.yml @@ -10,7 +10,7 @@ sap_ha_pacemaker_cluster_fence_agent_packages: # - id: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" # name: High Availability -sap_ha_pacemaker_cluster_stonith_required: +sap_ha_pacemaker_cluster_stonith_default: agent: "stonith:fence_ibm_vpc" options: apikey: "{{ sap_ha_pacemaker_cluster_ibmcloud_api_key }}" From 706de9ebda6d213d802b3e9708bcf18db71e6a5b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 14 Nov 2022 17:14:21 +0100 Subject: [PATCH 287/375] sap_ha_pacemaker_cluster: update to parameter section --- roles/sap_ha_pacemaker_cluster/README.md | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index b62a30edf..d0983abec 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -99,6 +99,20 @@ Required for cluster nodes setup on Amazon cloud.
AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud.
+### sap_ha_pacemaker_cluster_cluster_properties +- _Type:_ `dict` +- _Default:_ `see example` + +Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
+ +Example: +```yaml +sap_ha_pacemaker_cluster_cluster_properties: + concurrent-fencing: true + stonith-enabled: true + stonith-timeout: 900 +``` + ### sap_ha_pacemaker_cluster_create_config_dest - _Type:_ `str` - _Default:_ `_resource_config.yml` @@ -195,6 +209,19 @@ Required for cluster nodes setup in IBM Cloud VPC.
The type of SAP HANA site replication across multiple hosts.
_Not yet supported_
+### sap_ha_pacemaker_cluster_resource_defaults +- _Type:_ `dict` +- _Default:_ `See example` + +Set default parameters in the cluster that will be valid for all pacemaker resources.
+ +Example: +```yaml +sap_ha_pacemaker_cluster_resource_defaults: + migration-threshold: 5000 + resource-stickiness: 1000 +``` + ### sap_ha_pacemaker_cluster_sap_type - _Type:_ `str` - _Default:_ `scaleup` From d989bfecb99b48dbf3957d2229648ef1ad4b7103 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 14 Nov 2022 17:33:49 +0100 Subject: [PATCH 288/375] sap_ha_pacemaker_cluster: clearer parameter context --- roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index 2dae592dc..28995d2d4 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -99,7 +99,7 @@ argument_specs: type: str sap_ha_pacemaker_cluster_cluster_properties: - default: see example + default: See example description: - Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing. example: @@ -173,6 +173,7 @@ argument_specs: sap_ha_pacemaker_cluster_hana_automated_register: default: true description: + - Parameter for the 'SAPHana' cluster resource. - Define if a former primary should be re-registered automatically as secondary. required: false type: bool @@ -180,6 +181,7 @@ argument_specs: sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout: default: 900 description: + - Parameter for the 'SAPHana' cluster resource. - Time difference needed between to primary time stamps, if a dual-primary situation occurs. - If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status. - This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed. @@ -192,6 +194,7 @@ argument_specs: - false default: true description: + - Parameter for the 'SAPHana' cluster resource. - Set to "false" if the cluster should first attempt to restart the instance on the same node. - When set to "true" (default) a failover to secondary will be initiated on resource failure. required: false @@ -239,7 +242,7 @@ argument_specs: sap_ha_pacemaker_cluster_resource_defaults: default: See example description: - - Set default parameters in the cluster that will be valid for all pacemaker resources. + - Set default parameters that will be valid for all pacemaker resources. example: sap_ha_pacemaker_cluster_resource_defaults: resource-stickiness: 1000 From fc357487a2f0064d0032fc02c2ee0b6d8ceae89b Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 14 Nov 2022 17:35:42 +0100 Subject: [PATCH 289/375] sap_ha_pacemaker_cluster: clearer parameter context --- roles/sap_ha_pacemaker_cluster/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index d0983abec..50f4f4126 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -101,7 +101,7 @@ Required for cluster nodes setup on Amazon cloud.
### sap_ha_pacemaker_cluster_cluster_properties - _Type:_ `dict` -- _Default:_ `see example` +- _Default:_ `See example` Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
@@ -161,12 +161,14 @@ sap_ha_pacemaker_cluster_fence_options: - _Type:_ `bool` - _Default:_ `True` +Parameter for the 'SAPHana' cluster resource.
Define if a former primary should be re-registered automatically as secondary.
### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout - _Type:_ `int` - _Default:_ `900` +Parameter for the 'SAPHana' cluster resource.
Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
@@ -175,6 +177,7 @@ This is to give an admin a chance to react on a failover. A failed former primar - _Type:_ `bool` - _Default:_ `True` +Parameter for the 'SAPHana' cluster resource.
Set to "false" if the cluster should first attempt to restart the instance on the same node.
When set to "true" (default) a failover to secondary will be initiated on resource failure.
@@ -213,7 +216,7 @@ _Not yet supported_
- _Type:_ `dict` - _Default:_ `See example` -Set default parameters in the cluster that will be valid for all pacemaker resources.
+Set default parameters that will be valid for all pacemaker resources.
Example: ```yaml From 541540f697986ad41d22bedb3307fa1ad92a5f6e Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 14 Nov 2022 20:48:08 +0000 Subject: [PATCH 290/375] docs: update dev notes --- docs/developer_notes/sap_swmp_dev.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/developer_notes/sap_swmp_dev.md b/docs/developer_notes/sap_swmp_dev.md index 937bb2b7e..69d33d211 100644 --- a/docs/developer_notes/sap_swmp_dev.md +++ b/docs/developer_notes/sap_swmp_dev.md @@ -112,13 +112,19 @@ com.sap.engine.services.dc.api.cmd.Runner deploy \ --port 52004 ``` -**Example deploy.lst file:** +**Example deploy.lst files:** ``` /software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/SERVERCORE22_0.SCA /software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/J2EEAPPS22_0.SCA /software/sapnwas_java_export_extracted/DATA_UNITS/JAVA_J2EE_OSINDEP_UT/JSPM22_0.SCA etc ``` +``` +/software/sap_solman_java_export_extracted/DATA_UNITS/SOLMAN72_JAVA_UT/LMSERVICE12_0.SCA +/software/sap_solman_java_export_extracted/DATA_UNITS/SOLMAN72_JAVA_UT/ADSSAP19_1.SCA +/software/sap_solman_java_export_extracted/DATA_UNITS/SOLMAN72_JAVA_UT/ISAGENTMINJ500_0.SCA +etc +``` #### Error with the Deploy Controller Runner tool From 7ea9994b5c00108cde2b5684e87987157463ff6a Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 14 Nov 2022 20:55:05 +0000 Subject: [PATCH 291/375] sap_ha: deprecate preview roles merged into sap_ha_pacemaker_cluster --- roles/sap_ha_install_pacemaker/.ansible-lint | 1 - roles/sap_ha_install_pacemaker/.yamllint.yml | 1 - roles/sap_ha_install_pacemaker/README.md | 138 -------------- .../defaults/main.yml | 13 -- roles/sap_ha_install_pacemaker/meta/main.yml | 26 --- .../sap_ha_install_pacemaker/meta/runtime.yml | 2 - .../tasks/check_properties.yml | 7 - .../tasks/cluster_setup.yml | 42 ----- roles/sap_ha_install_pacemaker/tasks/main.yml | 55 ------ .../tasks/stonith_config.yml | 37 ---- roles/sap_ha_prepare_pacemaker/.ansible-lint | 1 - roles/sap_ha_prepare_pacemaker/.yamllint.yml | 1 - roles/sap_ha_prepare_pacemaker/README.md | 116 ------------ .../defaults/main.yml | 14 -- roles/sap_ha_prepare_pacemaker/meta/main.yml | 25 --- .../sap_ha_prepare_pacemaker/meta/runtime.yml | 2 - .../tasks/cluster_prepare.yml | 25 --- .../tasks/configure_firewall.yml | 18 -- roles/sap_ha_prepare_pacemaker/tasks/main.yml | 138 -------------- .../tasks/preconfig.yml | 6 - .../tasks/software_setup.yml | 29 --- roles/sap_ha_set_hana/.ansible-lint | 1 - roles/sap_ha_set_hana/.yamllint.yml | 1 - roles/sap_ha_set_hana/README.md | 166 ----------------- roles/sap_ha_set_hana/defaults/main.yml | 9 - roles/sap_ha_set_hana/meta/main.yml | 26 --- roles/sap_ha_set_hana/meta/runtime.yml | 2 - .../tasks/cluster_constraint.yml | 44 ----- .../tasks/cluster_resources.yml | 71 ------- .../sap_ha_set_hana/tasks/cluster_srhook.yml | 38 ---- .../sap_ha_set_hana/tasks/cluster_sudoer.yml | 10 - roles/sap_ha_set_hana/tasks/main.yml | 64 ------- roles/sap_ha_set_hana/templates/20-saphana.j2 | 16 -- roles/sap_ha_set_netweaver/README.md | 174 ----------------- roles/sap_ha_set_netweaver/defaults/main.yml | 47 ----- roles/sap_ha_set_netweaver/meta/main.yml | 15 -- roles/sap_ha_set_netweaver/meta/runtime.yml | 2 - .../tasks/filesystems.yml | 53 ------ roles/sap_ha_set_netweaver/tasks/main.yml | 25 --- .../sap_ha_set_netweaver/tasks/post_ascs.yml | 35 ---- roles/sap_ha_set_netweaver/tasks/post_ers.yml | 176 ------------------ roles/sap_ha_set_netweaver/tasks/post_pas.yml | 11 -- roles/sap_ha_set_netweaver/tasks/prepare.yml | 58 ------ .../tasks/update_etchosts.yml | 26 --- 44 files changed, 1767 deletions(-) delete mode 120000 roles/sap_ha_install_pacemaker/.ansible-lint delete mode 120000 roles/sap_ha_install_pacemaker/.yamllint.yml delete mode 100644 roles/sap_ha_install_pacemaker/README.md delete mode 100644 roles/sap_ha_install_pacemaker/defaults/main.yml delete mode 100644 roles/sap_ha_install_pacemaker/meta/main.yml delete mode 100644 roles/sap_ha_install_pacemaker/meta/runtime.yml delete mode 100644 roles/sap_ha_install_pacemaker/tasks/check_properties.yml delete mode 100644 roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml delete mode 100644 roles/sap_ha_install_pacemaker/tasks/main.yml delete mode 100644 roles/sap_ha_install_pacemaker/tasks/stonith_config.yml delete mode 120000 roles/sap_ha_prepare_pacemaker/.ansible-lint delete mode 120000 roles/sap_ha_prepare_pacemaker/.yamllint.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/README.md delete mode 100644 roles/sap_ha_prepare_pacemaker/defaults/main.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/meta/main.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/meta/runtime.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/tasks/configure_firewall.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/tasks/main.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/tasks/preconfig.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml delete mode 120000 roles/sap_ha_set_hana/.ansible-lint delete mode 120000 roles/sap_ha_set_hana/.yamllint.yml delete mode 100644 roles/sap_ha_set_hana/README.md delete mode 100644 roles/sap_ha_set_hana/defaults/main.yml delete mode 100644 roles/sap_ha_set_hana/meta/main.yml delete mode 100644 roles/sap_ha_set_hana/meta/runtime.yml delete mode 100644 roles/sap_ha_set_hana/tasks/cluster_constraint.yml delete mode 100644 roles/sap_ha_set_hana/tasks/cluster_resources.yml delete mode 100644 roles/sap_ha_set_hana/tasks/cluster_srhook.yml delete mode 100644 roles/sap_ha_set_hana/tasks/cluster_sudoer.yml delete mode 100644 roles/sap_ha_set_hana/tasks/main.yml delete mode 100644 roles/sap_ha_set_hana/templates/20-saphana.j2 delete mode 100644 roles/sap_ha_set_netweaver/README.md delete mode 100644 roles/sap_ha_set_netweaver/defaults/main.yml delete mode 100644 roles/sap_ha_set_netweaver/meta/main.yml delete mode 100644 roles/sap_ha_set_netweaver/meta/runtime.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/filesystems.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/main.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/post_ascs.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/post_ers.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/post_pas.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/prepare.yml delete mode 100644 roles/sap_ha_set_netweaver/tasks/update_etchosts.yml diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_install_pacemaker/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_install_pacemaker/.yamllint.yml b/roles/sap_ha_install_pacemaker/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_install_pacemaker/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_install_pacemaker/README.md b/roles/sap_ha_install_pacemaker/README.md deleted file mode 100644 index 984418136..000000000 --- a/roles/sap_ha_install_pacemaker/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# sap_ha_install_pacemaker Ansible Role - -Ansible role for SAP Pacemaker Setup. This role needs **sap_ha_prepare_pacemaker** to be able to run. It creates a 2 node pacemaker cluster. - -## Overview - -The **sap_ha_install_pacemaker** role is part of this sequence: - -| Sequence | System Role | Description | -| :------: | :----------------------- | :----------------------------------------------------------- | -| 1. | sap_general_preconfigure | System Preparation for SAP | -| 2. | sap_hana_preconfigure | System Preparation for SAP HANA | -| 3. | sap_hana_install | Installation of SAP HANA Database | -| 4. | sap_ha_install_hana_hsr | Configuration of SAP HANA System Replication | -| 5. | sap_ha_prepare_pacemaker | Authentication and Preparation of Nodes for Cluster Creation | -| 6. | sap_ha_install_pacemaker | Initialization of the Pacemaker Cluster | -| 7. | sap_ha_set_hana | Configuration of SAP HANA Resources for SAP Solutions | - -The **sap_ha_install_pacemaker** creates a pacemaker cluster. -The necessary preparation is done in the role **sap_ha_prepare_pacemaker**. - -## Tasks includes - -| Task | Description | -| ------------------ | ----------------------------------- | -| cluster_setup.yml | create a cluster without ressources | -| stonith_config.yml | configure a stonith device | - -## Common Variables/Parameters Used - -| Name | Description | Value | -| -------------------------------- | ------------------------------- | ---------------- | -| sap_domain | Domain Name | e.g. example.com | -| sap_hana_sid | SAP ID | e.g. RH1 | -| sap_hana_instance_number | Instance Number | e.g. 00 | -| sap_hana_install_master_password | DB System Password | -| sap_hana_cluster_nodes | Parameter list of cluster nodes | -| sap_hana_hacluster_password | Pacemaker hacluster Password | - -## Role specific Variables - -| Name | Description | Value | -| ---------------------------------------- | ------------------------------------------------------ | ----------------------------- | -| sap_ha_install_pacemaker_vip1 | VirtualIP address to the master database node | sap_hana_vip1 | -| sap_ha_install_pacemaker_vip2 | VirtualIP address to the slave database node (planned) | sap_hana_vip2 | -| sap_ha_install_pacemaker_stonith_devices | parameter to configure stonith device | sap_pacemaker_stonith_devices | -| sap_ha_install_hana_hsr_rep_mode | replication mode | default is sync | -| sap_ha_install_hana_hsr_oper_mode | operation mode | default is logreplay | -| sap_pacemaker_stonith_devices | description of the stonith device | - -The stonith device needs to be - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - -``` -sap_pacemaker_stonith_devices: - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - - - name: "fence_kdump1" - agent: "fence_kdump" - credential: "nodename='hana1'" - parameters: "pcmk_host_list='hana1,hana2' pcmk_reboot_action='off'" - - name: "fence_kdump2" - agent: "fence_kdump" - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - - credential: "nodename='hana2'" - parameters: "pcmk_host_list='hana1,hana2' pcmk_reboot_action='off'" - -``` - -## Requirements, Dependencies and Testing - -Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) - -## Example Parameter File - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - -``` -sap_hana_sid: 'DB1' -sap_hana_instance_number: '00' -sap_hana_install_master_password: 'my_hana-password' - -### Cluster Definition -sap_ha_install_pacemaker_cluster_name: cluster1 -sap_hana_hacluster_password: 'my_hacluster-password' -sap_pacemaker_stonith_devices: - -sap_domain: example.com - -sap_hana_cluster_nodes: - - node_name: node1 - node_ip: 192.168.1.11 - node_role: primary - hana_site: DC01 - - - node_name: node2 - node_ip: 192.168.1.12 - Please also check [SAP HANA scale-up Reference Architecture](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - - node_role: secondary - hana_site: DC02 - -sap_pacemaker_stonith_devices: - - name: "fence_name_for_rhevm" - agent: "fence_rhevm" - credential: "disable_http_filter=1 ipaddr=lu0529.wdf.sap.corp login='rhevuser@internal' password=G3h31m pcmk_host_map='hana01:hana01;hana02:hana02' power_wait=3 ssl=1 ssl_insecure=1" - -``` - -### Execution Design - -Having the parameters specified as above, it can be executed with one command: - -``` -ansible-playbook example_playbook_with_parameters.yml -``` - -If you need to execute the role using an external handled, you can also limit the playbook for -specific a **host** adding parameter defined in e **parameter_file**. - -``` -ansible-playbook -l node1 example_playbook.yml -e @parameter_file.yml -``` - -A good way to start is executing the playbook with the option _--list_tasks_. You can than start a -playbook with the option _--start-at-task_ at a specific point. _--list_task_ will not start any -task. - -For more information please check - -``` -ansible-playbook --help -``` - -## License - -Apache license 2.0 - -## Author Information - -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster diff --git a/roles/sap_ha_install_pacemaker/defaults/main.yml b/roles/sap_ha_install_pacemaker/defaults/main.yml deleted file mode 100644 index b69bbe4d8..000000000 --- a/roles/sap_ha_install_pacemaker/defaults/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -sap_ha_install_pacemaker_sid: "{{ sap_hana_sid }}" -sap_ha_install_pacemaker_instance_number: "{{ sap_hana_instance_number }}" - -sap_ha_install_pacemaker_cluster_name: "{{ sap_hana_cluster_name }}" -sap_ha_install_pacemaker_cluster_nodes: "{{ sap_hana_cluster_nodes }}" - -sap_ha_install_pacemaker_vip1: " {{ sap_hana_vip1 }}}" -sap_ha_install_pacemaker_vip2: " {{ sap_hana_vip2 }}}" - -sap_ha_install_pacemaker_hacluster_password: "{{ sap_hana_hacluster_password }}" - -sap_ha_install_pacemaker_stonith_devices: "{{ sap_pacemaker_stonith_devices }}" diff --git a/roles/sap_ha_install_pacemaker/meta/main.yml b/roles/sap_ha_install_pacemaker/meta/main.yml deleted file mode 100644 index 2d4a34820..000000000 --- a/roles/sap_ha_install_pacemaker/meta/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -galaxy_info: - namespace: community - author: IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster - description: Installation of Linux Pacemaker for SAP on Linux OS (RHEL, SLES) - company: Red Hat, Inc. - license: Apache-2.0 - min_ansible_version: "2.9" - platforms: - - name: EL - versions: ["7", "8", "9"] - - name: SLES - versions: ["15SP3"] - galaxy_tags: - [ - "sap", - "ha", - "dr", - "linuxpacemaker", - "pacemaker", - "rhel", - "redhat", - "sles", - "suse", - ] -dependencies: [] diff --git a/roles/sap_ha_install_pacemaker/meta/runtime.yml b/roles/sap_ha_install_pacemaker/meta/runtime.yml deleted file mode 100644 index 2ee3c9fa9..000000000 --- a/roles/sap_ha_install_pacemaker/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.9.10' diff --git a/roles/sap_ha_install_pacemaker/tasks/check_properties.yml b/roles/sap_ha_install_pacemaker/tasks/check_properties.yml deleted file mode 100644 index 628c22789..000000000 --- a/roles/sap_ha_install_pacemaker/tasks/check_properties.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: "SAP Pacemaker Setup - Get current properties" - ansible.builtin.shell: | - pcs property list - register: __sap_ha_install_pacemaker_pcs_properties - changed_when: false - failed_when: false diff --git a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml b/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml deleted file mode 100644 index 3a60e9dee..000000000 --- a/roles/sap_ha_install_pacemaker/tasks/cluster_setup.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# The following tasks are only included on the primary node! - -- name: "SAP Pacemaker Setup - Setup and enable/start Pacemaker cluster" - ansible.builtin.command: | - pcs cluster setup \ - {{ sap_ha_install_pacemaker_cluster_name }} {% for node in sap_ha_install_pacemaker_cluster_nodes %}{{ node.node_name }}{{ " " if not loop.last else "" }}{% endfor %} \ - totem token=30000 \ - --enable --start --wait=30 - register: __sap_ha_install_pacemaker_cluster_create - changed_when: __sap_ha_install_pacemaker_cluster_create.rc == 0 - -- name: "SAP Pacemaker Setup - Get cluster node corosync status" - ansible.builtin.shell: | - set -o pipefail && - pcs status nodes corosync | grep "Online" - register: __sap_ha_install_pacemaker_cluster_online - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Setup - Verify that all nodes are online" - ansible.builtin.assert: - that: - - item.node_name.split('.')[0] in __sap_ha_install_pacemaker_cluster_online.stdout - quiet: true - fail_msg: "Node not found in 'Online' status!" - loop: "{{ sap_ha_install_pacemaker_cluster_nodes }}" - loop_control: - label: "Is online: {{ item.node_name.split('.')[0] }}" - -#- name: "SAP Pacemaker Setup - Set Expected Votes = {{ sap_ha_install_pacemaker_cluster_nodes | length }}" -# ansible.builtin.shell: | -# pcs quorum expected-votes {{ sap_ha_install_pacemaker_cluster_nodes | length }} - -- name: "SAP Pacemaker Setup - Check pcs properties" - include_tasks: check_properties.yml - -- name: "SAP Pacemaker Setup - Allow concurrent fence actions" - ansible.builtin.shell: | - pcs property set concurrent-fencing=true - when: - - "'concurrent-fencing: true' not in __sap_ha_install_pacemaker_pcs_properties.stdout" diff --git a/roles/sap_ha_install_pacemaker/tasks/main.yml b/roles/sap_ha_install_pacemaker/tasks/main.yml deleted file mode 100644 index e35e4d470..000000000 --- a/roles/sap_ha_install_pacemaker/tasks/main.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -- name: "SAP Install Pacemaker - Pick up primary node name from definition" - ansible.builtin.set_fact: - __sap_ha_install_pacemaker_primary_node: "{{ item.node_name }}" - when: - - item.node_role is defined - - item.node_role == 'primary' - loop: "{{ sap_ha_install_pacemaker_cluster_nodes }}" - loop_control: - label: "{{ item.node_name }}" - tags: - - pacemaker - - ha - - stonith - -- name: "SAP Install Pacemaker - Check Cluster" - ansible.builtin.shell: | - pcs cluster status - become: true - become_user: root - register: sap_ha_install_pacemaker_check_cluster - changed_when: false - failed_when: false - tags: - - pacemaker - - ha - -- name: "SAP Install Pacemaker - Cluster Setup" - include_tasks: - file: cluster_setup.yml - apply: - tags: - - pacemaker - - ha - when: - - ansible_hostname == __sap_ha_install_pacemaker_primary_node - - sap_ha_install_pacemaker_check_cluster.rc == 1 - tags: - - pacemaker - - ha - -- name: "SAP Install Pacemaker - Stonith Configuration" - include_tasks: - file: stonith_config.yml - apply: - tags: - - stonith - - pacemaker - - ha - when: - - ansible_hostname == __sap_ha_install_pacemaker_primary_node - tags: - - stonith - - ha - - pacemaker diff --git a/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml b/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml deleted file mode 100644 index 5311220ce..000000000 --- a/roles/sap_ha_install_pacemaker/tasks/stonith_config.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# The following tasks are only included on the primary node! -- name: "SAP Pacemaker Setup - Check pcs properties" - include_tasks: check_properties.yml - -- name: "SAP Pacemaker Setup - Update STONITH timeout" - ansible.builtin.shell: | - pcs property set stonith-timeout=900 - when: - - '"stonith-timeout: 900" not in __sap_ha_install_pacemaker_pcs_properties.stdout' - -- name: "SAP Pacemaker Setup - Check the fence device" - ansible.builtin.shell: | - pcs stonith config - register: __sap_ha_install_pacemaker_stonith_check - changed_when: false - failed_when: false - -- name: "SAP Pacemaker Setup - Configure the fence device" - ansible.builtin.shell: | - pcs stonith create \ - {{ item.name }} {{ item.agent }} \ - {{ item.parameters }} - loop: "{{ sap_ha_install_pacemaker_stonith_devices }}" - loop_control: - label: "{{ item.agent }} as {{ item.name }}" - register: __sap_ha_install_pacemaker_configure_fence_device - when: - - item.name not in __sap_ha_install_pacemaker_stonith_check.stdout - failed_when: - - __sap_ha_install_pacemaker_configure_fence_device.stderr != "" - -- name: "SAP Pacemaker Setup - Enable the STONITH devices" - ansible.builtin.shell: | - pcs property set stonith-enabled=true - when: - - '"stonith-enabled: true" not in __sap_ha_install_pacemaker_pcs_properties.stdout' diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_prepare_pacemaker/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/.yamllint.yml b/roles/sap_ha_prepare_pacemaker/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_prepare_pacemaker/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_prepare_pacemaker/README.md b/roles/sap_ha_prepare_pacemaker/README.md deleted file mode 100644 index 03875e92f..000000000 --- a/roles/sap_ha_prepare_pacemaker/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# sap_ha_prepare_pacemaker Ansible Role - -The role **sap_ha_prepare_pacemaker** is necessary because tasks needs to be finished on all nodes before the the cluster can be configured. - -The following tasks are part of this role and excluded from the role **sap_ha_install_pacemaker**: - - Software Installation - - Host authentication - -## Overview - -The **sap_ha_prepare_pacemaker** role is part of this sequence: - -| Sequence | System Role | Description | -| :------: | :----------------------- | :----------------------------------------------------------- | -| 1. | sap_general_preconfigure | System Preparation for SAP | -| 2. | sap_hana_preconfigure | System Preparation for SAP HANA | -| 3. | sap_hana_install | Installation of SAP HANA Database | -| 4. | sap_ha_install_hana_hsr | Configuration of SAP HANA System Replication | -| 5. | sap_ha_prepare_pacemaker | Authentication and Preparation of Nodes for Cluster Creation | -| 6. | sap_ha_install_pacemaker | Initialization of the Pacemaker Cluster | -| 7. | sap_ha_set_hana | Configuration of SAP HANA Resources for SAP Solutions | - -The **sap_ha_install_pacemaker** prepares all nodes of a cluster to be able to install pacemaker.q - -## Tasks includes - -| Task | Description | -| ---------------------- | ------------------------------------------------- | -| software_setup.yml | enable repos and install cluster packages | -| preconfig.yml | set hacluster password | -| configure_firewall.yml | add high-availability ports to the firewalld | -| cluster_prepare.yml | enable cluster services and set pcs auth password | - -## Common Variables/Parameters Used - -| Name | Description | Value | -| -------------------------------- | ------------------------------- | ---------------- | -| sap_domain | Domain Name | e.g. example.com | -| sap_hana_sid | SAP ID | e.g. RH1 | -| sap_hana_instance_number | Instance Number | e.g. 00 | -| sap_hana_install_master_password | DB System Password | -| sap_hana_cluster_nodes | Parameter list of cluster nodes | -| sap_hana_hacluster_password | Pacemaker hacluster Password | - -## Role specific Variables - -| Name | Description | Value | -| ------------------------------------------- | ------------------ | --------------------------- | -| sap_ha_prepare_pacemaker_hacluster_password | hacluster password | sap_hana_hacluster_password | - -## Requirements, Dependencies and Testing - -Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) - -## Example Parameter File - -``` -sap_hana_sid: 'DB1' -sap_hana_instance_number: '00' -sap_hana_install_master_password: 'my_hana-pass - -### Cluster Definition -sap_ha_install_pacemaker_cluster_name: cluster1 -sap_hana_hacluster_password: 'my_hacluster-pass -sap_pacemaker_stonith_devices: - -sap_domain: example.com - -sap_hana_cluster_nodes: - - node_name: node1 - node_ip: 192.168.1.11 - node_role: primary - hana_site: DC01 - - - node_name: node2 - node_ip: 192.168.1.12 - node_role: secondary - hana_site: DC02 - -``` - -### Execution Design - -Having the parameters specified as above, it can be executed with one command: - -``` -ansible-playbook example_playbook_with_parameters.ymnl -``` - -If you need to execute the role using an external handled, you can also limit the playbook for -specific a **host** adding parameter defined in e **parameter_file**. - -``` -ansible-playbook -l node1 example_playbook.yml -e @parameter_file.yml -``` - -A good way to start is executing the playbook with the option _--list_tasks_. You can than start a -playbook with the option _--start-at-task_ at a specific point. _--list_task_ will not start any -task. - -For more information please check - -``` -ansible-playbook --help -``` - -## License - -Apache license 2.0 - -## Author Information - -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, -Markus Moster diff --git a/roles/sap_ha_prepare_pacemaker/defaults/main.yml b/roles/sap_ha_prepare_pacemaker/defaults/main.yml deleted file mode 100644 index e3ef2ee2e..000000000 --- a/roles/sap_ha_prepare_pacemaker/defaults/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -sap_ha_prepare_pacemaker_hacluster_password: "{{ sap_hana_hacluster_password }}" -sap_ha_prepare_pacemaker_cluster_nodes: "{{ sap_hana_cluster_nodes }}" -sap_ha_prepare_pacemaker_configure_firewall: no - -sap_ha_prepare_pacemaker_rhsm_repos: - - "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-e4s-rpms" - -sap_ha_prepare_pacemaker_packages: - - pcs - - pacemaker - - nfs-utils - - resource-agents-sap-hana - - fence-agents-all diff --git a/roles/sap_ha_prepare_pacemaker/meta/main.yml b/roles/sap_ha_prepare_pacemaker/meta/main.yml deleted file mode 100644 index d378edecb..000000000 --- a/roles/sap_ha_prepare_pacemaker/meta/main.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -galaxy_info: - namespace: community - author: IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster - description: Installation of Linux Pacemaker for SAP on Linux OS (RHEL, SLES) - company: Red Hat, Inc. - license: Apache-2.0 - min_ansible_version: "2.9" - platforms: - - name: EL - versions: ["7", "8", "9"] - - name: SLES - versions: ["15SP3"] - galaxy_tags: - [ - "sap", - "ha", - "dr", - "linuxpacemaker", - "rhel", - "redhat", - "sles", - "suse", - ] -dependencies: [] diff --git a/roles/sap_ha_prepare_pacemaker/meta/runtime.yml b/roles/sap_ha_prepare_pacemaker/meta/runtime.yml deleted file mode 100644 index 460bbaf81..000000000 --- a/roles/sap_ha_prepare_pacemaker/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: ">=2.9.10" diff --git a/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml b/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml deleted file mode 100644 index fc8ba15d4..000000000 --- a/roles/sap_ha_prepare_pacemaker/tasks/cluster_prepare.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- name: "SAP Prepare Pacemaker - Start pcsd.service" - ansible.builtin.systemd: - name: pcsd.service - state: started - enabled: yes - -- name: "SAP Prepare Pacemaker - Authenticate primary cluster node" - ansible.builtin.shell: | - pcs host auth \ - {{ ansible_hostname }} \ - -u hacluster -p '{{ sap_ha_prepare_pacemaker_hacluster_password }}' - register: pcs_host_auth_reg - when: - - ansible_hostname == __sap_ha_prepare_pacemaker_primary_node_name - -- name: "SAP Prepare Pacemaker - Authenticate secondary cluster node" - ansible.builtin.shell: | - pcs host auth \ - {{ ansible_hostname }} \ - -u hacluster -p '{{ sap_ha_prepare_pacemaker_hacluster_password }}' - register: pcs_host_auth_reg - when: - - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name - delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node }}" diff --git a/roles/sap_ha_prepare_pacemaker/tasks/configure_firewall.yml b/roles/sap_ha_prepare_pacemaker/tasks/configure_firewall.yml deleted file mode 100644 index 1cab43cca..000000000 --- a/roles/sap_ha_prepare_pacemaker/tasks/configure_firewall.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -- name: "SAP Prepare Pacemaker - Enable firewall" - ansible.builtin.systemd: - service: firewalld.service - state: started - enabled: true - -- name: "SAP Prepare Pacemaker - Configure firewall" - ansible.builtin.firewalld: - service: high-availability - state: enabled - immediate: yes - permanent: yes - -- name: "SAP Prepare Pacemaker - Immediately reload firewalld service" - ansible.builtin.systemd: - service: firewalld.service - state: reloaded diff --git a/roles/sap_ha_prepare_pacemaker/tasks/main.yml b/roles/sap_ha_prepare_pacemaker/tasks/main.yml deleted file mode 100644 index bc2fab224..000000000 --- a/roles/sap_ha_prepare_pacemaker/tasks/main.yml +++ /dev/null @@ -1,138 +0,0 @@ ---- -- name: "SAP Prepare Pacemaker - Pick up primary node name from definition" - ansible.builtin.set_fact: - __sap_ha_prepare_pacemaker_primary_node: "{{ item.node_name }}" - __sap_ha_prepare_pacemaker_primary_node_name: "{{ item.node_name }}" - __sap_ha_prepare_pacemaker_primary_node_ip: "{{ item.node_ip }}" - when: - - item.node_role is defined - - item.node_role == 'primary' - loop: "{{ sap_ha_prepare_pacemaker_cluster_nodes }}" - loop_control: - label: "{{ item.node_name }}" - tags: - - ha_software - - ha_firewall - - pacemaker - - ha - -- name: "SAP Prepare Pacemaker - Verify Ansible connection to primary node by name" - ansible.builtin.command: | - hostname -s - delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_name }}" - register: __sap_ha_prepare_pacemaker_primary_node_name_check - when: - - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name - ignore_unreachable: true - ignore_errors: true - failed_when: false - changed_when: false - become: false - tags: - - pacemaker - - ha - -# BEGIN of primary node connectivity test block -- name: "SAP Prepare Pacemaker - Connection verification block" - block: - - name: "SAP Prepare Pacemaker - Verify Ansible conn to primary node IP" - ansible.builtin.command: | - hostname -s - delegate_to: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" - register: __sap_ha_prepare_pacemaker_primary_node_ip_check - ignore_unreachable: true - ignore_errors: true - failed_when: false - changed_when: false - - - name: "SAP Prepare Pacemaker - Use IP for primary node delegation" - ansible.builtin.set_fact: - __sap_ha_prepare_pacemaker_primary_node: "{{ __sap_ha_prepare_pacemaker_primary_node_ip }}" - when: - - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout == __sap_ha_prepare_pacemaker_primary_node_name - - - name: "SAP Prepare Pacemaker - Fail if primary node is unreachable" - ansible.builtin.fail: - msg: | - Aborting due to issues identifying and connecting to the primary node. - It can either not be reached by host name or the connected IP returns - an unmatching hostname. - when: - - __sap_ha_prepare_pacemaker_primary_node_ip_check.unreachable is defined or - __sap_ha_prepare_pacemaker_primary_node_ip_check.stdout != __sap_ha_prepare_pacemaker_primary_node_name - - # block settings - when: - - ansible_hostname != __sap_ha_prepare_pacemaker_primary_node_name - - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable is defined - - __sap_ha_prepare_pacemaker_primary_node_name_check.unreachable - become: false - tags: - - pacemaker - - ha -# END of primary node connectivity test block - -- name: "SAP Prepare Pacemaker - Software Setup" - include_tasks: - file: software_setup.yml - apply: - tags: - - ha_software - - pacemaker - - ha - tags: - - ha_software - - pacemaker - - ha - -- name: "SAP Prepare Pacemaker - Preconfig" - include_tasks: - file: preconfig.yml - apply: - tags: - - pacemaker - - ha - tags: - - pacemaker - - ha - -- name: "SAP Prepare Pacemaker - Include Firewall Tasks" - include_tasks: - file: configure_firewall.yml - apply: - tags: - - ha_firewall - - pacemaker - - ha - when: - - (sap_hana_configure_firewall is defined and sap_hana_configure_firewall) - or sap_ha_prepare_pacemaker_configure_firewall - tags: - - ha_firewall - - pacemaker - - ha - -- name: "SAP Prepare Pacemaker - Check Cluster Status" - ansible.builtin.shell: | - pcs cluster status - become: true - become_user: root - register: sap_ha_prepare_pacemaker_check_cluster - changed_when: false - failed_when: false - tags: - - pacemaker - - ha - -- name: "SAP Prepare Pacemaker - Cluster Prepare" - include_tasks: - file: cluster_prepare.yml - apply: - tags: - - pacemaker - - ha - when: - - sap_ha_prepare_pacemaker_check_cluster.rc == 1 - tags: - - pacemaker - - ha diff --git a/roles/sap_ha_prepare_pacemaker/tasks/preconfig.yml b/roles/sap_ha_prepare_pacemaker/tasks/preconfig.yml deleted file mode 100644 index e7288791d..000000000 --- a/roles/sap_ha_prepare_pacemaker/tasks/preconfig.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# [A] Change hacluster password -- name: "SAP Prepare Pacemaker - Ensure password for hacluster is configured" - ansible.builtin.user: - name: hacluster - password: "{{ sap_ha_prepare_pacemaker_hacluster_password | password_hash('sha512') }}" diff --git a/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml b/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml deleted file mode 100644 index 8aeb1e40f..000000000 --- a/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: "SAP Prepare Pacemaker - Check RHEL HA Repos" - ansible.builtin.shell: | - yum repolist - args: - warn: no - become: true - become_user: root - register: sap_ha_prepare_pacemaker_check_ha_repos - changed_when: false - -- name: "SAP Prepare Pacemaker - Subscription Manager - Enable RHEL HA Repos" - ansible.builtin.command: 'subscription-manager repos --enable="{{ item }}"' - loop: "{{ sap_ha_prepare_pacemaker_rhsm_repos }}" - when: - - item not in sap_ha_prepare_pacemaker_check_ha_repos.stdout - -- name: "SAP Prepare Pacemaker - Install Packages" - ansible.builtin.yum: - name: '{{ sap_ha_prepare_pacemaker_packages }}' - state: present - -- name: "SAP Prepare Pacemaker - Install Packages - Vendor Specific" - ansible.builtin.yum: - name: "{{ vars['sap_ha_prepare_pacemaker_packages_' + sap_ha_prepare_pacemaker_type] }}" - state: present - when: - - sap_ha_prepare_pacemaker_type is defined - - vars['sap_ha_prepare_pacemaker_packages_' + sap_ha_prepare_pacemaker_type] is defined diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint deleted file mode 120000 index 3da8d984e..000000000 --- a/roles/sap_ha_set_hana/.ansible-lint +++ /dev/null @@ -1 +0,0 @@ -../../.ansible-lint \ No newline at end of file diff --git a/roles/sap_ha_set_hana/.yamllint.yml b/roles/sap_ha_set_hana/.yamllint.yml deleted file mode 120000 index 54a3654b9..000000000 --- a/roles/sap_ha_set_hana/.yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../.yamllint.yml \ No newline at end of file diff --git a/roles/sap_ha_set_hana/README.md b/roles/sap_ha_set_hana/README.md deleted file mode 100644 index 41c9bd9f1..000000000 --- a/roles/sap_ha_set_hana/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# sap_ha_set_hana Ansible Role - -Ansible role for SAP HANA High Availability Setup - -## Overview - -The **sap_ha_set_hana** role is part of this sequence: - -| Sequence | System Role | Description | -| :------: | :----------------------- | :----------------------------------------------------------- | -| 1. | sap_general_preconfigure | System Preparation for SAP | -| 2. | sap_hana_preconfigure | System Preparation for SAP HANA | -| 3. | sap_hana_install | Installation of SAP HANA Database | -| 4. | sap_ha_install_hana_hsr | Configuration of SAP HANA System Replication | -| 5. | sap_ha_prepare_pacemaker | Authentication and Preparation of Nodes for Cluster Creation | -| 6. | sap_ha_install_pacemaker | Initialization of the Pacemaker Cluster | -| 7. | sap_ha_set_hana | Configuration of SAP HANA Resources for SAP Solutions | - -The **sap_ha_set_hana** is the last role to complete the configuration of te cluster ressources for -SAP HANA. - -## Tasks includes - -| Task | Description | -| ---------------------- | --------------------------- | -| cluster_sudoer.yml | configure sudoer for SRHOOK | -| cluster_resources.yml | create SAPHANA ressources | -| cluster_srhook.yml | configure myHooks SAPHanaSR | -| cluster_constraint.yml | configure constraints | - -## Common Variables/Parameters Used - -| Name | Description | Value | -| -------------------------------- | ------------------------------- | ---------------- | -| sap_domain | Domain Name | e.g. example.com | -| sap_hana_sid | SAP ID | e.g. RH1 | -| sap_hana_instance_number | Instance Number | e.g. 00 | -| sap_hana_install_master_password | DB System Password | -| sap_hana_cluster_nodes | Parameter list of cluster nodes | -| sap_hana_hacluster_password | Pacemaker hacluster Password | - -## Role specific Variables - -| Name | Description | Value | -| -------------------- | ------------------------------------------------------ | ------------- | -| sap_ha_set_hana_vip1 | Virtual IP address of primary HANA database | sap_hana_vip1 | -| sap_ha_set_hana_vip2 | Virtual IP address of secondary HANA database(planned) | sap_hana_vip2 | - -## Requirements, Dependencies and Testing - -### Operating System requirements - -Designed for Linux operating systems. Assumptions for executing the Ansible Roles from this Ansible Collection include: - -- Registered OS -- OS Package repositories are available (from the relevant content delivery network of the OS vendor) - -## Testing target Operating Systems - -- Red Hat Enterprise Linux for SAP Solutions[^rhel] - - RHEL4SAP 8.2 - - RHEL4SAP 8.4 - -## Testing target SAP Software solution scenarios and Infrastructure Platforms - -Each scenario tested on an Infrastructure Platform, will use the available documentation from the Infrastructure vendor - see [Reference Documentation](#reference-documentation) for more detail. - -| Scenario | Description | Infrastructure Platform          | -| :--- | :--- | :--- | -| **SAP HANA 2-node pacemaker cluster** | Installation of a SAP HANA Database Server with HANA System Replication (HSR) in a basic 2-node Pacemaker Cluster configuration |
  • :warning: AWS EC2
  • :warning: GCP VM
  • :warning: IBM Cloud, Intel VS
  • :warning: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :warning: IBM PowerVM LPAR
  • :white_check_mark: OVirt VM
  • :warning: VMware vSphere VM
| - -**Key:** - -- :white_check_mark: Verified compatibility -- :warning: Unverified and untested, expected to be compatible -- :x: Not compatible - -**Out of Scope** - -- AWS Classic environment -- Azure Classic environment using Azure Service Manager (ASM) -- IBM Cloud Classic Infrastructure environment - -## Example Parameter File - -``` -sap_hana_sid: 'DB1' -sap_hana_instance_number: '00' -sap_hana_install_master_password: 'my_hana-pass - -### Cluster Definition -sap_ha_install_pacemaker_cluster_name: cluster1 -sap_hana_hacluster_password: 'my_hacluster-pass -sap_pacemaker_stonith_devices: - -sap_domain: example.com - -sap_hana_cluster_nodes: - - node_name: node1 - node_ip: 192.168.1.11 - node_role: primary - hana_site: DC01 - - - node_name: node2 - node_ip: 192.168.1.12 - node_role: secondary - hana_site: DC02 - -sap_hana_vip1: 192.168.1.13 -``` - -### Execution Design - -Having the parameters specified as above, it can be executed with one command: - -``` -ansible-playbook example_playbook_with_parameters.ymnl -``` - -If you need to execute the role using an external handled, you can also limit the playbook for -specific a **host** adding parameter defined in e **parameter_file**. - -``` -ansible-playbook -l node1 example_playbook.yml -e @parameter_file.yml -``` - -A good way to start is executing the playbook with the option _--list_tasks_. You can than start a -playbook with the option _--start-at-task_ at a specific point. _--list_task_ will not start any -task. - -For more information please check - -``` -ansible-playbook --help -``` - -## License - -Apache license 2.0 - -## Author Information - -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster - -[^rhel]: [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) - -## Reference documentation - -- Azure: - - - [Azure Pacemaker Setup Guide](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/high-availability-guide-rhel-pacemaker) - -- AWS: - - - [Configuring SAP HANA Scale-Up System Replication with the RHEL HA Add-On on Amazon Web Services (AWS)](https://access.redhat.com/articles/3569621) - -- Google Cloud: - - - [HA cluster configuration guide for SAP HANA on RHEL](https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel) - -- IBM Cloud: - - [IBM Cloud for SAP portfolio - IBM Cloud Docs](https://cloud.ibm.com/docs/sap) - -- RHEL: - - [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) - - [Automating SAP HANA Scale-Up System Replication using the RHEL HA Add-On](https://access.redhat.com/articles/3004101) diff --git a/roles/sap_ha_set_hana/defaults/main.yml b/roles/sap_ha_set_hana/defaults/main.yml deleted file mode 100644 index 42dfea3d6..000000000 --- a/roles/sap_ha_set_hana/defaults/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -sap_ha_set_hana_sid: "{{ sap_hana_sid }}" -sap_ha_set_hana_instance_number: "{{ sap_hana_instance_number }}" -sap_ha_set_hana_cluster_nodes: "{{ sap_hana_cluster_nodes }}" - -sap_ha_set_hana_vip1: "{{ sap_hana_vip1 }}" -sap_ha_set_hana_vip2: "{{ sap_hana_vip2 }}" - -sap_ha_set_hana_resource_defaults: update diff --git a/roles/sap_ha_set_hana/meta/main.yml b/roles/sap_ha_set_hana/meta/main.yml deleted file mode 100644 index 3e64c33b1..000000000 --- a/roles/sap_ha_set_hana/meta/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -galaxy_info: - namespace: community - author: IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster - description: Configuration settings for High Availability of SAP HANA on Linux OS (RHEL, SLES) - company: Red Hat, Inc. - license: Apache-2.0 - min_ansible_version: "2.9" - platforms: - - name: EL - versions: ["7", "8", "9"] - - name: SLES - versions: ["15SP3"] - galaxy_tags: - [ - "sap", - "hana", - "ha", - "dr", - "linuxpacemaker", - "rhel", - "redhat", - "sles", - "suse", - ] -dependencies: [] diff --git a/roles/sap_ha_set_hana/meta/runtime.yml b/roles/sap_ha_set_hana/meta/runtime.yml deleted file mode 100644 index 2ee3c9fa9..000000000 --- a/roles/sap_ha_set_hana/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.9.10' diff --git a/roles/sap_ha_set_hana/tasks/cluster_constraint.yml b/roles/sap_ha_set_hana/tasks/cluster_constraint.yml deleted file mode 100644 index a6296ff7e..000000000 --- a/roles/sap_ha_set_hana/tasks/cluster_constraint.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# The following tasks are only included on the primary node! - -- name: "SAP Pacemaker Hana - check constraint order HANA TOPOLOGY" - ansible.builtin.shell: | - set -o pipefail && - pcs constraint order --full | grep "id:"| awk -F "id:" '{ print $2 }' | \ - grep order-SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone-SAPHana - register: __sap_ha_set_hana_check_constraint_order_topology - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Hana - set ORDER Constraints" - ansible.builtin.command: | - pcs constraint order \ - SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone then \ - SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone symmetrical=false - register: __sap_ha_set_hana_order_constraint - when: - - __sap_ha_set_hana_check_constraint_order_topology.rc == 1 - -- name: "SAP Pacemaker Hana - check constraint colocation VIP with MASTER HANA" - ansible.builtin.shell: | - set -o pipefail && - pcs constraint colocation --full | \ - grep colocation-vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER-SAPHana - register: __sap_ha_set_hana_check_constraint_collocation_vip_master - failed_when: false - changed_when: false - when: sap_ha_set_hana_vip1 is defined - -- name: "SAP Pacemaker Hana - Constraint: promote HANA then start VIP" - ansible.builtin.shell: | - pcs constraint colocation add \ - vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER \ - with master \ - SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone 2000 - pcs constraint order promote \ - SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}-clone \ - then start \ - vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER - when: - - __sap_ha_set_hana_check_constraint_collocation_vip_master.rc == 1 - - sap_ha_set_hana_vip1 is defined diff --git a/roles/sap_ha_set_hana/tasks/cluster_resources.yml b/roles/sap_ha_set_hana/tasks/cluster_resources.yml deleted file mode 100644 index 0b5049bac..000000000 --- a/roles/sap_ha_set_hana/tasks/cluster_resources.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -# The following tasks are only included on the primary node! - -- name: "SAP Pacemaker Hana - Resource defaults update command on RHEL8.2" - ansible.builtin.set_fact: - sap_ha_set_hana_resource_defaults: "" - when: ansible_distribution_version == "8.2" - -- name: "SAP Pacemaker Hana - Update resource default values" - ansible.builtin.shell: | - pcs resource defaults {{ sap_ha_set_hana_resource_defaults }} resource-stickiness=1000 - pcs resource defaults {{ sap_ha_set_hana_resource_defaults }} migration-threshold=5000 - changed_when: true - -- name: "SAP Pacemaker Hana - Check SAP HANA Resources Topology" - ansible.builtin.shell: | - pcs resource config SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }} - register: sap_ha_set_hana_check_resource_topology - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Hana - Create SAP HANA Resource Topology" - ansible.builtin.shell: | - pcs resource create \ - SAPHanaTopology_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }} \ - SAPHanaTopology SID={{ sap_ha_set_hana_sid }} \ - InstanceNumber={{ sap_ha_set_hana_instance_number }} \ - op start timeout=600 op stop timeout=600 op monitor interval=10 timeout=600 \ - clone clone-max=2 clone-node-max=1 interleave=true - when: - - sap_ha_set_hana_check_resource_topology.rc == 1 - -- name: "SAP Pacemaker Hana - Check SAP HANA Resources Hana" - ansible.builtin.shell: | - pcs resource config SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }} - register: sap_ha_set_hana_check_resource_hana - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Hana - Create SAP HANA Resource HANA" - ansible.builtin.shell: | - pcs resource create \ - SAPHana_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }} \ - SAPHana SID={{ sap_ha_set_hana_sid }} \ - InstanceNumber={{ sap_ha_set_hana_instance_number }} \ - PREFER_SITE_TAKEOVER=true DUPLICATE_PRIMARY_TIMEOUT=900 AUTOMATED_REGISTER=true \ - op start timeout=3600 op stop timeout=3600 \ - op monitor interval=121 role="Slave" timeout=700 \ - op monitor interval=119 role="Master" timeout=700 \ - op promote timeout=3600 \ - op demote timeout=3600 \ - promotable notify=true \ - clone-max=2 clone-node-max=1 interleave=true - when: - - sap_ha_set_hana_check_resource_hana.rc == 1 - -- name: "SAP Pacemaker Hana - Check SAP HANA Resources VIP" - ansible.builtin.shell: | - pcs resource config vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER - register: sap_ha_set_hana_check_resource_vip - when: sap_ha_set_hana_vip1 is defined - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Hana - Create SAP HANA Resource VIP" - ansible.builtin.shell: | - pcs resource create \ - vip_{{ sap_ha_set_hana_sid }}_{{ sap_ha_set_hana_instance_number }}_MASTER \ - IPaddr2 ip="{{ sap_ha_set_hana_vip1 }}" - when: - - sap_ha_set_hana_check_resource_vip.rc == 1 diff --git a/roles/sap_ha_set_hana/tasks/cluster_srhook.yml b/roles/sap_ha_set_hana/tasks/cluster_srhook.yml deleted file mode 100644 index 535450d5b..000000000 --- a/roles/sap_ha_set_hana/tasks/cluster_srhook.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: "SAP Pacemaker Hana - config sr_hook DIR" - ansible.builtin.file: - path: /hana/shared/myHooks - state: directory - mode: "0755" - owner: "{{ sap_ha_set_hana_sid | lower }}adm" - group: sapsys - -- name: "SAP Pacemaker Hana - config sr_hook" - ansible.builtin.copy: - remote_src: true - src: /usr/share/SAPHanaSR/srHook/SAPHanaSR.py - dest: /hana/shared/myHooks/SAPHanaSR.py - mode: "0755" - owner: "{{ sap_ha_set_hana_sid | lower }}adm" - group: sapsys - -- name: "SAP Pacemaker Hana - check global.ini" - ansible.builtin.shell: | - grep ha_dr_saphanasr /usr/sap/{{ sap_ha_set_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini - register: trace_global - failed_when: false - changed_when: false - -- name: "SAP Pacemaker Hana - update hook in global.ini" - ansible.builtin.blockinfile: - path: /usr/sap/{{ sap_ha_set_hana_sid | upper }}/SYS/global/hdb/custom/config/global.ini - marker: "" - block: | - [ha_dr_provider_SAPHanaSR] - provider = SAPHanaSR - path = /hana/shared/myHooks - execution_order = 1 - - [trace] - ha_dr_saphanasr = info - when: trace_global.rc == 1 diff --git a/roles/sap_ha_set_hana/tasks/cluster_sudoer.yml b/roles/sap_ha_set_hana/tasks/cluster_sudoer.yml deleted file mode 100644 index 7d2384f07..000000000 --- a/roles/sap_ha_set_hana/tasks/cluster_sudoer.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: "SAP Pacemaker Hana - Add sudo" - ansible.builtin.template: - backup: yes - dest: /etc/sudoers.d/20-saphana - mode: "0440" - owner: root - group: root - src: templates/20-saphana.j2 - validate: visudo -cf %s diff --git a/roles/sap_ha_set_hana/tasks/main.yml b/roles/sap_ha_set_hana/tasks/main.yml deleted file mode 100644 index 0741509ba..000000000 --- a/roles/sap_ha_set_hana/tasks/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: "SAP HSR - Pick up primary node name from definition" - ansible.builtin.set_fact: - __sap_ha_set_hana_primary_node: "{{ item.node_name }}" - when: - - item.node_role is defined - - item.node_role == 'primary' - loop: "{{ sap_ha_set_hana_cluster_nodes }}" - loop_control: - label: "{{ item.node_name }}" - tags: - - pacemaker - - srhook_sudo - - ha_resources - - srhook - - ha_constraints - -- name: "SAP Pacemaker Hana - Sudoer Configuration" - include_tasks: - file: cluster_sudoer.yml - apply: - tags: - - pacemaker - - srhook_sudo - tags: - - pacemaker - - srhook_sudo - -- name: "SAP Pacemaker Hana - Resource Configuration" - include_tasks: - file: cluster_resources.yml - apply: - tags: - - pacemaker - - ha_resources - when: - - ansible_hostname == __sap_ha_set_hana_primary_node - tags: - - pacemaker - - ha_resources - -- name: "SAP Pacemaker Hana - srhooks Configuration" - include_tasks: - file: cluster_srhook.yml - apply: - tags: - - srhook - - pacemaker - tags: - - srhook - - pacemaker - -- name: "SAP Pacemaker Hana - Constraints Configuration" - include_tasks: - file: cluster_constraint.yml - apply: - tags: - - ha_constraints - - pacemaker - when: - - ansible_hostname == __sap_ha_set_hana_primary_node - tags: - - ha_constraints - - pacemaker diff --git a/roles/sap_ha_set_hana/templates/20-saphana.j2 b/roles/sap_ha_set_hana/templates/20-saphana.j2 deleted file mode 100644 index b7d0bb312..000000000 --- a/roles/sap_ha_set_hana/templates/20-saphana.j2 +++ /dev/null @@ -1,16 +0,0 @@ -# Managed by Ansible -# Collection: community.sap_install -# Role: sap_ha_set_hana -# -# Description: -# The following are sudo entries which are required for the pacemaker cluster -# to update the SAP HANA cluster resource status. - -{% for node in sap_ha_set_hana_cluster_nodes %} -Cmnd_Alias {{ node.hana_site }}_SOK = /usr/sbin/crm_attribute -n hana_{{ sap_ha_set_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SOK -t crm_config -s SAPHanaSR -Cmnd_Alias {{ node.hana_site }}_SFAIL = /usr/sbin/crm_attribute -n hana_{{ sap_ha_set_hana_sid | lower }}_site_srHook_{{ node.hana_site }} -v SFAIL -t crm_config -s SAPHanaSR -{% endfor %} - -{{ sap_ha_set_hana_sid|lower }}adm ALL=(ALL) NOPASSWD: {% for node in sap_ha_set_hana_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} - -Defaults!{% for node in sap_ha_set_hana_cluster_nodes %}{{ node.hana_site }}_SOK, {{ node.hana_site }}_SFAIL{{ ", " if not loop.last else "" }}{% endfor %} !requiretty diff --git a/roles/sap_ha_set_netweaver/README.md b/roles/sap_ha_set_netweaver/README.md deleted file mode 100644 index 2ae2f84e7..000000000 --- a/roles/sap_ha_set_netweaver/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# sap_ha_set_netweaver Ansible Role - -Ansible role for SAP NW High Availability Setup - -## Overview - -### Execution Design - -- This Ansible role is designed to be executed using an external handler such `Terraform` or a separate `bash` script -- Limitations of doing an SAP installation where scripts and Ansible playbooks have to be executed locally and not thru the usual `ansible command` -> `inventory of hosts` scenario - - Sample execution: - - ``` - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file.yml" - ``` - -- This role must be ran in 4 parts on both the `primary` / `node1` and the `secondary` / `node2` - - - **Part 1** - Prepare NW for Installation - - **Part 2** - Post NW ASCS Installation - - **Part 3** - Post NW ERS Installation - - **Part 4** - Post NW PAS Installation - -- Tasks marked with `[A]` are executed for both `primary` / `node1` and `secondary` / `node2` -- Tasks marked with `[1]` are only executed for `primary` / `node1` -- Tasks marked with `[2]` are only executed for `secondary` / `node2` - -### Sample Execution Steps - -- Run 1 - part 1 - primary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file1.yml" - ``` - - ```yaml - # input_file1.yml contents - sap_ha_set_netweaver_role: "primary" - sap_ha_set_netweaver_part: "1" - - ``` - -- Run 2 - part 1 - secondary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file2.yml" - ``` - - ```yaml - # input_file2.yml contents - sap_ha_set_netweaver_role: "secondary" - sap_ha_set_netweaver_part: "1" - - ``` - -- Run 3 - part 2 - primary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file3.yml" - ``` - - ```yaml - # input_file3.yml contents - sap_ha_set_netweaver_role: "primary" - sap_ha_set_netweaver_part: "2" - - ``` - -- Run 4 - part 2 - secondary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file4.yml" - ``` - - ```yaml - # input_file4.yml contents - sap_ha_set_netweaver_role: "secondary" - sap_ha_set_netweaver_part: "2" - - ``` - -- Run 5 - part 3 - primary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file4.yml" - ``` - - ```yaml - # input_file5.yml contents - sap_ha_set_netweaver_role: "primary" - sap_ha_set_netweaver_part: "3" - - ``` - -- Run 6 - part 3 - secondary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file4.yml" - ``` - - ```yaml - # input_file6.yml contents - sap_ha_set_netweaver_role: "secondary" - sap_ha_set_netweaver_part: "3" - - ``` - -- Run 7 - part 4 - primary: - - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file4.yml" - ``` - - ```yaml - # input_file7.yml contents - sap_ha_set_netweaver_role: "primary" - sap_ha_set_netweaver_part: "4" - - ``` - -- Run 8 - part 4 - primary: - ```bash - ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-ha.yml -e "@input_file4.yml" - ``` - ```yaml - # input_file8.yml contents - sap_ha_set_netweaver_role: "secondary" - sap_ha_set_netweaver_part: "4" - - ``` - -## Variables / Inputs - -| **Variable** | **Info** | **Default** | **Required** | -| :----------------------------------------------------- | :-------------------------- | :---------- | :----------- | -| sap_ha_set_netweaver_type | Cloud type - `az` for Azure | | yes | -| sap_ha_set_netweaver_role | `primary` or `secondary` | | yes | -| sap_ha_set_netweaver_part | `1` or `2` | | yes | -| sap_ha_set_netweaver_sid | | | yes | -| sap_ha_set_netweaver_nfs_ip | | | yes | -| sap_ha_set_netweaver_nfs_trans_ip | | | yes | -| sap_ha_set_netweaver_fqdn | | | yes | -| sap_ha_set_netweaver_node1_hostname | | | yes | -| sap_ha_set_netweaver_node1_ip | | | yes | -| sap_ha_set_netweaver_node2_hostname | | | yes | -| sap_ha_set_netweaver_node2_ip | | | yes | -| sap_ha_set_netweaver_load_balancer_db_hostname | | | yes | -| sap_ha_set_netweaver_load_balancer_db_ip | | | yes | -| sap_ha_set_netweaver_load_balancer_db_nr | | | yes | -| sap_ha_set_netweaver_load_balancer_db_schema | | 'SAPABAP1' | yes | -| sap_ha_set_netweaver_load_balancer_db_schema_password: | | | yes | -| sap_ha_set_netweaver_load_balancer_ascs_hostname | | | yes | -| sap_ha_set_netweaver_load_balancer_ascs_ip | | | yes | -| sap_ha_set_netweaver_load_balancer_ers_hostname | | | yes | -| sap_ha_set_netweaver_load_balancer_ers_ip | | | yes | -| sap_ha_set_netweaver_ascs_instance_nr | | | yes | -| sap_ha_set_netweaver_ascs_instance_hostname | | | yes | -| sap_ha_set_netweaver_ascs_instance_ip | | | yes | -| sap_ha_set_netweaver_ers_instance_nr | | | yes | -| sap_ha_set_netweaver_ers_instance_hostname | | | yes | -| sap_ha_set_netweaver_ers_instance_ip | | | yes | -| sap_ha_set_netweaver_pas_instance_nr | | | yes | -| sap_ha_set_netweaver_pas_instance_hostname | | | yes | -| sap_ha_set_netweaver_pas_instance_ip | | | yes | -| sap_ha_set_netweaver_az_netapp_file_volumes | | 'NFSv4.1' | yes | - -## License - -Apache license 2.0 - -## Author Information - -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster diff --git a/roles/sap_ha_set_netweaver/defaults/main.yml b/roles/sap_ha_set_netweaver/defaults/main.yml deleted file mode 100644 index 28f551a3b..000000000 --- a/roles/sap_ha_set_netweaver/defaults/main.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- - -# role = 'ascs', 'ers', 'pas' -sap_ha_set_netweaver_role: "{{ sap_netweaver_system_role }}" -sap_ha_set_netweaver_ensa: -sap_ha_set_netweaver_part: - -sap_ha_set_netweaver_sid: "{{ sap_netweaver_sid }}" - -sap_ha_set_netweaver_nfs_ip: -sap_ha_set_netweaver_nfs_trans_ip: - -sap_ha_set_netweaver_fqdn: "{{ sap_domain }}" - -sap_ha_set_netweaver_node1_hostname: "{{ sap_netweaver_node1_hostname }}" -sap_ha_set_netweaver_node1_ip: "{{ sap_netweaver_node1_ip }}" - -sap_ha_set_netweaver_node2_hostname: "{{ sap_netweaver_node2_hostname }}" -sap_ha_set_netweaver_node2_ip: "{{ sap_netweaver_node2_ip }}" - -sap_ha_set_netweaver_load_balancer_db_hostname: -sap_ha_set_netweaver_load_balancer_db_ip: -sap_ha_set_netweaver_load_balancer_db_nr: -sap_ha_set_netweaver_load_balancer_db_schema: 'SAPABAP1' -sap_ha_set_netweaver_load_balancer_db_schema_password: - -sap_ha_set_netweaver_load_balancer_ascs_hostname: -sap_ha_set_netweaver_load_balancer_ascs_ip: - -sap_ha_set_netweaver_load_balancer_ers_hostname: -sap_ha_set_netweaver_load_balancer_ers_ip: - -sap_ha_set_netweaver_ascs_instance_nr: "{{ sap_netweaver_ascs_instance_number }}" -sap_ha_set_netweaver_ascs_instance_hostname: "{{ sap_netweaver_ascs_hostname }}" -sap_ha_set_netweaver_ascs_instance_ip: "{{ sap_netweaver_ascs_ip }}" - -sap_ha_set_netweaver_ers_instance_nr: "{{ sap_netweaver_ers_instance_number }}" -sap_ha_set_netweaver_ers_instance_hostname: "{{ sap_netweaver_ers_hostname }}" -sap_ha_set_netweaver_ers_instance_ip: "{{ sap_netweaver_ers_ip }}" - -sap_ha_set_netweaver_pas_instance_nr: "{{ sap_netweaver_pas_instance_number }}" -sap_ha_set_netweaver_pas_instance_hostname: "{{ sap_netweaver_pas_hostname }}" -sap_ha_set_netweaver_pas_instance_ip: "{{ sap_netweaver_pas_ip }}" - -sap_ha_set_netweaver_az_netapp_file_volumes: "NFSv4.1" - -sap_ha_set_netweaver_usrsap_mountpoint: "" diff --git a/roles/sap_ha_set_netweaver/meta/main.yml b/roles/sap_ha_set_netweaver/meta/main.yml deleted file mode 100644 index 6136bf83d..000000000 --- a/roles/sap_ha_set_netweaver/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - namespace: community - author: IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sherard Guico, Markus Moster - description: Configuration settings for High Availability of SAP NetWeaver on Linux OS (RHEL, SLES) - company: Red Hat, Inc. - license: Apache-2.0 - min_ansible_version: 2.9 - platforms: - - name: EL - versions: [ 7, 8, 9 ] - - name: SLES - versions: [ 15SP3 ] - galaxy_tags: [ 'sap', 'netweaver', 'ha', 'dr', 'ha/dr', 'linuxpacemaker', 'rhel', 'redhat', 'sles', 'suse' ] -dependencies: [] diff --git a/roles/sap_ha_set_netweaver/meta/runtime.yml b/roles/sap_ha_set_netweaver/meta/runtime.yml deleted file mode 100644 index 2ee3c9fa9..000000000 --- a/roles/sap_ha_set_netweaver/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.9.10' diff --git a/roles/sap_ha_set_netweaver/tasks/filesystems.yml b/roles/sap_ha_set_netweaver/tasks/filesystems.yml deleted file mode 100644 index 99e6f27f8..000000000 --- a/roles/sap_ha_set_netweaver/tasks/filesystems.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- - -# [1] Create SAP directories in the Azure NetApp Files volume -- name: SAP NW HA - [1] Create SAP directories in the Azure NetApp Files volume - shell: | - sudo mkdir -p /saptmp - sudo mount -t nfs -o rw,hard,rsize=65536,wsize=65536,vers=4.1,sec=sys,tcp {{ sap_ha_set_netweaver_nfs_ip }}:/sap{{ sap_ha_set_netweaver_sid }} /saptmp - sudo cd /saptmp - sudo mkdir -p sapmnt{{ sap_ha_set_netweaver_sid }} - sudo mkdir -p usrsap{{ sap_ha_set_netweaver_sid }}ascs - sudo mkdir -p usrsap{{ sap_ha_set_netweaver_sid }}ers - sudo mkdir -p usrsap{{ sap_ha_set_netweaver_sid }}sys - sudo mkdir -p usrsap{{ sap_ha_set_netweaver_sid }}pas - sudo mkdir -p usrsap{{ sap_ha_set_netweaver_sid }}aas - sudo cd .. - sudo umount /saptmp - sudo rmdir /saptmp - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [A] Create the shared directories -- name: SAP NW HA - [A] Create the shared directories - shell: | - sudo mkdir -p /sapmnt/{{ sap_ha_set_netweaver_sid }} - sudo mkdir -p /usr/sap/trans - sudo mkdir -p /usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS - sudo mkdir -p /usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }} - sudo mkdir -p /usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr}} - sudo chattr +i /sapmnt/Q{{ sap_ha_set_netweaver_sid }}AS - sudo chattr +i /usr/sap/trans - sudo chattr +i /usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS - sudo chattr +i /usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }} - sudo chattr +i /usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr}} - -# [A] Install NFS client and other requirements -- name: SAP NW HA - [A] Install NFS client and other requirements - shell: | - sudo yum -y install nfs-utils resource-agents resource-agents-sap - -# [A] Add mount entries -- name: SAP NW HA - [A] Add mount entries - lineinfile: - path: /etc/fstab - line: "{{ item }}" - loop: - - "{{ sap_ha_set_netweaver_nfs_ip }}:/sap{{ sap_ha_set_netweaver_sid }}/sapmnt{{ sap_ha_set_netweaver_sid }} /sapmnt/{{ sap_ha_set_netweaver_sid }} nfs rw,hard,rsize=65536,wsize=65536,vers=4.1,sec=sys" - - "{{ sap_ha_set_netweaver_nfs_ip }}:/sap{{ sap_ha_set_netweaver_sid }}/usrsap{{ sap_ha_set_netweaver_sid }}sys /usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS nfs rw,hard,rsize=65536,wsize=65536,vers=4.1,sec=sys" - - "{{ sap_ha_set_netweaver_nfs_trans_ip }}:/transSAP /usr/sap/trans nfs rw,hard,rsize=65536,wsize=65536,vers=4.1,sec=sys" - -# [A] Mount a -- name: SAP NW HA - [A] Mount a - shell: | - sudo mount -a diff --git a/roles/sap_ha_set_netweaver/tasks/main.yml b/roles/sap_ha_set_netweaver/tasks/main.yml deleted file mode 100644 index bfb75af42..000000000 --- a/roles/sap_ha_set_netweaver/tasks/main.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- - -# Part 1 -- name: Prepare NW for Installation - include_tasks: prepare.yml - when: - - sap_ha_set_netweaver_part == '1' - -# Part 2 -- name: Post NW ASCS Installation - include_tasks: post_ascs.yml - when: - - sap_ha_set_netweaver_part == '2' - -# Part 3 -- name: Post NW ERS Installation - include_tasks: post_ers.yml - when: - - sap_ha_set_netweaver_part == '3' - -# Part 4 -- name: Post NW PAS Installation - include_tasks: post_pas.yml - when: - - sap_ha_set_netweaver_part == '4' diff --git a/roles/sap_ha_set_netweaver/tasks/post_ascs.yml b/roles/sap_ha_set_netweaver/tasks/post_ascs.yml deleted file mode 100644 index 8912112f6..000000000 --- a/roles/sap_ha_set_netweaver/tasks/post_ascs.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- - -# [A] Check permission of /usr/sap/{{ sap_ha_set_netweaver_sid }} -- name: Check permission of directory /usr/sap/{{ sap_ha_set_netweaver_sid }} - file: - path: /usr/sap/{{ sap_ha_set_netweaver_sid }} - state: directory - owner: '{{ sap_ha_set_netweaver_sid | lower }}adm' - group: sapsys - recurse: yes - mode: '0755' - -# [1] Create a virtual IP resource and health-probe for the ERS instance -- name: SAP NW HA - [1] Create a virtual IP resource and health-probe for the ERS instance - shell: | - sudo pcs node unstandby {{ sap_ha_set_netweaver_node2_hostname }} - sudo pcs node standby {{ sap_ha_set_netweaver_node1_hostname }} - sudo pcs resource create fs_{{ sap_ha_set_netweaver_sid }}_AERS Filesystem device='{{ sap_ha_set_netweaver_usrsap_mountpoint }}/usrsap{{ sap_ha_set_netweaver_sid }}ers' \ - directory='/usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr }}' fstype='nfs' force_unmount=safe options='sec=sys,vers=4.1' \ - op start interval=0 timeout=60 op stop interval=0 timeout=120 op monitor interval=200 timeout=40 \ - --group g-{{ sap_ha_set_netweaver_sid }}_AERS - - sudo pcs resource create vip_{{ sap_ha_set_netweaver_sid }}_AERS IPaddr2 \ - ip={{ sap_ha_set_netweaver_load_balancer_ers_ip }} cidr_netmask=24 \ - --group g-{{ sap_ha_set_netweaver_sid }}_AERS - - sudo pcs resource create nc_{{ sap_ha_set_netweaver_sid }}_AERS azure-lb port=621{{ sap_ha_set_netweaver_ers_instance_nr }} \ - --group g-{{ sap_ha_set_netweaver_sid }}_AERS - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [A] Install csh -- name: SAP NW HA - [A] Install csh - shell: | - yum -y install csh diff --git a/roles/sap_ha_set_netweaver/tasks/post_ers.yml b/roles/sap_ha_set_netweaver/tasks/post_ers.yml deleted file mode 100644 index ccdae8e43..000000000 --- a/roles/sap_ha_set_netweaver/tasks/post_ers.yml +++ /dev/null @@ -1,176 +0,0 @@ ---- - -# [A] Check permission of /usr/sap/{{ sap_ha_set_netweaver_sid }} -- name: Check permission of directory /usr/sap/{{ sap_ha_set_netweaver_sid }} - file: - path: /usr/sap/{{ sap_ha_set_netweaver_sid }} - state: directory - owner: '{{ sap_ha_set_netweaver_sid | lower }}adm' - group: sapsys - recurse: yes - mode: '0755' - -# # [1] Change SAPGLOBALHOST -# - name: SAP NW HA - [1] Change SAPGLOBALHOST -# replace: -# path: /sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/DEFAULT.PFL -# regexp: "SAPGLOBALHOST ={{ sap_ha_set_netweaver_ascs_instance_hostname }}" -# replace: "SAPGLOBALHOST = {{ sap_ha_set_netweaver_load_balancer_ascs_hostname }}" -# when: -# - sap_ha_set_netweaver_role == 'ascs' - -# [1] Change the restart command to a start command in ASCS/SCS profile -- name: SAP NW HA - [1] Change the restart command to a start command in ASCS/SCS profile - replace: - path: /sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} - regexp: "Restart_Program_01 = local $(_EN) pf=$(_PF)" - replace: "#Restart_Program_01 = local $(_EN) pf=$(_PF)\nStart_Program_01 = local $(_EN) pf=$(_PF)" - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [1] Add the keep alive parameter, if using ENSA1 in ASCS/SCS profile -- name: SAP NW HA - [1] Add the keep alive parameter, if using ENSA1 in ASCS/SCS profile - lineinfile: - path: /sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} - line: "{{ item }}" - loop: - - "enque/encni/set_so_keepalive = true" - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [1] Change the restart command to a start command in ERS profile -- name: SAP NW HA - [1] Change the restart command to a start command in ERS profile - replace: - path: /sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} - regexp: "Restart_Program_00 = local $(_EN) pf=$(_PF)" - replace: "#Restart_Program_00 = local $(_EN) pf=$(_PF)\nStart_Program_00 = local $(_EN) pf=$(_PF)" - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [1] Remove Autostart in ERS profile -- name: SAP NW HA - [A] Add Autostart in ERS profile - replace: - path: /sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} - regexp: "Autostart = 1" - replace: "#Autostart = 1" - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [A] Configure Keep Alive -- name: SAP NW HA -[A] Configure Keep Alive - shell: | - sudo sysctl net.ipv4.tcp_keepalive_time=300 - -# [1] Update the /usr/sap/sapservices file -- name: SAP NW HA - [1] Update the /usr/sap/sapservices file - replace: - path: /usr/sap/sapservices - regexp: "LD_LIBRARY_PATH=/usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}/exe:\\$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}/exe/sapstartsrv pf=/usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} -D -u {{ sap_ha_set_netweaver_sid | lower}}adm" - replace: "#LD_LIBRARY_PATH=/usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}/exe/sapstartsrv pf=/usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} -D -u {{ sap_ha_set_netweaver_sid | lower}}adm" - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [2] Update the /usr/sap/sapservices file -- name: SAP NW HA - [2] Update the /usr/sap/sapservices file - replace: - path: /usr/sap/sapservices - regexp: "LD_LIBRARY_PATH=/usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr }}/exe:\\$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr }}/exe/sapstartsrv pf=/usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS/profile/{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} -D -u {{ sap_ha_set_netweaver_sid | lower}}adm" - replace: "#LD_LIBRARY_PATH=/usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr }}/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/{{ sap_ha_set_netweaver_sid }}/ERS{{ sap_ha_set_netweaver_ers_instance_nr }}/exe/sapstartsrv pf=/usr/sap/{{ sap_ha_set_netweaver_sid }}/SYS/profile/{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} -D -u {{ sap_ha_set_netweaver_sid | lower}}adm" - when: - - sap_ha_set_netweaver_role == 'ers' - -# # [1] Create the SAP cluster resources -# - name: SAP NW HA - [1] Create the SAP cluster resources -# shell: | -# sudo pcs property set maintenance-mode=true - -# sudo pcs resource create rsc_sap_{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }} SAPInstance \ -# InstanceName={{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} START_PROFILE="/sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }}" \ -# AUTOMATIC_RECOVER=false \ -# meta resource-stickiness=5000 migration-threshold=1 failure-timeout=60 \ -# op monitor interval=20 on-fail=restart timeout=60 \ -# op start interval=0 timeout=600 op stop interval=0 timeout=600 \ -# --group g-{{ sap_ha_set_netweaver_sid }}_ASCS - -# sudo pcs resource meta g-{{ sap_ha_set_netweaver_sid }}_ASCS resource-stickiness=3000 - -# sudo pcs resource create rsc_sap_{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }} SAPInstance \ -# InstanceName={{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} START_PROFILE="/sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }}" \ -# AUTOMATIC_RECOVER=false IS_ERS=true \ -# op monitor interval=20 on-fail=restart timeout=60 op start interval=0 timeout=600 op stop interval=0 timeout=600 \ -# --group g-{{ sap_ha_set_netweaver_sid }}_AERS - -# sudo pcs constraint colocation add g-{{ sap_ha_set_netweaver_sid }}_AERS with g-{{ sap_ha_set_netweaver_sid }}_ASCS -5000 -# sudo pcs constraint location rsc_sap_{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }} rule score=2000 runs_ers_{{ sap_ha_set_netweaver_sid }} eq 1 -# sudo pcs constraint order start g-{{ sap_ha_set_netweaver_sid }}_ASCS then stop g-{{ sap_ha_set_netweaver_sid }}_AERS kind=Optional symmetrical=false - -# sudo pcs node unstandby {{ sap_ha_set_netweaver_node1_hostname }} -# sudo pcs property set maintenance-mode=false -# when: -# - sap_ha_set_netweaver_role == 'ascs' -# - sap_ha_set_netweaver_ensa == 'ensa1' - -# [1] Create the SAP cluster resources ENSA2 -- name: SAP NW HA - [1] Create the SAP cluster ENSA2 - shell: | - sudo pcs property set maintenance-mode=true - - sudo pcs resource create rsc_sap_{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }} SAPInstance \ - InstanceName={{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }} START_PROFILE="/sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }}" \ - AUTOMATIC_RECOVER=false \ - meta resource-stickiness=5000 \ - op monitor interval=20 on-fail=restart timeout=60 \ - op start interval=0 timeout=600 op stop interval=0 timeout=600 \ - --group g-{{ sap_ha_set_netweaver_sid }}_ASCS - - sudo pcs resource meta g-{{ sap_ha_set_netweaver_sid }}_ASCS resource-stickiness=3000 - - sudo pcs resource create rsc_sap_{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }} SAPInstance \ - InstanceName={{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }} START_PROFILE="/sapmnt/{{ sap_ha_set_netweaver_sid }}/profile/{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }}_{{ sap_ha_set_netweaver_load_balancer_ers_hostname }}" \ - AUTOMATIC_RECOVER=false IS_ERS=true \ - op monitor interval=20 on-fail=restart timeout=60 op start interval=0 timeout=600 op stop interval=0 timeout=600 \ - --group g-{{ sap_ha_set_netweaver_sid }}_AERS - - sudo pcs resource meta rsc_sap_{{ sap_ha_set_netweaver_sid }}_ERS{{ sap_ha_set_netweaver_ers_instance_nr }} resource-stickiness=3000 - - sudo pcs constraint colocation add g-{{ sap_ha_set_netweaver_sid }}_AERS with g-{{ sap_ha_set_netweaver_sid }}_ASCS -5000 - sudo pcs constraint order start g-{{ sap_ha_set_netweaver_sid }}_ASCS then start g-{{ sap_ha_set_netweaver_sid }}_AERS kind=Optional symmetrical=false - sudo pcs constraint order start g-{{ sap_ha_set_netweaver_sid }}_ASCS then stop g-{{ sap_ha_set_netweaver_sid }}_AERS kind=Optional symmetrical=false - - sudo pcs node unstandby {{ sap_ha_set_netweaver_node1_hostname }} - sudo pcs property set maintenance-mode=false - when: - - sap_ha_set_netweaver_role == 'ascs' -# - sap_ha_set_netweaver_ensa == 'ensa2' - -# # [A] Add firewall rules for ASCS and ERS on both nodes Add the firewall rules for ASCS and ERS on both nodes -# - name: SAP NW HA - [A] Add firewall rules for ASCS and ERS on both nodes Add the firewall rules for ASCS and ERS on both nodes -# shell: | -# sudo firewall-cmd --zone=public --add-port=62000/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=62000/tcp -# sudo firewall-cmd --zone=public --add-port=32{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=32{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=36{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=36{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=39{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=39{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=81{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=81{{ sap_ha_set_netweaver_ascs_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}3/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}3/tcp -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}4/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}4/tcp -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}6/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=50{{ sap_ha_set_netweaver_ers_instance_nr }}6/tcp -# sudo firewall-cmd --zone=public --add-port=621{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=621{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=32{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=32{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=33{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=33{{ sap_ha_set_netweaver_ers_instance_nr }}/tcp -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}13/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}13/tcp -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}14/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}14/tcp -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}16/tcp --permanent -# sudo firewall-cmd --zone=public --add-port=5{{ sap_ha_set_netweaver_ers_instance_nr }}16/tcp diff --git a/roles/sap_ha_set_netweaver/tasks/post_pas.yml b/roles/sap_ha_set_netweaver/tasks/post_pas.yml deleted file mode 100644 index 18dd4f105..000000000 --- a/roles/sap_ha_set_netweaver/tasks/post_pas.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -# [3] Update SAP HANA secure store -- name: SAP NW HA - [3] Update SAP HANA secure store - shell: | - /usr/sap/{{ sap_ha_set_netweaver_sid }}/hdbclient/hdbuserstore \ - SET DEFAULT {{ sap_ha_set_netweaver_load_balancer_db_hostname }}:3{{ sap_ha_set_netweaver_load_balancer_db_nr }}15 {{ sap_ha_set_netweaver_load_balancer_db_schema }} '{{ sap_ha_set_netweaver_load_balancer_db_schema_password }}' - args: - executable: /bin/bash - become: true - become_user: "{{ sap_ha_set_netweaver_sid | lower }}adm" diff --git a/roles/sap_ha_set_netweaver/tasks/prepare.yml b/roles/sap_ha_set_netweaver/tasks/prepare.yml deleted file mode 100644 index a89d0d754..000000000 --- a/roles/sap_ha_set_netweaver/tasks/prepare.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- - -# [A] Setup host name resolution -# - name: SAP NW HA - [A] Setup host name resolution -# include_tasks: update_etchosts.yml - -# # [A] Filesystems -# - name: SAP NW HA - [A] Filesystems -# include_tasks: filesystems.yml - -# [A] Configure SWAP file -- name: SAP NW HA - [A] Configure SWAP file - lineinfile: - path: /etc/waagent.conf - line: "{{ item }}" - loop: - - "ResourceDisk.EnableSwap=y" - - "ResourceDisk.SwapSizeMB=2000" - -# [A] Restart the Agent to activate the change -- name: SAP NW HA - [A] Restart the Agent to activate the change - shell: | - sudo service waagent restart - - -### Installing SAP NetWeaver ASCS/ERS - -# [1] Configure cluster default properties -- name: SAP NW HA - [1] Configure cluster default properties - shell: | - pcs resource defaults resource-stickiness=1 - pcs resource defaults migration-threshold=3 - when: - - sap_ha_set_netweaver_role == 'ascs' - -# [1] Create a virtual IP resource and health-probe for the ASCS instance -- name: SAP NW HA -[1] Create a virtual IP resource and health-probe for the ASCS instance - shell: | - sudo pcs node standby {{ sap_ha_set_netweaver_node2_hostname }} - sudo pcs resource create fs_{{ sap_ha_set_netweaver_sid }}_ASCS Filesystem device='{{ sap_ha_set_netweaver_usrsap_mountpoint }}/usrsap{{ sap_ha_set_netweaver_sid }}ascs' \ - directory='/usr/sap/{{ sap_ha_set_netweaver_sid }}/ASCS{{ sap_ha_set_netweaver_ascs_instance_nr }}' fstype='nfs' force_unmount=safe options='sec=sys,vers=4.1' \ - op start interval=0 timeout=60 op stop interval=0 timeout=120 op monitor interval=200 timeout=40 \ - --group g-{{ sap_ha_set_netweaver_sid }}_ASCS - sudo pcs resource create vip_{{ sap_ha_set_netweaver_sid }}_ASCS IPaddr2 \ - ip={{ sap_ha_set_netweaver_load_balancer_ascs_ip }} cidr_netmask=24 \ - --group g-{{ sap_ha_set_netweaver_sid }}_ASCS - sudo pcs resource create nc_{{ sap_ha_set_netweaver_sid }}_ASCS azure-lb port=620{{ sap_ha_set_netweaver_ascs_instance_nr }} \ - --group g-{{ sap_ha_set_netweaver_sid }}_ASCS - when: - - sap_ha_set_netweaver_role == 'ascs' - -###################################################### -# RUN SAP NW DEPLOY ASCS -###################################################### - -###################################################### -# RUN SAP NW DEPLOY ERS -###################################################### diff --git a/roles/sap_ha_set_netweaver/tasks/update_etchosts.yml b/roles/sap_ha_set_netweaver/tasks/update_etchosts.yml deleted file mode 100644 index 08bf1faac..000000000 --- a/roles/sap_ha_set_netweaver/tasks/update_etchosts.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- - -# [A] Deduplicate values from /etc/hosts -- name: SAP NW HA - Deduplicate values from /etc/hosts - lineinfile: - path: /etc/hosts - create: false - regexp: (?i)^\s*{{ item }}\s+ - state: absent - loop: - - "{{ sap_ha_set_netweaver_node1_ip }}" - - "{{ sap_ha_set_netweaver_node2_ip }}" - - "{{ sap_ha_set_netweaver_load_balancer_ascs_ip }}" - - "{{ sap_ha_set_netweaver_load_balancer_ers_ip }}" - - "{{ sap_ha_set_netweaver_load_balancer_db_ip }}" - -- name: SAP NW HA - [A] Setup host name resolution - lineinfile: - path: /etc/hosts - line: "{{ item }}" - loop: - - "{{ sap_ha_set_netweaver_node1_ip }}\t{{ sap_ha_set_netweaver_node1_hostname }}.{{ sap_ha_set_netweaver_fqdn }}\t{{ sap_ha_set_netweaver_node1_hostname }}" - - "{{ sap_ha_set_netweaver_node2_ip }}\t{{ sap_ha_set_netweaver_node2_hostname }}.{{ sap_ha_set_netweaver_fqdn }}\t{{ sap_ha_set_netweaver_node2_hostname }}" - - "{{ sap_ha_set_netweaver_load_balancer_ascs_ip }}\t{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }}.{{ sap_ha_set_netweaver_fqdn }}\t{{ sap_ha_set_netweaver_load_balancer_ascs_hostname }}" - - "{{ sap_ha_set_netweaver_load_balancer_ers_ip }}\t{{ sap_ha_set_netweaver_load_balancer_ers_hostname }}.{{ sap_ha_set_netweaver_fqdn }}\t{{ sap_ha_set_netweaver_load_balancer_ers_hostname }}" - - "{{ sap_ha_set_netweaver_load_balancer_db_ip }}\t{{ sap_ha_set_netweaver_load_balancer_db_hostname }}.{{ sap_ha_set_netweaver_fqdn }}\t{{ sap_ha_set_netweaver_load_balancer_db_hostname }}" From 449ee66f7550c324516232ddaf24a256c3edce93 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 15 Nov 2022 16:55:38 +0100 Subject: [PATCH 292/375] sap_hana_preconfigure: Solve issue #234 --- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 523ec53f9..6e8d08999 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -123,6 +123,8 @@ __sap_hana_preconfigure_packages: - libtool-ltdl # SAP NOTE 2777782: - tuned-profiles-sap-hana +# required for SAP HANA on RHEL 9: + - libxcrypt-compat __sap_hana_preconfigure_packages_min_install: # SAP NOTE 2772999: @@ -162,6 +164,8 @@ __sap_hana_preconfigure_packages_min_install: - libtool-ltdl # SAP NOTE 2777782: - tuned-profiles-sap-hana +# required for SAP HANA on RHEL 9: + - libxcrypt-compat # The packages for RHEL8 are almost the same as for RHEL7. # IBM publishes the packages as a repository here: From bb8b70696759e72432ebbc4c4333330fbd2a024b Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 15 Nov 2022 17:13:44 +0100 Subject: [PATCH 293/375] sap_swpm lint cleaning --- .ansible-lint | 27 ++++++++++++- .pre-commit-config.yaml | 39 +++++++++++++++++++ roles/sap_swpm/README.md | 2 +- roles/sap_swpm/tasks/main.yml | 9 +++-- roles/sap_swpm/tasks/post_install.yml | 3 +- .../tasks/post_install/update_firewall.yml | 4 +- .../tasks/pre_install/create_os_user.yml | 11 +++--- .../tasks/pre_install/update_firewall.yml | 4 +- .../sap_swpm/tasks/swpm/prepare_software.yml | 14 +++---- .../sap_swpm/tasks/swpm/swpm_pre_install.yml | 3 +- 10 files changed, 92 insertions(+), 24 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.ansible-lint b/.ansible-lint index 8ec477952..0664e5805 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,6 +1,29 @@ --- +# Collection wide lint-file +# DO NOT CHANGE +exclude_paths: + - .cache/ + - .github/ + - changelogs/ + - playbooks/ + - roles/sap_general_preconfigure + - roles/sap_ha_install_hana_hsr + - roles/sap_ha_install_pacemaker + - roles/sap_hana_install + - roles/sap_hana_preconfigure + - roles/sap_ha_prepare_pacemaker + - roles/sap_ha_set_hana + - roles/sap_ha_set_netweaver + - roles/sap_hostagent + - roles/sap_install_media_detect + - roles/sap_netweaver_preconfigure + - roles/sap_storage_setup + # roles/sap_swpm + - roles/sap_storage + enable_list: - yaml skip_list: - - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - experimental + # schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + # ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..e4f119dda --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,39 @@ +--- +exclude: '^$' +fail_fast: true +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: end-of-file-fixer + - id: check-merge-conflict + - id: check-symlinks + types: ["symlink"] + types_or: ["symlink"] + stages: [manual] + - id: check-executables-have-shebangs + name: "Executable text files have shebangs" + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + files: .*\.(xml|yaml|yml|md|adoc)$ + - id: check-xml + - id: check-yaml + args: + - "-m" + # - repo: https://github.com/adrienverge/yamllint.git + # rev: v1.26.3 + # hooks: + # - id: yamllint + # exclude: > + # (?x)^( + # examples/playbooks/templates/.*| + # examples/other/some.j2.yaml + # )$ + # files: \.(yaml|yml)$ + # types: [file, yaml] + # entry: yamllint --strict + - repo: https://github.com/ansible-community/ansible-lint.git + rev: v6.8.6 # put latest release tag from https://github.com/ansible-community/ansible-lint/releases/ + hooks: + - id: ansible-lint + files: \.(yaml|yml)$ diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index c1e2e7dff..5b06b8bf3 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -28,7 +28,7 @@ This role has been tested and working for the following SAP products 1. SAPCAR executable -2. Software Provisioning Manager .SAR file +2. Software Provisioning Manager .SAR file - `SWPM*.SAR` 3. SAP Installation files diff --git a/roles/sap_swpm/tasks/main.yml b/roles/sap_swpm/tasks/main.yml index 419d3f133..b119977ef 100644 --- a/roles/sap_swpm/tasks/main.yml +++ b/roles/sap_swpm/tasks/main.yml @@ -1,7 +1,10 @@ --- -- import_tasks: pre_install.yml +- name: SAP SWPM - run pre_install tasks + ansible.builtin.import_tasks: pre_install.yml -- import_tasks: swpm.yml +- name: SAP SWPM - run swpm + ansible.builtin.import_tasks: swpm.yml -- import_tasks: post_install.yml +- name: SAP SWPM - run postinstall task + ansible.builtin.import_tasks: post_install.yml diff --git a/roles/sap_swpm/tasks/post_install.yml b/roles/sap_swpm/tasks/post_install.yml index 56746b953..76fd07b7a 100644 --- a/roles/sap_swpm/tasks/post_install.yml +++ b/roles/sap_swpm/tasks/post_install.yml @@ -1,7 +1,7 @@ --- # Reason for noqa: The command might change things but we do not yet attempt to find out -- name: SAP SWPM Post Install - Set {{ sap_swpm_sid | lower }}adm to no expire # noqa no-changed-when +- name: SAP SWPM Post Install - ensure password expiry disabled {{ sap_swpm_sid | lower + 'adm' }} ansible.builtin.shell: | chage -m 0 -M 99999 -I -1 -E -1 {{ sap_swpm_sid | lower }}adm chage -m 0 -M 99999 -I -1 -E -1 sapadm @@ -9,6 +9,7 @@ executable: /bin/bash become: true register: sap_swpm_post_install_sidadm_noexpire + changed_when: true # Firewall diff --git a/roles/sap_swpm/tasks/post_install/update_firewall.yml b/roles/sap_swpm/tasks/post_install/update_firewall.yml index 8172616e7..bf77074d1 100644 --- a/roles/sap_swpm/tasks/post_install/update_firewall.yml +++ b/roles/sap_swpm/tasks/post_install/update_firewall.yml @@ -1,8 +1,8 @@ --- # This task requires the variable passed_port -- name: Update Firewall - {{ passed_port }}/tcp - ansible.builtin.firewalld: +- name: Update Firewall - {{ passed_port + '/tcp' }} + ansible.posix.firewalld: zone: public port: "{{ passed_port }}/tcp" permanent: yes diff --git a/roles/sap_swpm/tasks/pre_install/create_os_user.yml b/roles/sap_swpm/tasks/pre_install/create_os_user.yml index 8b6490c37..ccf72e132 100644 --- a/roles/sap_swpm/tasks/pre_install/create_os_user.yml +++ b/roles/sap_swpm/tasks/pre_install/create_os_user.yml @@ -1,22 +1,23 @@ --- -- name: SAP SWPM Pre Install - Remove existing {{ sap_swpm_sid | lower }}adm +- name: SAP SWPM Pre Install - Remove existing {{ sap_swpm_sid | lower + 'adm' }} block: # Reason for noqa: We currently do not determine if there are processes to be killed - - name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower }}adm # noqa no-changed-when + - name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower + 'adm' }} ansible.builtin.shell: | killall -u {{ sap_swpm_sid | lower }}adm ignore_errors: yes + changed_when: true - - name: SAP SWPM Pre Install - Remove {{ sap_swpm_sid | lower }}adm + - name: SAP SWPM Pre Install - Remove user {{ sap_swpm_sid | lower + 'adm' }} ansible.builtin.user: name: '{{ sap_swpm_sid | lower }}adm' state: absent remove: yes force: yes - - name: SAP SWPM Pre Install - Remove {{ sap_swpm_sid | lower }}adm group + - name: SAP SWPM Pre Install - Remove group {{ sap_swpm_sid | lower + 'adm' }} ansible.builtin.group: name: '{{ sap_swpm_sid | lower }}adm' state: absent @@ -27,7 +28,7 @@ gid: '{{ sap_swpm_sapsys_gid }}' state: present -- name: SAP SWPM Pre Install - Create {{ sap_swpm_sid | lower }}adm +- name: SAP SWPM Pre Install - Create {{ sap_swpm_sid | lower + 'adm' }} ansible.builtin.user: name: '{{ sap_swpm_sid | lower }}adm' comment: "SAP User - {{ sap_swpm_sid }}" diff --git a/roles/sap_swpm/tasks/pre_install/update_firewall.yml b/roles/sap_swpm/tasks/pre_install/update_firewall.yml index 8172616e7..bf77074d1 100644 --- a/roles/sap_swpm/tasks/pre_install/update_firewall.yml +++ b/roles/sap_swpm/tasks/pre_install/update_firewall.yml @@ -1,8 +1,8 @@ --- # This task requires the variable passed_port -- name: Update Firewall - {{ passed_port }}/tcp - ansible.builtin.firewalld: +- name: Update Firewall - {{ passed_port + '/tcp' }} + ansible.posix.firewalld: zone: public port: "{{ passed_port }}/tcp" permanent: yes diff --git a/roles/sap_swpm/tasks/swpm/prepare_software.yml b/roles/sap_swpm/tasks/swpm/prepare_software.yml index 467fd0519..9a417b8f4 100644 --- a/roles/sap_swpm/tasks/swpm/prepare_software.yml +++ b/roles/sap_swpm/tasks/swpm/prepare_software.yml @@ -100,7 +100,7 @@ ansible.builtin.set_fact: sap_swpm_sapcar_file_name: "{{ sap_swpm_sapcar_file_name_get.stdout }}" -- name: SAP SWPM Pre Install - Check availability of SAPCAR - {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} +- name: SAP SWPM Pre Install - Check availability of SAPCAR - {{ sap_swpm_sapcar_path + '/' + sap_swpm_sapcar_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }}" register: sap_swpm_sapcar_file_name_stat @@ -120,7 +120,7 @@ ansible.builtin.set_fact: sap_swpm_swpm_sar_file_name: "{{ sap_swpm_swpm_sar_file_name_get.stdout }}" -- name: SAP SWPM Pre Install - Check availability of SWPM - {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} +- name: SAP SWPM Pre Install - Check availability of SWPM - {{ sap_swpm_swpm_path + '/' + sap_swpm_swpm_sar_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }}" register: sap_swpm_swpm_sar_file_name_stat @@ -144,7 +144,7 @@ sap_swpm_igs_path: "{{ sap_swpm_software_path }}" sap_swpm_igs_file_name: "{{ sap_swpm_igs_file_name_get.stdout }}" - - name: SAP SWPM Pre Install - Check availability of IGS - {{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }} + - name: SAP SWPM Pre Install - Check availability of IGS - {{ sap_swpm_igs_path + '/' + sap_swpm_igs_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_igs_path }}/{{ sap_swpm_igs_file_name }}" register: sap_swpm_igs_file_name_stat @@ -165,7 +165,7 @@ sap_swpm_igs_helper_path: "{{ sap_swpm_software_path }}" sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}" - - name: SAP SWPM Pre Install - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }} + - name: SAP SWPM Pre Install - Check availability of IGS Helper - {{ sap_swpm_igs_helper_path + '/' + sap_swpm_igs_helper_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_igs_helper_path }}/{{ sap_swpm_igs_helper_file_name }}" register: sap_swpm_igs_helper_file_name_stat @@ -186,7 +186,7 @@ sap_swpm_kernel_dependent_path: "{{ sap_swpm_software_path }}" sap_swpm_kernel_dependent_file_name: "{{ sap_swpm_kernel_dependent_file_name_get.stdout }}" - - name: SAP SWPM Pre Install - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }} + - name: SAP SWPM Pre Install - Check availability of SAPEXEDB - {{ sap_swpm_kernel_dependent_path + '/' + sap_swpm_kernel_dependent_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_kernel_dependent_path }}/{{ sap_swpm_kernel_dependent_file_name }}" register: sap_swpm_kernel_dependent_file_name_stat @@ -207,7 +207,7 @@ sap_swpm_kernel_independent_path: "{{ sap_swpm_software_path }}" sap_swpm_kernel_independent_file_name: "{{ sap_swpm_kernel_independent_file_name_get.stdout }}" - - name: SAP SWPM Pre Install - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }} + - name: SAP SWPM Pre Install - Check availability of SAPEXE - {{ sap_swpm_kernel_independent_path + '/' + sap_swpm_kernel_independent_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_kernel_independent_path }}/{{ sap_swpm_kernel_independent_file_name }}" register: sap_swpm_kernel_independent_file_name_stat @@ -234,7 +234,7 @@ sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}" sap_swpm_web_dispatcher_file_name: "{{ sap_swpm_web_dispatcher_file_name_get.stdout }}" - - name: SAP SWPM Pre Install - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} + - name: SAP SWPM Pre Install - Check availability of WEBDISP - {{ sap_swpm_web_dispatcher_path + '/' + sap_swpm_web_dispatcher_file_name }} ansible.builtin.stat: path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" register: sap_swpm_web_dispatcher_file_name_stat diff --git a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml index d8114ca1d..b11a61912 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml @@ -17,7 +17,8 @@ when: sap_swpm_use_password_file == "y" # Run SWPM inifile generation based on ansible role mode -- include_tasks: "swpm_inifile_generate_{{ sap_swpm_ansible_role_mode }}.yml" +- name: SAP SWPM - generate swpm inifile + ansible.builtin.include_tasks: "swpm_inifile_generate_{{ sap_swpm_ansible_role_mode }}.yml" # Set fact for SWPM path - name: SAP SWPM Pre Install - Set fact for SWPM path From d18017561c8ea9964b2bab4fbfe7f42dd89b13b4 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 15 Nov 2022 19:19:44 +0100 Subject: [PATCH 294/375] sap_hana_preconfigure: solve merge conflicts for PR #9 --- roles/sap_hana_preconfigure/tasks/SLES/configuration.yml | 7 +++++-- roles/sap_hana_preconfigure/tasks/SLES/installation.yml | 7 +++++-- .../tasks/sapnote/2292690/10-ibm-energyscale.yml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 0a716daba..eb47a1ed7 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -8,8 +8,11 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: Include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/configuration.yml" + +- name: include configuration actions for required sapnotes + ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/configuration.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item # - ansible.builtin.include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 92ae29f10..9c5d51ef2 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -8,6 +8,9 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: Include configuration actions for required sapnotes - ansible.builtin.include_tasks: "tasks/sapnote/{{ item }}/installation.yml" +- name: include configuration actions for required sapnotes + ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/installation.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" + loop_control: + loop_var: sap_note_line_item + diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml index 050b74220..d6f9dfae7 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml @@ -6,7 +6,7 @@ msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" - name: Ensure pseries-energy package is not installed - ansible.builtin.yum: + ansible.builtin.package: name: pseries-energy state: absent when: ansible_architecture == "ppc64le" From a65a1a1defd9892d57368f9ad0bf80f642be4d2f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 15 Nov 2022 19:24:45 +0100 Subject: [PATCH 295/375] sap_hana_preconfigure: solve remaining merge conflicts for PR #10 --- roles/sap_hana_preconfigure/tasks/SLES/installation.yml | 1 - .../tasks/sapnote/2292690/10-ibm-energyscale.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 9c5d51ef2..6a3d5260e 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -13,4 +13,3 @@ with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" loop_control: loop_var: sap_note_line_item - diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml index d6f9dfae7..603021cd1 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml @@ -5,7 +5,7 @@ ansible.builtin.debug: msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" -- name: Ensure pseries-energy package is not installed +- name: ensure pseries-energy package is not installed ansible.builtin.package: name: pseries-energy state: absent From 4fa857129a2d5a9dff5c2b27d7054304340f3d9f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 15 Nov 2022 19:38:53 +0100 Subject: [PATCH 296/375] GitHub actions: Run collection checks only once per week --- .github/workflows/ansible-lint.yml | 10 ++-------- .github/workflows/ansible-test-sanity.yml | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 5b276e6af..9a013c5e2 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -5,14 +5,8 @@ name: ansible-lint of the collection on: - push: - branches: - - main - - dev - pull_request: - branches: - - main - - dev + schedule: + - cron: '31 13 * * 1' workflow_dispatch: diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index 58e3ecd7d..3ea710575 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -5,14 +5,8 @@ name: ansible-test sanity of the collection on: - push: - branches: - - main - - dev - pull_request: - branches: - - main - - dev + schedule: + - cron: '31 12 * * 1' workflow_dispatch: From c2727f2f17ed36ceab5eaaf9f0b45ebb1917d35f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 15 Nov 2022 23:16:47 +0100 Subject: [PATCH 297/375] preconfigure, sap_hana_install: allow for specifying the collection name for lsr roles --- roles/sap_general_preconfigure/defaults/main.yml | 5 +++++ .../tasks/RedHat/generic/configure-selinux.yml | 2 +- roles/sap_hana_install/defaults/main.yml | 5 +++++ roles/sap_hana_install/tasks/post_install.yml | 2 +- roles/sap_hana_install/tasks/pre_install.yml | 2 +- roles/sap_hana_preconfigure/defaults/main.yml | 5 +++++ .../tasks/RedHat/generic/configure-selinux.yml | 2 +- 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 9cbda356b..759947120 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -21,6 +21,11 @@ sap_general_preconfigure_assert: no sap_general_preconfigure_assert_ignore_errors: no +# Set which Ansible Collection to use for the Linux System Roles. +# For community/upstream, use 'fedora.linux_system_roles' +# For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles' +sap_general_preconfigure_system_roles_collection: 'fedora.linux_system_roles' + # Set to `yes` if you want the role to enable the repos as configured below. The default is `no`. sap_general_preconfigure_enable_repos: no diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 8cc7bedb8..4e09d3772 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -98,7 +98,7 @@ - name: Configure '/usr/sap' SELinux file labels ansible.builtin.include_role: - name: fedora.linux_system_roles.selinux + name: '{{ sap_general_preconfigure_system_roles_collection }}.selinux' vars: selinux_booleans: - { name: 'selinuxuser_execmod', state: 'on' } diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 5fbd8c363..408ddedef 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -3,6 +3,11 @@ ################ # Main role parameters: ################ +# Set which Ansible Collection to use for the Linux System Roles. +# For community/upstream, use 'fedora.linux_system_roles' +# For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles' +sap_hana_install_system_roles_collection: 'fedora.linux_system_roles' + # Directory containing the IMDB SAR files and all components sap_hana_install_software_directory: '/software/hana' diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 175f2621b..661428031 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -157,7 +157,7 @@ - name: Configure '/usr/sap' SELinux file contexts ansible.builtin.include_role: - name: fedora.linux_system_roles.selinux + name: '{{ sap_hana_install_system_roles_collection }}.selinux' vars: selinux_fcontexts: - { target: '/usr/sap(/.*)?', setype: 'usr_t' } diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index bcb6e3773..56e1339dc 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -85,7 +85,7 @@ - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts ansible.builtin.include_role: - name: fedora.linux_system_roles.selinux + name: '{{ sap_hana_install_system_roles_collection }}.selinux' vars: selinux_booleans: - { name: 'selinuxuser_execmod', state: 'on' } diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index e9aeae9ac..d8e1f914a 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -36,6 +36,11 @@ sap_hana_preconfigure_assert_ignore_errors: no # In case of an assertion run, if set to "yes", check all configuration steps no matter if tuned or static configuration has been selected: sap_hana_preconfigure_assert_all_config: no +# Set which Ansible Collection to use for the Linux System Roles. +# For community/upstream, use 'fedora.linux_system_roles' +# For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles' +sap_hana_preconfigure_system_roles_collection: 'fedora.linux_system_roles' + # Perform a RHEL minor release check for SAP HANA: sap_hana_preconfigure_min_rhel_release_check: yes diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml index f1b5f24e3..1c59a7e4e 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -2,7 +2,7 @@ - name: SAP HANA Pre Install - Configure SELinux file contexts ansible.builtin.include_role: - name: fedora.linux_system_roles.selinux + name: '{{ sap_hana_preconfigure_system_roles_collection }}.selinux' vars: selinux_booleans: - { name: 'selinuxuser_execmod', state: 'on' } From ce8ed19500a1a00d0acc6cbdaee3f7c3a72f068e Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 16 Nov 2022 11:23:16 +0000 Subject: [PATCH 298/375] sap_swpm: fixing linter issues and bad jinja --- .ansible-lint | 3 +++ roles/sap_swpm/tasks/post_install/firewall.yml | 5 ++++- .../pre_install/install_type/maint_plan_stack_install.yml | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 0664e5805..f7f51bd76 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -6,6 +6,7 @@ exclude_paths: - .github/ - changelogs/ - playbooks/ + - roles/sap_anydb_install_oracle - roles/sap_general_preconfigure - roles/sap_ha_install_hana_hsr - roles/sap_ha_install_pacemaker @@ -15,11 +16,13 @@ exclude_paths: - roles/sap_ha_set_hana - roles/sap_ha_set_netweaver - roles/sap_hostagent + - roles/sap_hypervisor_node_preconfigure - roles/sap_install_media_detect - roles/sap_netweaver_preconfigure - roles/sap_storage_setup # roles/sap_swpm - roles/sap_storage + - roles/sap_vm_preconfigure enable_list: - yaml diff --git a/roles/sap_swpm/tasks/post_install/firewall.yml b/roles/sap_swpm/tasks/post_install/firewall.yml index 9353a1333..7992ce222 100644 --- a/roles/sap_swpm/tasks/post_install/firewall.yml +++ b/roles/sap_swpm/tasks/post_install/firewall.yml @@ -18,6 +18,9 @@ tags: sap_swpm_configure_firewall - name: SAP SWPM Post Install - Firewall Setup + when: + - sap_swpm_wd_instance_nr is defined + - sap_swpm_wd_instance_nr | length ansible.builtin.set_fact: sap_nw_firewall_ports: - "3200-3399" @@ -29,7 +32,7 @@ - "443{{ sap_swpm_ascs_instance_nr }}" - "8090" - "44390" - - "{{ 443{{ sap_swpm_wd_instance_nr }} if sap_swpm_wd_instance_nr is not empty }}" + - "443{{ sap_swpm_wd_instance_nr }}" - name: SAP SWPM Post Install - Add Ports Based on NR - {{ sap_swpm_pas_instance_nr }} ansible.builtin.include_tasks: update_firewall.yml diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index 122fa6f97..76ef5db10 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -4,7 +4,7 @@ # Check for MP Stack XML if filename not given - name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_mp_stack_path }} - shell: | + ansible.builtin.shell: | ls MP*.xml args: chdir: "{{ sap_swpm_mp_stack_path }}" @@ -12,12 +12,12 @@ when: (sap_swpm_mp_stack_file_name is not defined) or (sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank - name: SAP SWPM Pre Install - MP Stack XML - Set fact - set_fact: + ansible.builtin.set_fact: sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" when: (sap_swpm_mp_stack_file_name is not defined) or (sap_swpm_mp_stack_file_name | default(None)) # Test if variable string is not defined or None / blank - name: SAP SWPM Pre Install - MP Stack XML - Set fact - debug: + ansible.builtin.debug: msg: "SAP Maintenance Planner Stack XML is {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" - name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection From 1443c7b81a3506560572a3732b1f2079c369f19b Mon Sep 17 00:00:00 2001 From: Janine Fuchs <105372097+ja9fuchs@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:31:32 +0100 Subject: [PATCH 299/375] sap_ha_pacemaker_cluster: update argument def ha_cluster (#247) * sap_ha_pacemaker_cluster: update argument def ha_cluster * sap_ha_pacemaker_cluster: formatting fix in ha_cluster argument * sap_ha_pacemaker_cluster: simplify example, more extensive docs and examples will be handled separately * sap_ha_pacemaker_cluster: removed specific anchor from LSR link --- roles/sap_ha_pacemaker_cluster/README.md | 18 +++---------- .../meta/argument_specs.yml | 27 +++---------------- 2 files changed, 6 insertions(+), 39 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index 50f4f4126..1e40ace50 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -45,20 +45,9 @@ On cloud platforms additional parameters are required: ### ha_cluster - _Type:_ `dict` -Optional _**host_vars**_ parameter, if defined it must be set for each node.
-Definition of node name and IP addresses to be used for the pacemaker cluster.
-Required for resilient node communication by providing more than one corosync IP.
-See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses
- - - **corosync_addresses**
- _Default:_ ``
- List of one or more IP addresses to be used for Corosync.
All nodes must have the same number of addresses.
The order of the listed addresses matters. - - **node_name**
- _Default:_ ``
- The name of the node in the cluster. - - **pcs_address**
- _Default:_ ``
- An address used by pcs to communicate with the node.
Can be a name, FQDN or IP address and can contain a port. +Optional _**host_vars**_ parameter - if defined it must be set for each node.
+Dictionary that can contain various node options for the pacemaker cluster configuration.
+Supported options can be reviewed in the `ha_cluster` Linux System Role (https://github.com/linux-system-roles/ha_cluster/blob/master/README.md).
Example: ```yaml @@ -67,7 +56,6 @@ ha_cluster: - 192.168.1.10 - 192.168.2.10 node_name: nodeA - pcs_address: nodeA ``` ### ha_cluster_cluster_name diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index 28995d2d4..b1a74b64f 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -29,39 +29,18 @@ argument_specs: ha_cluster: description: - - Optional _**host_vars**_ parameter, if defined it must be set for each node. - - Definition of node name and IP addresses to be used for the pacemaker cluster. - - Required for resilient node communication by providing more than one corosync IP. - - See https://github.com/linux-system-roles/ha_cluster/blob/master/README.md#nodes-names-and-addresses + - Optional _**host_vars**_ parameter - if defined it must be set for each node. + - Dictionary that can contain various node options for the pacemaker cluster configuration. + - Supported options can be reviewed in the `ha_cluster` Linux System Role (https://github.com/linux-system-roles/ha_cluster/blob/master/README.md). example: ha_cluster: corosync_addresses: - 192.168.1.10 - 192.168.2.10 node_name: nodeA - pcs_address: nodeA required: false type: dict - options: - corosync_addresses: - default: - description: - - List of one or more IP addresses to be used for Corosync. - - All nodes must have the same number of addresses. - - The order of the listed addresses matters. - type: list - node_name: - default: - description: - - The name of the node in the cluster. - type: str - pcs_address: - default: - description: - - An address used by pcs to communicate with the node. - - Can be a name, FQDN or IP address and can contain a port. - type: str ha_cluster_cluster_name: default: my-cluster From c396ee7bc71c03d8aaec92277cc3390172d33160 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 17 Nov 2022 11:49:15 +0100 Subject: [PATCH 300/375] sap_ha roles: remove certain files to resolve merge conflicts --- roles/sap_ha_install_pacemaker/.ansible-lint | 7 ------- roles/sap_ha_install_pacemaker/.yamllint.yml | 21 -------------------- roles/sap_ha_prepare_pacemaker/.ansible-lint | 7 ------- roles/sap_ha_prepare_pacemaker/.yamllint.yml | 21 -------------------- roles/sap_ha_set_hana/.ansible-lint | 7 ------- roles/sap_ha_set_hana/.yamllint.yml | 21 -------------------- 6 files changed, 84 deletions(-) delete mode 100644 roles/sap_ha_install_pacemaker/.ansible-lint delete mode 100644 roles/sap_ha_install_pacemaker/.yamllint.yml delete mode 100644 roles/sap_ha_prepare_pacemaker/.ansible-lint delete mode 100644 roles/sap_ha_prepare_pacemaker/.yamllint.yml delete mode 100644 roles/sap_ha_set_hana/.ansible-lint delete mode 100644 roles/sap_ha_set_hana/.yamllint.yml diff --git a/roles/sap_ha_install_pacemaker/.ansible-lint b/roles/sap_ha_install_pacemaker/.ansible-lint deleted file mode 100644 index 63122b8f9..000000000 --- a/roles/sap_ha_install_pacemaker/.ansible-lint +++ /dev/null @@ -1,7 +0,0 @@ ---- -enable_list: - - yaml -skip_list: - - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_ha_install_pacemaker/.yamllint.yml b/roles/sap_ha_install_pacemaker/.yamllint.yml deleted file mode 100644 index 57ef427c1..000000000 --- a/roles/sap_ha_install_pacemaker/.yamllint.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: {max-spaces-inside: 1, level: error} - brackets: {max-spaces-inside: 1, level: error} -# colons: {max-spaces-after: -1, level: error} -# commas: {max-spaces-after: -1, level: error} - comments: disable - comments-indentation: disable -# document-start: disable -# empty-lines: {max: 3, level: error} -# hyphens: {level: error} -# indentation: disable -# key-duplicates: enable - line-length: disable -# new-line-at-end-of-file: disable -# new-lines: {type: unix} -# trailing-spaces: disable - truthy: disable diff --git a/roles/sap_ha_prepare_pacemaker/.ansible-lint b/roles/sap_ha_prepare_pacemaker/.ansible-lint deleted file mode 100644 index 63122b8f9..000000000 --- a/roles/sap_ha_prepare_pacemaker/.ansible-lint +++ /dev/null @@ -1,7 +0,0 @@ ---- -enable_list: - - yaml -skip_list: - - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_ha_prepare_pacemaker/.yamllint.yml b/roles/sap_ha_prepare_pacemaker/.yamllint.yml deleted file mode 100644 index 57ef427c1..000000000 --- a/roles/sap_ha_prepare_pacemaker/.yamllint.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: {max-spaces-inside: 1, level: error} - brackets: {max-spaces-inside: 1, level: error} -# colons: {max-spaces-after: -1, level: error} -# commas: {max-spaces-after: -1, level: error} - comments: disable - comments-indentation: disable -# document-start: disable -# empty-lines: {max: 3, level: error} -# hyphens: {level: error} -# indentation: disable -# key-duplicates: enable - line-length: disable -# new-line-at-end-of-file: disable -# new-lines: {type: unix} -# trailing-spaces: disable - truthy: disable diff --git a/roles/sap_ha_set_hana/.ansible-lint b/roles/sap_ha_set_hana/.ansible-lint deleted file mode 100644 index 63122b8f9..000000000 --- a/roles/sap_ha_set_hana/.ansible-lint +++ /dev/null @@ -1,7 +0,0 @@ ---- -enable_list: - - yaml -skip_list: - - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_ha_set_hana/.yamllint.yml b/roles/sap_ha_set_hana/.yamllint.yml deleted file mode 100644 index 57ef427c1..000000000 --- a/roles/sap_ha_set_hana/.yamllint.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: {max-spaces-inside: 1, level: error} - brackets: {max-spaces-inside: 1, level: error} -# colons: {max-spaces-after: -1, level: error} -# commas: {max-spaces-after: -1, level: error} - comments: disable - comments-indentation: disable -# document-start: disable -# empty-lines: {max: 3, level: error} -# hyphens: {level: error} -# indentation: disable -# key-duplicates: enable - line-length: disable -# new-line-at-end-of-file: disable -# new-lines: {type: unix} -# trailing-spaces: disable - truthy: disable From d52feb6262501f0723b67fc06c38ca0019d6d31d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 17 Nov 2022 13:27:00 +0100 Subject: [PATCH 301/375] preconfigure roles: Solve issue #246 --- roles/sap_general_preconfigure/handlers/main.yml | 2 -- .../tasks/RedHat/assert-installation.yml | 5 +---- roles/sap_general_preconfigure/tasks/RedHat/installation.yml | 2 -- .../tasks/SLES/assert-installation.yml | 2 -- .../tasks/RedHat/assert-installation.yml | 3 +-- .../tasks/sapnote/2292690/10-assert-ibm-energyscale.yml | 2 -- 6 files changed, 2 insertions(+), 14 deletions(-) diff --git a/roles/sap_general_preconfigure/handlers/main.yml b/roles/sap_general_preconfigure/handlers/main.yml index 47ad190ba..8d43fdfc3 100644 --- a/roles/sap_general_preconfigure/handlers/main.yml +++ b/roles/sap_general_preconfigure/handlers/main.yml @@ -26,8 +26,6 @@ - name: Remount /dev/shm ansible.builtin.command: mount -o remount /dev/shm - args: - warn: false listen: __sap_general_preconfigure_mount_tmpfs_handler - name: Check if /dev/shm is available diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index da8233f10..9f0e8cfbe 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -229,9 +229,8 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_general_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false + no_log: true ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update @@ -278,8 +277,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_needs_restarting_command_assert }}" register: __sap_general_preconfigure_register_needs_restarting_assert changed_when: false - args: - warn: false check_mode: false ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 16009406b..8471acf9b 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -78,8 +78,6 @@ - name: Get list of enabled repositories ansible.builtin.command: "yum repolist" # noqa command-instead-of-module register: __sap_general_preconfigure_register_yum_repolist - args: - warn: false changed_when: false - name: Display the list of enabled repositories diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index 647c5dfb3..53f444644 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -81,8 +81,6 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_general_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index 8d72936e6..64eb3f785 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -170,9 +170,8 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_hana_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false + no_log: true ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_update diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml index e84302ade..8b2133f01 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml @@ -14,8 +14,6 @@ register: __sap_hana_preconfigure_register_yum_pseries_energy_assert changed_when: no ignore_errors: yes - args: - warn: false - name: Assert that package pseries-energy is not installed ansible.builtin.assert: From 3c225d526663084ca7ca6060fae6cb64d2834307 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 17 Nov 2022 14:01:26 +0100 Subject: [PATCH 302/375] preconfigure roles: Solve ansible-lint errors for issue #246 --- .../tasks/RedHat/.assert-installation.yml.swp | Bin 0 -> 16384 bytes .../tasks/RedHat/assert-installation.yml | 3 ++- .../tasks/RedHat/assert-installation.yml | 3 ++- .../2292690/10-assert-ibm-energyscale.yml | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp diff --git a/roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp b/roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..5ad0b8624762a7da20b6f4564bb742e5008ad15c GIT binary patch literal 16384 zcmeHOOKc=Z87?3sWW(+T5aMwlwcb^13%AD)A;)7GWV~_KVVNv8OAg7ZRnuML>A0u6 zx2xOUiPsP$asUp53y3|zB9z@rP@+T}KyX9i21w)-DM6f&kPuvuSQPlGx@sQnd3o0h zTGTCl9(lUEs{ZeP^#A`|Q=R$B`WNZq^bEoAFd>!c9cS)`ljM;X38~h+V2j7{%)rCv zLC_p{MRxM5dce{&3xrqodC3WVpF4>c2BM_Dvpc_Y!bT$vyrfyG@;Gp_^;m*Mwik$m z`M%}y9cyl8ZqAyWwPqJeap-eVk{4|8fXB?YqnJBkQ1iCZn3obJwnb@!yXRO^VnXmZ zvGhnxu41~`@JA4&xTIjSUhC>SUhC>SUh zC>SUhC>Xds29oGL@-^K0UVZyh`tv=x&wuOVN&WqW-1&F)`N#G5*K+6Ir~hBopKs^R z>wk-nf`Nj8f`Nj8f`Nj8f`Nj8f`Nj8f`Nj8f`Nj8yTAZ*33(dh{!|wHc>ize|9_n% zbJBo8yGs1XAF0z-Ivhyz@aqUIPR$ z1N{9VLS6@M00D3oSOp#g{(Ov(p95EcMc~$hg!~nF1Nb)ZE#M;X8Q`rC5ON*(5fB3Z zcz}>sfbRp}18iUgc=LWjz5}cS3jhKB@_s^o3p@`rfs4Qx@Co4Kz+3kb;sGB5{)tA$ zAAxs(9|JD}@1l7U0G|XTkFS{K35Gx7gX%-1j>Cnp8)Bzri<2{8Y^|%9y9xW7e4G>$R_~te@|(cDY=NEgnfKq#Sa5+wQlo!;bkD z1mUqQ(yDM`FH-U}SirD<1!ol>cDCVTS|n}=K_F#I#-z>?@OZ>CEH975wV_4pWV)Jq ze&Pkw*>cNjkroYDgO}-w+Oq;BuuKzqeQPbZ)K0XB-c}IC+~#o{#-dD{T<8-{oneoU zYwy;1P^Lkszcz%HkBW6YZeB)F=e}R2f+y4pY2-y*ng)IJQQE0VOKY-a*;gss-KOJ} zwdLixy(spAq(;wF*7hrFr_2{xyN0;4Jb}qluLje1X+7LkhTQN#%K@jsY9wz}Nv5Pf zEj zxvPbwgEg)1L-ZfydhPMsPIiDj#DN-flAaOUqMMKs>ta4kQ6x01WqO~Y2yQ9!jiAyM z^~g4hojN?%Nw9a3%BP8#U!1wper#F&V?}$xAS4aCDN$s$=z;eS@%uW{6I#Y_6qAX3qp^7_ouPP3yK~C|V zIvZv*|Bq@9!ocdGdXqdQ{rxc&+%|61GW;QyYpyTTapUucwBL(?%&bhj(Mbq`_7tsq zTXo8IkZiH4=VOPpG2@YCF}5+fH0F-GAne3{$JGv>rK@6F9D~46Tq9O>Hh$H1DFRM z0DgsfUe@^6fO7x^9sy*H|7#!xR)Jfnt9{3pW3tiiP z6Q5JS!@#Sk>2Crl@OhvNoB)mkzeHVs9XJWRfO>ud_!4jo_#5i?8^Fr|2kr-cf;#>Z z@B}aqn0o$o)biJWb>O4GpTLRa%u}!3LjN7;#W4hwvfe;UMf63AM8z0 zkxQUeGeGnfMh1?f=hKmOt=$M+bR<;miCMa974z-k`Urhk=|P3AREFe@G8?xK3@U$A zgeHKYTqd(QMlCAa1u=?xG`DK1fbZfrr+s=F=5v{$*`@|ozbN9&wZfXE)=5s&4K(D? zS*xMjATP}tUiy03lY=qwE8IzCQ>}qVbArKwgn5DLiHPi}rpoyN)-{T_J-BpvHQg%r z;J_1+&zeenvs5X7(mrgKGB`jrMB%L~*#-|(<0MNVOcB$w#VCuJ$EIgYT0?L1uvfpZ zQ8~YSW+IjCF>1w=OHyIa&@+4Xx;(W{k$vMIb=^L_v?Qeoz_pjq*(J)+H_85)SweA^ zRr7bquqN!ak7hb<}Nx7u;W*eL34>c}23%21USLK$P3 zm9@*yo|==@Oo!$su|9qDRCt3u7sjp5vQ+z`=>klQc*A4kG>kD#yK2324K-68_&d3= zVrc;Rs5^}9(J6))8QF_dFgk}vNjLWc{N^By3mJ`fPQ`)s-(?yWl%0)IW<)MaI5d)b zfSKlX_U>c7vi4M&RuF|+aY+U#6glcArZi&CHr@izRE;L+1fr-X+l>QiHFfEvN(A!O zkPDWw%N47(@@TW;`7S$^GGOA_j~tU-oNW;K>)t%%;c#nj3lWa#KDQe)g0Yz61 ziAvzgpr7OO5ZO|ufy3uY@Krm@IIqTN(YWL?PFhpf-k(@ZYg0d*$EEY0TlI|nY zNV%PSv(mXV8mbq6ZLP_R2Si9Dcy_eCCDcolXD-QS*+{VlDO%t)usogkxGk?RuTXWr fwIkY$u#7`S9O<3I)&U Date: Thu, 17 Nov 2022 14:57:49 +0100 Subject: [PATCH 303/375] sap_general_preconfigure: remove superfluous file --- .../tasks/RedHat/.assert-installation.yml.swp | Bin 16384 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp diff --git a/roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp b/roles/sap_general_preconfigure/tasks/RedHat/.assert-installation.yml.swp deleted file mode 100644 index 5ad0b8624762a7da20b6f4564bb742e5008ad15c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOOKc=Z87?3sWW(+T5aMwlwcb^13%AD)A;)7GWV~_KVVNv8OAg7ZRnuML>A0u6 zx2xOUiPsP$asUp53y3|zB9z@rP@+T}KyX9i21w)-DM6f&kPuvuSQPlGx@sQnd3o0h zTGTCl9(lUEs{ZeP^#A`|Q=R$B`WNZq^bEoAFd>!c9cS)`ljM;X38~h+V2j7{%)rCv zLC_p{MRxM5dce{&3xrqodC3WVpF4>c2BM_Dvpc_Y!bT$vyrfyG@;Gp_^;m*Mwik$m z`M%}y9cyl8ZqAyWwPqJeap-eVk{4|8fXB?YqnJBkQ1iCZn3obJwnb@!yXRO^VnXmZ zvGhnxu41~`@JA4&xTIjSUhC>SUhC>SUh zC>SUhC>Xds29oGL@-^K0UVZyh`tv=x&wuOVN&WqW-1&F)`N#G5*K+6Ir~hBopKs^R z>wk-nf`Nj8f`Nj8f`Nj8f`Nj8f`Nj8f`Nj8f`Nj8yTAZ*33(dh{!|wHc>ize|9_n% zbJBo8yGs1XAF0z-Ivhyz@aqUIPR$ z1N{9VLS6@M00D3oSOp#g{(Ov(p95EcMc~$hg!~nF1Nb)ZE#M;X8Q`rC5ON*(5fB3Z zcz}>sfbRp}18iUgc=LWjz5}cS3jhKB@_s^o3p@`rfs4Qx@Co4Kz+3kb;sGB5{)tA$ zAAxs(9|JD}@1l7U0G|XTkFS{K35Gx7gX%-1j>Cnp8)Bzri<2{8Y^|%9y9xW7e4G>$R_~te@|(cDY=NEgnfKq#Sa5+wQlo!;bkD z1mUqQ(yDM`FH-U}SirD<1!ol>cDCVTS|n}=K_F#I#-z>?@OZ>CEH975wV_4pWV)Jq ze&Pkw*>cNjkroYDgO}-w+Oq;BuuKzqeQPbZ)K0XB-c}IC+~#o{#-dD{T<8-{oneoU zYwy;1P^Lkszcz%HkBW6YZeB)F=e}R2f+y4pY2-y*ng)IJQQE0VOKY-a*;gss-KOJ} zwdLixy(spAq(;wF*7hrFr_2{xyN0;4Jb}qluLje1X+7LkhTQN#%K@jsY9wz}Nv5Pf zEj zxvPbwgEg)1L-ZfydhPMsPIiDj#DN-flAaOUqMMKs>ta4kQ6x01WqO~Y2yQ9!jiAyM z^~g4hojN?%Nw9a3%BP8#U!1wper#F&V?}$xAS4aCDN$s$=z;eS@%uW{6I#Y_6qAX3qp^7_ouPP3yK~C|V zIvZv*|Bq@9!ocdGdXqdQ{rxc&+%|61GW;QyYpyTTapUucwBL(?%&bhj(Mbq`_7tsq zTXo8IkZiH4=VOPpG2@YCF}5+fH0F-GAne3{$JGv>rK@6F9D~46Tq9O>Hh$H1DFRM z0DgsfUe@^6fO7x^9sy*H|7#!xR)Jfnt9{3pW3tiiP z6Q5JS!@#Sk>2Crl@OhvNoB)mkzeHVs9XJWRfO>ud_!4jo_#5i?8^Fr|2kr-cf;#>Z z@B}aqn0o$o)biJWb>O4GpTLRa%u}!3LjN7;#W4hwvfe;UMf63AM8z0 zkxQUeGeGnfMh1?f=hKmOt=$M+bR<;miCMa974z-k`Urhk=|P3AREFe@G8?xK3@U$A zgeHKYTqd(QMlCAa1u=?xG`DK1fbZfrr+s=F=5v{$*`@|ozbN9&wZfXE)=5s&4K(D? zS*xMjATP}tUiy03lY=qwE8IzCQ>}qVbArKwgn5DLiHPi}rpoyN)-{T_J-BpvHQg%r z;J_1+&zeenvs5X7(mrgKGB`jrMB%L~*#-|(<0MNVOcB$w#VCuJ$EIgYT0?L1uvfpZ zQ8~YSW+IjCF>1w=OHyIa&@+4Xx;(W{k$vMIb=^L_v?Qeoz_pjq*(J)+H_85)SweA^ zRr7bquqN!ak7hb<}Nx7u;W*eL34>c}23%21USLK$P3 zm9@*yo|==@Oo!$su|9qDRCt3u7sjp5vQ+z`=>klQc*A4kG>kD#yK2324K-68_&d3= zVrc;Rs5^}9(J6))8QF_dFgk}vNjLWc{N^By3mJ`fPQ`)s-(?yWl%0)IW<)MaI5d)b zfSKlX_U>c7vi4M&RuF|+aY+U#6glcArZi&CHr@izRE;L+1fr-X+l>QiHFfEvN(A!O zkPDWw%N47(@@TW;`7S$^GGOA_j~tU-oNW;K>)t%%;c#nj3lWa#KDQe)g0Yz61 ziAvzgpr7OO5ZO|ufy3uY@Krm@IIqTN(YWL?PFhpf-k(@ZYg0d*$EEY0TlI|nY zNV%PSv(mXV8mbq6ZLP_R2Si9Dcy_eCCDcolXD-QS*+{VlDO%t)usogkxGk?RuTXWr fwIkY$u#7`S9O<3I)&U Date: Thu, 17 Nov 2022 15:35:51 +0100 Subject: [PATCH 304/375] repository: add vi swap file to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4938417fd..b85b79265 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ __pycache__/ # VSCode .vscode +# vi swap file +*.swp From 0e7f2b000c638b7562c253b333f84e6e94196130 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 09:44:01 +0000 Subject: [PATCH 305/375] sap_ha_pacemaker_cluster: fix cluster config creation and cluster name default --- roles/sap_ha_pacemaker_cluster/defaults/main.yml | 2 +- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/defaults/main.yml b/roles/sap_ha_pacemaker_cluster/defaults/main.yml index 4bba69ae5..96737df68 100644 --- a/roles/sap_ha_pacemaker_cluster/defaults/main.yml +++ b/roles/sap_ha_pacemaker_cluster/defaults/main.yml @@ -6,7 +6,7 @@ # Do NOT USE ANSIBLE FACTS for defaults to be compatible with # playbooks that disable generic fact gathering! -sap_ha_pacemaker_cluster_cluster_name: my-cluster +sap_ha_pacemaker_cluster_cluster_name: "{{ ha_cluster_cluster_name | default('my-cluster') }}" sap_ha_pacemaker_cluster_create_config_varfile: false sap_ha_pacemaker_cluster_create_config_dest: "{{ sap_ha_pacemaker_cluster_cluster_name }}_resource_config.yml" diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index ee26dd8b2..252fb9768 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -171,7 +171,9 @@ # their user provided variables? - name: "SAP HA Install Pacemaker - Create cluster configuration parameters file" - when: sap_ha_pacemaker_cluster_create_config_dest is defined + when: + - sap_ha_pacemaker_cluster_create_config_dest | length + - sap_ha_pacemaker_cluster_create_config_varfile ansible.builtin.template: backup: true dest: "{{ sap_ha_pacemaker_cluster_create_config_dest }}" @@ -185,7 +187,9 @@ check_mode: false - name: "SAP HA Install Pacemaker - Display configuration parameters SAVE FILE location" - when: sap_ha_pacemaker_cluster_create_config_varfile + when: + - sap_ha_pacemaker_cluster_create_config_varfile + - sap_ha_pacemaker_cluster_create_config_dest | length ansible.builtin.debug: msg: | The cluster resource configuration parameters have been saved here: From ed26134048d92d2f1a01a22430501910deeaab1d Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 10:38:30 +0000 Subject: [PATCH 306/375] sap_ha_pacemaker_cluster: cosmetical alignment of task conditional --- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index 252fb9768..cae4403e7 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -172,8 +172,8 @@ - name: "SAP HA Install Pacemaker - Create cluster configuration parameters file" when: - - sap_ha_pacemaker_cluster_create_config_dest | length - sap_ha_pacemaker_cluster_create_config_varfile + - sap_ha_pacemaker_cluster_create_config_dest | length ansible.builtin.template: backup: true dest: "{{ sap_ha_pacemaker_cluster_create_config_dest }}" From 9b83632afa5a0a1eda7a740902b830ca94917a89 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 18 Nov 2022 11:54:57 +0100 Subject: [PATCH 307/375] sap_general_preconfigure: ansible-lint 6.8.6 cleanup --- roles/sap_general_preconfigure/handlers/main.yml | 3 ++- .../tasks/RedHat/generic/configure-etc-hosts.yml | 2 +- .../tasks/SLES/assert-installation.yml | 3 ++- roles/sap_general_preconfigure/vars/SLES_15.yml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/sap_general_preconfigure/handlers/main.yml b/roles/sap_general_preconfigure/handlers/main.yml index 8d43fdfc3..0c28d1bc7 100644 --- a/roles/sap_general_preconfigure/handlers/main.yml +++ b/roles/sap_general_preconfigure/handlers/main.yml @@ -24,7 +24,8 @@ - not sap_general_preconfigure_fail_if_reboot_required|d(true) - not sap_general_preconfigure_reboot_ok|d(false) -- name: Remount /dev/shm +# Reason for noqa: We want to avoid non-ansible.builtin modules where possible +- name: Remount /dev/shm # noqa command-instead-of-module ansible.builtin.command: mount -o remount /dev/shm listen: __sap_general_preconfigure_mount_tmpfs_handler diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml index ba2a184b5..baa6991d3 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml @@ -19,7 +19,7 @@ - name: Display hostname aliases ansible.builtin.debug: - var=__sap_general_preconfigure_register_sap_hostname_aliases + var: __sap_general_preconfigure_register_sap_hostname_aliases - name: Check if ipv4 address, FQDN, and hostname are in /etc/hosts when: not sap_general_preconfigure_modify_etc_hosts | bool diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index 53f444644..4ed5df4f3 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -78,7 +78,8 @@ ignore_errors: yes when: not __sap_general_preconfigure_min_pkgs | d([]) -- name: Get info about possible package updates +# Reason for noqa: The yum module appears to not support the check-update option +- name: Get info about possible package updates # noqa command-instead-of-module ansible.builtin.command: yum check-update register: __sap_general_preconfigure_register_yum_check_update_assert changed_when: false diff --git a/roles/sap_general_preconfigure/vars/SLES_15.yml b/roles/sap_general_preconfigure/vars/SLES_15.yml index 750333937..cc3c2793b 100644 --- a/roles/sap_general_preconfigure/vars/SLES_15.yml +++ b/roles/sap_general_preconfigure/vars/SLES_15.yml @@ -14,4 +14,4 @@ __sap_general_preconfigure_packages: __sap_general_preconfigure_min_pkgs: __sap_general_preconfigure_packagegroups: __sap_general_preconfigure_envgroups: -__sap_general_preconfigure_kernel_parameters_default: \ No newline at end of file +__sap_general_preconfigure_kernel_parameters_default: From ec2d390e364b15587dcd42ed41b8aa11ea4ced52 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 18 Nov 2022 12:02:22 +0100 Subject: [PATCH 308/375] sap_netweaver_preconfigure: ansible-lint 6.8.6 cleanup --- roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml b/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml index 4520c4375..73efdb98c 100644 --- a/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml +++ b/roles/sap_netweaver_preconfigure/tasks/sapnote/2526952.yml @@ -12,9 +12,9 @@ - name: Enable and start tuned ansible.builtin.service: - name=tuned - state=started - enabled=yes + name: tuned + state: started + enabled: yes - name: Show currently active tuned profile ansible.builtin.shell: set -o pipefail && /usr/sbin/tuned-adm active | awk '/:/{print $NF}' From a554c3dd9be1dff7b864c71ca4850dfc1f829425 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 14:26:24 +0100 Subject: [PATCH 309/375] quick fix of invalid dependency version key --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index 1e2525558..837504c71 100644 --- a/requirements.yml +++ b/requirements.yml @@ -2,5 +2,5 @@ collections: - name: fedora.linux_system_roles - version: latest + version: '>=1.13.0' type: galaxy From 4fe1b6ba5dd5a6acb590f1f5c5c4b4d266f00fdd Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 15:08:29 +0100 Subject: [PATCH 310/375] adjust sample playbook to new cluster role + linter fix --- .pre-commit-config.yaml | 2 +- ...laybook_deploy-2-node-sap-hana-cluster.yml | 43 ++++++++++--------- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 4 +- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4f119dda..13541e313 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: '^$' fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.3.0 hooks: - id: end-of-file-fixer - id: check-merge-conflict diff --git a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml index 6a5911b88..7c68e295e 100644 --- a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml +++ b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml @@ -28,15 +28,13 @@ sap_hana_preconfigure_reboot_ok: yes sap_hana_preconfigure_fail_if_reboot_required: no - sap_hana_update_etchosts: yes - sap_hana_sid: "DB1" sap_hana_instance_number: "00" sap_hana_install_master_password: "my-hana-password" ### Cluster Definition - sap_hana_cluster_name: cluster1 - sap_hana_hacluster_password: "my_hacluster-password" + ha_cluster_cluster_name: cluster1 + ha_cluster_hacluster_password: "my_hacluster-password" sap_hana_cluster_nodes: - node_name: node1 @@ -49,18 +47,25 @@ node_role: secondary hana_site: DC02 - sap_hana_vip1: 192.168.1.100 + sap_hana_vip: + primary: 192.168.5.64 + + ha_cluster_fence_agent_packages: + - fence-agents-rhevm + + sap_ha_pacemaker_cluster_stonith_custom: + - name: rhevm-fencing + agent: 'stonith:fence_rhevm' + options: + ip: rhevm-manager.example.com + username: rhevm-user@internal + password: rhevm-secret + pcmk_host_list: "{{ ansible_play_hosts_all | join(',') }}" + power_wait: 3 + ssl: 1 + ssl_insecure: 1 + disable_http_filter: 1 - sap_pacemaker_stonith_devices: - - name: "rhevm_fence1" - agent: "fence_rhevm" - parameters: > - ip=rhevm-manager.example.com - username=rhevm-user@internal - password=rhevm-secret - pcmk_host_list='node1,node2' - power_wait=3 - ssl=1 ssl_insecure=1 disable_http_filter=1 roles: # SAP Hana preparation and installation @@ -71,9 +76,5 @@ # SAP Hana System Replication setup between 2 nodes - name: sap_ha_install_hana_hsr - # 2-node Pacemaker Cluster Configuration - - name: sap_ha_prepare_pacemaker - - name: sap_ha_install_pacemaker - - # SAP Hana Cluster Resources Configuration - - name: sap_ha_set_hana + # Pacemaker cluster installation and configuration for SAP HANA nodes + - name: sap_ha_pacemaker_cluster diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index cae4403e7..0eaf4ee6d 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -171,7 +171,7 @@ # their user provided variables? - name: "SAP HA Install Pacemaker - Create cluster configuration parameters file" - when: + when: - sap_ha_pacemaker_cluster_create_config_varfile - sap_ha_pacemaker_cluster_create_config_dest | length ansible.builtin.template: @@ -187,7 +187,7 @@ check_mode: false - name: "SAP HA Install Pacemaker - Display configuration parameters SAVE FILE location" - when: + when: - sap_ha_pacemaker_cluster_create_config_varfile - sap_ha_pacemaker_cluster_create_config_dest | length ansible.builtin.debug: From 5fe3163c16a131cc1d24fbb07181164210bf9732 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 16:17:00 +0100 Subject: [PATCH 311/375] made example VIP address more generic --- .../sample-playbook_deploy-2-node-sap-hana-cluster.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml index 7c68e295e..7ca448d05 100644 --- a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml +++ b/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml @@ -48,7 +48,7 @@ hana_site: DC02 sap_hana_vip: - primary: 192.168.5.64 + primary: 192.168.1.100 ha_cluster_fence_agent_packages: - fence-agents-rhevm From 0e7c55114afc9bc95f20a04e01d6191563ad9d56 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Fri, 18 Nov 2022 17:33:25 +0100 Subject: [PATCH 312/375] delete deprecated role workflows and excludes update workflows with 1 whitespace fix --- .ansible-lint | 4 -- .../ansible-lint-sap_general_preconfigure.yml | 2 +- .../ansible-lint-sap_ha_install_hana_hsr.yml | 2 +- .../ansible-lint-sap_ha_install_pacemaker.yml | 39 ------------------- ...ansible-lint-sap_ha_pacemaker_cluster.yml} | 10 ++--- .../ansible-lint-sap_ha_prepare_pacemaker.yml | 39 ------------------- .../ansible-lint-sap_hana_install.yml | 2 +- .../ansible-lint-sap_hana_preconfigure.yml | 2 +- ...-lint-sap_hypervisor_node_preconfigure.yml | 8 ++-- ...nsible-lint-sap_netweaver_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_swpm.yml | 2 +- .../ansible-lint-sap_vm_preconfigure.yml | 8 ++-- ...llint-sap_hypervisor_node_preconfigure.yml | 6 +-- .../yamllint-sap_vm_preconfigure.yml | 6 +-- 14 files changed, 25 insertions(+), 107 deletions(-) delete mode 100644 .github/workflows/ansible-lint-sap_ha_install_pacemaker.yml rename .github/workflows/{ansible-lint-sap_ha_set_hana.yml => ansible-lint-sap_ha_pacemaker_cluster.yml} (71%) delete mode 100644 .github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml diff --git a/.ansible-lint b/.ansible-lint index 70346fb07..69b206305 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -9,12 +9,8 @@ exclude_paths: - roles/sap_anydb_install_oracle - roles/sap_general_preconfigure - roles/sap_ha_install_hana_hsr - - roles/sap_ha_install_pacemaker - roles/sap_hana_install - roles/sap_hana_preconfigure - - roles/sap_ha_prepare_pacemaker - - roles/sap_ha_set_hana - - roles/sap_ha_set_netweaver - roles/sap_hostagent - roles/sap_hypervisor_node_preconfigure - roles/sap_install_media_detect diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index be5370076..38355329c 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_general_preconfigure diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index 9ff81ad6f..1582e8537 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_ha_install_hana_hsr diff --git a/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml b/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml deleted file mode 100644 index a2e12f62b..000000000 --- a/.github/workflows/ansible-lint-sap_ha_install_pacemaker.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- - -# Workflow for ansible-lint of a role - -name: ansible-lint of the role sap_ha_install_pacemaker - -on: - push: - branches: - - main - - dev - paths: - - 'roles/sap_ha_install_pacemaker/**' - pull_request: - branches: - - main - - dev - paths: - - 'roles/sap_ha_install_pacemaker/**' - -jobs: - ansible-lint: - runs-on: ubuntu-latest - - steps: - - name: Check out the code - uses: actions/checkout@v2 - - - name: Set up Python 3 - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install test dependencies - run: pip3 install ansible ansible-lint - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_pacemaker - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_set_hana.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml similarity index 71% rename from .github/workflows/ansible-lint-sap_ha_set_hana.yml rename to .github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index bb8431c2a..2b8ee16d1 100644 --- a/.github/workflows/ansible-lint-sap_ha_set_hana.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -1,8 +1,8 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role -name: ansible-lint of the role sap_ha_set_hana +name: ansible-lint of the role sap_ha_pacemaker_cluster on: push: @@ -10,13 +10,13 @@ on: - main - dev paths: - - 'roles/sap_ha_set_hana/**' + - 'roles/sap_ha_pacemaker_cluster/**' pull_request: branches: - main - dev paths: - - 'roles/sap_ha_set_hana/**' + - 'roles/sap_ha_pacemaker_cluster/**' jobs: ansible-lint: @@ -35,5 +35,5 @@ jobs: run: pip3 install ansible ansible-lint - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_set_hana + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_pacemaker_cluster run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml b/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml deleted file mode 100644 index 5b7c9c613..000000000 --- a/.github/workflows/ansible-lint-sap_ha_prepare_pacemaker.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- - -# Workflow for ansible-lint of a role - -name: ansible-lint of the role sap_ha_prepare_pacemaker - -on: - push: - branches: - - main - - dev - paths: - - 'roles/sap_ha_prepare_pacemaker/**' - pull_request: - branches: - - main - - dev - paths: - - 'roles/sap_ha_prepare_pacemaker/**' - -jobs: - ansible-lint: - runs-on: ubuntu-latest - - steps: - - name: Check out the code - uses: actions/checkout@v2 - - - name: Set up Python 3 - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install test dependencies - run: pip3 install ansible ansible-lint - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_prepare_pacemaker - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index a9b3156b6..5b3a1a847 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_hana_install diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index ac6d78606..78426756e 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_hana_preconfigure diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index ddc84a74e..6caa476a1 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -1,11 +1,11 @@ name: Ansible Lint for sap_hypervisor_node_preconfigure -on: - push: - paths: +on: + push: + paths: - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: - paths: + paths: - 'roles/sap_hypervisor_node_preconfigure/**' jobs: ansible-lint: diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 0037b5216..0e5176954 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_netweaver_preconfigure diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 50325db5b..ed38c6c34 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role name: ansible-lint of the role sap_swpm diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index 025dc5657..0c2a057a2 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -1,11 +1,11 @@ name: Ansible Lint for sap_vm_preconfigure -on: - push: - paths: +on: + push: + paths: - 'roles/sap_vm_preconfigure/**' pull_request: - paths: + paths: - 'roles/sap_vm_preconfigure/**' jobs: ansible-lint: diff --git a/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml index def66ab8d..603fd3617 100644 --- a/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/yamllint-sap_hypervisor_node_preconfigure.yml @@ -3,13 +3,13 @@ name: yamllint-sap_hypervisor_node_preconfigure on: push: branches: [ main ] - paths: + paths: - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: branches: [ main ] - paths: + paths: - 'roles/sap_hypervisor_node_preconfigure/**' - + workflow_dispatch: jobs: diff --git a/.github/workflows/yamllint-sap_vm_preconfigure.yml b/.github/workflows/yamllint-sap_vm_preconfigure.yml index 6dc8352fb..e7d301518 100644 --- a/.github/workflows/yamllint-sap_vm_preconfigure.yml +++ b/.github/workflows/yamllint-sap_vm_preconfigure.yml @@ -3,13 +3,13 @@ name: yamllint-sap_vm_preconfigure on: push: branches: [ main ] - paths: + paths: - 'roles/sap_vm_preconfigure/**' pull_request: branches: [ main ] - paths: + paths: - 'roles/sap_vm_preconfigure/**' - + workflow_dispatch: jobs: From 6bf7152bb301b896056b18880a2cae05ef3c4fc9 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 18 Nov 2022 21:15:07 +0100 Subject: [PATCH 313/375] sap_hana_preconfigure: ansible-lint 6.8.6 cleanup --- .../tasks/SLES/configuration.yml | 2 +- .../tasks/SLES/installation.yml | 2 +- roles/sap_hana_preconfigure/tasks/main.yml | 6 ++-- .../tasks/sapnote/2009879.yml | 3 +- .../tasks/sapnote/2009879_7.yml | 29 ++++++++++++------- .../tasks/sapnote/2292690/01-assert-tuned.yml | 3 +- .../sapnote/2292690/01-configure-tuned.yml | 4 ++- .../2292690/02-assert-auto-numa-balancing.yml | 4 ++- .../02-turn-off-auto-numa-balancing.yml | 4 ++- .../tasks/sapnote/2292690/03-assert-thp.yml | 4 ++- .../tasks/sapnote/2292690/03-disable-thp.yml | 4 ++- .../04-assert-c-states-for-lower-latency.yml | 4 ++- ...4-configure-c-states-for-lower-latency.yml | 4 ++- .../2292690/05-assert-cpu-governor.yml | 4 ++- .../2292690/05-configure-cpu-governor.yml | 4 ++- .../tasks/sapnote/2292690/06-assert-epb.yml | 4 ++- .../sapnote/2292690/06-configure-epb.yml | 4 ++- .../tasks/sapnote/2292690/07-assert-ksm.yml | 4 ++- .../tasks/sapnote/2292690/07-disable-ksm.yml | 4 ++- .../2292690/10-assert-ibm-energyscale.yml | 5 ++-- .../sapnote/2292690/10-ibm-energyscale.yml | 2 +- .../sapnote/2777782/01-assert-selinux.yml | 4 ++- .../sapnote/2777782/01-configure-selinux.yml | 4 ++- .../tasks/sapnote/2777782/02-assert-tuned.yml | 4 ++- .../sapnote/2777782/02-configure-tuned.yml | 4 ++- .../03-assert-abrt-coredumps-kdump.yml | 16 +++++++--- .../03-disable-abrt-coredumps-kdump.yml | 16 +++++++--- .../2777782/04-assert-auto-numa-balancing.yml | 4 ++- .../04-turn-off-auto-numa-balancing.yml | 4 ++- .../tasks/sapnote/2777782/05-assert-thp.yml | 4 ++- .../tasks/sapnote/2777782/05-disable-thp.yml | 4 ++- .../06-assert-c-states-for-lower-latency.yml | 4 ++- ...6-configure-c-states-for-lower-latency.yml | 4 ++- .../2777782/07-assert-cpu-governor.yml | 4 ++- .../2777782/07-configure-cpu-governor.yml | 4 ++- .../tasks/sapnote/2777782/08-assert-epb.yml | 4 ++- .../sapnote/2777782/08-configure-epb.yml | 4 ++- .../tasks/sapnote/2777782/09-assert-ksm.yml | 4 ++- .../tasks/sapnote/2777782/09-disable-ksm.yml | 4 ++- .../tasks/sapnote/2777782/11-assert-tsx.yml | 4 ++- .../tasks/sapnote/2777782/11-enable-tsx.yml | 4 ++- .../tasks/sapnote/assert-2009879_7.yml | 21 +++++++++----- 42 files changed, 163 insertions(+), 66 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index eb47a1ed7..dfe225826 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -9,7 +9,7 @@ var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: Include configuration actions for required sapnotes ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/configuration.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" loop_control: diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 6a3d5260e..1fefe9714 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -8,7 +8,7 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: Include configuration actions for required sapnotes ansible.builtin.include_tasks: "tasks/sapnote/{{ sap_note_line_item }}/installation.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" loop_control: diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 7ae398264..08780364a 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -35,7 +35,8 @@ ansible.builtin.debug: var: sap_general_preconfigure_fact_reboot_required -- include_tasks: '{{ item }}/{{ assert_prefix }}installation.yml' +- name: Include installation.yml + ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}installation.yml' when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_installation | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' @@ -44,7 +45,8 @@ - name: Gather package facts again after the installation phase ansible.builtin.package_facts: -- include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' +- name: Include configuration.yml + ansible.builtin.include_tasks: '{{ item }}/{{ assert_prefix }}configuration.yml' when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_configuration | d(false) with_first_found: - '{{ ansible_distribution.split("_")[0] }}' diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2009879.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2009879.yml index eba699f93..130ba5111 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2009879.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2009879.yml @@ -34,4 +34,5 @@ (version {{ (__sap_hana_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2009879$') | first).version }}): SAP HANA Guidelines for R HEL 7 (pdf)" -- include_tasks: 2009879_{{ ansible_distribution_major_version }}.yml +- name: Include 2009879_X.yml + ansible.builtin.include_tasks: 2009879_{{ ansible_distribution_major_version }}.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml index ad28b1015..f95d065cd 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml @@ -24,7 +24,9 @@ block: - name: 3.9 create compatibility links for RHEL 7.2 - ansible.builtin.file: src=/usr/lib64/{{ line_item.src }} dest=/usr/lib64/{{ line_item.dest }} state=link + ansible.builtin.file: + src: /usr/lib64/{{ line_item.src }} + dest: /usr/lib64/{{ line_item.dest }} state=link with_items: - { src: 'libssl.so.1.0.1e', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.1.0.1e', dest: 'libcrypto.so.1.0.1' } @@ -34,7 +36,9 @@ loop_var: line_item - name: 3.9 create compatibility links for RHEL 7.3+ - ansible.builtin.file: src=/usr/lib64/{{ line_item.src }} dest=/usr/lib64/{{ line_item.dest }} state=link + ansible.builtin.file: + src: /usr/lib64/{{ line_item.src }} + dest: /usr/lib64/{{ line_item.dest }} state=link with_items: - { src: 'libssl.so.10', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.10', dest: 'libcrypto.so.1.0.1' } @@ -77,19 +81,23 @@ # loop_var: line_item # when: sap_hana_preconfigure_config_all|d(true) or sap_hana_preconfigure_2009879_3_13|d(false) -### 3.14 - Disable ABRT -- include_tasks: ../RedHat/generic/disable-abrtd.yml +### 3.14 - Disable abrt +- name: Step 3.14 - Disable abrt + ansible.builtin.include_tasks: ../RedHat/generic/disable-abrtd.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_1 | d(false) -- include_tasks: ../RedHat/generic/disable-abrt-ccpp.yml +- name: Step 3.14 - Disable abrt-ccpp + ansible.builtin.include_tasks: ../RedHat/generic/disable-abrt-ccpp.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_2 | d(false) -### 3.14 - Disable core Dumps -- include_tasks: ../RedHat/generic/disable-coredumps.yml +### 3.14 - Disable core dumps +- name: Step 3.14 - Disable core dumps + ansible.builtin.include_tasks: ../RedHat/generic/disable-coredumps.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_3 | d(false) -### 3.14 - Disable Kdump -- include_tasks: ../RedHat/generic/disable-kdump.yml +### 3.14 - Disable kdump +- name: Step 3.14 - Disable kdump + ansible.builtin.include_tasks: ../RedHat/generic/disable-kdump.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_4 | d(false) ### 3.15 - Disable Firewalld @@ -97,7 +105,8 @@ ### otherwise disable firewall ### NYI: Set proper firewall rules if SID/instance number is known ### -- include_tasks: ../RedHat/generic/disable-firewalld.yml +- name: Step 3.15 - Disable firewalld + ansible.builtin.include_tasks: ../RedHat/generic/disable-firewalld.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_15 | d(false) ### Firewall Calculation for SID=xx diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-assert-tuned.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-assert-tuned.yml index 262422068..a83b9025c 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-assert-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-assert-tuned.yml @@ -4,4 +4,5 @@ ansible.builtin.debug: msg: "SAP note 2292690 Step 1: Configure tuned to use profile sap-hana" -- import_tasks: ../../RedHat/generic/assert-tuned.yml +- name: Import ../../RedHat/generic/assert-tuned.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-tuned.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-configure-tuned.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-configure-tuned.yml index 9ca06537c..cd1a6d95e 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-configure-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/01-configure-tuned.yml @@ -3,4 +3,6 @@ - name: Configure 2292690-1 ansible.builtin.debug: msg: "SAP note 2292690 Step 1: Configure tuned to use profile sap-hana" -- import_tasks: ../../RedHat/generic/configure-tuned.yml + +- name: Import ../../RedHat/generic/configure-tuned.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-tuned.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-assert-auto-numa-balancing.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-assert-auto-numa-balancing.yml index 33d555233..e3296d036 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-assert-auto-numa-balancing.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-assert-auto-numa-balancing.yml @@ -4,4 +4,6 @@ - name: Assert 2292690-2 ansible.builtin.debug: msg: "SAP note 2292690 Step 2: Turn off auto-numa balancing" -- import_tasks: ../../RedHat/generic/assert-auto-numa-balancing.yml + +- name: Import ../../RedHat/generic/assert-auto-numa-balancing.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-auto-numa-balancing.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-turn-off-auto-numa-balancing.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-turn-off-auto-numa-balancing.yml index 22ec9d13e..aabf98d86 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-turn-off-auto-numa-balancing.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/02-turn-off-auto-numa-balancing.yml @@ -4,4 +4,6 @@ - name: Configure 2292690-2 ansible.builtin.debug: msg: "SAP note 2292690 Step 2: Turn off auto-numa balancing" -- import_tasks: ../../RedHat/generic/turn-off-auto-numa-balancing.yml + +- name: Import ../../RedHat/generic/turn-off-auto-numa-balancing.yml + ansible.builtin.import_tasks: ../../RedHat/generic/turn-off-auto-numa-balancing.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-assert-thp.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-assert-thp.yml index 1e5b734d0..9935ea665 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-assert-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-assert-thp.yml @@ -4,4 +4,6 @@ - name: Assert 2292690-3 ansible.builtin.debug: msg: "SAP note 2292690 Step 3: Disable Transparent Hugepages (THP)" -- import_tasks: ../../RedHat/generic/assert-thp.yml + +- name: Import ../../RedHat/generic/assert-thp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-thp.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-disable-thp.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-disable-thp.yml index 594c429a1..7f4e24d57 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-disable-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/03-disable-thp.yml @@ -4,4 +4,6 @@ - name: Configure 2292690-3 ansible.builtin.debug: msg: "SAP note 2292690 Step 3: Disable Transparent Hugepages (THP)" -- import_tasks: ../../RedHat/generic/disable-thp.yml + +- name: Import ../../RedHat/generic/disable-thp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-thp.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-assert-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-assert-c-states-for-lower-latency.yml index bf3596968..5481358a0 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-assert-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-assert-c-states-for-lower-latency.yml @@ -4,4 +4,6 @@ - name: Assert 2292690-4 ansible.builtin.debug: msg: "SAP note 2292690 Step 4: Configure C-States for lower latency (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-c-states-for-lower-latency.yml + +- name: Import ../../RedHat/generic/assert-c-states-for-lower-latency.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-c-states-for-lower-latency.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-configure-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-configure-c-states-for-lower-latency.yml index 577852e85..fb3b5f7d1 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-configure-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/04-configure-c-states-for-lower-latency.yml @@ -4,4 +4,6 @@ - name: Configure 2292690-4 ansible.builtin.debug: msg: "SAP note 2292690 Step 4: Configure C-States for lower latency (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-c-states-for-lower-latency.yml + +- name: Import ../../RedHat/generic/configure-c-states-for-lower-latency.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-c-states-for-lower-latency.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-assert-cpu-governor.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-assert-cpu-governor.yml index 91fd7dd04..e2549b68d 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-assert-cpu-governor.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-assert-cpu-governor.yml @@ -5,4 +5,6 @@ - name: Assert 2292690-5 ansible.builtin.debug: msg: "SAP note 2292690 Step 5: Configure CPU Governor for performance (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-cpu-governor-for-performance.yml + +- name: Import ../../RedHat/generic/assert-cpu-governor-for-performance.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-cpu-governor-for-performance.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-configure-cpu-governor.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-configure-cpu-governor.yml index 13627b1df..8728d411c 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-configure-cpu-governor.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/05-configure-cpu-governor.yml @@ -5,4 +5,6 @@ - name: Configure 2292690-5 ansible.builtin.debug: msg: "SAP note 2292690 Step 5: Configure CPU Governor for performance (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-cpu-governor-for-performance.yml + +- name: Import ../../RedHat/generic/configure-cpu-governor-for-performance.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-cpu-governor-for-performance.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-assert-epb.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-assert-epb.yml index e4075cfc8..032b463f1 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-assert-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-assert-epb.yml @@ -5,4 +5,6 @@ - name: Assert 2292690-6 ansible.builtin.debug: msg: "SAP note 2292690 Step 6: Configure Energy Performance Bias (EPB, x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-epb.yml + +- name: Import ../../RedHat/generic/assert-epb.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-epb.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-configure-epb.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-configure-epb.yml index 94a90b3da..a02b2aae5 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-configure-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/06-configure-epb.yml @@ -5,4 +5,6 @@ - name: Configure 2292690-6 ansible.builtin.debug: msg: "SAP note 2292690 Step 6: Configure Energy Performance Bias (EPB, x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-epb.yml + +- name: Import ../../RedHat/generic/configure-epb.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-epb.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-assert-ksm.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-assert-ksm.yml index 6af0ab264..886a8af70 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-assert-ksm.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-assert-ksm.yml @@ -3,4 +3,6 @@ - name: Assert 2292690-7 ansible.builtin.debug: msg: "SAP note 2292690 Step 7: Disable Kernel samepage merging (KSM)" -- import_tasks: ../../RedHat/generic/assert-ksm.yml + +- name: Import ../../RedHat/generic/assert-ksm.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-ksm.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-disable-ksm.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-disable-ksm.yml index 594cff1b6..e96f62341 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-disable-ksm.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/07-disable-ksm.yml @@ -3,4 +3,6 @@ - name: Configure 2292690-7 ansible.builtin.debug: msg: "SAP note 2292690 Step 7: Disable Kernel samepage merging (KSM)" -- import_tasks: ../../RedHat/generic/disable-ksm.yml + +- name: Import ../../RedHat/generic/disable-ksm.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-ksm.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml index e2bec3177..e84302ade 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml @@ -9,12 +9,13 @@ when: ansible_architecture == "ppc64le" block: -# Reason for noqa: In assert mode, we do not enforce a certain configuration. - - name: Check if package pseries-energy is not installed # noqa command-instead-of-module + - name: Check if package pseries-energy is not installed ansible.builtin.command: yum info installed pseries-energy register: __sap_hana_preconfigure_register_yum_pseries_energy_assert changed_when: no ignore_errors: yes + args: + warn: false - name: Assert that package pseries-energy is not installed ansible.builtin.assert: diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml index 603021cd1..d6f9dfae7 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-ibm-energyscale.yml @@ -5,7 +5,7 @@ ansible.builtin.debug: msg: "SAP note 2292690 Step 10: IBM EnergyScale for POWER8 Processor-Based Systems" -- name: ensure pseries-energy package is not installed +- name: Ensure pseries-energy package is not installed ansible.builtin.package: name: pseries-energy state: absent diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml index 88a054e0d..715819c85 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-assert-selinux.yml @@ -3,4 +3,6 @@ - name: Assert 2777782-1 ansible.builtin.debug: msg: "SAP note 2777782 Step 1: Configure SELinux" -- import_tasks: ../../RedHat/generic/assert-selinux.yml + +- name: Import ../../RedHat/generic/assert-selinux.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-selinux.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml index 545494a16..0aead6a74 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/01-configure-selinux.yml @@ -3,4 +3,6 @@ - name: Configure 2777782-1 ansible.builtin.debug: msg: "SAP note 2777782 Step 1: Configure SELinux" -- import_tasks: ../../RedHat/generic/configure-selinux.yml + +- name: Import ../../RedHat/generic/configure-selinux.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-selinux.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-assert-tuned.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-assert-tuned.yml index a6edd2311..b61b61b5a 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-assert-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-assert-tuned.yml @@ -3,4 +3,6 @@ - name: Assert 2777782-2 ansible.builtin.debug: msg: "SAP note 2777782 Step 2: Configure tuned to use profile sap-hana" -- import_tasks: ../../RedHat/generic/assert-tuned.yml + +- name: Import ../../RedHat/generic/assert-tuned.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-tuned.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-configure-tuned.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-configure-tuned.yml index 94704f04e..3cc3f7a27 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-configure-tuned.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/02-configure-tuned.yml @@ -3,4 +3,6 @@ - name: Configure 2777782-2 ansible.builtin.debug: msg: "SAP note 2777782 Step 2: Configure tuned to use profile for SAP HANA" -- import_tasks: ../../RedHat/generic/configure-tuned.yml + +- name: Import ../../RedHat/generic/configure-tuned.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-tuned.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-assert-abrt-coredumps-kdump.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-assert-abrt-coredumps-kdump.yml index e6c29c287..f995add3b 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-assert-abrt-coredumps-kdump.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-assert-abrt-coredumps-kdump.yml @@ -3,7 +3,15 @@ - name: Assert 2777782-3 ansible.builtin.debug: msg: "SAP note 2777782 Step 3: Disable ABRT, core dumps, and kdump" -- import_tasks: ../../RedHat/generic/assert-abrtd.yml -- import_tasks: ../../RedHat/generic/assert-abrt-ccpp.yml -- import_tasks: ../../RedHat/generic/assert-coredumps.yml -- import_tasks: ../../RedHat/generic/assert-kdump.yml + +- name: Import ../../RedHat/generic/assert-abrtd.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-abrtd.yml + +- name: Import ../../RedHat/generic/assert-abrt-ccpp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-abrt-ccpp.yml + +- name: Import ../../RedHat/generic/assert-coredumps.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-coredumps.yml + +- name: Import ../../RedHat/generic/assert-kdump.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-kdump.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-disable-abrt-coredumps-kdump.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-disable-abrt-coredumps-kdump.yml index 554714586..738e06f07 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-disable-abrt-coredumps-kdump.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/03-disable-abrt-coredumps-kdump.yml @@ -3,7 +3,15 @@ - name: Configure 2777782-3 ansible.builtin.debug: msg: "SAP note 2777782 Step 3: Disable ABRT, core dumps, and kdump" -- import_tasks: ../../RedHat/generic/disable-abrtd.yml -- import_tasks: ../../RedHat/generic/disable-abrt-ccpp.yml -- import_tasks: ../../RedHat/generic/disable-coredumps.yml -- import_tasks: ../../RedHat/generic/disable-kdump.yml + +- name: Import ../../RedHat/generic/disable-abrtd.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-abrtd.yml + +- name: Import ../../RedHat/generic/disable-abrt-ccpp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-abrt-ccpp.yml + +- name: Import ../../RedHat/generic/disable-coredumps.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-coredumps.yml + +- name: Import ../../RedHat/generic/disable-kdump.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-kdump.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-assert-auto-numa-balancing.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-assert-auto-numa-balancing.yml index 238ce92b9..e685c4677 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-assert-auto-numa-balancing.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-assert-auto-numa-balancing.yml @@ -4,4 +4,6 @@ - name: Assert 2777782-4 ansible.builtin.debug: msg: "SAP note 2777782 Step 4: Turn off auto-numa balancing" -- import_tasks: ../../RedHat/generic/assert-auto-numa-balancing.yml + +- name: Import ../../RedHat/generic/assert-auto-numa-balancing.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-auto-numa-balancing.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-turn-off-auto-numa-balancing.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-turn-off-auto-numa-balancing.yml index b9de9cd61..81d95a43f 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-turn-off-auto-numa-balancing.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/04-turn-off-auto-numa-balancing.yml @@ -4,4 +4,6 @@ - name: Configure 2777782-4 ansible.builtin.debug: msg: "SAP note 2777782 Step 4: Turn off auto-numa balancing" -- import_tasks: ../../RedHat/generic/turn-off-auto-numa-balancing.yml + +- name: Import ../../RedHat/generic/turn-off-auto-numa-balancing.yml + ansible.builtin.import_tasks: ../../RedHat/generic/turn-off-auto-numa-balancing.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-assert-thp.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-assert-thp.yml index 52f1f3146..a7000dd85 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-assert-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-assert-thp.yml @@ -4,4 +4,6 @@ - name: Assert 2777782-5 ansible.builtin.debug: msg: "SAP note 2777782 Step 5: Disable Transparent Hugepages (THP)" -- import_tasks: ../../RedHat/generic/assert-thp.yml + +- name: Import ../../RedHat/generic/assert-thp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-thp.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-disable-thp.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-disable-thp.yml index c55d7ba1e..5ee91783b 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-disable-thp.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/05-disable-thp.yml @@ -4,4 +4,6 @@ - name: Configure 2777782-5 ansible.builtin.debug: msg: "SAP note 2777782 Step 5: Disable Transparent Hugepages (THP)" -- import_tasks: ../../RedHat/generic/disable-thp.yml + +- name: Import ../../RedHat/generic/disable-thp.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-thp.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-assert-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-assert-c-states-for-lower-latency.yml index 28742a492..9ed6cc068 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-assert-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-assert-c-states-for-lower-latency.yml @@ -4,4 +4,6 @@ - name: Assert 2777782-6 ansible.builtin.debug: msg: "SAP note 2777782 Step 6: Configure C-States for lower latency (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-c-states-for-lower-latency.yml + +- name: Import ../../RedHat/generic/assert-c-states-for-lower-latency.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-c-states-for-lower-latency.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-configure-c-states-for-lower-latency.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-configure-c-states-for-lower-latency.yml index 4d4391053..445a43654 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-configure-c-states-for-lower-latency.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/06-configure-c-states-for-lower-latency.yml @@ -4,4 +4,6 @@ - name: Configure 2777782-6 ansible.builtin.debug: msg: "SAP note 2777782 Step 6: Configure C-States for lower latency (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-c-states-for-lower-latency.yml + +- name: Import ../../RedHat/generic/configure-c-states-for-lower-latency.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-c-states-for-lower-latency.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-assert-cpu-governor.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-assert-cpu-governor.yml index 5c6909e7c..8a600b0fb 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-assert-cpu-governor.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-assert-cpu-governor.yml @@ -5,4 +5,6 @@ - name: Assert 2777782-7 ansible.builtin.debug: msg: "SAP note 2777782 Step 7: Configure CPU Governor for performance (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-cpu-governor-for-performance.yml + +- name: Import ../../RedHat/generic/assert-cpu-governor-for-performance.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-cpu-governor-for-performance.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-configure-cpu-governor.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-configure-cpu-governor.yml index 0c4ae3f0a..40d22dcbf 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-configure-cpu-governor.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/07-configure-cpu-governor.yml @@ -5,4 +5,6 @@ - name: Configure 2777782-7 ansible.builtin.debug: msg: "SAP note 2777782 Step 7: Configure CPU Governor for performance (x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-cpu-governor-for-performance.yml + +- name: Import ../../RedHat/generic/configure-cpu-governor-for-performance.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-cpu-governor-for-performance.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-assert-epb.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-assert-epb.yml index 0a69cbefb..d7fb09e88 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-assert-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-assert-epb.yml @@ -5,4 +5,6 @@ - name: Assert 2777782-8 ansible.builtin.debug: msg: "SAP note 2777782 Step 8: Configure Energy Performance Bias (EPB, x86_64 platform only)" -- import_tasks: ../../RedHat/generic/assert-epb.yml + +- name: Import ../../RedHat/generic/assert-epb.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-epb.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-configure-epb.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-configure-epb.yml index 0f8d0b5da..0d6c3a2ee 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-configure-epb.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/08-configure-epb.yml @@ -5,4 +5,6 @@ - name: Configure 2777782-8 ansible.builtin.debug: msg: "SAP note 2777782 Step 8: Configure Energy Performance Bias (EPB, x86_64 platform only)" -- import_tasks: ../../RedHat/generic/configure-epb.yml + +- name: Import ../../RedHat/generic/configure-epb.yml + ansible.builtin.import_tasks: ../../RedHat/generic/configure-epb.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-assert-ksm.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-assert-ksm.yml index 1b3be258f..3393445b9 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-assert-ksm.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-assert-ksm.yml @@ -3,4 +3,6 @@ - name: Assert 2777782-9 ansible.builtin.debug: msg: "SAP note 2777782 Step 9: Disable Kernel samepage merging (KSM)" -- import_tasks: ../../RedHat/generic/assert-ksm.yml + +- name: Import ../../RedHat/generic/assert-ksm.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-ksm.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-disable-ksm.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-disable-ksm.yml index 63d85e514..a9cde0c26 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-disable-ksm.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/09-disable-ksm.yml @@ -3,4 +3,6 @@ - name: Configure 2777782-9 ansible.builtin.debug: msg: "SAP note 2777782 Step 9: Disable Kernel samepage merging (KSM)" -- import_tasks: ../../RedHat/generic/disable-ksm.yml + +- name: Import ../../RedHat/generic/disable-ksm.yml + ansible.builtin.import_tasks: ../../RedHat/generic/disable-ksm.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-assert-tsx.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-assert-tsx.yml index c82c92c1e..bf8e695ca 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-assert-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-assert-tsx.yml @@ -3,4 +3,6 @@ - name: Assert 2777782-11 ansible.builtin.debug: msg: "SAP note 2777782 Step 11: Enable TSX (Intel Transactional Synchronization Extensions)" -- import_tasks: ../../RedHat/generic/assert-tsx.yml + +- name: Import ../../RedHat/generic/assert-tsx.yml + ansible.builtin.import_tasks: ../../RedHat/generic/assert-tsx.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-enable-tsx.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-enable-tsx.yml index 6bb672921..509e152a3 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-enable-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/11-enable-tsx.yml @@ -3,4 +3,6 @@ - name: Configure 2777782-11 ansible.builtin.debug: msg: "SAP note 2777782 Step 11: Enable TSX (Intel Transactional Synchronization Extensions)" -- import_tasks: ../../RedHat/generic/enable-tsx.yml + +- name: Import ../../RedHat/generic/enable-tsx.yml + ansible.builtin.import_tasks: ../../RedHat/generic/enable-tsx.yml diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml index 9aea11a35..cef71a27e 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-2009879_7.yml @@ -193,19 +193,23 @@ # # when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_13 | d(false) -### 3.14 - Disable ABRT -- include_tasks: ../RedHat/generic/assert-abrtd.yml +### 3.14 - Disable abrt +- name: Step 3.14 - Assert abrt being disabled + ansible.builtin.include_tasks: ../RedHat/generic/assert-abrtd.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_1 | d(false) -- include_tasks: ../RedHat/generic/assert-abrt-ccpp.yml +- name: Step 3.14 - Assert abrt-ccpp being disabled + ansible.builtin.include_tasks: ../RedHat/generic/assert-abrt-ccpp.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_2 | d(false) -### 3.14 - Disable core Dumps -- include_tasks: ../RedHat/generic/assert-coredumps.yml +### 3.14 - Disable core dumps +- name: Step 3.14 - Assert core dumps being disabled + ansible.builtin.include_tasks: ../RedHat/generic/assert-coredumps.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_3 | d(false) -### 3.14 - Disable Kdump -- include_tasks: ../RedHat/generic/assert-kdump.yml +### 3.14 - Disable kdump +- name: Step 3.14 - Assert kdump being disabled + ansible.builtin.include_tasks: ../RedHat/generic/assert-kdump.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_14_4 | d(false) ### 3.15 - Disable Firewalld @@ -213,7 +217,8 @@ ### otherwise disable firewall ### NYI: Set proper firewall rules if SID/instance number is known ### -- include_tasks: ../RedHat/generic/assert-firewalld.yml +- name: Step 3.15 - Assert firewalld being disabled + ansible.builtin.include_tasks: ../RedHat/generic/assert-firewalld.yml when: sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_2009879_3_15 | d(false) # - name: 3.15 Ensure firewall is disabled when instance ID unknown # service: name=firewalld state=stopped enabled=no From 44b769a283bf2c73153f867d9114891255661b27 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 11:31:02 +0100 Subject: [PATCH 314/375] sap_ha_install_hana_hsr: lint cleanup --- .ansible-lint | 4 +++- roles/sap_ha_install_hana_hsr/tasks/main.yml | 12 ++++++------ .../tasks/update_etchosts.yml | 2 +- roles/sap_vm_preconfigure/README.md | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 69b206305..e84f0e886 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -4,11 +4,13 @@ exclude_paths: - .cache/ - .github/ + - docs/ - changelogs/ - playbooks/ - roles/sap_anydb_install_oracle - roles/sap_general_preconfigure - - roles/sap_ha_install_hana_hsr + #- roles/sap_ha_install_hana_hsr + #- roles/sap_ha_pacemaker_cluster - roles/sap_hana_install - roles/sap_hana_preconfigure - roles/sap_hostagent diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index d5802149e..94da92552 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -105,7 +105,7 @@ # END of primary node connectivity test block - name: "SAP HSR - Update /etc/hosts" - include_tasks: + ansible.builtin.include_tasks: file: update_etchosts.yml apply: tags: hsr_etchosts @@ -116,7 +116,7 @@ - hsr_etchosts - name: "SAP HSR - hdbuserstore" - include_tasks: + ansible.builtin.include_tasks: file: hdbuserstore.yml apply: tags: hsr_hdbuserstore @@ -124,7 +124,7 @@ - hsr_hdbuserstore - name: "SAP HSR - Log Mode" - include_tasks: + ansible.builtin.include_tasks: file: log_mode.yml apply: tags: hsr_logmode @@ -133,7 +133,7 @@ # Steps only running on secondary nodes - name: "SAP HSR - PKI Files" - include_tasks: + ansible.builtin.include_tasks: file: pki_files.yml apply: tags: hsr_pki @@ -146,7 +146,7 @@ # Steps only executed on a primary node - name: "SAP HSR - Run Backup" - include_tasks: + ansible.builtin.include_tasks: file: run_backup.yml apply: become: true @@ -158,7 +158,7 @@ - hsr_backup - name: "SAP HSR - Configure HSR" - include_tasks: + ansible.builtin.include_tasks: file: configure_hsr.yml apply: tags: hsr_register diff --git a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml index c0f6dc0f4..bcb2c5db0 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml @@ -1,7 +1,7 @@ --- - name: "SAP HSR - Check /etc/hosts for conflicting entries" ansible.builtin.shell: | - awk '(/{{ "( |\t)"+item.node_name+"($| |\t)" }}/ && !/^{{ item.node_ip+"( |\t)" }}/) || (/^{{ item.node_ip+"( |\t)" }}/ && !/{{ "( |\t)"+item.node_name+"($| |\t)" }}/)' /etc/hosts + awk '(/{{ "( |\t)" + item.node_name + "($| |\t)" }}/ && !/^{{ item.node_ip + "( |\t)" }}/) || (/^{{ item.node_ip + "( |\t)" }}/ && !/{{ "( |\t)" + item.node_name + "($| |\t)" }}/)' /etc/hosts register: etchosts_conflict changed_when: false failed_when: etchosts_conflict.stdout != '' diff --git a/roles/sap_vm_preconfigure/README.md b/roles/sap_vm_preconfigure/README.md index 3c61772ad..c6dafdeab 100644 --- a/roles/sap_vm_preconfigure/README.md +++ b/roles/sap_vm_preconfigure/README.md @@ -3,7 +3,7 @@ sap_vm_preconfigure ================== -This role will set and check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. +This role will set and check the required settings and parameters for a guest (VM) running on RHV/KVM for SAP HANA. Requirements From 884b59314a47d87596cf6049c218ca7bddc07923 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 11:36:33 +0100 Subject: [PATCH 315/375] include ansible-lint check of the docs contents by default --- .ansible-lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index e84f0e886..f2d5cc7bc 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -4,7 +4,7 @@ exclude_paths: - .cache/ - .github/ - - docs/ + #- docs/ - changelogs/ - playbooks/ - roles/sap_anydb_install_oracle From 4c44b701694300258bf27f9ad59f116ef47288a2 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 21 Nov 2022 11:47:25 +0100 Subject: [PATCH 316/375] sap_hana_preconfigure: ansible-lint 6.8.6 cleanup, review --- roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml index f95d065cd..44babf850 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2009879_7.yml @@ -26,7 +26,8 @@ - name: 3.9 create compatibility links for RHEL 7.2 ansible.builtin.file: src: /usr/lib64/{{ line_item.src }} - dest: /usr/lib64/{{ line_item.dest }} state=link + dest: /usr/lib64/{{ line_item.dest }} + state: link with_items: - { src: 'libssl.so.1.0.1e', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.1.0.1e', dest: 'libcrypto.so.1.0.1' } @@ -38,7 +39,8 @@ - name: 3.9 create compatibility links for RHEL 7.3+ ansible.builtin.file: src: /usr/lib64/{{ line_item.src }} - dest: /usr/lib64/{{ line_item.dest }} state=link + dest: /usr/lib64/{{ line_item.dest }} + state: link with_items: - { src: 'libssl.so.10', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.10', dest: 'libcrypto.so.1.0.1' } From 8c2003906c1ad8e2ed0e801de0ec667404a02474 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 14:46:09 +0100 Subject: [PATCH 317/375] recommit new hana_exist --- roles/sap_hana_install/README.md | 9 +- roles/sap_hana_install/defaults/main.yml | 3 + roles/sap_hana_install/tasks/hana_exists.yml | 113 +++++++++++++++---- roles/sap_hana_install/tasks/main.yml | 30 +++-- 4 files changed, 120 insertions(+), 35 deletions(-) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index ec1812a8f..f41ea1da9 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -233,12 +233,17 @@ You can find more complex playbooks in directory `playbooks` of the collection ` #### Perform Initial Checks +These checks are only performed if `sap_hana_install_force` is set to `true`. Its default value is `false` - If variable `sap_hana_install_check_sidadm_user` is undefined or set to `y`: Check if user sidadm exists. If yes, abort the role. -- Check if directory `/hana/shared/` exists. If yes, abort the role. +- Check if `/usr/sap/hostctrl/exe/saphostctrl` exists and get info on running HANA instances. + - If conclicting instances exist the role aborts with a failure + - If desired instance is running, the role aborts with success -- Check if directory `/usr/sap/` exists. If yes, abort the role. +- If `/usr/sap/hostctrl/exe/saphostctrl` does not exist + - Check if directory `/hana/shared/` exists. If yes and not empty, abort the role. + - Check if directory `/usr/sap/` exists. If yes and not empty, abort the role. #### Pre-Install diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 408ddedef..f0208c316 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -70,6 +70,9 @@ sap_hana_install_check_installation: no # no: use the command `hdblcm --action=check_installation` sap_hana_install_use_hdbcheck: yes +# If the following variable is set to yes the idempotency check, if HANA is already installed will be skipped +sap_hana_install_force: no + # If the following variable is set to `no`, the role will attempt to install SAP HANA even if there is already a sidadm user. # Default is `yes`. sap_hana_install_check_sidadm_user: yes diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 6c9bf291c..176b9a8dc 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -44,30 +44,101 @@ Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." when: __sap_hana_install_register_getent_group_sapsys.rc == 0 -- name: SAP HANA Checks - Get info about directory '/hana/shared/{{ sap_hana_install_sid }}' +## Try to use saphostctrl to figure out if HANA or other SID is installed +- name: SAP HANA Checks - Check if saphostctrl is installed ansible.builtin.stat: - path: "/hana/shared/{{ sap_hana_install_sid }}" + path: /usr/sap/hostctrl/exe/saphostctrl check_mode: no - register: __sap_hana_install_register_stat_hana_shared_sid_assert + register: __sap_hana_install_register_stat_saphostctrl failed_when: no -- name: SAP HANA Checks - Assert that directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist - ansible.builtin.assert: - that: not __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: Directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist." +- name: SAP HANA Checks - Check if SAP instances are installed with saphostctrl + when: __sap_hana_install_register_stat_saphostctrl.stat.exists + block: -- name: SAP HANA Checks - Get info about directory '/usr/sap/{{ sap_hana_install_sid }}' - ansible.builtin.stat: - path: "/usr/sap/{{ sap_hana_install_sid }}" - check_mode: no - register: __sap_hana_install_register_stat_usr_sap_sid_assert - failed_when: no + - name: SAP HANA Checks - Get list of installed SAP instances + ansible.builtin.shell: /usr/sap/hostctrl/exe/saphostctrl -function ListInstances | cut -d":" -f2- + register: __sap_hana_install_register_instancelist + changed_when: false + + - name: SAP HANA Checks - debug found instances + ansible.builtin.debug: + var: __sap_hana_install_register_instancelist.stdout + verbosity: 1 + + - name: SAP HANA Checks - set variables with found instances + ansible.builtin.set_fact: + __sap_hana_install_fact_running_sid: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[0]|trim }}" + __sap_hana_install_fact_running_instance: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[1]|trim }}" + __sap_hana_install_fact_running_description: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[2]|trim }}" + + - name: SAP HANA Checks - desired HANA is installed and running + ansible.builtin.set_fact: + __sap_hana_install_fact_is_installed: true + when: + - __sap_hana_install_fact_running_sid == sap_hana_install_sid + - __sap_hana_install_fact_running_instance == sap_hana_install_number -- name: SAP HANA Checks - Assert that directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist - ansible.builtin.assert: - that: not __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: Directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist." + - name: SAP HANA Checks - trying to install HANA with other SID and same instance + fail: + msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }" + when: + - __sap_hana_install_fact_running_sid != sap_hana_install_sid + - __sap_hana_install_fact_running_instance == sap_hana_install_number + + - name: SAP HANA Checks - trying to install HANA with identical SID and other instance number + fail: + msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }}" + when: + - __sap_hana_install_fact_running_sid == sap_hana_install_sid + - __sap_hana_install_fact_running_instance != sap_hana_install_number + + +## If saphostcontrol is not installed + +- name: SAP HANA Checks - Check directories if no saphostctrl is found + block: + when: not __sap_hana_install_register_stat_saphostctrl.stat.exists + - name: SAP HANA Checks - Get info about directory '/hana/shared/{{ sap_hana_install_sid }}' + ansible.builtin.stat: + path: "/hana/shared/{{ sap_hana_install_sid }}" + check_mode: no + register: __sap_hana_install_register_stat_hana_shared_sid_assert + failed_when: no + + - name: SAP HANA Checks - Check if directory '/hana/shared/{{ sap_hana_install_sid }}' is empty + ansible.builtin.find: + paths: "/hana/shared/{{ sap_hana_install_sid }}" + patterns: '*' + register: __sap_hana_install_register_files_in_hana_shared_sid_assert + when: __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists + + - name: SAP HANA Checks - Assert that directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist or is empty + ansible.builtin.assert: + that: not __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists + fail_msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists! + Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." + success_msg: "PASS: Directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist." + when: __sap_hana_install_register_files_in_hana_shared_sid_assert.matched|int != 0 + + - name: SAP HANA Checks - Get info about directory '/usr/sap/{{ sap_hana_install_sid }}' + ansible.builtin.stat: + path: "/usr/sap/{{ sap_hana_install_sid }}" + check_mode: no + register: __sap_hana_install_register_stat_usr_sap_sid_assert + failed_when: no + + - name: SAP HANA Checks - Check if directory '/usr/sap/{{ sap_hana_install_sid }}' is empty + ansible.builtin.find: + paths: "/usr/sap/{{ sap_hana_install_sid }}" + patterns: '*' + register: __sap_hana_install_register_files_in_usr_sap_sid_assert + when: __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists + + - name: SAP HANA Checks - Assert that directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist or is empty + ansible.builtin.assert: + that: not __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists + fail_msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists! + Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." + success_msg: "PASS: Directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist." + when: __sap_hana_install_register_files_in_usr_sap_sid_assert.matched|int != 0 diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 2b6f29a08..89fa2ad1e 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -40,19 +40,25 @@ - name: SAP HANA existence checking ansible.builtin.import_tasks: hana_exists.yml - when: sap_hana_install_new_system | d(true) + when: + - sap_hana_install_new_system | d(true) + - not sap_hana_install_force | d(false) -- name: SAP HANA pre-install steps - ansible.builtin.import_tasks: pre_install.yml - tags: sap_hana_install_preinstall +- name: Install SAP HANA + when: not __sap_hana_install_fact_is_installed | d(false) + block: + + - name: SAP HANA pre-install steps + ansible.builtin.import_tasks: pre_install.yml + tags: sap_hana_install_preinstall -- name: SAP HANA installation steps - ansible.builtin.import_tasks: hana_install.yml - when: sap_hana_install_new_system | d(true) + - name: SAP HANA installation steps + ansible.builtin.import_tasks: hana_install.yml + when: sap_hana_install_new_system | d(true) -- name: SAP HANA addhosts steps - ansible.builtin.import_tasks: hana_addhosts.yml - when: not sap_hana_install_new_system | d(true) + - name: SAP HANA addhosts steps + ansible.builtin.import_tasks: hana_addhosts.yml + when: not sap_hana_install_new_system | d(true) -- name: SAP HANA post-install steps - ansible.builtin.import_tasks: post_install.yml + - name: SAP HANA post-install steps + ansible.builtin.import_tasks: post_install.yml From d9cff4f310f7e2f1bb2e0faed9b6d3937d300602 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 14:53:34 +0100 Subject: [PATCH 318/375] recommit new hana_exist --- roles/sap_hana_install/tasks/hana_exists.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 176b9a8dc..562ab0bd2 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -97,26 +97,26 @@ ## If saphostcontrol is not installed - name: SAP HANA Checks - Check directories if no saphostctrl is found - block: when: not __sap_hana_install_register_stat_saphostctrl.stat.exists - - name: SAP HANA Checks - Get info about directory '/hana/shared/{{ sap_hana_install_sid }}' + block: + - name: SAP HANA Checks - Get info about directory "{{ '/hana/shared/' + sap_hana_install_sid }}" ansible.builtin.stat: path: "/hana/shared/{{ sap_hana_install_sid }}" check_mode: no register: __sap_hana_install_register_stat_hana_shared_sid_assert failed_when: no - - name: SAP HANA Checks - Check if directory '/hana/shared/{{ sap_hana_install_sid }}' is empty + - name: SAP HANA Checks - Check if directory is empty '/hana/shared/{{ sap_hana_install_sid }}' ansible.builtin.find: paths: "/hana/shared/{{ sap_hana_install_sid }}" patterns: '*' register: __sap_hana_install_register_files_in_hana_shared_sid_assert when: __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - - name: SAP HANA Checks - Assert that directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist or is empty + - name: SAP HANA Checks - Assert that directory does not exist or is empty '/hana/shared/{{ sap_hana_install_sid }}' ansible.builtin.assert: that: not __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists! + fail_msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists and is not empty! Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." success_msg: "PASS: Directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist." when: __sap_hana_install_register_files_in_hana_shared_sid_assert.matched|int != 0 @@ -128,17 +128,17 @@ register: __sap_hana_install_register_stat_usr_sap_sid_assert failed_when: no - - name: SAP HANA Checks - Check if directory '/usr/sap/{{ sap_hana_install_sid }}' is empty + - name: SAP HANA Checks - Check if directory is empty '/usr/sap/{{ sap_hana_install_sid }}' ansible.builtin.find: paths: "/usr/sap/{{ sap_hana_install_sid }}" patterns: '*' register: __sap_hana_install_register_files_in_usr_sap_sid_assert when: __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists - - name: SAP HANA Checks - Assert that directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist or is empty + - name: SAP HANA Checks - Assert that directory does not exist or is empty '/usr/sap/{{ sap_hana_install_sid }}' ansible.builtin.assert: that: not __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists! + fail_msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists and is not empty! Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." success_msg: "PASS: Directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist." when: __sap_hana_install_register_files_in_usr_sap_sid_assert.matched|int != 0 From 25565a29789ff9ca17ea909982ff1c1368062b2e Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 14:54:19 +0100 Subject: [PATCH 319/375] recommit new hana_exist --- .ansible-lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index 69b206305..5fd24005f 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -26,4 +26,4 @@ skip_list: - experimental - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + # name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work From a63e3209a0867d895cdc9db1454f1d6c8b9899ab Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 15:25:30 +0100 Subject: [PATCH 320/375] sap_ha_install_hana_hsr: linter fix for when in block --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index 94da92552..d4053179c 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -66,6 +66,14 @@ # BEGIN of primary node connectivity test block - name: "SAP HSR - Check block to verify Ansible access to primary node" + # block settings + when: + - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name + - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined + - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable + become: false + tags: + - hsr_pki block: - name: "SAP HSR - Verify that Ansible can connect to the defined primary node by IP" ansible.builtin.command: | @@ -94,14 +102,6 @@ - __sap_ha_install_hana_hsr_primary_node_ip_check.unreachable is defined or __sap_ha_install_hana_hsr_primary_node_ip_check.stdout != __sap_ha_install_hana_hsr_primary_node_name - # block settings - when: - - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name - - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined - - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable - become: false - tags: - - hsr_pki # END of primary node connectivity test block - name: "SAP HSR - Update /etc/hosts" From 61ebd5fcdec087d2cc7f213d669e4c37cb649451 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 15:38:21 +0100 Subject: [PATCH 321/375] fixed linting issues --- .ansible-lint | 4 ++-- roles/sap_hana_install/README.md | 6 +++--- roles/sap_hana_install/tasks/hana_exists.yml | 12 ++++++------ roles/sap_hana_install/tasks/main.yml | 6 +++--- roles/sap_hana_install/tests/install/README.md | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 5fd24005f..79ea3ced3 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -9,7 +9,7 @@ exclude_paths: - roles/sap_anydb_install_oracle - roles/sap_general_preconfigure - roles/sap_ha_install_hana_hsr - - roles/sap_hana_install + # roles/sap_hana_install - roles/sap_hana_preconfigure - roles/sap_hostagent - roles/sap_hypervisor_node_preconfigure @@ -26,4 +26,4 @@ skip_list: - experimental - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - # name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index f41ea1da9..b5d47d92f 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -237,7 +237,7 @@ These checks are only performed if `sap_hana_install_force` is set to `true`. It - If variable `sap_hana_install_check_sidadm_user` is undefined or set to `y`: Check if user sidadm exists. If yes, abort the role. -- Check if `/usr/sap/hostctrl/exe/saphostctrl` exists and get info on running HANA instances. +- Check if `/usr/sap/hostctrl/exe/saphostctrl` exists and get info on running HANA instances. - If conclicting instances exist the role aborts with a failure - If desired instance is running, the role aborts with success @@ -245,7 +245,7 @@ These checks are only performed if `sap_hana_install_force` is set to `true`. It - Check if directory `/hana/shared/` exists. If yes and not empty, abort the role. - Check if directory `/usr/sap/` exists. If yes and not empty, abort the role. -#### Pre-Install +#### Pre-Install - Set all passwords to follow master password if set to 'y'. @@ -309,7 +309,7 @@ in a temporary directory for use by the hdblcm command in the next step. ### Add hosts to an existing SAP HANA Installation -#### Pre-Install +#### Pre-Install - Process SAP HANA configfile based on input parameters. diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 562ab0bd2..d676046b4 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -68,9 +68,9 @@ - name: SAP HANA Checks - set variables with found instances ansible.builtin.set_fact: - __sap_hana_install_fact_running_sid: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[0]|trim }}" - __sap_hana_install_fact_running_instance: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[1]|trim }}" - __sap_hana_install_fact_running_description: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[2]|trim }}" + __sap_hana_install_fact_running_sid: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[0] | trim }}" + __sap_hana_install_fact_running_instance: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[1] | trim }}" + __sap_hana_install_fact_running_description: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[2] | trim }}" - name: SAP HANA Checks - desired HANA is installed and running ansible.builtin.set_fact: @@ -80,14 +80,14 @@ - __sap_hana_install_fact_running_instance == sap_hana_install_number - name: SAP HANA Checks - trying to install HANA with other SID and same instance - fail: - msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }" + ansible.builtin.fail: + msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }}" when: - __sap_hana_install_fact_running_sid != sap_hana_install_sid - __sap_hana_install_fact_running_instance == sap_hana_install_number - name: SAP HANA Checks - trying to install HANA with identical SID and other instance number - fail: + ansible.builtin.fail: msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }}" when: - __sap_hana_install_fact_running_sid == sap_hana_install_sid diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 89fa2ad1e..830fbfa99 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -40,9 +40,9 @@ - name: SAP HANA existence checking ansible.builtin.import_tasks: hana_exists.yml - when: - - sap_hana_install_new_system | d(true) - - not sap_hana_install_force | d(false) + when: + - sap_hana_install_new_system | d(true) + - not sap_hana_install_force | d(false) - name: Install SAP HANA when: not __sap_hana_install_fact_is_installed | d(false) diff --git a/roles/sap_hana_install/tests/install/README.md b/roles/sap_hana_install/tests/install/README.md index 3931456ba..7a344c4ef 100644 --- a/roles/sap_hana_install/tests/install/README.md +++ b/roles/sap_hana_install/tests/install/README.md @@ -9,7 +9,7 @@ from the managed node via `ssh`, for which we need a user name. The following steps have to be performed to prepare the tests: - The files mentioned in the tasks `Copy ... to software directory` (e.g. `SAPCAR_1115-70006178.EXE`), as well as their sha256 checksum files (e.g. `SAPCAR_1115-70006178.EXE.sha256`), need to be available - in the directory specified by variable `sap_hana_install_software_directory` in file + in the directory specified by variable `sap_hana_install_software_directory` in file `install-vars.yml`, e.g. `/software/sap_hana_install_test`. - You can either download or copy these files manually or via Ansible with yml file `prepare-install-tests-x86_64.yml` or `prepare-install-tests-ppc64le.yml`. From a9d5134537abf81e3bb0d9c88ed2810633e82578 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 17:03:12 +0100 Subject: [PATCH 322/375] sap_ha_install_hana_hsr: remove comment --- roles/sap_ha_install_hana_hsr/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_ha_install_hana_hsr/tasks/main.yml b/roles/sap_ha_install_hana_hsr/tasks/main.yml index d4053179c..7d33bf2bf 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/main.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/main.yml @@ -66,7 +66,6 @@ # BEGIN of primary node connectivity test block - name: "SAP HSR - Check block to verify Ansible access to primary node" - # block settings when: - __sap_ha_install_hana_hsr_node_name != __sap_ha_install_hana_hsr_primary_node_name - __sap_ha_install_hana_hsr_primary_node_name_check.unreachable is defined From a6b91b00b9b02feda00bacc70e1b093d52f2fadd Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 17:21:53 +0100 Subject: [PATCH 323/375] added looping over found instances --- .ansible-lint | 1 + roles/sap_hana_install/tasks/hana_exists.yml | 37 +++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 79ea3ced3..3b59406c4 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -9,6 +9,7 @@ exclude_paths: - roles/sap_anydb_install_oracle - roles/sap_general_preconfigure - roles/sap_ha_install_hana_hsr + - roles/sap_ha_pacemaker_cluster # roles/sap_hana_install - roles/sap_hana_preconfigure - roles/sap_hostagent diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index d676046b4..cb9a8bc4e 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -63,36 +63,41 @@ - name: SAP HANA Checks - debug found instances ansible.builtin.debug: - var: __sap_hana_install_register_instancelist.stdout + var: __sap_hana_install_register_instancelist.stdout_lines verbosity: 1 - - name: SAP HANA Checks - set variables with found instances - ansible.builtin.set_fact: - __sap_hana_install_fact_running_sid: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[0] | trim }}" - __sap_hana_install_fact_running_instance: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[1] | trim }}" - __sap_hana_install_fact_running_description: "{{ __sap_hana_install_register_instancelist.stdout.split('-')[2] | trim }}" - - name: SAP HANA Checks - desired HANA is installed and running ansible.builtin.set_fact: __sap_hana_install_fact_is_installed: true when: - - __sap_hana_install_fact_running_sid == sap_hana_install_sid - - __sap_hana_install_fact_running_instance == sap_hana_install_number + - __sap_hana_install_loop_instance.split('-')[0] | trim == sap_hana_install_sid + - __sap_hana_install_loop_instance.split('-')[1] | trim == sap_hana_install_number + loop: "{{ __sap_hana_install_register_instancelist.stdout_lines }}" + loop_control: + loop_var: __sap_hana_install_loop_instance + label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - name: SAP HANA Checks - trying to install HANA with other SID and same instance ansible.builtin.fail: - msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }}" + msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} already exists with the instance number {{ __sap_hana_install_number }}" when: - - __sap_hana_install_fact_running_sid != sap_hana_install_sid - - __sap_hana_install_fact_running_instance == sap_hana_install_number + - __sap_hana_install_loop_instance.split('-')[0] | trim != sap_hana_install_sid + - __sap_hana_install_loop_instance.split('-')[1] | trim == sap_hana_install_number + loop: "{{ __sap_hana_install_register_instancelist.stdout_lines }}" + loop_control: + loop_var: __sap_hana_install_loop_instance + label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - name: SAP HANA Checks - trying to install HANA with identical SID and other instance number ansible.builtin.fail: - msg: "HANA {{ __sap_hana_install_fact_running_sid }} already exists with instance number {{ __sap_hana_install_fact_running_instance }}" + msg: "HANA {{ sap_hana_install_sid }} already exists with different instance number {{ __sap_hana_install_loop_instance.split('-')[1] | trim }}" when: - - __sap_hana_install_fact_running_sid == sap_hana_install_sid - - __sap_hana_install_fact_running_instance != sap_hana_install_number - + - __sap_hana_install_loop_instance.split('-')[0] | trim == sap_hana_install_sid + - __sap_hana_install_loop_instance.split('-')[1] | trim != sap_hana_install_number + loop: "{{ __sap_hana_install_register_instancelist.stdout_lines }}" + loop_control: + loop_var: __sap_hana_install_loop_instance + label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" ## If saphostcontrol is not installed From f59cf751f8e941d238f2b7eca4ecf10eb54dff98 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 21 Nov 2022 17:57:10 +0100 Subject: [PATCH 324/375] fixed change requests by Bernd --- roles/sap_hana_install/README.md | 2 +- roles/sap_hana_install/defaults/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index b5d47d92f..7eeb1f131 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -238,7 +238,7 @@ These checks are only performed if `sap_hana_install_force` is set to `true`. It abort the role. - Check if `/usr/sap/hostctrl/exe/saphostctrl` exists and get info on running HANA instances. - - If conclicting instances exist the role aborts with a failure + - If conflicting instances exist the role aborts with a failure - If desired instance is running, the role aborts with success - If `/usr/sap/hostctrl/exe/saphostctrl` does not exist diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index f0208c316..f4561b695 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -70,7 +70,7 @@ sap_hana_install_check_installation: no # no: use the command `hdblcm --action=check_installation` sap_hana_install_use_hdbcheck: yes -# If the following variable is set to yes the idempotency check, if HANA is already installed will be skipped +# If the following variable is set to yes, the HANA installation check will be skipped sap_hana_install_force: no # If the following variable is set to `no`, the role will attempt to install SAP HANA even if there is already a sidadm user. From 79337519049ab0096f29de354968ac4754c8cbab Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 17:21:29 +0000 Subject: [PATCH 325/375] sap_ha_pacemaker_cluster: make LSR collection flexible --- roles/sap_ha_pacemaker_cluster/defaults/main.yml | 5 +++++ roles/sap_ha_pacemaker_cluster/tasks/main.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_pacemaker_cluster/defaults/main.yml b/roles/sap_ha_pacemaker_cluster/defaults/main.yml index 96737df68..6d232b45a 100644 --- a/roles/sap_ha_pacemaker_cluster/defaults/main.yml +++ b/roles/sap_ha_pacemaker_cluster/defaults/main.yml @@ -1,4 +1,9 @@ --- +# Set which Ansible Collection to use for the Linux System Roles. +# For community/upstream, use 'fedora.linux_system_roles' +# For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles' +sap_ha_pacemaker_cluster_system_roles_collection: 'fedora.linux_system_roles' + # Variables for the cluster setup must be constructed by dedicated tasks! # The included 'ha_cluster' role will not work with the role variables set # in this role. diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index 0eaf4ee6d..b20a091e5 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -108,7 +108,7 @@ # linux system role 'ha_cluster' - name: "SAP HA Install Pacemaker - Include System Role 'ha_cluster'" ansible.builtin.include_role: - name: linux-system-roles.ha_cluster + name: "{{ sap_ha_pacemaker_cluster_system_roles_collection }}.hacluster" apply: tags: ha_cluster no_log: true # some parameters contain secrets From 786214ead9570010785f6cbf33f8a9ac1d8de96a Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 21 Nov 2022 17:22:09 +0000 Subject: [PATCH 326/375] sap_ha_pacemaker_cluster: adding role linter files --- roles/sap_ha_pacemaker_cluster/.ansible-lint | 10 ++++++++++ roles/sap_ha_pacemaker_cluster/.yamllint.yml | 21 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 roles/sap_ha_pacemaker_cluster/.ansible-lint create mode 100644 roles/sap_ha_pacemaker_cluster/.yamllint.yml diff --git a/roles/sap_ha_pacemaker_cluster/.ansible-lint b/roles/sap_ha_pacemaker_cluster/.ansible-lint new file mode 100644 index 000000000..de41416e6 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/.ansible-lint @@ -0,0 +1,10 @@ +--- +exclude_paths: + - .cache/ + +enable_list: + - yaml +skip_list: + - experimental + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + #- name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_ha_pacemaker_cluster/.yamllint.yml b/roles/sap_ha_pacemaker_cluster/.yamllint.yml new file mode 100644 index 000000000..d2eadc1f2 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} + colons: {max-spaces-after: -1, level: error} + commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable + empty-lines: {max: 3, level: error} + hyphens: {level: error} +# indentation: disable +# key-duplicates: enable +# line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable +# truthy: disable From e256a3da50cfff24de3031944bdc6c10919a5d9c Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 22 Nov 2022 10:23:22 +0000 Subject: [PATCH 327/375] sap_ha_pacemaker_cluster: role yamllint --- roles/sap_ha_pacemaker_cluster/.yamllint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/.yamllint.yml b/roles/sap_ha_pacemaker_cluster/.yamllint.yml index d2eadc1f2..c007566b7 100644 --- a/roles/sap_ha_pacemaker_cluster/.yamllint.yml +++ b/roles/sap_ha_pacemaker_cluster/.yamllint.yml @@ -13,8 +13,8 @@ rules: empty-lines: {max: 3, level: error} hyphens: {level: error} # indentation: disable -# key-duplicates: enable -# line-length: disable + key-duplicates: enable + line-length: disable # new-line-at-end-of-file: disable # new-lines: {type: unix} # trailing-spaces: disable From 4f39254562a0ca5b4e76937a6bf60fe97d80ea70 Mon Sep 17 00:00:00 2001 From: Ranjith Rajaram Date: Tue, 22 Nov 2022 11:14:24 +0000 Subject: [PATCH 328/375] Revert "Cleanup of folders after SAP HANA Install" This reverts commit f521889ca895841cc8eec58f02fe6e81d1a46941. --- roles/sap_hana_install/README.md | 3 --- roles/sap_hana_install/defaults/main.yml | 7 ------- roles/sap_hana_install/tasks/post_install.yml | 13 ------------- 3 files changed, 23 deletions(-) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 8a74e0231..68a7411b9 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -81,9 +81,6 @@ If this role is executed on more than one host in parallel and the software extr the role will only extract the files on the first host on which the extraction has started. The role will proceed on the other hosts after the extraction of SAR files has completed. -If NFS is used for sharing the SAP HANA installation media between the nodes, then it is required to define `sap_hana_install_configfile_directory`. The default for `sap_hana_install_configfile_directory` is "{{ sap_hana_install_software_extract_directory }}/configfiles". This variable should point to a non nfs path. After installation, if a cleanup of configfile is required, then set `sap_hana_install_cleanup_configfile_directory` as true. If a cleanup of software extract directory is required then set sap_hana_install_cleanup_extract_directory as true. The default value for both these cleanup actins are false - - - Sample directory `sap_hana_install_software_extract_directory` containing extracted SAP HANA software installation files ```console [root@hanahost extracted]# ll -lrt diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 4a1897507..3a33797ef 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -11,9 +11,6 @@ sap_hana_install_software_directory: '/software/hana' # created again before the extraction starts. sap_hana_install_software_extract_directory: "{{ sap_hana_install_software_directory }}/extracted" -# If there is a requirement to cleanup "sap_hana_install_software_extract_directory" after SAP HANA Installation, then set the value to true. By default, this directory will not be removed -sap_hana_install_cleanup_extract_directory: false - # Set this variabe to `yes` if you want to copy the SAR files from `sap_hana_install_software_directory` # to `sap_hana_install_software_extract_directory/sarfiles` before extracting. # This might be useful if the SAR files are on a slow fileshare. @@ -52,9 +49,6 @@ sap_hana_install_verify_signature: no # Directory where to store the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_directory: "{{ sap_hana_install_software_extract_directory }}/configfiles" -# If a custom path for sap_hana_install_configfile_directory was defined and if there is a requirement to cleanup this directory, then set "sap_hana_install_cleanup_configfile_directory" as true. Incase if a custom path was not defined and "sap_hana_install_cleanup_extract_directory" was set as true, then the configfiles will be removed. -sap_hana_install_cleanup_configfile_directory: false - # File name prefix for the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_template_prefix: "hdblcm_configfile_template" @@ -184,4 +178,3 @@ sap_hana_install_create_initial_tenant: 'y' # The hostname is set by 'hdblcm --dump_configfile_template' during the preinstall phase but can also # be set to a different value in your playbook or hostvars: # sap_hana_install_hostname: - diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index d1c2cd2dc..5010877af 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -160,19 +160,6 @@ __sap_hana_install_fact_hana_version: "{{ __sap_hana_install_register_install_result.stdout.split(';')[0] }}" when: not ansible_check_mode - -- name: SAP HANA Post Install - Deleting software extract directory '{{ sap_hana_install_software_extract_directory }}' - ansible.builtin.file: - path: "{{ sap_hana_install_software_extract_directory }}" - state: absent - when: sap_hana_install_cleanup_extract_directory - -- name: SAP HANA Post Install - Deleting Configfile Directory '{{ sap_hana_install_configfile_directory }}' - ansible.builtin.file: - path: "{{ sap_hana_install_configfile_directory }}" - state: absent - when: sap_hana_install_cleanup_configfile_directory - - name: Set fact - HANA hosts ansible.builtin.set_fact: __sap_hana_install_fact_hana_hosts: "{{ __sap_hana_install_register_install_result.stdout.split(';')[1] }}" From 72a6760602eddb1810013d3422e4e34983017c95 Mon Sep 17 00:00:00 2001 From: Ranjith Rajaram Date: Tue, 22 Nov 2022 12:32:19 +0000 Subject: [PATCH 329/375] Updated the pull request with the suggested changes --- roles/sap_hana_install/README.md | 8 ++++++++ roles/sap_hana_install/defaults/main.yml | 9 +++++++++ roles/sap_hana_install/tasks/post_install.yml | 12 ++++++++++++ 3 files changed, 29 insertions(+) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 68a7411b9..a067adea8 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -81,6 +81,14 @@ If this role is executed on more than one host in parallel and the software extr the role will only extract the files on the first host on which the extraction has started. The role will proceed on the other hosts after the extraction of SAR files has completed. +If NFS is used for sharing the SAP HANA installation media between the nodes, then it is required to define +`sap_hana_install_configfile_directory`. The default for `sap_hana_install_configfile_directory` is +"{{ sap_hana_install_software_extract_directory }}/configfiles". This variable should point to a non nfs path. After installation, +if a cleanup of configfile is required, then set `sap_hana_install_cleanup_configfile_directory` as true. If a cleanup of +software extract directory is required then set `sap_hana_install_cleanup_extract_directory` as true. The default value for both +these cleanup actions are false. + + - Sample directory `sap_hana_install_software_extract_directory` containing extracted SAP HANA software installation files ```console [root@hanahost extracted]# ll -lrt diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 3a33797ef..be9d1b044 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -11,6 +11,10 @@ sap_hana_install_software_directory: '/software/hana' # created again before the extraction starts. sap_hana_install_software_extract_directory: "{{ sap_hana_install_software_directory }}/extracted" +# If there is a requirement to cleanup "sap_hana_install_software_extract_directory" after SAP HANA Installation, then +# set the value to true. By default, this directory will not be removed +sap_hana_install_cleanup_extract_directory: false + # Set this variabe to `yes` if you want to copy the SAR files from `sap_hana_install_software_directory` # to `sap_hana_install_software_extract_directory/sarfiles` before extracting. # This might be useful if the SAR files are on a slow fileshare. @@ -49,6 +53,11 @@ sap_hana_install_verify_signature: no # Directory where to store the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_directory: "{{ sap_hana_install_software_extract_directory }}/configfiles" +# If a custom path for sap_hana_install_configfile_directory was defined and if there is a requirement to cleanup this directory, +# then set "sap_hana_install_cleanup_configfile_directory" as true. Incase if a custom path was not defined and +# "sap_hana_install_cleanup_extract_directory" was set as true, then the configfiles will be removed. +sap_hana_install_cleanup_configfile_directory: false + # File name prefix for the hdblcm configfile template and the Jinja2 template: sap_hana_install_configfile_template_prefix: "hdblcm_configfile_template" diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 5010877af..187776636 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -160,6 +160,18 @@ __sap_hana_install_fact_hana_version: "{{ __sap_hana_install_register_install_result.stdout.split(';')[0] }}" when: not ansible_check_mode +- name: SAP HANA Post Install - Deleting software extract directory '{{ sap_hana_install_software_extract_directory }}' + ansible.builtin.file: + path: "{{ sap_hana_install_software_extract_directory }}" + state: absent + when: sap_hana_install_cleanup_extract_directory + +- name: SAP HANA Post Install - Deleting Configfile Directory '{{ sap_hana_install_configfile_directory }}' + ansible.builtin.file: + path: "{{ sap_hana_install_configfile_directory }}" + state: absent + when: sap_hana_install_cleanup_configfile_directory + - name: Set fact - HANA hosts ansible.builtin.set_fact: __sap_hana_install_fact_hana_hosts: "{{ __sap_hana_install_register_install_result.stdout.split(';')[1] }}" From fbd686486ab19539d3c9dd8b9b755cf4255a2f11 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 22 Nov 2022 15:36:24 +0100 Subject: [PATCH 330/375] hana_exists: misspelling variable --- roles/sap_hana_install/tasks/hana_exists.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index cb9a8bc4e..5e4df9513 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -79,7 +79,7 @@ - name: SAP HANA Checks - trying to install HANA with other SID and same instance ansible.builtin.fail: - msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} already exists with the instance number {{ __sap_hana_install_number }}" + msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} already exists with the instance number {{ sap_hana_install_number }}" when: - __sap_hana_install_loop_instance.split('-')[0] | trim != sap_hana_install_sid - __sap_hana_install_loop_instance.split('-')[1] | trim == sap_hana_install_number From abd5e1e21c0a7932f72e401700bcb6a0e4fb8d86 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Tue, 22 Nov 2022 17:02:44 +0100 Subject: [PATCH 331/375] sap_hana_install: switch hana and user detection user detection is moved after HANA detection, so that it can be skipped, when HANA is installed properly --- roles/sap_hana_install/tasks/hana_exists.yml | 91 ++++++++++---------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 5e4df9513..0644b06b3 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -1,49 +1,5 @@ --- -- name: SAP HANA Checks - HANA admin user check - when: sap_hana_install_check_sidadm_user | d(true) - block: - - - name: Check for sidadm user - ansible.builtin.command: getent passwd {{ sap_hana_install_sid | lower }}adm - check_mode: no - register: __sap_hana_install_register_getent_passwd_sidadm - changed_when: no - failed_when: no - - - name: SAP HANA Checks - Assert that there is no sidadm user - ansible.builtin.assert: - that: __sap_hana_install_register_getent_passwd_sidadm.rc != 0 - fail_msg: "FAIL: User '{{ sap_hana_install_sid | lower }}adm' exists! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: User '{{ sap_hana_install_sid | lower }}adm' does not exist." - -# The role supports specifying the SAP HANA group id in variable `sap_hana_install_groupid`, which is the id of the sapsys group. -# The SAP HANA installation will fail if there is already a group named sapsys but with a different ID. Let's better fail before. -- name: SAP HANA Checks - Check HANA admin group - when: - - sap_hana_install_groupid is defined - - sap_hana_install_groupid | string != "None" - - sap_hana_install_groupid | string | length > 0 - block: - - - name: SAP HANA Checks - Get info about the ID of the sapsys group - ansible.builtin.command: getent group sapsys - check_mode: no - register: __sap_hana_install_register_getent_group_sapsys - changed_when: no - failed_when: no - - - name: SAP HANA Checks - In case there is a group sapsys, assert that its group ID is identical to sap_hana_install_groupid - ansible.builtin.assert: - that: "{{ __sap_hana_install_register_getent_group_sapsys.stdout.split(':')[2] }} == {{ sap_hana_install_groupid }}" - success_msg: "PASS: The group ID of 'sapsys' is identical to the value of variable - sap_hana_install_groupid, which is '{{ sap_hana_install_groupid }}'" - fail_msg: "FAIL: Group sapsys exists but with a different group ID than '{{ sap_hana_install_groupid }}', - which has been specified in variable sap_hana_install_groupid. - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - when: __sap_hana_install_register_getent_group_sapsys.rc == 0 - ## Try to use saphostctrl to figure out if HANA or other SID is installed - name: SAP HANA Checks - Check if saphostctrl is installed ansible.builtin.stat: @@ -147,3 +103,50 @@ Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." success_msg: "PASS: Directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist." when: __sap_hana_install_register_files_in_usr_sap_sid_assert.matched|int != 0 + +- name: SAP HANA Checks - HANA admin user check + when: + - sap_hana_install_check_sidadm_user | d(true) + - not __sap_hana_install_fact_is_installed| d(false) + block: + + - name: Check for sidadm user + ansible.builtin.command: getent passwd {{ sap_hana_install_sid | lower }}adm + check_mode: no + register: __sap_hana_install_register_getent_passwd_sidadm + changed_when: no + failed_when: no + + - name: SAP HANA Checks - Assert that there is no sidadm user + ansible.builtin.assert: + that: __sap_hana_install_register_getent_passwd_sidadm.rc != 0 + fail_msg: "FAIL: User '{{ sap_hana_install_sid | lower }}adm' exists! + Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." + success_msg: "PASS: User '{{ sap_hana_install_sid | lower }}adm' does not exist." + +# The role supports specifying the SAP HANA group id in variable `sap_hana_install_groupid`, which is the id of the sapsys group. +# The SAP HANA installation will fail if there is already a group named sapsys but with a different ID. Let's better fail before. +- name: SAP HANA Checks - Check HANA admin group + when: + - sap_hana_install_groupid is defined + - sap_hana_install_groupid | string != "None" + - sap_hana_install_groupid | string | length > 0 + - not __sap_hana_install_fact_is_installed| d(false) + block: + + - name: SAP HANA Checks - Get info about the ID of the sapsys group + ansible.builtin.command: getent group sapsys + check_mode: no + register: __sap_hana_install_register_getent_group_sapsys + changed_when: no + failed_when: no + + - name: SAP HANA Checks - In case there is a group sapsys, assert that its group ID is identical to sap_hana_install_groupid + ansible.builtin.assert: + that: "{{ __sap_hana_install_register_getent_group_sapsys.stdout.split(':')[2] }} == {{ sap_hana_install_groupid }}" + success_msg: "PASS: The group ID of 'sapsys' is identical to the value of variable + sap_hana_install_groupid, which is '{{ sap_hana_install_groupid }}'" + fail_msg: "FAIL: Group sapsys exists but with a different group ID than '{{ sap_hana_install_groupid }}', + which has been specified in variable sap_hana_install_groupid. + Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." + when: __sap_hana_install_register_getent_group_sapsys.rc == 0 From d7e168fa7dc2023b13acd0a629fa0333f3f34d90 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 22 Nov 2022 21:44:39 +0100 Subject: [PATCH 332/375] sap_general_preconfigure: Solve issue #260 --- .../vars/RedHat_8.2.yml | 74 +++++++++++++++++++ .../vars/RedHat_8.yml | 2 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 roles/sap_general_preconfigure/vars/RedHat_8.2.yml diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml new file mode 100644 index 000000000..70c871535 --- /dev/null +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -0,0 +1,74 @@ +--- + +# vars file for sap_general_preconfigure + +__sap_general_preconfigure_sapnotes_versions: + - { number: '2772999', version: '19' } + - { number: '1771258', version: '6' } + +__sap_general_preconfigure_max_repo_type_x86_64: 'e4s' +__sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' +__sap_general_preconfigure_max_repo_type_s390x: 'eus' + +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" + +# RHEL 8 minor releases maximum repo support duration +__sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' + +__sap_general_preconfigure_req_os_repos: + - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms +__sap_general_preconfigure_req_netweaver_repos: + - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms +__sap_general_preconfigure_req_hana_repos: + - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms +__sap_general_preconfigure_req_ha_repos: + - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + +__sap_general_preconfigure_envgroups: + - "server-product-environment" + +__sap_general_preconfigure_packagegroups_x86_64: + - "@server" + +__sap_general_preconfigure_packagegroups_ppc64le: + - "@server" + +__sap_general_preconfigure_packagegroups_s390x: + - "@server" + +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" + +__sap_general_preconfigure_packages_x86_64: + - uuidd + - libnsl + - tcsh + - psmisc + - nfs-utils + - bind-utils + - compat-sap-c++-9 + - compat-sap-c++-10 + +__sap_general_preconfigure_packages_ppc64le: + - uuidd + - libnsl + - tcsh + - psmisc + - nfs-utils + - bind-utils + - compat-sap-c++-9 + - compat-sap-c++-10 + +__sap_general_preconfigure_packages_s390x: + - uuidd + - libnsl + - tcsh + - psmisc + - nfs-utils + - bind-utils + +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" + +__sap_general_preconfigure_kernel_parameters_default: + - { name: vm.max_map_count, value: '2147483647' } + - { name: kernel.pid_max, value: '4194304' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index fe7f472cd..60aa08e62 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -13,7 +13,6 @@ __sap_general_preconfigure_max_repo_type_s390x: 'eus' __sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" # RHEL 8 minor releases maximum repo support duration -__sap_general_preconfigure_max_repo_type_string_8_2: '{{ __sap_general_preconfigure_max_repo_type }}-' __sap_general_preconfigure_max_repo_type_string_8_3: '' __sap_general_preconfigure_max_repo_type_string_8_4: '{{ __sap_general_preconfigure_max_repo_type }}-' __sap_general_preconfigure_max_repo_type_string_8_5: '' @@ -78,6 +77,7 @@ __sap_general_preconfigure_packages_s390x: - psmisc - nfs-utils - bind-utils + - compat-sap-c++-10 __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" From 14470b1ef29d3cd8d49b2cbfb359b0a4ccf5dcaa Mon Sep 17 00:00:00 2001 From: Ranjith Rajaram Date: Wed, 23 Nov 2022 09:37:58 +0000 Subject: [PATCH 333/375] cleared trailing whitespaces for Cleanup of folders after SAP HANA Install --- roles/sap_hana_install/README.md | 6 +++--- roles/sap_hana_install/defaults/main.yml | 6 +++--- roles/sap_hana_install/tasks/post_install.yml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index a067adea8..eea7911a4 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -81,11 +81,11 @@ If this role is executed on more than one host in parallel and the software extr the role will only extract the files on the first host on which the extraction has started. The role will proceed on the other hosts after the extraction of SAR files has completed. -If NFS is used for sharing the SAP HANA installation media between the nodes, then it is required to define -`sap_hana_install_configfile_directory`. The default for `sap_hana_install_configfile_directory` is +If NFS is used for sharing the SAP HANA installation media between the nodes, then it is required to define +`sap_hana_install_configfile_directory`. The default for `sap_hana_install_configfile_directory` is "{{ sap_hana_install_software_extract_directory }}/configfiles". This variable should point to a non nfs path. After installation, if a cleanup of configfile is required, then set `sap_hana_install_cleanup_configfile_directory` as true. If a cleanup of -software extract directory is required then set `sap_hana_install_cleanup_extract_directory` as true. The default value for both +software extract directory is required then set `sap_hana_install_cleanup_extract_directory` as true. The default value for both these cleanup actions are false. diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index be9d1b044..e0f93c8d3 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -11,8 +11,8 @@ sap_hana_install_software_directory: '/software/hana' # created again before the extraction starts. sap_hana_install_software_extract_directory: "{{ sap_hana_install_software_directory }}/extracted" -# If there is a requirement to cleanup "sap_hana_install_software_extract_directory" after SAP HANA Installation, then -# set the value to true. By default, this directory will not be removed +# If there is a requirement to cleanup "sap_hana_install_software_extract_directory" after SAP HANA Installation, then +# set the value to true. By default, this directory will not be removed sap_hana_install_cleanup_extract_directory: false # Set this variabe to `yes` if you want to copy the SAR files from `sap_hana_install_software_directory` @@ -54,7 +54,7 @@ sap_hana_install_verify_signature: no sap_hana_install_configfile_directory: "{{ sap_hana_install_software_extract_directory }}/configfiles" # If a custom path for sap_hana_install_configfile_directory was defined and if there is a requirement to cleanup this directory, -# then set "sap_hana_install_cleanup_configfile_directory" as true. Incase if a custom path was not defined and +# then set "sap_hana_install_cleanup_configfile_directory" as true. Incase if a custom path was not defined and # "sap_hana_install_cleanup_extract_directory" was set as true, then the configfiles will be removed. sap_hana_install_cleanup_configfile_directory: false diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index 187776636..c89e9995c 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -162,9 +162,9 @@ - name: SAP HANA Post Install - Deleting software extract directory '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.file: - path: "{{ sap_hana_install_software_extract_directory }}" + path: "{{ sap_hana_install_software_extract_directory }}" state: absent - when: sap_hana_install_cleanup_extract_directory + when: sap_hana_install_cleanup_extract_directory - name: SAP HANA Post Install - Deleting Configfile Directory '{{ sap_hana_install_configfile_directory }}' ansible.builtin.file: From 17ebd3948800427f57cba46af8c2c20546450ded Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 23 Nov 2022 15:54:23 +0000 Subject: [PATCH 334/375] sap_ha_pacemaker_cluster: first align linter configs with collection standard --- roles/sap_ha_pacemaker_cluster/.ansible-lint | 7 ++----- roles/sap_ha_pacemaker_cluster/.yamllint.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/.ansible-lint b/roles/sap_ha_pacemaker_cluster/.ansible-lint index de41416e6..63122b8f9 100644 --- a/roles/sap_ha_pacemaker_cluster/.ansible-lint +++ b/roles/sap_ha_pacemaker_cluster/.ansible-lint @@ -1,10 +1,7 @@ --- -exclude_paths: - - .cache/ - enable_list: - yaml skip_list: - - experimental + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - #- name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_ha_pacemaker_cluster/.yamllint.yml b/roles/sap_ha_pacemaker_cluster/.yamllint.yml index c007566b7..57ef427c1 100644 --- a/roles/sap_ha_pacemaker_cluster/.yamllint.yml +++ b/roles/sap_ha_pacemaker_cluster/.yamllint.yml @@ -5,17 +5,17 @@ extends: default rules: braces: {max-spaces-inside: 1, level: error} brackets: {max-spaces-inside: 1, level: error} - colons: {max-spaces-after: -1, level: error} - commas: {max-spaces-after: -1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} comments: disable comments-indentation: disable # document-start: disable - empty-lines: {max: 3, level: error} - hyphens: {level: error} +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} # indentation: disable - key-duplicates: enable +# key-duplicates: enable line-length: disable # new-line-at-end-of-file: disable # new-lines: {type: unix} # trailing-spaces: disable -# truthy: disable + truthy: disable From 57af7e40b748223121cf8f6b126583900ae03472 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Mon, 28 Nov 2022 13:59:26 +0100 Subject: [PATCH 335/375] sap_ha_pacemaker_cluster: fixing bad typo in included role --- roles/sap_ha_pacemaker_cluster/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/main.yml b/roles/sap_ha_pacemaker_cluster/tasks/main.yml index b20a091e5..aeed1029e 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/main.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/main.yml @@ -108,7 +108,7 @@ # linux system role 'ha_cluster' - name: "SAP HA Install Pacemaker - Include System Role 'ha_cluster'" ansible.builtin.include_role: - name: "{{ sap_ha_pacemaker_cluster_system_roles_collection }}.hacluster" + name: "{{ sap_ha_pacemaker_cluster_system_roles_collection }}.ha_cluster" apply: tags: ha_cluster no_log: true # some parameters contain secrets From ff5ad8941f77e5f7eaa0ef204ce3a2b438f5dd7f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 28 Nov 2022 14:48:07 +0100 Subject: [PATCH 336/375] preconfigure roles: Prepare for Ansible 2.14 Solves issue #246, by removing all warn: false arguments from tasks which call the shell and command modules --- .ansible-lint | 6 ++--- .../tasks/RedHat/assert-installation.yml | 4 ---- .../tasks/RedHat/installation.yml | 22 +++++-------------- .../tasks/SLES/assert-installation.yml | 2 -- .../tasks/SLES/installation.yml | 2 -- .../tasks/RedHat/assert-installation.yml | 4 ---- .../tasks/RedHat/installation.yml | 2 -- .../2292690/10-assert-ibm-energyscale.yml | 5 ++--- .../tasks/RedHat/assert-installation.yml | 5 ++--- 9 files changed, 13 insertions(+), 39 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 9d54fcb4b..802618231 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -8,15 +8,15 @@ exclude_paths: - changelogs/ - playbooks/ - roles/sap_anydb_install_oracle - - roles/sap_general_preconfigure + #- roles/sap_general_preconfigure #- roles/sap_ha_install_hana_hsr #- roles/sap_ha_pacemaker_cluster #- roles/sap_hana_install - - roles/sap_hana_preconfigure + #- roles/sap_hana_preconfigure - roles/sap_hostagent - roles/sap_hypervisor_node_preconfigure - roles/sap_install_media_detect - - roles/sap_netweaver_preconfigure + #- roles/sap_netweaver_preconfigure - roles/sap_storage_setup #- roles/sap_swpm - roles/sap_storage diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index 3728a9a1e..dcdff29c6 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -104,8 +104,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_group_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_group_assert changed_when: no - args: - warn: false - name: Assert that all required RHEL 7 package groups are installed ansible.builtin.assert: @@ -135,8 +133,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_envgroup_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_envgroup_assert changed_when: no - args: - warn: false - name: Assert that all required RHEL 8 environment groups are installed ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 8471acf9b..afdb05217 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -104,22 +104,14 @@ - __sap_general_preconfigure_register_subscription_manager_release.stdout != ansible_distribution_version - name: Ensure that the required package groups are installed, RHEL 7 - ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} -y" - args: - warn: false - register: __sap_general_preconfigure_register_yum_group_install - when: ansible_distribution_major_version == '7' - -- name: Display the output of the yum install command - ansible.builtin.debug: - var: __sap_general_preconfigure_register_yum_group_install + ansible.builtin.package: + name: "{{ sap_general_preconfigure_packagegroups }}" + state: present when: ansible_distribution_major_version == '7' -- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 -# Note: We want to avoid unwanted package upgrades, see bug 1983749. +# Reason for noqa: We do not want package updates when using the package module, see also Red Hat bug 1983749 +- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 # noqa command-instead-of-module ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} --nobest --exclude=kernel* -y" - args: - warn: false register: __sap_general_preconfigure_register_yum_group_install when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' @@ -130,8 +122,8 @@ - name: Ensure that the required packages are installed ansible.builtin.package: - state: present name: "{{ sap_general_preconfigure_packages }}" + state: present - name: Ensure that the minimum required package versions are installed when: @@ -228,8 +220,6 @@ register: __sap_general_preconfigure_register_needs_restarting ignore_errors: true changed_when: false - args: - warn: false check_mode: false - name: Display the output of the reboot requirement check diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index 4ed5df4f3..941ce6625 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -134,8 +134,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_needs_restarting_command_assert }}" register: __sap_general_preconfigure_register_needs_restarting_assert changed_when: false - args: - warn: false check_mode: false ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/SLES/installation.yml b/roles/sap_general_preconfigure/tasks/SLES/installation.yml index 224390f29..305da9953 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/installation.yml @@ -76,8 +76,6 @@ register: __sap_general_preconfigure_register_needs_restarting ignore_errors: true changed_when: false - args: - warn: false check_mode: false - name: Display the output of the reboot requirement check diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index 3d2f6d8ee..38d8025ba 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -85,8 +85,6 @@ ansible.builtin.shell: set -o pipefail && yum info installed {{ __sap_hana_preconfigure_required_ppc64le | map('quote') | join(' ') }} | awk '/Name/{n=$NF}/Version/{v=$NF}/Release/{r=$NF}/Description/{printf ("%s\n", n)}' register: __sap_hana_preconfigure_register_required_ppc64le_packages_assert changed_when: no - args: - warn: false - name: Assert that all required IBM packages are installed ansible.builtin.assert: @@ -223,8 +221,6 @@ ansible.builtin.shell: "{{ __sap_hana_preconfigure_fact_needs_restarting_command_assert }}" register: __sap_hana_preconfigure_register_needs_restarting_assert changed_when: false - args: - warn: false check_mode: false ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml index 867fba6c3..30ce97cc6 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml @@ -209,8 +209,6 @@ register: __sap_hana_preconfigure_register_needs_restarting ignore_errors: true changed_when: false - args: - warn: false check_mode: false - name: Display the output of the reboot requirement check diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml index e84302ade..e2bec3177 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml @@ -9,13 +9,12 @@ when: ansible_architecture == "ppc64le" block: - - name: Check if package pseries-energy is not installed +# Reason for noqa: In assert mode, we do not enforce a certain configuration. + - name: Check if package pseries-energy is not installed # noqa command-instead-of-module ansible.builtin.command: yum info installed pseries-energy register: __sap_hana_preconfigure_register_yum_pseries_energy_assert changed_when: no ignore_errors: yes - args: - warn: false - name: Assert that package pseries-energy is not installed ansible.builtin.assert: diff --git a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml index e2c565ca2..f8767c3c7 100644 --- a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml @@ -12,12 +12,11 @@ loop_var: line_item ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" -- name: Check if required packages for Adobe Document Services are installed +# Reason for noqa: We want a list of packages which are not installed +- name: Check if required packages for Adobe Document Services are installed # noqa command-instead-of-module ansible.builtin.shell: rpm -q --qf "%{NAME}.%{ARCH}\n" {{ __sap_netweaver_preconfigure_adobe_doc_services_packages | map('quote') | join(' ') }} register: __sap_netweaver_preconfigure_register_rpm_q_ads_packages changed_when: no - args: - warn: false when: sap_netweaver_preconfigure_use_adobe_doc_services | d(false) ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" From 7fdcc136019cb4779d8e8c1463615bece9c15492 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 28 Nov 2022 17:46:29 +0100 Subject: [PATCH 337/375] sap_general_preconfigure: Use the dnf module For installing the server environment group, the dnf module can be used with the same options as those we had used in the yum command before. --- .../tasks/RedHat/installation.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index afdb05217..2429de9ce 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -109,17 +109,16 @@ state: present when: ansible_distribution_major_version == '7' -# Reason for noqa: We do not want package updates when using the package module, see also Red Hat bug 1983749 -- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 # noqa command-instead-of-module - ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} --nobest --exclude=kernel* -y" +# Note: We do not want package updates, see Red Hat bug 1983749. +- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 + ansible.builtin.dnf: + name: "{{ sap_general_preconfigure_packagegroups }}" + state: present + exclude: kernel* + nobest: true register: __sap_general_preconfigure_register_yum_group_install when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' -- name: Display the output of the yum install command - ansible.builtin.debug: - var: __sap_general_preconfigure_register_yum_group_install - when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' - - name: Ensure that the required packages are installed ansible.builtin.package: name: "{{ sap_general_preconfigure_packages }}" From 20fab053b50467abaaeaf01ede9821df5f4a2343 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 28 Nov 2022 22:55:10 +0100 Subject: [PATCH 338/375] repository: Set fixed ansible-lint version --- .github/workflows/ansible-lint-sap_general_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml | 2 +- .github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml | 2 +- .github/workflows/ansible-lint-sap_hana_install.yml | 2 +- .github/workflows/ansible-lint-sap_hana_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_netweaver_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_swpm.yml | 2 +- .github/workflows/ansible-lint.yml | 2 +- .github/workflows/ansible-test-sanity.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index 38355329c..46dfc0fc3 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_general_preconfigure diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index 1582e8537..5b1f5e4a0 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_hana_hsr diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index 2b8ee16d1..9e880b21e 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_pacemaker_cluster diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index 5b3a1a847..dab7b855b 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_install diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index 78426756e..ad3f90d67 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_preconfigure diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 0e5176954..4e9f7d9d9 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_netweaver_preconfigure diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index ed38c6c34..29e94f3c2 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -32,7 +32,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_swpm diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 9a013c5e2..eccb59883 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -24,7 +24,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 # - name: Install collection dependencies # run: ansible-galaxy collection install community.general diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index 3ea710575..aa47bc80a 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -24,7 +24,7 @@ jobs: python-version: '3.9' - name: Install test dependencies - run: pip3 install yamllint ansible ansible-lint + run: pip3 install ansible ansible-lint==6.8.6 # - name: Install collection dependencies # run: ansible-galaxy collection install community.general From 540f1db89a5f3d9f00b5fc02e0d654ece5cbe9a4 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 28 Nov 2022 23:33:48 +0100 Subject: [PATCH 339/375] sap_netweaver_preconfigure: Add link to libstdc++.so.6 Solves issue #263. --- .../defaults/main.yml | 2 ++ .../tasks/sapnote/3119751.yml | 20 +++++++++++ .../tasks/sapnote/assert-3119751.yml | 34 +++++++++++++++++++ .../vars/RedHat_8.yml | 2 ++ 4 files changed, 58 insertions(+) create mode 100644 roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml create mode 100644 roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index b69ef77a9..de42de101 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -11,4 +11,6 @@ sap_netweaver_preconfigure_min_swap_space_mb: "{{ __sap_netweaver_preconfigure_m sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: yes +sap_netweaver_preconfigure_rpath: '/usr/sap/lib' + sap_netweaver_preconfigure_use_adobe_doc_services: no diff --git a/roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml b/roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml new file mode 100644 index 000000000..b922d1f2e --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml @@ -0,0 +1,20 @@ +--- + +- name: Configure - Display SAP note number 3119751 and its version + ansible.builtin.debug: + msg: "SAP note {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).number }} + (version {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).version }}): Linux Requirements for SAP Kernel 754 and for SAP Kernel 788 and higher" + +- name: Create directory "{{ sap_netweaver_preconfigure_rpath }}" + ansible.builtin.file: + path: "{{ sap_netweaver_preconfigure_rpath }}" + state: directory + owner: root + group: root + mode: '0755' + +- name: Create a link to libstdc++.so.6 + ansible.builtin.file: + src: /opt/rh/SAP/lib64/compat-sap-c++-10.so + dest: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" + state: link diff --git a/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml b/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml new file mode 100644 index 000000000..62ad88166 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml @@ -0,0 +1,34 @@ +--- + +- name: Configure - Display SAP note number 3119751 and its version + ansible.builtin.debug: + msg: "SAP note {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).number }} + (version {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).version }}): Linux Requirements for SAP Kernel 754 and for SAP Kernel 788 and higher" + +- name: Get info about file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" + ansible.builtin.stat: + path: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" + register: __sap_netweaver_preconfigure_register_stat_libstdc_assert + +- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" exists + ansible.builtin.assert: + that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists + fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 does not exist!" + success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 exists." + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" + +- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link + ansible.builtin.assert: + that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.islnk + fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link!" + success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link." + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists + +- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so + ansible.builtin.assert: + that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.lnk_target == '/opt/rh/SAP/lib64/compat-sap-c++-10.so' + fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so!" + success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so." + ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" + when: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists diff --git a/roles/sap_netweaver_preconfigure/vars/RedHat_8.yml b/roles/sap_netweaver_preconfigure/vars/RedHat_8.yml index c9b5dbef1..49c674eea 100644 --- a/roles/sap_netweaver_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_netweaver_preconfigure/vars/RedHat_8.yml @@ -4,9 +4,11 @@ __sap_netweaver_preconfigure_sapnotes: - "2526952" + - "3119751" __sap_netweaver_preconfigure_sapnotes_versions: - { number: '2526952', version: '5' } + - { number: '3119751', version: '4' } __sap_netweaver_preconfigure_packages: - tuned-profiles-sap From 776deb2def11e20e3b10a342dbd0791ed1e72e31 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 29 Nov 2022 17:59:00 +0100 Subject: [PATCH 340/375] sap_hana_preconfigure: Support SAP HANA on RHEL 8.6 ppc64le --- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index fe2cfe96e..93834d426 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -155,6 +155,7 @@ __sap_hana_preconfigure_min_packages_8_5_ppc64le: __sap_hana_preconfigure_min_packages_8_6_x86_64: __sap_hana_preconfigure_min_packages_8_6_ppc64le: + - [ 'kernel', '4.18.0-372.32.1.el8_6' ] __sap_hana_preconfigure_min_packages_8_7_x86_64: From 8fd6afb762e9c79dc75d17ca017275fccddb7690 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 19:03:00 +0100 Subject: [PATCH 341/375] sap_hana_preconfigure: Add missing repo vars for RHEL 9.x Replaces commit 53876030b91ae351d6d9b4c820e6df723ca7707a . --- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 6e8d08999..00ca1db87 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -25,6 +25,96 @@ __sap_hana_preconfigure_req_repos_redhat_9_1_ppc64le: - "rhel-9-for-ppc64le-appstream-rpms" - "rhel-9-for-ppc64le-sap-solutions-rpms" +__sap_hana_preconfigure_req_repos_redhat_9_2_x86_64: + - "rhel-9-for-x86_64-baseos-e4s-rpms" + - "rhel-9-for-x86_64-appstream-e4s-rpms" + - "rhel-9-for-x86_64-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_2_ppc64le: + - "rhel-9-for-ppc64le-baseos-e4s-rpms" + - "rhel-9-for-ppc64le-appstream-e4s-rpms" + - "rhel-9-for-ppc64le-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_3_x86_64: + - "rhel-9-for-x86_64-baseos-rpms" + - "rhel-9-for-x86_64-appstream-rpms" + - "rhel-9-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_3_ppc64le: + - "rhel-9-for-ppc64le-baseos-rpms" + - "rhel-9-for-ppc64le-appstream-rpms" + - "rhel-9-for-ppc64le-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_4_x86_64: + - "rhel-9-for-x86_64-baseos-e4s-rpms" + - "rhel-9-for-x86_64-appstream-e4s-rpms" + - "rhel-9-for-x86_64-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_4_ppc64le: + - "rhel-9-for-ppc64le-baseos-e4s-rpms" + - "rhel-9-for-ppc64le-appstream-e4s-rpms" + - "rhel-9-for-ppc64le-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_5_x86_64: + - "rhel-9-for-x86_64-baseos-rpms" + - "rhel-9-for-x86_64-appstream-rpms" + - "rhel-9-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_5_ppc64le: + - "rhel-9-for-ppc64le-baseos-rpms" + - "rhel-9-for-ppc64le-appstream-rpms" + - "rhel-9-for-ppc64le-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_6_x86_64: + - "rhel-9-for-x86_64-baseos-e4s-rpms" + - "rhel-9-for-x86_64-appstream-e4s-rpms" + - "rhel-9-for-x86_64-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_6_ppc64le: + - "rhel-9-for-ppc64le-baseos-e4s-rpms" + - "rhel-9-for-ppc64le-appstream-e4s-rpms" + - "rhel-9-for-ppc64le-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_7_x86_64: + - "rhel-9-for-x86_64-baseos-rpms" + - "rhel-9-for-x86_64-appstream-rpms" + - "rhel-9-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_7_ppc64le: + - "rhel-9-for-ppc64le-baseos-rpms" + - "rhel-9-for-ppc64le-appstream-rpms" + - "rhel-9-for-ppc64le-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_8_x86_64: + - "rhel-9-for-x86_64-baseos-e4s-rpms" + - "rhel-9-for-x86_64-appstream-e4s-rpms" + - "rhel-9-for-x86_64-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_8_ppc64le: + - "rhel-9-for-ppc64le-baseos-e4s-rpms" + - "rhel-9-for-ppc64le-appstream-e4s-rpms" + - "rhel-9-for-ppc64le-sap-solutions-e4s-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_9_x86_64: + - "rhel-9-for-x86_64-baseos-rpms" + - "rhel-9-for-x86_64-appstream-rpms" + - "rhel-9-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_9_ppc64le: + - "rhel-9-for-ppc64le-baseos-rpms" + - "rhel-9-for-ppc64le-appstream-rpms" + - "rhel-9-for-ppc64le-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_10_x86_64: + - "rhel-9-for-x86_64-baseos-rpms" + - "rhel-9-for-x86_64-appstream-rpms" + - "rhel-9-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_9_10_ppc64le: + - "rhel-9-for-ppc64le-baseos-rpms" + - "rhel-9-for-ppc64le-appstream-rpms" + - "rhel-9-for-ppc64le-sap-solutions-rpms" + # required SAP notes for RHEL 9: __sap_hana_preconfigure_sapnotes_versions_x86_64: - { number: '2777782', version: '22' } From 9c0363042224e3c58c7538378d27dbd93fd81826 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 19:09:14 +0100 Subject: [PATCH 342/375] sap_hana_preconfigure: Also update the SAP notes versions in the RHEL 9 vars file --- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 00ca1db87..0796ff817 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -117,13 +117,13 @@ __sap_hana_preconfigure_req_repos_redhat_9_10_ppc64le: # required SAP notes for RHEL 9: __sap_hana_preconfigure_sapnotes_versions_x86_64: - - { number: '2777782', version: '22' } + - { number: '2777782', version: '32' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - - { number: '2055470', version: '85' } - - { number: '2777782', version: '22' } + - { number: '2055470', version: '87' } + - { number: '2777782', version: '32' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } From a72e54d90e962cd325af39ee95997d0cc03ff38d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 19:18:30 +0100 Subject: [PATCH 343/375] sap_hana_preconfigure: Update RHEL 8 repo vars file Solves issue #275. --- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index 93834d426..c21d245b0 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -99,15 +99,35 @@ __sap_hana_preconfigure_req_repos_redhat_8_8_ppc64le: - "rhel-8-for-ppc64le-appstream-e4s-rpms" - "rhel-8-for-ppc64le-sap-solutions-e4s-rpms" +__sap_hana_preconfigure_req_repos_redhat_8_9_x86_64: + - "rhel-8-for-x86_64-baseos-rpms" + - "rhel-8-for-x86_64-appstream-rpms" + - "rhel-8-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_8_9_ppc64le: + - "rhel-8-for-ppc64le-baseos-rpms" + - "rhel-8-for-ppc64le-appstream-rpms" + - "rhel-8-for-ppc64le-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_8_10_x86_64: + - "rhel-8-for-x86_64-baseos-rpms" + - "rhel-8-for-x86_64-appstream-rpms" + - "rhel-8-for-x86_64-sap-solutions-rpms" + +__sap_hana_preconfigure_req_repos_redhat_8_10_ppc64le: + - "rhel-8-for-ppc64le-baseos-rpms" + - "rhel-8-for-ppc64le-appstream-rpms" + - "rhel-8-for-ppc64le-sap-solutions-rpms" + # required SAP notes for RHEL 8: __sap_hana_preconfigure_sapnotes_versions_x86_64: - - { number: '2777782', version: '24' } + - { number: '2777782', version: '32' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - - { number: '2055470', version: '85' } - - { number: '2777782', version: '24' } + - { number: '2055470', version: '87' } + - { number: '2777782', version: '32' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } From 93d0c0c762b88657fe2e6babf394b86a2fc155f2 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 20:32:50 +0100 Subject: [PATCH 344/375] sap_hana_install: Solve issue #273 Also add one more tag 'sap_hana_install_check_hana_exists' for running all hana_exists checks --- roles/sap_hana_install/tasks/hana_exists.yml | 74 ++++++++++---------- roles/sap_hana_install/tasks/main.yml | 20 ++++-- 2 files changed, 52 insertions(+), 42 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index 0644b06b3..e5e328385 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -17,12 +17,12 @@ register: __sap_hana_install_register_instancelist changed_when: false - - name: SAP HANA Checks - debug found instances + - name: SAP HANA Checks - Display instances ansible.builtin.debug: var: __sap_hana_install_register_instancelist.stdout_lines verbosity: 1 - - name: SAP HANA Checks - desired HANA is installed and running + - name: SAP HANA Checks - Desired HANA is installed and running ansible.builtin.set_fact: __sap_hana_install_fact_is_installed: true when: @@ -33,9 +33,10 @@ loop_var: __sap_hana_install_loop_instance label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - - name: SAP HANA Checks - trying to install HANA with other SID and same instance + - name: SAP HANA Checks - Trying to install HANA with other SID and same instance ansible.builtin.fail: - msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} already exists with the instance number {{ sap_hana_install_number }}" + msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} + already exists with the instance number {{ sap_hana_install_number }}!" when: - __sap_hana_install_loop_instance.split('-')[0] | trim != sap_hana_install_sid - __sap_hana_install_loop_instance.split('-')[1] | trim == sap_hana_install_number @@ -44,9 +45,10 @@ loop_var: __sap_hana_install_loop_instance label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - - name: SAP HANA Checks - trying to install HANA with identical SID and other instance number + - name: SAP HANA Checks - Trying to install HANA with identical SID and other instance number ansible.builtin.fail: - msg: "HANA {{ sap_hana_install_sid }} already exists with different instance number {{ __sap_hana_install_loop_instance.split('-')[1] | trim }}" + msg: "HANA {{ sap_hana_install_sid }} already exists with different instance number + {{ __sap_hana_install_loop_instance.split('-')[1] | trim }}!" when: - __sap_hana_install_loop_instance.split('-')[0] | trim == sap_hana_install_sid - __sap_hana_install_loop_instance.split('-')[1] | trim != sap_hana_install_number @@ -60,69 +62,66 @@ - name: SAP HANA Checks - Check directories if no saphostctrl is found when: not __sap_hana_install_register_stat_saphostctrl.stat.exists block: - - name: SAP HANA Checks - Get info about directory "{{ '/hana/shared/' + sap_hana_install_sid }}" + + - name: SAP HANA Checks - Get status of '{{ "/hana/shared/" + sap_hana_install_sid }}' ansible.builtin.stat: path: "/hana/shared/{{ sap_hana_install_sid }}" check_mode: no register: __sap_hana_install_register_stat_hana_shared_sid_assert failed_when: no - - name: SAP HANA Checks - Check if directory is empty '/hana/shared/{{ sap_hana_install_sid }}' + - name: SAP HANA Checks - Get contents of '/hana/shared/{{ sap_hana_install_sid }}' ansible.builtin.find: paths: "/hana/shared/{{ sap_hana_install_sid }}" patterns: '*' register: __sap_hana_install_register_files_in_hana_shared_sid_assert when: __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - - name: SAP HANA Checks - Assert that directory does not exist or is empty '/hana/shared/{{ sap_hana_install_sid }}' - ansible.builtin.assert: - that: not __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists and is not empty! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: Directory '/hana/shared/{{ sap_hana_install_sid }}' does not exist." - when: __sap_hana_install_register_files_in_hana_shared_sid_assert.matched|int != 0 + - name: SAP HANA Checks - Fail if directory '/hana/shared/{{ sap_hana_install_sid }}' exists and is not empty + ansible.builtin.fail: + msg: "FAIL: Directory '/hana/shared/{{ sap_hana_install_sid }}' exists and is not empty!" + when: + - __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists + - __sap_hana_install_register_files_in_hana_shared_sid_assert.matched | int != 0 - - name: SAP HANA Checks - Get info about directory '/usr/sap/{{ sap_hana_install_sid }}' + - name: SAP HANA Checks - Get status of '{{ "/usr/sap/" + sap_hana_install_sid }}' ansible.builtin.stat: path: "/usr/sap/{{ sap_hana_install_sid }}" check_mode: no register: __sap_hana_install_register_stat_usr_sap_sid_assert failed_when: no - - name: SAP HANA Checks - Check if directory is empty '/usr/sap/{{ sap_hana_install_sid }}' + - name: SAP HANA Checks - Get contents of '/usr/sap/{{ sap_hana_install_sid }}' ansible.builtin.find: paths: "/usr/sap/{{ sap_hana_install_sid }}" patterns: '*' register: __sap_hana_install_register_files_in_usr_sap_sid_assert when: __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists - - name: SAP HANA Checks - Assert that directory does not exist or is empty '/usr/sap/{{ sap_hana_install_sid }}' - ansible.builtin.assert: - that: not __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists - fail_msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists and is not empty! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: Directory '/usr/sap/{{ sap_hana_install_sid }}' does not exist." - when: __sap_hana_install_register_files_in_usr_sap_sid_assert.matched|int != 0 + - name: SAP HANA Checks - Fail if directory '/usr/sap/{{ sap_hana_install_sid }}' exists and is not empty + ansible.builtin.fail: + msg: "FAIL: Directory '/usr/sap/{{ sap_hana_install_sid }}' exists and is not empty!" + when: + - __sap_hana_install_register_stat_usr_sap_sid_assert.stat.exists + - __sap_hana_install_register_files_in_usr_sap_sid_assert.matched | int != 0 - name: SAP HANA Checks - HANA admin user check when: - sap_hana_install_check_sidadm_user | d(true) - - not __sap_hana_install_fact_is_installed| d(false) + - not __sap_hana_install_fact_is_installed | d(false) block: - - name: Check for sidadm user + - name: SAP HANA Checks - Get info about '{{ sap_hana_install_sid | lower }}adm' user ansible.builtin.command: getent passwd {{ sap_hana_install_sid | lower }}adm check_mode: no register: __sap_hana_install_register_getent_passwd_sidadm changed_when: no failed_when: no - - name: SAP HANA Checks - Assert that there is no sidadm user - ansible.builtin.assert: - that: __sap_hana_install_register_getent_passwd_sidadm.rc != 0 - fail_msg: "FAIL: User '{{ sap_hana_install_sid | lower }}adm' exists! - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." - success_msg: "PASS: User '{{ sap_hana_install_sid | lower }}adm' does not exist." + - name: SAP HANA Checks - Fail if the user '{{ sap_hana_install_sid | lower }}adm' exists + ansible.builtin.fail: + msg: "FAIL: User '{{ sap_hana_install_sid | lower }}adm' exists!" + when: __sap_hana_install_register_getent_passwd_sidadm.rc == 0 # The role supports specifying the SAP HANA group id in variable `sap_hana_install_groupid`, which is the id of the sapsys group. # The SAP HANA installation will fail if there is already a group named sapsys but with a different ID. Let's better fail before. @@ -131,22 +130,21 @@ - sap_hana_install_groupid is defined - sap_hana_install_groupid | string != "None" - sap_hana_install_groupid | string | length > 0 - - not __sap_hana_install_fact_is_installed| d(false) + - not __sap_hana_install_fact_is_installed | d(false) block: - - name: SAP HANA Checks - Get info about the ID of the sapsys group + - name: SAP HANA Checks - Get info about the ID of the 'sapsys' group ansible.builtin.command: getent group sapsys check_mode: no register: __sap_hana_install_register_getent_group_sapsys changed_when: no failed_when: no - - name: SAP HANA Checks - In case there is a group sapsys, assert that its group ID is identical to sap_hana_install_groupid + - name: SAP HANA Checks - In case there is a group 'sapsys', assert that its group ID is identical to 'sap_hana_install_groupid' ansible.builtin.assert: that: "{{ __sap_hana_install_register_getent_group_sapsys.stdout.split(':')[2] }} == {{ sap_hana_install_groupid }}" success_msg: "PASS: The group ID of 'sapsys' is identical to the value of variable sap_hana_install_groupid, which is '{{ sap_hana_install_groupid }}'" - fail_msg: "FAIL: Group sapsys exists but with a different group ID than '{{ sap_hana_install_groupid }}', - which has been specified in variable sap_hana_install_groupid. - Because of this, SAP HANA with SID '{{ sap_hana_install_sid }}' will not be installed." + fail_msg: "FAIL: Group 'sapsys' exists but with a different group ID than '{{ sap_hana_install_groupid }}' + (specified in variable sap_hana_install_groupid)!" when: __sap_hana_install_register_getent_group_sapsys.rc == 0 diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 830fbfa99..2ac3810eb 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -8,6 +8,7 @@ sap_hana_install_system_usage: "{{ sap_hana_install_env_type | d(sap_hana_install_system_usage) }}" sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict | d(sap_hana_install_restrict_max_mem) }}" tags: + - sap_hana_install_check_hana_exists - sap_hana_install_preinstall - sap_hana_install_set_log_mode - sap_hana_install_configure_firewall @@ -16,33 +17,44 @@ ansible.builtin.fail: msg: "The variable 'sap_hana_install_sid' is not defined." when: sap_hana_install_sid | length == 0 - tags: sap_hana_install_preinstall + tags: + - sap_hana_install_check_hana_exists + - sap_hana_install_preinstall - name: Validate SAP HANA System ID - 'sap_hana_install_sid' consists of 3 characters ansible.builtin.assert: that: sap_hana_install_sid | length == 3 success_msg: "PASS: The length of the SAP System ID '{{ sap_hana_install_sid }}' is 3 characters." fail_msg: "FAIL: The length of the SAP HANA System ID '{{ sap_hana_install_sid }}' is not 3 characters!" - tags: sap_hana_install_preinstall + tags: + - sap_hana_install_check_hana_exists + - sap_hana_install_preinstall - name: Validate SAP HANA System ID - 'sap_hana_install_sid' is not in the list of reserved SAP SIDs ansible.builtin.assert: that: sap_hana_install_sid not in __sap_hana_install_sid_prohibited success_msg: "PASS: The SAP HANA System ID '{{ sap_hana_install_sid }}' is not in the list of reserved SAP SIDs in SAP note 1979280 v.20." fail_msg: "FAIL: The SAP HANA System ID '{{ sap_hana_install_sid }}' is in the list of reserved SAP SIDs in SAP note 1979280 v.20!" - tags: sap_hana_install_preinstall + tags: + - sap_hana_install_check_hana_exists + - sap_hana_install_preinstall - name: Fail if necessary variable 'sap_hana_install_number' is not defined ansible.builtin.fail: msg: "The variable 'sap_hana_install_number' is not defined." when: sap_hana_install_number | length == 0 - tags: sap_hana_install_preinstall + tags: + - sap_hana_install_check_hana_exists + - sap_hana_install_preinstall - name: SAP HANA existence checking ansible.builtin.import_tasks: hana_exists.yml when: - sap_hana_install_new_system | d(true) - not sap_hana_install_force | d(false) + tags: + - sap_hana_install_check_hana_exists + - sap_hana_install_preinstall - name: Install SAP HANA when: not __sap_hana_install_fact_is_installed | d(false) From e8cbae6a5ae1c03a6d642c9c68644d3dbc6b0c1b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 20:49:52 +0100 Subject: [PATCH 345/375] sap_hana_install: Changes to some task names and fail messages --- roles/sap_hana_install/tasks/hana_exists.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/sap_hana_install/tasks/hana_exists.yml b/roles/sap_hana_install/tasks/hana_exists.yml index e5e328385..3a450cfc0 100644 --- a/roles/sap_hana_install/tasks/hana_exists.yml +++ b/roles/sap_hana_install/tasks/hana_exists.yml @@ -33,10 +33,10 @@ loop_var: __sap_hana_install_loop_instance label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - - name: SAP HANA Checks - Trying to install HANA with other SID and same instance + - name: SAP HANA Checks - Trying to install HANA with other SID and existing instance number ansible.builtin.fail: - msg: "HANA {{ __sap_hana_install_loop_instance.split('-')[0] | trim }} - already exists with the instance number {{ sap_hana_install_number }}!" + msg: "The instance number {{ sap_hana_install_number }} is already used by + HANA system {{ __sap_hana_install_loop_instance.split('-')[0] | trim }}!" when: - __sap_hana_install_loop_instance.split('-')[0] | trim != sap_hana_install_sid - __sap_hana_install_loop_instance.split('-')[1] | trim == sap_hana_install_number @@ -45,9 +45,9 @@ loop_var: __sap_hana_install_loop_instance label: "{{ __sap_hana_install_loop_instance.split('-')[0] | trim }}" - - name: SAP HANA Checks - Trying to install HANA with identical SID and other instance number + - name: SAP HANA Checks - Trying to install HANA with existing SID and other instance number ansible.builtin.fail: - msg: "HANA {{ sap_hana_install_sid }} already exists with different instance number + msg: "HANA system {{ sap_hana_install_sid }} already exists with different instance number {{ __sap_hana_install_loop_instance.split('-')[1] | trim }}!" when: - __sap_hana_install_loop_instance.split('-')[0] | trim == sap_hana_install_sid @@ -63,7 +63,7 @@ when: not __sap_hana_install_register_stat_saphostctrl.stat.exists block: - - name: SAP HANA Checks - Get status of '{{ "/hana/shared/" + sap_hana_install_sid }}' + - name: SAP HANA Checks - Get status of '/hana/shared/{{ sap_hana_install_sid }}' ansible.builtin.stat: path: "/hana/shared/{{ sap_hana_install_sid }}" check_mode: no @@ -84,7 +84,7 @@ - __sap_hana_install_register_stat_hana_shared_sid_assert.stat.exists - __sap_hana_install_register_files_in_hana_shared_sid_assert.matched | int != 0 - - name: SAP HANA Checks - Get status of '{{ "/usr/sap/" + sap_hana_install_sid }}' + - name: SAP HANA Checks - Get status of '/usr/sap/{{ sap_hana_install_sid }}' ansible.builtin.stat: path: "/usr/sap/{{ sap_hana_install_sid }}" check_mode: no From 0e7ca2a4f3662f0f88373245ce3532fce75f01e6 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 1 Dec 2022 21:05:11 +0100 Subject: [PATCH 346/375] sap_hana_preconfigure: No longer install IBMinvscout on RHEL 8 on ppc64le --- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 4 ++-- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index 93834d426..630d46bc5 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -274,9 +274,9 @@ __sap_hana_preconfigure_required_ppc64le: - libservicelog - servicelog - powerpc-utils -# - powerpc-utils-python # this package is no longer available for RHEL8 +# - powerpc-utils-python # this package is no longer available for RHEL 8 - ppc64-diag - - IBMinvscout +# - IBMinvscout # this package is no longer available for RHEL 8 # Network related kernel parameters as set in SAP Note 2382421: __sap_hana_preconfigure_kernel_parameters_default: diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 6e8d08999..689f7a10d 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -196,7 +196,7 @@ __sap_hana_preconfigure_required_ppc64le: - libservicelog - servicelog - powerpc-utils -# - powerpc-utils-python # this package is no longer available for RHEL8 +# - powerpc-utils-python # this package is no longer available for RHEL 9 - ppc64-diag # - IBMinvscout # this package is no longer available for RHEL 9 From 39edb2f087e70a95914ab4a43ed4cea7b888ed54 Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Fri, 2 Dec 2022 17:01:20 +0000 Subject: [PATCH 347/375] added improvement based on feedback from LinuxLab --- roles/sap_general_preconfigure/README.md | 2 ++ roles/sap_hana_preconfigure/README.md | 2 +- roles/sap_hana_preconfigure/defaults/main.yml | 2 +- roles/sap_hana_preconfigure/vars/SLES_15.yml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/sap_general_preconfigure/README.md b/roles/sap_general_preconfigure/README.md index 4da0485e9..713c10a23 100644 --- a/roles/sap_general_preconfigure/README.md +++ b/roles/sap_general_preconfigure/README.md @@ -2,6 +2,8 @@ This role installs required packages and performs configuration steps which are required for installing and running SAP NetWeaver or SAP HANA. Specific installation and configuration steps on top of these basic steps are performed with roles sap-netweaver-preconfigure and sap-hana-preconfigure. Future implementations may reduce the scope of this role, for example if certain installation or configuration steps are done in the more specific roles. +For SLES systems, this role may not be necessary. The majority of SAP preparation and tuning is covered by `saptune` which is configured in the `sap_hana_preconfigure` and `sap_netweaver_preconfigure` roles. + ## Requirements To use this role, your system needs to be installed according to: diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index 99e9b65c6..6fbde98d0 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -1,7 +1,7 @@ # sap_hana_preconfigure Ansible Role This role installs additional required packages and performs additional configuration steps for installing and running SAP HANA. -If you want to configure a RHELsystem for the installation and later usage of SAP HANA, you have to first run role sap_general_preconfigure +If you want to configure a RHEL system for the installation and later usage of SAP HANA, you have to first run role sap_general_preconfigure and then role sap_hana_preconfigure. However, if we wish to run SLES for HANA, you may run only this role. ## Requirements diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index d604b7bcf..73df8acad 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -66,7 +66,7 @@ sap_hana_sps: "0" sap_hana_preconfigure_packages: "{{ __sap_hana_preconfigure_packages }}" #sap_hana_preconfigure_packages: "{{ __sap_hana_preconfigure_packages_min_install }}" -# SAP HANA requires certain minimum package versions to be supported. These minium levels are listed in SAP Note 2235581. +# SAP HANA requires certain minimum package versions to be supported. These minimum levels are listed in SAP Note 2235581. # Set to no if you want to ignore these requirements. sap_hana_preconfigure_min_package_check: yes diff --git a/roles/sap_hana_preconfigure/vars/SLES_15.yml b/roles/sap_hana_preconfigure/vars/SLES_15.yml index 7bb60c5dd..8ffe3f9c0 100644 --- a/roles/sap_hana_preconfigure/vars/SLES_15.yml +++ b/roles/sap_hana_preconfigure/vars/SLES_15.yml @@ -28,4 +28,4 @@ __sap_hana_preconfigure_grub_file: /tmp/grub # Services that conflict with saptune __sap_hana_preconfigure_saptune_conflicting_services: - sapconf - - tuned \ No newline at end of file + - tuned From 68908b2b7252bb584ccee356d97c7c84b741d02d Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Mon, 5 Dec 2022 08:15:33 +0000 Subject: [PATCH 348/375] Fixed typo in netweaver preconfigure role --- roles/sap_netweaver_preconfigure/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_netweaver_preconfigure/README.md b/roles/sap_netweaver_preconfigure/README.md index 7a415f285..1f575bffd 100644 --- a/roles/sap_netweaver_preconfigure/README.md +++ b/roles/sap_netweaver_preconfigure/README.md @@ -17,7 +17,7 @@ On RHEL, as per SAP notes 2002167 and 2772999, the role will switch to tuned pro (e.g. virtual-guest) had been active before or not. On SLES, this role will switch the saptune solution to the one specified by the configuration and will override any previously set solution. -The default solution is +The default solution is `NETWEAVER`. The role can check if enough swap space - as per the prerequisite checker in sapinst - has been configured on the managed node. Please check the SAP NetWeaver installation guide for swap space requirements. From bc7af6f1421f3fa072421fe579758e0dd3038bcc Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 5 Dec 2022 09:52:41 +0100 Subject: [PATCH 349/375] sap_swpm: ansible-lint cleanup - solve key-order --- roles/sap_swpm/tasks/post_install/firewall.yml | 7 ++----- roles/sap_swpm/tasks/pre_install/firewall.yml | 7 ++----- .../sap_swpm/tasks/pre_install/update_etchosts.yml | 13 +++++-------- roles/sap_swpm/tasks/swpm/prepare_software.yml | 8 ++------ 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/roles/sap_swpm/tasks/post_install/firewall.yml b/roles/sap_swpm/tasks/post_install/firewall.yml index 7992ce222..524b3023a 100644 --- a/roles/sap_swpm/tasks/post_install/firewall.yml +++ b/roles/sap_swpm/tasks/post_install/firewall.yml @@ -1,6 +1,7 @@ --- - name: SAP SWPM Post Install - Firewall Setup + when: ansible_virtualization_role != "guest" or ansible_virtualization_type != "docker" block: - name: SAP SWPM Post Install - Gathering Firewall Facts @@ -8,6 +9,7 @@ manager: auto - name: SAP SWPM Post Install - Setup Firewall if included in packages + when: '"firewalld" in ansible_facts.packages' block: - name: SAP SWPM Post Install - Enable and start the firewalld service @@ -44,8 +46,3 @@ - name: SAP SWPM Post Install - Reload Firewall # noqa no-changed-when ansible.builtin.shell: | firewall-cmd --reload - - when: - - '"firewalld" in ansible_facts.packages' - - when: ansible_virtualization_role != "guest" or ansible_virtualization_type != "docker" diff --git a/roles/sap_swpm/tasks/pre_install/firewall.yml b/roles/sap_swpm/tasks/pre_install/firewall.yml index 9634b5d5c..80d1cee95 100644 --- a/roles/sap_swpm/tasks/pre_install/firewall.yml +++ b/roles/sap_swpm/tasks/pre_install/firewall.yml @@ -1,6 +1,7 @@ --- - name: SAP SWPM Pre Install - Firewall Setup + when: ansible_virtualization_role != "guest" or ansible_virtualization_type != "docker" block: - name: SAP SWPM Pre Install - Gathering Firewall Facts @@ -8,6 +9,7 @@ manager: auto - name: SAP SWPM Pre Install - Setup Firewall if included in packages + when: '"firewalld" in ansible_facts.packages' block: - name: SAP SWPM Pre Install - Enable and start the firewalld service @@ -58,8 +60,3 @@ - name: SAP SWPM Pre Install - Reload Firewall # noqa no-changed-when ansible.builtin.shell: | firewall-cmd --reload - - when: - - '"firewalld" in ansible_facts.packages' - - when: ansible_virtualization_role != "guest" or ansible_virtualization_type != "docker" diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 9f9ccc78c..992bbef9e 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -3,6 +3,7 @@ # Update etc hosts for NW - name: SAP SWPM Pre Install - Update etc hosts for NW + when: "sap_swpm_fqdn is defined" block: - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts @@ -19,12 +20,13 @@ path: /etc/hosts line: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" - when: - - "sap_swpm_fqdn is defined" - # Update etc hosts for HANA - name: SAP SWPM Pre Install - Update etc hosts for HANA + when: + - "sap_swpm_db_ip is defined" + - "sap_swpm_db_host is defined" + - "sap_swpm_db_host != ansible_hostname" block: - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts @@ -40,8 +42,3 @@ ansible.builtin.lineinfile: path: /etc/hosts line: "{{ sap_swpm_db_ip }}\t{{ sap_swpm_db_host }}.{{ sap_swpm_fqdn }}\t{{ sap_swpm_db_host }}" - - when: - - "sap_swpm_db_ip is defined" - - "sap_swpm_db_host is defined" - - "sap_swpm_db_host != ansible_hostname" diff --git a/roles/sap_swpm/tasks/swpm/prepare_software.yml b/roles/sap_swpm/tasks/swpm/prepare_software.yml index 50168a98d..9b1b1ede5 100644 --- a/roles/sap_swpm/tasks/swpm/prepare_software.yml +++ b/roles/sap_swpm/tasks/swpm/prepare_software.yml @@ -102,6 +102,7 @@ failed_when: not sap_swpm_swpm_sar_file_name_stat.stat.exists - name: SAP SWPM Pre Install - Full SAP System + when: not sap_swpm_generic | bool block: # 3. IGS @@ -188,10 +189,8 @@ register: sap_swpm_kernel_independent_file_name_stat failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists - when: - - not sap_swpm_generic | bool - - name: SAP SWPM Pre Install - Webdispatcher + when: "'Webdispatcher' in sap_swpm_product_catalog_id" block: # 7. Web Dispatcher @@ -214,6 +213,3 @@ path: "{{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }}" register: sap_swpm_web_dispatcher_file_name_stat failed_when: not sap_swpm_web_dispatcher_file_name_stat.stat.exists - - when: - - "'Webdispatcher' in sap_swpm_product_catalog_id" From 08c299e6682de41de26865cbb2222bad42ccee88 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 5 Dec 2022 11:59:14 +0100 Subject: [PATCH 350/375] sap_swpm: Solve issue 281 Add some tags to allow for easily executing only certain steps of the role: sap_swpm_pre_install: Only run all preinstallation steps sap_swpm_generate_inifile: Only generate the SWPM inifile sap_swpm_sapinst_commandline: Only display the full sapinst command line sap_swpm_install: Run all preinstallation and installation steps but omit the postinstallation steps --- roles/sap_swpm/tasks/main.yml | 5 +++++ roles/sap_swpm/tasks/pre_install.yml | 11 ++++++----- .../sap_swpm/tasks/pre_install/install_type.yml | 8 +++++--- .../swpm/swpm_inifile_generate_advanced.yml | 11 ++++++++--- ...swpm_inifile_generate_advanced_templates.yml | 13 ++++++++++--- .../swpm/swpm_inifile_generate_default.yml | 13 +++++++++++-- .../swpm_inifile_generate_default_templates.yml | 17 ++++++++++++++--- .../swpm_inifile_generate_inifile_reuse.yml | 9 ++++++++- roles/sap_swpm/tasks/swpm/swpm_pre_install.yml | 14 ++++++++++++-- 9 files changed, 79 insertions(+), 22 deletions(-) diff --git a/roles/sap_swpm/tasks/main.yml b/roles/sap_swpm/tasks/main.yml index b119977ef..aa16a779e 100644 --- a/roles/sap_swpm/tasks/main.yml +++ b/roles/sap_swpm/tasks/main.yml @@ -2,9 +2,14 @@ - name: SAP SWPM - run pre_install tasks ansible.builtin.import_tasks: pre_install.yml + tags: + - sap_swpm_pre_install + - sap_swpm_install - name: SAP SWPM - run swpm ansible.builtin.import_tasks: swpm.yml + tags: + - sap_swpm_install - name: SAP SWPM - run postinstall task ansible.builtin.import_tasks: post_install.yml diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index e47f59c83..fea55a694 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -6,7 +6,9 @@ - name: SAP SWPM Pre Install - Run Preinstallation Steps ansible.builtin.include_tasks: swpm/swpm_pre_install.yml - + tags: + - sap_swpm_generate_inifile + - sap_swpm_sapinst_commandline ################ # Set sapinst command @@ -20,6 +22,7 @@ # IF SWPM is running a HA installation, Ansible Variable sap_swpm_swpm_command_virtual_hostname is set and contains "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }}" # If SWPM is running a MP Stack XML installation, Ansible Variable sap_swpm_swpm_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" sap_swpm_swpm_command_extra_args: "SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false {{ sap_swpm_swpm_command_virtual_hostname }} {{ sap_swpm_swpm_command_mp_stack }}" + tags: sap_swpm_sapinst_commandline ################ # Pre Install Optional Tasks @@ -29,15 +32,13 @@ - name: SAP SWPM Pre Install - Firewall Setup ansible.builtin.include_tasks: pre_install/firewall.yml - when: - - "sap_swpm_setup_firewall | bool" + when: "sap_swpm_setup_firewall | bool" # /etc/hosts - name: SAP SWPM Pre Install - Update /etc/hosts ansible.builtin.include_tasks: pre_install/update_etchosts.yml - when: - - "sap_swpm_update_etchosts | bool" + when: "sap_swpm_update_etchosts | bool" ################ # Display Parameters diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index 549f8fb06..8cf428da2 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -7,7 +7,6 @@ sap_swpm_swpm_command_virtual_hostname: "" sap_swpm_swpm_command_mp_stack: "" - ################ # Determine Installation Type ################ @@ -47,7 +46,10 @@ # Run Installation Type Steps ################ +- name: SAP SWPM Pre Install - Display the Installation Type + ansible.builtin.debug: + var: sap_swpm_swpm_installation_type + - name: SAP SWPM Pre Install - Run Installation Type Steps ansible.builtin.include_tasks: "install_type/{{ sap_swpm_swpm_installation_type }}_install.yml" - when: - - "sap_swpm_swpm_installation_type | length > 0" + when: "sap_swpm_swpm_installation_type | length > 0" diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml index c270fd38b..b8fbc6d70 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml @@ -1,11 +1,12 @@ --- # Remove Existing inifile.params -- name: SAP SWPM advanced mode - Create inifile.params +- name: SAP SWPM advanced mode - Ensure 'inifile.params' exists ansible.builtin.file: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: touch mode: '0640' + tags: sap_swpm_generate_inifile - name: SAP SWPM advanced mode - Loop over the dictionary and output to file ansible.builtin.lineinfile: @@ -13,13 +14,17 @@ state: present line: "{{ item.key }} = {{ item.value }}" with_dict: "{{ sap_swpm_inifile_custom_values_dictionary }}" + tags: sap_swpm_generate_inifile # NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash - # Detect variables from generated inifile - name: SAP SWPM advanced mode - Detect Variables - ansible.builtin.include_tasks: detect_variables.yml + ansible.builtin.include_tasks: + file: detect_variables.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Prepare Software - name: SAP SWPM advanced mode - Prepare Software diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml index 603a0178f..2ada11ade 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml @@ -4,19 +4,22 @@ - name: SAP SWPM advanced_templates mode - Set product_catalog_id ansible.builtin.set_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" + tags: sap_swpm_generate_inifile - name: SAP SWPM advanced_templates mode - Create temporary directory ansible.builtin.tempfile: state: directory suffix: swpmconfig register: sap_swpm_tmpdir + tags: sap_swpm_generate_inifile # Remove Existing inifile.params -- name: SAP SWPM advanced_templates mode - Ensure inifile.params +- name: SAP SWPM advanced_templates mode - Ensure 'inifile.params' exists ansible.builtin.file: path: "{{ sap_swpm_tmpdir.path }}/inifile.params" state: touch mode: '0640' + tags: sap_swpm_generate_inifile - name: SAP SWPM advanced_templates mode - Loop over the dictionary and output to file ansible.builtin.lineinfile: @@ -25,19 +28,23 @@ insertafter: EOF line: "{{ item.key }}={{ item.value }}" with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] }}" + tags: sap_swpm_generate_inifile # NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash # Detect variables from generated inifile - name: SAP SWPM advanced_templates mode - Detect Variables - ansible.builtin.include_tasks: detect_variables.yml + ansible.builtin.include_tasks: + file: detect_variables.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Prepare Software - name: SAP SWPM advanced_templates mode - Prepare Software ansible.builtin.include_tasks: prepare_software.yml - # ALT: Generate complete inifile.params with all parameters from control.xml, for every SAP software product #- name: ALT: SAP SWPM advanced_templates mode - Generate complete inifile.params # script: ./plugins/module_utils/swpm2_parameters_inifile_generate.py '/path/to/controlxml/' diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml index 14b5ce98c..cc4357f9f 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml @@ -2,11 +2,19 @@ # Determine Installation Type - name: SAP SWPM default mode - Determine Installation Type - ansible.builtin.include_tasks: "../pre_install/install_type.yml" + ansible.builtin.include_tasks: + file: ../pre_install/install_type.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Password Facts - name: SAP SWPM default mode - Password Facts - ansible.builtin.include_tasks: ../pre_install/password_facts.yml + ansible.builtin.include_tasks: + file: ../pre_install/password_facts.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Prepare Software - name: SAP SWPM default mode - Prepare Software @@ -19,3 +27,4 @@ dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" mode: '0640' register: sap_swpm_cftemplate + tags: sap_swpm_generate_inifile diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml index 2abebaf21..e5dadf8ad 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml @@ -5,25 +5,35 @@ ansible.builtin.set_fact: sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" sap_swpm_inifile_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] }}" + tags: sap_swpm_generate_inifile - name: SAP SWPM default_templates mode - Set product_catalog_id and inifile_list ansible.builtin.set_fact: sap_swpm_java_template_id_selected_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_java_template_id_selected_list'] }}" when: "'java' in sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] | lower" + tags: sap_swpm_generate_inifile - name: SAP SWPM default_templates mode - If not already defined, use the default variable for the template ansible.builtin.set_fact: "{{ item.key }}": "{{ item.value }}" with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_dictionary'] }}" - + tags: sap_swpm_generate_inifile # Determine Installation Type - name: SAP SWPM default_templates mode - Determine Installation Type - ansible.builtin.include_tasks: "../pre_install/install_type.yml" + ansible.builtin.include_tasks: + file: ../pre_install/install_type.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Password Facts - name: SAP SWPM default_templates mode - Password Facts - ansible.builtin.include_tasks: ../pre_install/password_facts.yml + ansible.builtin.include_tasks: + file: ../pre_install/password_facts.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Prepare Software - name: SAP SWPM default_templates mode - Prepare Software @@ -36,3 +46,4 @@ dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" mode: '0640' register: sap_swpm_cftemplate + tags: sap_swpm_generate_inifile diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml index 25de97159..92698ea14 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml @@ -6,22 +6,29 @@ src: "{{ sap_swpm_inifile_reuse_source }}" dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" mode: '0640' + tags: sap_swpm_generate_inifile # Check inifile for des25 - name: SAP SWPM inifile_reuse mode - Check inifile for des25 ansible.builtin.shell: set -o pipefail && cat "{{ sap_swpm_tmpdir.path }}/inifile.params" | grep des25 | wc -l register: sap_swpm_inifile_read_file changed_when: false + tags: sap_swpm_generate_inifile # Check if inifile is reusable - name: SAP SWPM inifile_reuse mode - Check if inifile is reusable ansible.builtin.fail: msg: "{{ sap_swpm_inifile_reuse_source }} is not reusable" when: sap_swpm_inifile_read_file.stdout != '0' + tags: sap_swpm_generate_inifile # Detect variables from generated inifile - name: SAP SWPM inifile_reuse mode - Detect Variables - ansible.builtin.include_tasks: detect_variables.yml + ansible.builtin.include_tasks: + file: detect_variables.yml + apply: + tags: sap_swpm_generate_inifile + tags: sap_swpm_generate_inifile # Prepare Software - name: SAP SWPM inifile_reuse mode - Prepare Software diff --git a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml index 545a7ac57..bf0afcc54 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml +++ b/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml @@ -6,6 +6,9 @@ state: directory suffix: swpmconfig register: sap_swpm_tmpdir + tags: + - sap_swpm_generate_inifile + - sap_swpm_sapinst_commandline # Copy password file to the same location as inifile.params - name: SAP SWPM Pre Install - Copy password file to the same location as inifile.params @@ -15,17 +18,24 @@ remote_src: yes mode: '0640' when: sap_swpm_use_password_file == "y" + tags: sap_swpm_generate_inifile # Run SWPM inifile generation based on ansible role mode -- name: SAP SWPM - generate swpm inifile +- name: SAP SWPM Pre Install - generate swpm inifile ansible.builtin.include_tasks: "swpm_inifile_generate_{{ sap_swpm_ansible_role_mode }}.yml" + tags: sap_swpm_generate_inifile + +- name: SAP SWPM Pre Install - Display the location of file 'inifile.params' + ansible.builtin.debug: + msg: "{{ sap_swpm_tmpdir.path }}/inifile.params" + tags: sap_swpm_generate_inifile # Set fact for SWPM path - name: SAP SWPM Pre Install - Set fact for SWPM path ansible.builtin.set_fact: sap_swpm_sapinst_path: "{{ sap_swpm_swpm_path }}/sap_swpm_extracted" -- name: Create directories if does not exist +- name: SAP SWPM Pre Install - Ensure directory '{{ sap_swpm_sapinst_path }}' exists ansible.builtin.file: path: "{{ sap_swpm_sapinst_path }}" state: directory From fa606d9e2ec484fbc35cbb99dfc4a83f109666fd Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 5 Dec 2022 12:16:55 +0100 Subject: [PATCH 351/375] sap_swpm: Two more tags (issue #281) New tags: - sap_swpm_setup_firewall: Only run the tasks in pre_install/firewall.yml - sap_swpm_update_etchosts: Only run the tasks in pre_install/update_etchosts.yml --- roles/sap_swpm/tasks/pre_install.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index fea55a694..bf08793ab 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -31,14 +31,22 @@ # Firewall - name: SAP SWPM Pre Install - Firewall Setup - ansible.builtin.include_tasks: pre_install/firewall.yml + ansible.builtin.include_tasks: + file: pre_install/firewall.yml + apply: + tags: sap_swpm_setup_firewall when: "sap_swpm_setup_firewall | bool" + tags: sap_swpm_setup_firewall # /etc/hosts - name: SAP SWPM Pre Install - Update /etc/hosts - ansible.builtin.include_tasks: pre_install/update_etchosts.yml + ansible.builtin.include_tasks: + file: pre_install/update_etchosts.yml + apply: + tags: sap_swpm_update_etchosts when: "sap_swpm_update_etchosts | bool" + tags: sap_swpm_update_etchosts ################ # Display Parameters From 9e24559e3bd31c91293286e29751c8ab9932eab3 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 6 Dec 2022 18:24:38 +0100 Subject: [PATCH 352/375] sap_swpm: No longer update /etc/hosts by default Solves issue #283. --- roles/sap_swpm/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index b8cc677a0..396f546ad 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -375,4 +375,4 @@ sap_swpm_swpm_command_mp_stack: "" sap_swpm_setup_firewall: 'false' # Update /etc/hosts -sap_swpm_update_etchosts: 'true' +sap_swpm_update_etchosts: 'false' From fea9cc3131d892301977bd779f1b32a12a6b75a0 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 6 Dec 2022 21:53:57 +0100 Subject: [PATCH 353/375] sap_swpm: Ensure correct /etc/hosts entries Solves issue #63. --- .../tasks/pre_install/update_etchosts.yml | 66 ++++++++++++++----- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 992bbef9e..27dceb776 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -2,34 +2,64 @@ # Update etc hosts for NW -- name: SAP SWPM Pre Install - Update etc hosts for NW - when: "sap_swpm_fqdn is defined" +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for NW due to missing 'sap_swpm_fqdn' + ansible.builtin.debug: + msg: "WARN: Not configuring NW entries in '/etc/hosts' because 'sap_swpm_fqdn' is not defined!" + when: + ( sap_swpm_fqdn | type_debug == 'NoneType' ) or + ( sap_swpm_fqdn | length == 0 ) + +# Update etc hosts for HANA + +- name: SAP SWPM Pre Install - Update '/etc/hosts' for NW + when: + - "sap_swpm_fqdn | type_debug != 'NoneType'" + - "sap_swpm_fqdn | length > 0" block: - - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts - ansible.builtin.lineinfile: - path: /etc/hosts - create: false - regexp: (?i)^\s*{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\s+ - state: absent + - name: SAP SWPM Pre Install - Deduplicate values from '/etc/hosts' + ansible.builtin.lineinfile: + path: /etc/hosts + create: false + regexp: (?i)^\s*{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\s+ + state: absent # Reason for noqa: 1. Tabs can increase readability; # 2. Tabs are allowed for /etc/hosts - - name: SAP SWPM Pre Install - Update /etc/hosts with NW entry # noqa no-tabs - ansible.builtin.lineinfile: - path: /etc/hosts - line: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" + - name: SAP SWPM Pre Install - Update '/etc/hosts' with NW entry # noqa no-tabs + ansible.builtin.lineinfile: + path: /etc/hosts + line: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" -# Update etc hosts for HANA +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA due to missing 'sap_swpm_db_ip' + ansible.builtin.debug: + msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_ip' is not defined!" + when: + ( sap_swpm_db_ip | type_debug == 'NoneType' ) or + ( sap_swpm_db_ip | length == 0 ) + +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA due to missing 'sap_swpm_db_host' + ansible.builtin.debug: + msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_host' is not defined!" + when: + ( sap_swpm_db_host | type_debug == 'NoneType' ) or + ( sap_swpm_db_host | length == 0 ) + +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA because 'sap_swpm_db_host' is the current host + ansible.builtin.debug: + msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_host' is the current host!" + when: sap_swpm_db_host == ansible_hostname -- name: SAP SWPM Pre Install - Update etc hosts for HANA +- name: SAP SWPM Pre Install - Update '/etc/hosts' for HANA when: - - "sap_swpm_db_ip is defined" - - "sap_swpm_db_host is defined" + - "sap_swpm_db_ip | type_debug != 'NoneType'" + - "sap_swpm_db_ip | length > 0" + - "sap_swpm_db_host | type_debug != 'NoneType'" + - "sap_swpm_db_host | length > 0" - "sap_swpm_db_host != ansible_hostname" block: - - name: SAP SWPM Pre Install - Deduplicate values from /etc/hosts + - name: SAP SWPM Pre Install - Deduplicate values from '/etc/hosts' ansible.builtin.lineinfile: path: /etc/hosts create: false @@ -38,7 +68,7 @@ # Reason for noqa: 1. Tabs can increase readability; # 2. Tabs are allowed for /etc/hosts - - name: SAP SWPM Pre Install - Update /etc/hosts with HANA entry # noqa no-tabs + - name: SAP SWPM Pre Install - Update '/etc/hosts' with HANA entry # noqa no-tabs ansible.builtin.lineinfile: path: /etc/hosts line: "{{ sap_swpm_db_ip }}\t{{ sap_swpm_db_host }}.{{ sap_swpm_fqdn }}\t{{ sap_swpm_db_host }}" From 1e8bd6b69f43b710d9839637ace2078516b6aa54 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 9 Dec 2022 15:57:08 +0100 Subject: [PATCH 354/375] sap_general_preconfigure: Set kernel.pid_max only on RHEL 8.0 and 8.1 Solves issue #286. --- roles/sap_general_preconfigure/vars/RedHat_8.2.yml | 1 - roles/sap_general_preconfigure/vars/RedHat_8.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml index 70c871535..9b66c5a77 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -71,4 +71,3 @@ __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfig __sap_general_preconfigure_kernel_parameters_default: - { name: vm.max_map_count, value: '2147483647' } - - { name: kernel.pid_max, value: '4194304' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 60aa08e62..d0f33774c 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -83,4 +83,3 @@ __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfig __sap_general_preconfigure_kernel_parameters_default: - { name: vm.max_map_count, value: '2147483647' } - - { name: kernel.pid_max, value: '4194304' } From f1ff417c892ff60cd482ac837b54c36c987afbc5 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 9 Dec 2022 19:30:35 +0100 Subject: [PATCH 355/375] sap_general_preconfigure: Set 2772999 to v.24 --- roles/sap_general_preconfigure/vars/RedHat_8.0.yml | 2 +- roles/sap_general_preconfigure/vars/RedHat_8.1.yml | 2 +- roles/sap_general_preconfigure/vars/RedHat_8.2.yml | 2 +- roles/sap_general_preconfigure/vars/RedHat_8.yml | 2 +- roles/sap_general_preconfigure/vars/RedHat_9.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml index 822cd47b5..bd6eca124 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml @@ -3,7 +3,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2772999', version: '19' } + - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml index 319e045f4..dfb6b1558 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml @@ -3,7 +3,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2772999', version: '19' } + - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml index 9b66c5a77..d722756e2 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -3,7 +3,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2772999', version: '19' } + - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index d0f33774c..9112e5253 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -3,7 +3,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2772999', version: '19' } + - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index e6c51b9e6..d874c9c86 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -4,7 +4,7 @@ __sap_general_preconfigure_sapnotes_versions: # for the time being, use SAP note 2772999: - - { number: '2772999', version: '19' } + - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' From 75be83b15c0c2cc4b96bfb205af3a44285077d5a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 9 Dec 2022 19:42:36 +0100 Subject: [PATCH 356/375] sap_general_preconfigure: no longer set kernel.pid_max for RHEL 9 --- roles/sap_general_preconfigure/vars/RedHat_9.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index d874c9c86..76da84a1d 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -92,4 +92,3 @@ __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfig __sap_general_preconfigure_kernel_parameters_default: - { name: vm.max_map_count, value: '2147483647' } - - { name: kernel.pid_max, value: '4194304' } From ff3d68ed659c016f9579e8a33c9c8277f4dfcd1c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 9 Dec 2022 19:55:59 +0100 Subject: [PATCH 357/375] sap_hana_preconfigure: Changes for kernel.pid_max --- .../tasks/sapnote/2777782/10-assert-pidmax.yml | 6 +++--- .../tasks/sapnote/2777782/10-increase-pidmax.yml | 6 +++--- roles/sap_hana_preconfigure/vars/RedHat_8.yml | 4 ++-- roles/sap_hana_preconfigure/vars/RedHat_9.yml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-assert-pidmax.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-assert-pidmax.yml index 8ad70b6a3..3239fb7fc 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-assert-pidmax.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-assert-pidmax.yml @@ -2,8 +2,8 @@ - name: Assert 2777782-10 ansible.builtin.debug: - msg: "SAP note 2777782 Step 10: Increase pidmax" + msg: "SAP note 2777782 Step 10: Increase kernel.pidmax" -- name: Notify about where pidmax is asserted +- name: Notify about where 'kernel.pidmax' is asserted ansible.builtin.debug: - msg: "INFO: Kernel parameter pidmax is already asserted by role sap_general_preconfigure." + msg: "INFO: Kernel parameter 'kernel.pid_max' is already asserted by role 'sap_general_preconfigure' if necessary." diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-increase-pidmax.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-increase-pidmax.yml index 51ccc99e8..9099120d3 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-increase-pidmax.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2777782/10-increase-pidmax.yml @@ -2,8 +2,8 @@ - name: Configure 2777782-10 ansible.builtin.debug: - msg: "SAP note 2777782 Step 10: Increase pidmax" + msg: "SAP note 2777782 Step 10: Increase kernel.pidmax" -- name: Notify about where pidmax is set +- name: Notify about where 'kernel.pid_max' is set ansible.builtin.debug: - msg: "Kernel parameter pidmax is already set by role sap_general_preconfigure." + msg: "Kernel parameter 'kernel.pid_max' is already set by role 'sap_general_preconfigure' if necessary." diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index 026a6cd7f..2f925ca95 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -121,13 +121,13 @@ __sap_hana_preconfigure_req_repos_redhat_8_10_ppc64le: # required SAP notes for RHEL 8: __sap_hana_preconfigure_sapnotes_versions_x86_64: - - { number: '2777782', version: '32' } + - { number: '2777782', version: '33' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2055470', version: '87' } - - { number: '2777782', version: '32' } + - { number: '2777782', version: '33' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 071212641..2679c1da5 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -117,13 +117,13 @@ __sap_hana_preconfigure_req_repos_redhat_9_10_ppc64le: # required SAP notes for RHEL 9: __sap_hana_preconfigure_sapnotes_versions_x86_64: - - { number: '2777782', version: '32' } + - { number: '2777782', version: '33' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2055470', version: '87' } - - { number: '2777782', version: '32' } + - { number: '2777782', version: '33' } - { number: '2382421', version: '40' } - { number: '3024346', version: '3' } From 0545092213ae1f7e0670c4ecc62f60789c4a410c Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Tue, 13 Dec 2022 14:51:05 +0000 Subject: [PATCH 358/375] fixed linting --- roles/sap_hana_preconfigure/defaults/main.yml | 2 +- roles/sap_netweaver_preconfigure/defaults/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index be5b9ec46..d565184b5 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -160,7 +160,7 @@ sap_hana_preconfigure_run_grub2_mkconfig: "{{ __sap_hana_preconfigure_run_grub2_ # "Configuring Process Resource Limits" of SAP note 2772999): # sap_hana_preconfigure_db_group_name: dba -## The following variables control aspects of saptune and are only relevant for SLES for SAP Application +## The following variables control aspects of saptune and are only relevant for SLES for SAP Application # Version of saptune to install this will replace the current installed version if present, downgrading if necessary sap_hana_preconfigure_saptune_version: 3.0.2 diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index d2fedcf70..a3975e594 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -18,12 +18,12 @@ sap_netweaver_preconfigure_use_adobe_doc_services: no #SLES Only sap_netweaver_preconfigure_saptune_version: 3.0.2 -## The following variables control aspects of saptune and are only relevant for SLES for SAP Application +## The following variables control aspects of saptune and are only relevant for SLES for SAP Application # The saptune solution to apply. For netweaver, the only appropriate options are: #NETWEAVER -#NETWEAVER+HANA -#S4HANA-APP+DB +#NETWEAVER+HANA +#S4HANA-APP+DB #S4HANA-APPSERVER #S4HANA-DBSERVER # The default vaule is NETWEAVER From 2571f772255e518f8b4c157d76f2ae21c8a6c0f6 Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Tue, 13 Dec 2022 15:16:01 +0000 Subject: [PATCH 359/375] linting fixes --- .../tasks/SLES/assert-configuration.yml | 9 ++++----- .../sap_hana_preconfigure/tasks/SLES/configuration.yml | 10 ++++------ .../sap_hana_preconfigure/tasks/SLES/installation.yml | 2 +- roles/sap_netweaver_preconfigure/defaults/main.yml | 1 - .../tasks/SLES/assert-configuration.yml | 8 ++++---- .../tasks/SLES/configuration.yml | 10 +++++----- .../tasks/SLES/installation.yml | 4 ++-- 7 files changed, 20 insertions(+), 24 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml index 32fcf9893..25b5fe6d8 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/assert-configuration.yml @@ -9,7 +9,7 @@ - name: Assert that saptune conflicting services are stopped ansible.builtin.assert: - that: + that: - "ansible_facts.services['{{ service }}.service'].state == 'inactive' or ansible_facts.services['{{ service }}.service'].state == 'stopped'" - "ansible_facts.services['{{ service }}.service'].status == 'disabled'" fail_msg: "FAIL: the service '{{ service }}' is not configured as expected" @@ -20,13 +20,13 @@ - name: Assert that saptune is running and enabled ansible.builtin.assert: - that: + that: - "ansible_facts.services['saptune.service'].state == 'running'" - "ansible_facts.services['saptune.service'].status == 'enabled'" fail_msg: "FAIL: the service 'saptune' is not configured as expected" success_msg: "PASS: the service 'saptune' is configured as expected" -- name: Run saptune_check +- name: Run saptune_check ansible.builtin.command: saptune_check register: __sap_hana_preconfigure_register_saptune_check changed_when: false @@ -45,7 +45,7 @@ - name: Set solution fact ansible.builtin.set_fact: - __sap_hana_preconfigure_saptune_configured_solution: "{{ (__sap_hana_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1' ))[0] | default('NONE') }}" + __sap_hana_preconfigure_saptune_configured_solution: "{{ (__sap_hana_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1'))[0] | default('NONE') }}" - name: Assert that active solution is the expected solution ansible.builtin.assert: @@ -73,4 +73,3 @@ # net.ipv4.tcp_tw_recycle = 0 # when: # - sap_hana_preconfigure_saptune_azure - diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 048b9173a..0cd8a35bc 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -54,7 +54,7 @@ net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_tw_reuse = 0 net.ipv4.tcp_tw_recycle = 0 - when: + when: - sap_hana_preconfigure_saptune_azure - name: Check if saptune solution needs to be applied @@ -65,7 +65,7 @@ - name: Ensure no solution is currently applied ansible.builtin.command: "saptune solution revert {{ __sap_hana_preconfigure_fact_solution_configured }}" - when: + when: - __sap_hana_preconfigure_fact_solution_configured != 'NONE' - __sap_hana_preconfigure_register_saptune_verify.rc != 0 @@ -73,8 +73,6 @@ ansible.builtin.command: "saptune solution apply {{ sap_hana_preconfigure_saptune_solution }}" when: __sap_hana_preconfigure_register_saptune_verify.rc != 0 -- name: Ensure solution was successful +- name: Ensure solution was successful ansible.builtin.command: "saptune solution verify {{ sap_hana_preconfigure_saptune_solution }}" - changed_when: no # We're only checking, not changing! - - + changed_when: no # We're only checking, not changing! diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 334fdc492..4139c4413 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -22,4 +22,4 @@ type: package name: "saptune={{ sap_hana_preconfigure_saptune_version }}" state: present - force: yes \ No newline at end of file + force: yes diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index a3975e594..1ae9603d5 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -29,4 +29,3 @@ sap_netweaver_preconfigure_saptune_version: 3.0.2 # The default vaule is NETWEAVER sap_netweaver_preconfigure_saptune_solution: NETWEAVER - diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml index 49ece622f..26dce663a 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/assert-configuration.yml @@ -4,7 +4,7 @@ - name: Assert that saptune conflicting services are stopped ansible.builtin.assert: - that: + that: - "ansible_facts.services['{{ service }}.service'].state == 'inactive' or ansible_facts.services['{{ service }}.service'].state == 'stopped'" - "ansible_facts.services['{{ service }}.service'].status == 'disabled'" fail_msg: "FAIL: the service '{{ service }}' is not configured as expected" @@ -15,13 +15,13 @@ - name: Assert that saptune is running and enabled ansible.builtin.assert: - that: + that: - "ansible_facts.services['saptune.service'].state == 'running'" - "ansible_facts.services['saptune.service'].status == 'enabled'" fail_msg: "FAIL: the service 'saptune' is not configured as expected" success_msg: "PASS: the service 'saptune' is configured as expected" -- name: Run saptune_check +- name: Run saptune_check ansible.builtin.command: saptune_check register: __sap_netweaver_preconfigure_register_saptune_check changed_when: false @@ -40,7 +40,7 @@ - name: Set solution fact ansible.builtin.set_fact: - __sap_netweaver_preconfigure_saptune_configured_solution: "{{ (__sap_netweaver_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1' ))[0] | default('NONE') }}" + __sap_netweaver_preconfigure_saptune_configured_solution: "{{ (__sap_netweaver_preconfigure_register_saptune_status.stdout | regex_search('(\\S+)', '\\1'))[0] | default('NONE') }}" - name: Discover active solution ansible.builtin.command: saptune solution enabled diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml index ec989dea7..3d9d90bc6 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml @@ -35,7 +35,7 @@ - name: Ensure no solution is currently applied ansible.builtin.command: "saptune solution revert {{ __sap_netweaver_preconfigure_fact_solution_configured }}" - when: + when: - __sap_netweaver_preconfigure_fact_solution_configured != 'NONE' - __sap_netweaver_preconfigure_register_saptune_verify.rc != 0 @@ -43,14 +43,14 @@ ansible.builtin.command: "saptune solution apply {{ sap_netweaver_preconfigure_saptune_solution }}" when: __sap_netweaver_preconfigure_register_saptune_verify.rc != 0 -- name: Ensure solution was successful +- name: Ensure solution was successful ansible.builtin.command: "saptune solution verify {{ sap_netweaver_preconfigure_saptune_solution }}" - changed_when: no # We're only checking, not changing! + changed_when: no # We're only checking, not changing! - name: Warn if not enough swap space is configured ansible.builtin.fail: msg: "The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, - which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" + which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" ignore_errors: yes when: - ansible_swaptotal_mb < sap_netweaver_preconfigure_min_swap_space_mb|int @@ -59,7 +59,7 @@ - name: Fail if not enough swap space is configured ansible.builtin.fail: msg: "The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, - which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" + which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" when: - ansible_swaptotal_mb < sap_netweaver_preconfigure_min_swap_space_mb|int - sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured|d(true) diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml index ad8710a9c..10590a0a6 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/installation.yml @@ -7,8 +7,8 @@ #The use of zypper here allows exact saptune version to be declared and used. - name: Ensure saptune is installed - ansible.builtin.zypper: + community.general.zypper: type: package name: "saptune={{ sap_netweaver_preconfigure_saptune_version }}" state: present - force: yes \ No newline at end of file + force: yes From 9905dc51fa9219a668751502fb19bd8fc73dde11 Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Tue, 13 Dec 2022 16:50:17 +0000 Subject: [PATCH 360/375] fixed linting --- roles/sap_netweaver_preconfigure/vars/SLES_15.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml index 41ba34cbf..64e117388 100644 --- a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml +++ b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml @@ -34,5 +34,3 @@ __sap_netweaver_preconfigure_min_swap_space_mb: '20480' __sap_netweaver_preconfigure_saptune_conflicting_services: - sapconf - tuned - - From b210d6a6e2b50bec2c24d66bee6e7cf6e8ceef36 Mon Sep 17 00:00:00 2001 From: Steven Stringer Date: Wed, 14 Dec 2022 08:07:47 +0000 Subject: [PATCH 361/375] corrected FQCN for community.general.zypper --- roles/sap_hana_preconfigure/tasks/SLES/installation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 4139c4413..763afe3a6 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -11,14 +11,14 @@ when: sap_hana_preconfigure_update|bool - name: Ensure saphana pattern is installed - ansible.builtin.zypper: + community.general.zypper: type: pattern name: sap-hana state: present force: yes - name: Ensure saptune is installed - ansible.builtin.zypper: + community.general.zypper: type: package name: "saptune={{ sap_hana_preconfigure_saptune_version }}" state: present From 59e64f7706a1cb5fa633b2453842fba2f992e9bc Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 14 Dec 2022 17:27:56 +0100 Subject: [PATCH 362/375] sap_ha_pacemaker_cluster: docs and playbook updates related to the cluster role --- README.md | 21 ++-- docs/getting_started/secure-your-passwords.md | 26 ++-- ...ploy-2-node-sap-hana-pacemaker-cluster.yml | 9 +- roles/sap_ha_install_hana_hsr/README.md | 35 +++--- roles/sap_ha_pacemaker_cluster/README.md | 113 +++++++++++++----- .../meta/argument_specs.yml | 4 +- 6 files changed, 129 insertions(+), 79 deletions(-) rename docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml => playbooks/sample-deploy-2-node-sap-hana-pacemaker-cluster.yml (92%) diff --git a/README.md b/README.md index 04dd926d9..3c6fef5ae 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# community.sap_install Ansible Collection ![Ansible Lint](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint.yml/badge.svg?branch=main) +# community.sap_install Ansible Collection + +![Ansible Lint](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint.yml/badge.svg?branch=main) This Ansible Collection executes various SAP Software installations and configuration tasks for running SAP software on Linux operating systems; with handlers for SAP HANA database lifecycle manager (HDBLCM) and SAP Software Provisioning Manager (SWPM) for programmatic deployment of any SAP solution scenario. @@ -49,9 +51,7 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An | [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | | [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | | [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | -| [sap_ha_prepare_pacemaker](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_prepare_pacemaker) | prepare for Linux Pacemaker installation | -| [sap_ha_install_pacemaker](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_pacemaker) | install and configure Linux Pacemaker | -| [sap_ha_set_hana](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_hana) | configure HA/DR for SAP HANA | +| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | | [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | | [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | | [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | @@ -66,12 +66,15 @@ The logic has been separated to support a flexible execution of the different st | Role Name | Ansible Lint Status | | :----------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_general_preconfigure.yml) | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_netweaver_preconfigure.yml) | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_preconfigure.yml) | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint%20sap_hana_install.yml) | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | +| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lintsap_hana_preconfigure.yml) | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | +| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | [![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml) | +| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | [![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml) | **_Notes:_** + - Ansible Playbook localhost executions may have limitations on SAP Software installations - Ansible Roles for HA/DR are all designed for execution with Terraform @@ -144,5 +147,3 @@ SAP SWPM Catalog Products which have been tested: ## Contributors Contributors to the Ansible Roles within this Ansible Collection, are shown within [/docs/contributors](./docs/CONTRIBUTORS.md). - -[^rhel]: [Overview of the Red Hat Enterprise Linux for SAP Solutions subscription](https://access.redhat.com/solutions/3082481) diff --git a/docs/getting_started/secure-your-passwords.md b/docs/getting_started/secure-your-passwords.md index c7771bc94..350b26afa 100644 --- a/docs/getting_started/secure-your-passwords.md +++ b/docs/getting_started/secure-your-passwords.md @@ -23,13 +23,14 @@ Enter your secret password as single string in a file and save it. Make sure the vi passfile ``` -Use ansible-vault to encrypt the string, which it reads from the file. Adding the variable name will using `-n` will give you the full variable definition that can be copied directly into your `vars:` section of the playbook or the desired place of your variable definition (group_vars, host_vars, etc.). +Use ansible-vault to encrypt the string, which it reads from the file. Adding the variable name using `-n` will give you the full variable definition that can be copied directly into your `vars:` section of the playbook or the desired place of your variable definition (group_vars, host_vars, etc.). ```bash ansible-vault encrypt_string $(cat passfile) -n my_secret_var ``` -Ansible-vault will ask to enter a password which is required to automatically encrypt the value during ansible runtime afterwards. +Ansible-vault will ask to enter a vault password, which is required to decrypt the value during ansible runtime afterwards. +Consider this the "master key" for your vault-encrypted credentials. ```text New Vault password: @@ -44,17 +45,13 @@ my_secret_var: !vault | Encryption successful ``` -Save the `my_secret_var` and encrypted value in your variable definitions and include the definition file as usual. +Save the `my_secret_var` and encrypted multi-line value in your variable definitions and include the definition file as usual. The variable can as well be referenced and used by other variables for more flexibility. ```yaml playbook1_secret_var: "{{ my_secret_var }}" ``` -```yaml -playbook5_secret_var: "{{ my_secret_var }}" -``` - This way the value is only present and managed in one place and can be used by different playbooks. **Remove the temporary file which contains the plain-text password!** @@ -65,7 +62,8 @@ rm passfile ## Run playbook which uses vault-encrypted content -For the encryption to work during ansible / ansible-playbook execution you have to tell ansible to prompt for the vault password. +As soon as a vault-encrypted value is present in your playbook, ansible will require the vault password to be entered for playbook execution. +Add `--ask-vault` to your `ansible-playbook` command to prompt for this "master key" password and allow secure decryption. ```bash ansible-playbook tasks_with_secrets.yml [...] --ask-vault @@ -77,10 +75,10 @@ _When encrypting multiple values that will be used together, you have to make su You can also encrypt an entire file, e.g. containing multiple secrets. -However, if variables are defined in the file it will encrypt the variable names as well and makes it harder to identify the source definition of a referenced variable. +However, if variables are defined in the file it will encrypt the variable names as well and makes it harder to identify the source definition of a referenced variable. Also, encrypting the entire file will require ansible-vault commands to view or edit the contents of the file. A file containing individually encrypted values can be viewed and edited as any other file without uncovering the actual secret value. -It will prompt for the vault password - either to be created, or to be used for decrypting the existing content. +`ansible-vault` will prompt for the vault password - either to be created for a new encrypted file, or to be used for decrypting existing content (for view or edit operations). ```bash ansible-vault encrypt file_containing_secrets.yml @@ -89,11 +87,13 @@ ansible-vault view file_containing_secrets.yml ansible-vault edit file_containing_secrets.yml ``` -Including this file and using it works the same way as any other included file, as long as the vault password is provided to ansible during execution. +This file can be included into a playbook similar to any other file include. +The playbook will only be usable when the correct vault password is provided to `ansible-playbook` for the runtime, see above. ## More features and information Vault encryption can also be done through password-files, scripts or automation software which provides secure ways to manage vault credentials. For more complex ways to use ansible vault encryption/decryption please refer to the documentation. -https://docs.ansible.com/ansible/latest/user_guide/vault.html -https://docs.ansible.com/ansible/latest/cli/ansible-vault.html + +- [Ansible Vault User Guide](https://docs.ansible.com/ansible/latest/user_guide/vault.html) +- [Ansible Vault CLI Guide](https://docs.ansible.com/ansible/latest/cli/ansible-vault.html) diff --git a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml b/playbooks/sample-deploy-2-node-sap-hana-pacemaker-cluster.yml similarity index 92% rename from docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml rename to playbooks/sample-deploy-2-node-sap-hana-pacemaker-cluster.yml index 7ca448d05..db15fcb50 100644 --- a/docs/getting_started/sample-playbook_deploy-2-node-sap-hana-cluster.yml +++ b/playbooks/sample-deploy-2-node-sap-hana-pacemaker-cluster.yml @@ -9,10 +9,11 @@ # please update the "vars" parameters with values # corresponding to your individual naming standards # and infrastructure (e.g. IP definitions matching your network). - -# Prerequisite: -# - target nodes are registered with subscription-manager and -# subscribed to "RHEL for SAP Solutions" +# +# NOTE: +# For simplicity the sample password values are plain text. Please make sure to +# apply security measures to any credentials, for instance using ansible-vault +# encryption. - name: "Install SAP HANA and configure it in a 2-node pacemaker cluster" hosts: node1, node2 diff --git a/roles/sap_ha_install_hana_hsr/README.md b/roles/sap_ha_install_hana_hsr/README.md index 062b7fab8..f8a5730b3 100644 --- a/roles/sap_ha_install_hana_hsr/README.md +++ b/roles/sap_ha_install_hana_hsr/README.md @@ -1,6 +1,11 @@ # sap_ha_install_hana_hsr Ansible Role -Ansible role for SAP HANA System Replication Setup on 2 nodes with the same OS and SAP HANA release. +Ansible role for SAP HANA System Replication Setup on 2 nodes. + +## Prerequisites + +- target nodes are on the same OS level +- target nodes are using the same SAP HANA release ## Overview @@ -11,10 +16,8 @@ The **sap_ha_install_hana_hsr** role is part of this system role sequence: | 1. | sap_general_preconfigure | System Preparation for SAP | | 2. | sap_hana_preconfigure | System Preparation for SAP HANA | | 3. | sap_hana_install | Installation of SAP HANA Database | -| 4. | sap_ha_install_hana_hsr | Configuration of SAP HANA System Replication | -| 5. | sap_ha_prepare_pacemaker | Authentication and Preparation of Nodes for Cluster Creation | -| 6. | sap_ha_install_pacemaker | Initialization of the Pacemaker Cluster | -| 7. | sap_ha_set_hana | Configuration of SAP HANA Resources for SAP Solutions | +| _4._ | _sap_ha_install_hana_hsr_ | _Configuration of SAP HANA System Replication_ | +| 5. | sap_ha_pacemaker_cluster | Linux Pacemaker cluster setup and SAP resources configuration | The **sap_ha_install_hana_hsr** roles configures a HANA system replication relationship which is used by the pacemaker cluster to automate SAP HANA System Replication (HSR). Prerequisite is the SAP HANA installation on the nodes. @@ -22,8 +25,8 @@ The **sap_ha_install_hana_hsr** roles configures a HANA system replication relat | Task | Description | | ---------------------- | ----------------------------------------------------------------------------------- | -| update_etchosts.yml | all nodes of the cluster will be entered into the /etc/hosts, if not already exists | -| configure_firewall.yml | this will configure the firewall für HANA system replication (opional) | +| update_etchosts.yml | ensures that all nodes of the cluster are configured in all nodes' /etc/hosts | +| configure_firewall.yml | this will configure the firewall für HANA system replication (disabled) | | hdbuserstore.yml | create a user in the hdbuserstore | | log_mode.yml | check/set database logmode | | pki_files.yml | copy pki file from primary to secondary database | @@ -32,11 +35,11 @@ The **sap_ha_install_hana_hsr** roles configures a HANA system replication relat ## Common Variables/Parameters Used -| Name | Description | Value | -| -------------------------------- | ------------------------------- | ---------------- | -| sap_domain | Domain Name | e.g. example.com | -| sap_hana_sid | SAP ID | e.g. RH1 | -| sap_hana_instance_number | Instance Number | e.g. 00 | +| Name | Description | Value | +| -------------------------------- | ------------------------------- | ---------------------- | +| sap_domain | Domain Name | example: `example.com` | +| sap_hana_sid | SAP ID | example: `RH1` | +| sap_hana_instance_number | Instance Number | example: `"00"` | | sap_hana_install_master_password | DB System Password | | sap_hana_cluster_nodes | Parameter list of cluster nodes | | sap_hana_hacluster_password | Pacemaker hacluster Password | @@ -48,14 +51,6 @@ The **sap_ha_install_hana_hsr** roles configures a HANA system replication relat | sap_ha_install_hana_hsr_rep_mode | replication mode | default is sync | | sap_ha_install_hana_hsr_oper_mode | operation mode | default is logreplay | -In most cases you need to specify these variables only, if you want to use different values than the default values. - -## Requirements, Dependencies and Testing - -Tests are performed with other Ansible Roles in the sequence. Please refer to tests performed with final Ansible Roles: -- [sap_ha_set_hana Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_hana/README.md#requirements-dependencies-and-testing) -- [sap_ha_set_netweaver Ansible Role - Requirements, Dependencies and Testing](../sap_ha_set_netweaver/README.md#requirements-dependencies-and-testing) - ## Example Parameter File ```yaml diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index 1e40ace50..7b11c5c06 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -1,33 +1,53 @@ # sap_ha_pacemaker_cluster Ansible Role -This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources. -The cluster setup is managed through the `ha_cluster` Linux System Role.
-`sap_ha_pacemaker_cluster` is acting as a wrapper that takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA Cluster setup after pacemaker configuration. +![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg) - +This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources in a new pacemaker cluster. +The pacemaker installation and cluster setup is done through the `ha_cluster` Linux System Role. +Ansible role `sap_ha_pacemaker_cluster` is acting as a wrapper and takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA configuration in the pacemaker cluster. + +:warning: Do **not** execute this role against already configured cluster nodes, +:warning: unless you know what you are doing and have prepared the role input variables accordingly! - ## Requirements Target Systems: + - Supported OS: RHEL 8.3+ -- RHEL registration and access to High-Availability repository -- SAP Hana installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository +- access to High-Availability repository +- SAP HANA is installed and configured, for instance using the provided `sap_hana_*` Ansible roles in this repository Ansible Control System: + - Ansible 2.9+ -- `Linux System Roles` collection from either source and minimum version: - - RHEL package: _rhel-system-roles-1.13.0-1_ or later - - Red Hat Automation Hub: _rhel_system_roles 1.12.1_ or later - - Ansible Galaxy: _fedora.linux_system_roles:1.13.0_ or later +- **Linux System Roles** collection from either source and minimum version: + - RHEL package: `rhel-system-roles-1.13.0-1` or later + - Red Hat Automation Hub: `rhel_system_roles 1.12.1` or later + - Ansible Galaxy: `fedora.linux_system_roles:1.13.0` or later + +## Functionality + +_All of the following functionality is provided as **Technology Preview**._ - +:warning: Platforms not explicitly listed may not work as expected. + +### 2-node pacemaker cluster with SAP HANA System Replication + +| Platform | Usability | +| -------- | --------- | +| :heavy_check_mark: physical server | expected to work with any fencing method that is supported by the `ha_cluster` Linux System Role | +| :heavy_check_mark: OVirt VM | tested and working | +| :heavy_check_mark: AWS EC2 | platform detection and awscli setup included, tested and expected to work | +| IBM Cloud VPC | platform detection included, tested and working (unsupported at this point in time) | + + ## Role Input Parameters Minimum required parameters: + - [ha_cluster_hacluster_password](#ha_cluster_hacluster_password) - [sap_hana_cluster_nodes](#sap_hana_cluster_nodes) - [sap_hana_instance_number](#sap_hana_instance_number) @@ -43,13 +63,15 @@ On cloud platforms additional parameters are required: --- ### ha_cluster + - _Type:_ `dict` Optional _**host_vars**_ parameter - if defined it must be set for each node.
Dictionary that can contain various node options for the pacemaker cluster configuration.
-Supported options can be reviewed in the `ha_cluster` Linux System Role (https://github.com/linux-system-roles/ha_cluster/blob/master/README.md).
+Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
Example: + ```yaml ha_cluster: corosync_addresses: @@ -59,41 +81,48 @@ ha_cluster: ``` ### ha_cluster_cluster_name + - _Type:_ `str` - _Default:_ `my-cluster` The name of the pacemaker cluster.
### ha_cluster_hacluster_password required + - _Type:_ `str` The password of the `hacluster` user which is created during pacemaker installation.
### sap_ha_pacemaker_cluster_aws_access_key_id + - _Type:_ `str` AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud.
### sap_ha_pacemaker_cluster_aws_region + - _Type:_ `str` The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud.
### sap_ha_pacemaker_cluster_aws_secret_access_key + - _Type:_ `str` AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud.
### sap_ha_pacemaker_cluster_cluster_properties + - _Type:_ `dict` - _Default:_ `See example` Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
Example: + ```yaml sap_ha_pacemaker_cluster_cluster_properties: concurrent-fencing: true @@ -102,6 +131,7 @@ sap_ha_pacemaker_cluster_cluster_properties: ``` ### sap_ha_pacemaker_cluster_create_config_dest + - _Type:_ `str` - _Default:_ `_resource_config.yml` @@ -111,6 +141,7 @@ Specify a path/filename to save the file in a custom location.
The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
### sap_ha_pacemaker_cluster_create_config_varfile + - _Type:_ `bool` - _Default:_ `False` @@ -120,6 +151,7 @@ When enabled this parameters file is also created when the playbook is run in ch WARNING! This report may include sensitive details like secrets required for certain cluster resources!
### sap_ha_pacemaker_cluster_fence_options + - _Type:_ `dict` STONITH resource common parameters that apply to most fencing agents.
@@ -127,17 +159,18 @@ These options are applied to fencing resources this role uses automatically for The listed options are set by default.
Additional options can be added by defining this parameter in dictionary format and adding the defaults plus any valid stonith resource key-value pair.
- - **pcmk_reboot_retries**
- _Default:_ `4`
- STONITH resource parameter to define how often it retries to restart a node. - - **pcmk_reboot_timeout**
- _Default:_ `400`
- STONITH resource parameter to define after which timeout a node restart is returned as failed. - - **power_timeout**
- _Default:_ `240`
- STONITH resource parameter to test X seconds for status change after ON/OFF. +- **pcmk_reboot_retries**
+ _Default:_ `4`
+ STONITH resource parameter to define how often it retries to restart a node. +- **pcmk_reboot_timeout**
+ _Default:_ `400`
+ STONITH resource parameter to define after which timeout a node restart is returned as failed. +- **power_timeout**
+ _Default:_ `240`
+ STONITH resource parameter to test X seconds for status change after ON/OFF. Example: + ```yaml sap_ha_pacemaker_cluster_fence_options: pcmk_reboot_retries: 4 @@ -146,6 +179,7 @@ sap_ha_pacemaker_cluster_fence_options: ``` ### sap_ha_pacemaker_cluster_hana_automated_register + - _Type:_ `bool` - _Default:_ `True` @@ -153,6 +187,7 @@ Parameter for the 'SAPHana' cluster resource.
Define if a former primary should be re-registered automatically as secondary.
### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout + - _Type:_ `int` - _Default:_ `900` @@ -162,6 +197,7 @@ If the time difference is less than the time gap, then the cluster holds one or This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
### sap_ha_pacemaker_cluster_hana_prefer_site_takeover + - _Type:_ `bool` - _Default:_ `True` @@ -170,30 +206,35 @@ Set to "false" if the cluster should first attempt to restart the instance on th When set to "true" (default) a failover to secondary will be initiated on resource failure.
### sap_ha_pacemaker_cluster_hana_resource_name + - _Type:_ `str` - _Default:_ `SAPHana__` Customize the cluster resource name of the SAP HANA DB resource.
### sap_ha_pacemaker_cluster_hana_topology_resource_name + - _Type:_ `str` - _Default:_ `SAPHanaTopology__` Customize the cluster resource name of the SAP HANA Topology resource.
### sap_ha_pacemaker_cluster_ibmcloud_api_key + - _Type:_ `str` The API key is required to allow control of instances (for example for fencing operations).
Required for cluster nodes setup in IBM Cloud VPC.
### sap_ha_pacemaker_cluster_ibmcloud_region + - _Type:_ `str` The cloud region key in which the instances are running.
Required for cluster nodes setup in IBM Cloud VPC.
### sap_ha_pacemaker_cluster_replication_type + - _Type:_ `str` - _Default:_ `none` @@ -201,12 +242,14 @@ The type of SAP HANA site replication across multiple hosts.
_Not yet supported_
### sap_ha_pacemaker_cluster_resource_defaults + - _Type:_ `dict` - _Default:_ `See example` Set default parameters that will be valid for all pacemaker resources.
Example: + ```yaml sap_ha_pacemaker_cluster_resource_defaults: migration-threshold: 5000 @@ -214,6 +257,7 @@ sap_ha_pacemaker_cluster_resource_defaults: ``` ### sap_ha_pacemaker_cluster_sap_type + - _Type:_ `str` - _Default:_ `scaleup` @@ -221,6 +265,7 @@ The SAP landscape to be installed.
_Currently only scale-up is supported_
### sap_ha_pacemaker_cluster_vip_client_interface + - _Type:_ `str` - _Default:_ `eth0` @@ -228,33 +273,37 @@ OS device name of the network interface to use for the Virtual IP configuration. This is used for VIP agents that require an interface name, for example in cloud platform environments.
### sap_ha_pacemaker_cluster_vip_resource_name + - _Type:_ `str` - _Default:_ `vip__` Customize the name of the resource managing the Virtual IP.
### sap_ha_pacemaker_cluster_vip_update_rt + - _Type:_ `list` List one more routing table IDs for managing Virtual IP failover through routing table changes.
Required for VIP configuration in AWS EC2 environments.
### sap_hana_cluster_nodes required + - _Type:_ `list` List of cluster nodes and associated attributes to describe the target SAP HA environment.
This is required for the HANA System Replication configuration.
- - **hana_site**
- Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
This is required for HANA System Replication configuration. - - **node_ip**
- IP address of the node used for HANA System Replication. - - **node_name**
- Name of the cluster node, should match the remote systems' hostnames.
This is needed by the cluster members to know all their partner nodes. - - **node_role**
- Role of this node in the SAP cluster setup.
There must be only *one* primary, but there can be multiple secondary nodes. +- **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
This is required for HANA System Replication configuration. +- **node_ip**
+ IP address of the node used for HANA System Replication. +- **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
This is needed by the cluster members to know all their partner nodes. +- **node_role**
+ Role of this node in the SAP cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes. Example: + ```yaml sap_hana_cluster_nodes: - hana_site: DC01 @@ -268,23 +317,27 @@ sap_hana_cluster_nodes: ``` ### sap_hana_instance_number required + - _Type:_ `str` The instance number of the SAP HANA database which is role will configure in the cluster.
### sap_hana_sid required + - _Type:_ `str` The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280.
### sap_hana_vip required + - _Type:_ `dict` One floating IP is required for SAP HANA DB connection by clients.
This main VIP will always run on the promoted HANA node and be moved with it during a failover.
Example: + ```yaml sap_hana_vip: primary: 192.168.10.100 diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index b1a74b64f..029ac1007 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -31,7 +31,7 @@ argument_specs: description: - Optional _**host_vars**_ parameter - if defined it must be set for each node. - Dictionary that can contain various node options for the pacemaker cluster configuration. - - Supported options can be reviewed in the `ha_cluster` Linux System Role (https://github.com/linux-system-roles/ha_cluster/blob/master/README.md). + - Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md]. example: ha_cluster: corosync_addresses: @@ -298,7 +298,7 @@ argument_specs: - secondary description: - Role of this node in the SAP cluster setup. - - There must be only *one* primary, but there can be multiple secondary nodes. + - There must be only **one** primary, but there can be multiple secondary nodes. required: true hana_site: description: From 0d35e8153161e8c3fb6ac056fe7a186e7e84ab53 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 14:19:59 +0100 Subject: [PATCH 363/375] sap_swpm:: Update README.md --- roles/sap_swpm/README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index 8715df97b..75e67b0e0 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -2,6 +2,15 @@ Ansible role for SAP software installation using SWPM +## Requirements + +The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, +make sure that the required collections are installed, for example by using the following command: + +`ansible-galaxy install -vv -r meta/collection-requirements.yml` + +## Scope + This role has been tested and working for the following scenarios - One Host Installation - Dual Host Installation @@ -143,7 +152,7 @@ Every SAP Software installation via SAP Software Provisioning Manager (SWPM) is ### Default Templates mode variables -Example using all inifile list parameters with the Default Templates mode to install SAP ECC EhP8 on IBM Db2: +Example using all inifile list parameters with the Default Templates mode to install SAP ECC EHP8 on IBM DB2: ``` sap_swpm_ansible_role_mode: default_templates @@ -179,10 +188,19 @@ sap_swpm_templates_install_dictionary: - sap_os_linux_user ``` +## Tags + +With the following tags, the role can be called to perform certain activities only: +- tag `sap_swpm_generate_inifile`: Only create the sapinst inifile. This can be useful for checking if the inifile is created as desired. +- tag `sap_swpm_sapinst_commandline`: Only show the sapinst command line. +- tag `sap_swpm_pre_install`: Perform all preinstallation steps, then exit. +- tag `sap_swpm_setup_firewall`: Only perform the firewall preinstallation settings (but only if variable `sap_swpm_setup_firewall` is set to `true`). +- tag `sap_swpm_update_etchosts`: Only update file `/etc/hosts` (but only if variable `sap_swpm_update_etchosts` is set to `true`). + ## License Apache license 2.0 ## Author Information -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sean Freeman +IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sean Freeman, Bernd Finger, Markus Koch From deb122b9d4315ca0e687d7d436cf434df00dff7f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 14:30:10 +0100 Subject: [PATCH 364/375] sap_swpm: create file meta/collection-requirements.yml --- roles/sap_swpm/meta/collection-requirements.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 roles/sap_swpm/meta/collection-requirements.yml diff --git a/roles/sap_swpm/meta/collection-requirements.yml b/roles/sap_swpm/meta/collection-requirements.yml new file mode 100644 index 000000000..16f12c680 --- /dev/null +++ b/roles/sap_swpm/meta/collection-requirements.yml @@ -0,0 +1,6 @@ +--- + +collections: + - name: ansible.posix + - name: community.general + - name: fedora.linux_system_roles From 5df3a920b081121061781eacbda5dfea5e9487c4 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 14:44:32 +0100 Subject: [PATCH 365/375] sap_swpm: We are not yet using lsr --- roles/sap_swpm/meta/collection-requirements.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/sap_swpm/meta/collection-requirements.yml b/roles/sap_swpm/meta/collection-requirements.yml index 16f12c680..a6d0e8348 100644 --- a/roles/sap_swpm/meta/collection-requirements.yml +++ b/roles/sap_swpm/meta/collection-requirements.yml @@ -3,4 +3,3 @@ collections: - name: ansible.posix - name: community.general - - name: fedora.linux_system_roles From 26d17690b6da375f712045387808d9a313d2a541 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 16:18:47 +0100 Subject: [PATCH 366/375] collection: Add entry to the changelog --- CHANGELOG.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6d8851ee9..35a3acb75 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,23 @@ community.sap_install Release Notes .. contents:: Topics + +v1.2.0 +====== + +Release Summary +--------------- + +| Release Date: 2022-12-20 +| Consolidate sap_ha_install_pacemaker, sap_ha_prepare_pacemaker, and sap_ha_set_hana into new sap_ha_pacemaker_cluster role +| Use the ha_cluster Linux System Role and its enhanced features in the new role sap_ha_pacemaker_cluster +| Modify SELinux file labels for SAP directories to support SELinux enforcing mode +| Upgrade SAP SWPM handling for compatibility with more scenarios when generating inifile.params +| Add Ansible Role for basic Oracle DB installations for SAP +| Various minor enhancements +| Various fixes + + v1.1.0 ====== From 50b0255e99d218313443b11d390d8a07e8630c3c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 16:40:06 +0100 Subject: [PATCH 367/375] rephrase SELinux entry in changelog --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 35a3acb75..48c0c462e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Release Summary | Release Date: 2022-12-20 | Consolidate sap_ha_install_pacemaker, sap_ha_prepare_pacemaker, and sap_ha_set_hana into new sap_ha_pacemaker_cluster role | Use the ha_cluster Linux System Role and its enhanced features in the new role sap_ha_pacemaker_cluster -| Modify SELinux file labels for SAP directories to support SELinux enforcing mode +| Enable modifying SELinux file labels for SAP directories | Upgrade SAP SWPM handling for compatibility with more scenarios when generating inifile.params | Add Ansible Role for basic Oracle DB installations for SAP | Various minor enhancements From d6f612c2caac047bfbf08fcdc77893e046752df1 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 17:15:55 +0100 Subject: [PATCH 368/375] sap_swpm: Revert to using the correct abbreviations --- roles/sap_swpm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index 75e67b0e0..ef76a6609 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -152,7 +152,7 @@ Every SAP Software installation via SAP Software Provisioning Manager (SWPM) is ### Default Templates mode variables -Example using all inifile list parameters with the Default Templates mode to install SAP ECC EHP8 on IBM DB2: +Example using all inifile list parameters with the Default Templates mode to install SAP ECC EhP8 on IBM Db2: ``` sap_swpm_ansible_role_mode: default_templates From f31c2e0af43c941e81457f1b4f20fb2ac2df03a9 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 19 Dec 2022 17:22:36 +0100 Subject: [PATCH 369/375] collection: modify version string in galaxy.yml --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 13c4fc471..d7a551bee 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: community name: sap_install # The version of the collection. Must be compatible with semantic versioning -version: 1.1.1 +version: 1.2.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md From fab522cfaa381f70e961eb88ab29f721a4ee0f4c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 20 Dec 2022 12:19:55 +0100 Subject: [PATCH 370/375] collection: Add one more entry to the changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 48c0c462e..0faee4901 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Release Summary | Release Date: 2022-12-20 | Consolidate sap_ha_install_pacemaker, sap_ha_prepare_pacemaker, and sap_ha_set_hana into new sap_ha_pacemaker_cluster role | Use the ha_cluster Linux System Role and its enhanced features in the new role sap_ha_pacemaker_cluster +| Improve SID and instance checking in role sap_hana_install | Enable modifying SELinux file labels for SAP directories | Upgrade SAP SWPM handling for compatibility with more scenarios when generating inifile.params | Add Ansible Role for basic Oracle DB installations for SAP From 83dea2885d015773a7ff3d3ed02ba74f58c652a6 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Dec 2022 11:25:09 +0100 Subject: [PATCH 371/375] collection: linter and workflow fixes --- ...-lint-sap_hypervisor_node_preconfigure.yml | 40 ++++++++++++------- .../ansible-lint-sap_vm_preconfigure.yml | 40 ++++++++++++------- .../tasks/hdbuserstore.yml | 8 ++-- .../platform/preconfigure_vm_aws_ec2.yml | 3 +- .../platform/register_sysinfo_vm_ibmcloud.yml | 5 +-- .../tasks/SLES/installation.yml | 2 +- .../.ansible-lint | 7 ++++ .../tasks/pre_install/update_etchosts.yml | 12 +++--- roles/sap_vm_preconfigure/.ansible-lint | 7 ++++ 9 files changed, 80 insertions(+), 44 deletions(-) create mode 100644 roles/sap_hypervisor_node_preconfigure/.ansible-lint create mode 100644 roles/sap_vm_preconfigure/.ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 6caa476a1..f96b0f786 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -1,27 +1,39 @@ -name: Ansible Lint for sap_hypervisor_node_preconfigure +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_hypervisor_node_preconfigure on: push: + branches: + - main + - dev paths: - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: + branches: + - main + - dev paths: - 'roles/sap_hypervisor_node_preconfigure/**' + jobs: ansible-lint: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_hypervisor_node_preconfigure - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint==6.8.6 + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hypervisor_node_preconfigure + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index 0c2a057a2..9c0740c16 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -1,27 +1,39 @@ -name: Ansible Lint for sap_vm_preconfigure +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint of the role sap_vm_preconfigure on: push: + branches: + - main + - dev paths: - 'roles/sap_vm_preconfigure/**' pull_request: + branches: + - main + - dev paths: - 'roles/sap_vm_preconfigure/**' + jobs: ansible-lint: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@main - with: - targets: | - ./roles/sap_vm_preconfigure - override-deps: | - ansible==5.3.0 - ansible-lint==5.3.2 - -# Static: use Ansible Community Edition 4.8.0, with lowest compatible Ansible Core 2.11.6 and use Ansible-lint 5.2.1 + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install test dependencies + run: pip3 install ansible ansible-lint==6.8.6 + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_vm_preconfigure + run: ansible-lint diff --git a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml index 9923be2cf..696eaffdf 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/hdbuserstore.yml @@ -2,9 +2,9 @@ # ansible-lint: # become_user string is deduced from a variable + suffix with no spaces - name: "SAP HSR - Check if hdbuserstore exists" - become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" # noqa var-spacing + become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.command: | - /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ + /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbuserstore \ List {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} register: sap_ha_install_hana_hsr_hdbuserstore failed_when: false @@ -15,9 +15,9 @@ # ansible-lint: # become_user string is deduced from a variable + suffix with no spaces - name: "SAP HSR - Create and Store Connection Info in hdbuserstore" - become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" # noqa var-spacing + become_user: "{{ sap_ha_install_hana_hsr_sid | lower }}adm" ansible.builtin.command: | - /usr/sap/{{ sap_ha_install_hana_hsr_sid}}/SYS/exe/hdb/hdbuserstore \ + /usr/sap/{{ sap_ha_install_hana_hsr_sid }}/SYS/exe/hdb/hdbuserstore \ SET {{ sap_ha_install_hana_hsr_hdbuserstore_system_backup_user }} \ {{ ansible_hostname }}:3{{ sap_ha_install_hana_hsr_instance_number }}13 \ SYSTEM '{{ sap_ha_install_hana_hsr_db_system_password }}' diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml index a179123ce..b404d76e9 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/preconfigure_vm_aws_ec2.yml @@ -38,6 +38,5 @@ __sap_ha_pacemaker_cluster_pcmk_host_map: > {% for node in ansible_play_hosts_all -%} {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].ansible_board_asset_tag }} - {%- if not loop.last %}; - {%- endif %} + {%- if not loop.last %};{% endif -%} {%- endfor %} diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml index e21dd9673..d09114f55 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/register_sysinfo_vm_ibmcloud.yml @@ -13,6 +13,5 @@ __sap_ha_pacemaker_cluster_pcmk_host_map: >- {% for node in ansible_play_hosts_all -%} {{ hostvars[node].ansible_hostname }}:{{ hostvars[node].__sap_ha_pacemaker_cluster_register_ibmcloud_instance.stdout }} - {%- if not loop.last %}; - {%- endif %} - {% endfor %} + {%- if not loop.last %};{%- endif -%} + {%- endfor %} diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index 763afe3a6..01d2d2736 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -8,7 +8,7 @@ ansible.builtin.package: state: latest name: "*" - when: sap_hana_preconfigure_update|bool + when: sap_hana_preconfigure_update | bool - name: Ensure saphana pattern is installed community.general.zypper: diff --git a/roles/sap_hypervisor_node_preconfigure/.ansible-lint b/roles/sap_hypervisor_node_preconfigure/.ansible-lint new file mode 100644 index 000000000..63122b8f9 --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/.ansible-lint @@ -0,0 +1,7 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 27dceb776..5044e5d2b 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -6,8 +6,8 @@ ansible.builtin.debug: msg: "WARN: Not configuring NW entries in '/etc/hosts' because 'sap_swpm_fqdn' is not defined!" when: - ( sap_swpm_fqdn | type_debug == 'NoneType' ) or - ( sap_swpm_fqdn | length == 0 ) + (sap_swpm_fqdn | type_debug == 'NoneType') or + (sap_swpm_fqdn | length == 0) # Update etc hosts for HANA @@ -35,15 +35,15 @@ ansible.builtin.debug: msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_ip' is not defined!" when: - ( sap_swpm_db_ip | type_debug == 'NoneType' ) or - ( sap_swpm_db_ip | length == 0 ) + (sap_swpm_db_ip | type_debug == 'NoneType') or + (sap_swpm_db_ip | length == 0) - name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA due to missing 'sap_swpm_db_host' ansible.builtin.debug: msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_host' is not defined!" when: - ( sap_swpm_db_host | type_debug == 'NoneType' ) or - ( sap_swpm_db_host | length == 0 ) + (sap_swpm_db_host | type_debug == 'NoneType') or + (sap_swpm_db_host | length == 0) - name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA because 'sap_swpm_db_host' is the current host ansible.builtin.debug: diff --git a/roles/sap_vm_preconfigure/.ansible-lint b/roles/sap_vm_preconfigure/.ansible-lint new file mode 100644 index 000000000..63122b8f9 --- /dev/null +++ b/roles/sap_vm_preconfigure/.ansible-lint @@ -0,0 +1,7 @@ +--- +enable_list: + - yaml +skip_list: + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work From 0ad15bc43eee6ac9affea7654a4e290db6e9f156 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 21 Dec 2022 12:03:05 +0100 Subject: [PATCH 372/375] added missing yamllint config files for consistency --- .../.yamllint | 33 ------------------- .../.yamllint.yml | 21 ++++++++++++ roles/sap_vm_preconfigure/.yamllint.yml | 21 ++++++++++++ 3 files changed, 42 insertions(+), 33 deletions(-) delete mode 100644 roles/sap_hypervisor_node_preconfigure/.yamllint create mode 100644 roles/sap_hypervisor_node_preconfigure/.yamllint.yml create mode 100644 roles/sap_vm_preconfigure/.yamllint.yml diff --git a/roles/sap_hypervisor_node_preconfigure/.yamllint b/roles/sap_hypervisor_node_preconfigure/.yamllint deleted file mode 100644 index 882767605..000000000 --- a/roles/sap_hypervisor_node_preconfigure/.yamllint +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Based on ansible-lint config -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - colons: - max-spaces-after: -1 - level: error - commas: - max-spaces-after: -1 - level: error - comments: disable - comments-indentation: disable - document-start: disable - empty-lines: - max: 3 - level: error - hyphens: - level: error - indentation: disable - key-duplicates: enable - line-length: disable - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: disable - truthy: disable diff --git a/roles/sap_hypervisor_node_preconfigure/.yamllint.yml b/roles/sap_hypervisor_node_preconfigure/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_hypervisor_node_preconfigure/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable diff --git a/roles/sap_vm_preconfigure/.yamllint.yml b/roles/sap_vm_preconfigure/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_vm_preconfigure/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable From 78e26b0473e6506cfc02f78f7191dc3d23fa2863 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 21 Dec 2022 13:13:27 +0100 Subject: [PATCH 373/375] collection: Update README.md --- README.md | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3c6fef5ae..f8dfd98e5 100644 --- a/README.md +++ b/README.md @@ -43,19 +43,22 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An ### Ansible Roles -| Name                    | Summary | -| :----------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general settings for SAP software | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | -| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | -| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | -| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | -| [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | -| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | -| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | -| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | detect and extract SAP Software installation media | +| Name | Summary | +| :--------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | +| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | configure a hypervisor running VMs for SAP HANA | +| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | configure settings for a guest (VM) running on RHV/KVM for SAP HANA | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general OS settings for SAP software | +| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | +| [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | install Oracle DB 19.x for SAP | +| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | +| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | +| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | +| [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | +| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | +| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | detect and extract SAP Software installation media | **_Notes_**: @@ -66,12 +69,20 @@ The logic has been separated to support a flexible execution of the different st | Role Name | Ansible Lint Status | | :----------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | +| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | N/A | +| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | N/A | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | | [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lintsap_hana_preconfigure.yml) | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | -| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | [![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml) | -| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | [![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml) | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml) | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | +| [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | N/A | +| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | [![Ansible Lint for sap_swpm](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml) | +| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | [![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml) | +| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | [![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml) | +| [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | N/A | +| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | N/A | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | N/A | +| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | N/A | **_Notes:_** From c35f70cb0f4baa94149fb8b7821667c05ade9d3e Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 21 Dec 2022 14:06:56 +0100 Subject: [PATCH 374/375] collection: reorder roles alphabetically in README.md --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f8dfd98e5..31b7586ac 100644 --- a/README.md +++ b/README.md @@ -44,21 +44,21 @@ Within this Ansible Collection, there are various Ansible Roles and no custom An ### Ansible Roles | Name | Summary | -| :--------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | -| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | configure a hypervisor running VMs for SAP HANA | -| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | configure settings for a guest (VM) running on RHV/KVM for SAP HANA | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general OS settings for SAP software | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | +| :--- | :--- | | [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | install Oracle DB 19.x for SAP | -| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general OS settings for SAP software | | [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | | [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | | [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | configure HA/DR for SAP NetWeaver | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | | [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | -| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | +| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | configure a hypervisor running VMs for SAP HANA | | [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | detect and extract SAP Software installation media | +| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | +| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | +| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | configure settings for a guest (VM) running on RHV/KVM for SAP HANA | **_Notes_**: @@ -67,22 +67,22 @@ The logic has been separated to support a flexible execution of the different st ### Ansible Roles Lint Status -| Role Name | Ansible Lint Status | -| :----------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | N/A | -| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | N/A | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml) | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | +| Role Name | Ansible Lint Status | +| :--- | :--- | | [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | N/A | -| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | [![Ansible Lint for sap_swpm](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml) | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | | [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | [![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml) | | [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | [![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml) | | [sap_ha_set_netweaver](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_set_netweaver) | N/A | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml) | | [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | N/A | -| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | N/A | +| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | N/A | | [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | N/A | +| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | N/A | +| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | [![Ansible Lint for sap_swpm](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml) | +| [sap_vm_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_vm_preconfigure) | N/A | **_Notes:_** From cd02980e137729f4c1e391642592fb9183d4fef0 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 21 Dec 2022 14:23:28 +0100 Subject: [PATCH 375/375] sap_swpm: Add the sample playbooks to the README.md file --- roles/sap_swpm/README.md | 52 +++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index ef76a6609..7bcb5f54e 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -72,19 +72,49 @@ Sample input files are stored in the [inputs](/playbooks/vars) folder of this An ### Default Parameters -Please check the default parameters file for more information on other parameters that can be used as an input -- [**sap_swpm** default parameters](defaults/main.yml) - -- Template S/4HANA2020 input for installation - - [Template S/4HANA Install](/playbooks/vars/s4hana/template.S4H.install) - - [Template S/4HANA Restore](/playbooks/vars/s4hana/template.S4H.restore) +### Default Parameters -- Sample S/4HANA2020 input for distributed / high availability installation (ASCS, ERS, DBCI, PAS) - - [Sample S/4HANA distributed](/playbooks/vars/s4hana/s4hana-distributed) +Please check the default parameters file for more information on other parameters that can be used as an input: +- [**sap_swpm** default parameters](defaults/main.yml) -- Sample Solman 7.2 input installation - - ABAP [Solman 7.2](/playbooks/vars/solman/SHA.install) - - Java [Solman 7.2](/playbooks/vars/solman/SHA.install) +Sample Playbooks and sample parameters are shown in the Ansible Collection `/playbooks` directory. + +The Ansible Collection `/playbooks` directory includes sample playbooks for using the `sap_swpm` Ansible Role in the following 'modes': +- Default +- Default Templates +- Advanced +- Advanced Templates +- Inifile Reuse + +The Ansible Collection `/playbooks/vars` directory includes sample variable files for: +- `sap_swpm` 'Default mode' to generate inifile.params of... + - SAP BW/4HANA OneHost + - SAP S/4HANA Distributed - ASCS, DBCI, ERS, PAS + - SAP S/4HANA OneHost + - SAP S/4HANA System Copy OneHost + - SAP Solution Manager (ABAP) + - SAP Solution Manager (JAVA) + - SAP Web Dispatcher + - SAP System Rename +- `sap_swpm` 'Default Templates mode' to generate inifile.params of... + - SAP S/4HANA OneHost + - SAP S/4HANA System Copy OneHost + - SAP System Rename +- `sap_swpm` 'Advanced mode' to generate inifile.params of... + - SAP S/4HANA OneHost +- `sap_swpm` 'Advanced Templates mode' to generate inifile.params of... + - SAP BW/4HANA OneHost + - SAP S/4HANA Distributed - ASCS, DBCI, ERS, PAS + - SAP S/4HANA OneHost + - SAP S/4HANA System Copy OneHost + - SAP Solution Manager (ABAP) + - SAP Solution Manager (JAVA) + - SAP Web Dispatcher + - SAP System Rename +- `sap_swpm` 'Inifile Reuse mode' inifile.params file for... + - SAP S/4HANA OneHost + +NOTE: these are only sample files, they are meant to be edited by the user before execution and do not cover all scenarios possible (the Ansible Role can execute ant SAP SWPM installation) ## Execution