diff --git a/runner/ansible/roles/checks/1.3.7/defaults/main.yml b/runner/ansible/roles/checks/1.3.7/defaults/main.yml deleted file mode 100644 index 2863ea7..0000000 --- a/runner/ansible/roles/checks/1.3.7/defaults/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- - -name: 1.3.7 -group: SBD -labels: generic -description: | - The 2 nodes cluster has either disk-based SBD or Qdevice -remediation: | - ## Remediation - HA cluster with 2 nodes must either have a disk-based SBD or a Qdevice. - - ## References - Azure: - - - https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/sap-high-availability-architecture-scenarios#multiple-instances-of-virtual-machines-in-the-same-availability-set - - https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/high-availability-guide-suse-pacemaker#use-an-sbd-device - - AWS: - - - https://docs.aws.amazon.com/sap/latest/sap-hana/sap-hana-on-aws-aws-infrastructure-operating-system-setup-and-hana-installation.html - - GCP: - - - https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-sles#deploying_the_vms_and_sap_hana - - SUSE / KVM: - - - https://documentation.suse.com/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/#cha.hana-sr.scenario - -implementation: "{{ lookup('file', 'roles/checks/'+name+'/tasks/main.yml') }}" - -# check id. This value must not be changed over the life of this check -id: A2EF8C diff --git a/runner/ansible/roles/checks/1.3.7/tasks/main.yml b/runner/ansible/roles/checks/1.3.7/tasks/main.yml deleted file mode 100644 index 0e5d906..0000000 --- a/runner/ansible/roles/checks/1.3.7/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- - -- name: "{{ name }}.check" - shell: | - if [[ $(crm_node -l | wc -l) != "2" ]]; then - exit 0 - fi - sbdarray=$(grep -E '^SBD_DEVICE=' /etc/sysconfig/sbd | grep -oP 'SBD_DEVICE=\K[^.]+' | sed 's/\"//g') - IFS=';' sbdarray=( $sbdarray ) - # convoluted, but normal count method does not work with jinja2 - # issue https://github.com/ansible/ansible/issues/16968 - temp_ar=(${!sbdarray[@]}); device_count=`expr ${temp_ar[-1]} + 1` - # If there is at least 1 device and there is an sbd device used by pacemaker - if [[ $device_count != "0" ]] && crm conf show | grep -q "stonith:external/sbd"; then - exit 0 - fi - # If the qdevice is configured it\'s also good - if corosync-quorumtool | tail -n1 | grep -i qdevice; then - exit 0 - fi - exit 1 - register: config_updated - check_mode: false - changed_when: config_updated.rc != 0 - failed_when: config_updated.rc > 1 - -- block: - - name: Post results - import_role: - name: post-results - when: - - ansible_check_mode - vars: - status: "{{ config_updated is not changed }}"