diff --git a/.ansible-lint b/.ansible-lint index 3a784e8ae..88bbb5659 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -15,11 +15,12 @@ exclude_paths: #- roles/sap_hana_preconfigure - roles/sap_hostagent - roles/sap_hypervisor_node_preconfigure - - roles/sap_install_media_detect + #- roles/sap_install_media_detect #- roles/sap_netweaver_preconfigure #- roles/sap_storage_setup #- roles/sap_swpm - roles/sap_vm_preconfigure + - tests/ enable_list: - yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 13541e313..cdf88a704 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: # 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/ + rev: v6.22.1 # 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_anydb_install_oracle/meta/runtime.yml b/roles/sap_anydb_install_oracle/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_anydb_install_oracle/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_general_preconfigure/meta/runtime.yml b/roles/sap_general_preconfigure/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_general_preconfigure/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_ha_install_hana_hsr/.ansible-lint b/roles/sap_ha_install_hana_hsr/.ansible-lint index 63122b8f9..1405704bf 100644 --- a/roles/sap_ha_install_hana_hsr/.ansible-lint +++ b/roles/sap_ha_install_hana_hsr/.ansible-lint @@ -1,7 +1,10 @@ --- +exclude_paths: + - tests/ enable_list: - yaml skip_list: + - meta-runtime[unsupported-version] # We don't want to enforce new Ansible versions for Galaxy - 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_hana_hsr/defaults/main.yml b/roles/sap_ha_install_hana_hsr/defaults/main.yml index bc3f8ca4c..5aed4c99f 100644 --- a/roles/sap_ha_install_hana_hsr/defaults/main.yml +++ b/roles/sap_ha_install_hana_hsr/defaults/main.yml @@ -9,4 +9,4 @@ sap_ha_install_hana_hsr_fqdn: "{{ sap_domain }}" sap_ha_install_hana_hsr_rep_mode: sync sap_ha_install_hana_hsr_oper_mode: logreplay -sap_ha_install_hana_hsr_update_etchosts: yes +sap_ha_install_hana_hsr_update_etchosts: true diff --git a/roles/sap_ha_install_hana_hsr/meta/runtime.yml b/roles/sap_ha_install_hana_hsr/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_ha_install_hana_hsr/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' 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 61e61e91f..f93be1c3c 100644 --- a/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml +++ b/roles/sap_ha_install_hana_hsr/tasks/pki_files.yml @@ -37,8 +37,8 @@ - name: "SAP HSR - Authorize pub key on primary node" ansible.builtin.lineinfile: - backup: yes - create: yes + backup: true + create: true line: "{{ __sap_ha_install_hana_hsr_pubkey.stdout }}" mode: "0600" path: ~/.ssh/authorized_keys 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 bcb2c5db0..bad7b39da 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,9 @@ --- - 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 != '' @@ -17,7 +19,7 @@ create: true mode: '0644' state: present - backup: yes + backup: true 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 }}" diff --git a/roles/sap_ha_pacemaker_cluster/.ansible-lint b/roles/sap_ha_pacemaker_cluster/.ansible-lint index 63122b8f9..1405704bf 100644 --- a/roles/sap_ha_pacemaker_cluster/.ansible-lint +++ b/roles/sap_ha_pacemaker_cluster/.ansible-lint @@ -1,7 +1,10 @@ --- +exclude_paths: + - tests/ enable_list: - yaml skip_list: + - meta-runtime[unsupported-version] # We don't want to enforce new Ansible versions for Galaxy - 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_pacemaker_cluster/meta/runtime.yml b/roles/sap_ha_pacemaker_cluster/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_ha_pacemaker_cluster/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' 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 c4311a481..ef23ca89a 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/validate_input_parameters.yml @@ -4,7 +4,7 @@ ansible.builtin.assert: that: - sap_ha_pacemaker_cluster_hana_sid | length == 3 - - sap_ha_pacemaker_cluster_hana_sid not in __sap_sid_prohibited + - sap_ha_pacemaker_cluster_hana_sid not in __sap_ha_pacemaker_cluster_sid_prohibited fail_msg: | Host type = {{ sap_ha_pacemaker_cluster_host_type }} Requires 'sap_ha_pacemaker_cluster_hana_sid' to be defined! @@ -37,7 +37,7 @@ ansible.builtin.assert: that: - sap_ha_pacemaker_cluster_nwas_abap_sid | length == 3 - - sap_ha_pacemaker_cluster_nwas_abap_sid not in __sap_sid_prohibited + - sap_ha_pacemaker_cluster_nwas_abap_sid not in __sap_ha_pacemaker_cluster_sid_prohibited fail_msg: | Host type = {{ sap_ha_pacemaker_cluster_host_type }} Requires 'sap_ha_pacemaker_cluster_nwas_abap_sid' to be defined! diff --git a/roles/sap_ha_pacemaker_cluster/vars/main.yml b/roles/sap_ha_pacemaker_cluster/vars/main.yml index 92b2f8b3c..09aa3fa2b 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/main.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/main.yml @@ -1,15 +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_ha_pacemaker_cluster_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'] # ansible_facts required by the role __sap_ha_pacemaker_cluster_required_facts: diff --git a/roles/sap_hana_install/meta/runtime.yml b/roles/sap_hana_install/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_hana_install/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_hana_preconfigure/meta/runtime.yml b/roles/sap_hana_preconfigure/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_hana_preconfigure/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_hostagent/meta/runtime.yml b/roles/sap_hostagent/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_hostagent/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_hypervisor_node_preconfigure/meta/runtime.yml b/roles/sap_hypervisor_node_preconfigure/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_hypervisor_node_preconfigure/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_install_media_detect/meta/runtime.yml b/roles/sap_install_media_detect/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_install_media_detect/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_maintain_etc_hosts/meta/runtime.yml b/roles/sap_maintain_etc_hosts/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_maintain_etc_hosts/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_netweaver_preconfigure/meta/runtime.yml b/roles/sap_netweaver_preconfigure/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_netweaver_preconfigure/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_storage_setup/.ansible-lint b/roles/sap_storage_setup/.ansible-lint index 63122b8f9..1405704bf 100644 --- a/roles/sap_storage_setup/.ansible-lint +++ b/roles/sap_storage_setup/.ansible-lint @@ -1,7 +1,10 @@ --- +exclude_paths: + - tests/ enable_list: - yaml skip_list: + - meta-runtime[unsupported-version] # We don't want to enforce new Ansible versions for Galaxy - 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_storage_setup/defaults/main.yml b/roles/sap_storage_setup/defaults/main.yml index 583c2c386..8abea7e81 100644 --- a/roles/sap_storage_setup/defaults/main.yml +++ b/roles/sap_storage_setup/defaults/main.yml @@ -67,23 +67,23 @@ sap_storage_setup_cloud_type: 'generic' # Azure variables -sap_storage_az_imds_json: -sap_storage_az_imds_url: 'http://169.254.169.254/metadata/instance/compute?api-version=2020-09-01' -sap_storage_az_vmsize_url: 'http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2017-08-01&format=text' +sap_storage_setup_az_imds_json: +sap_storage_setup_az_imds_url: 'http://169.254.169.254/metadata/instance/compute?api-version=2020-09-01' +sap_storage_setup_az_vmsize_url: 'http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2017-08-01&format=text' -sap_storage_az_vmsize: +sap_storage_setup_az_vmsize: -sap_storage_az_lun: '/dev/disk/azure/scsi1/lun' +sap_storage_setup_az_lun: '/dev/disk/azure/scsi1/lun' # AWS variables # should probably put into a platform specific vars file, to be included and overwriting the default #sap_storage_setup_aws_nfs_options: 'nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,acl' -sap_storage_aws_imds_url: -sap_storage_aws_vmsize_url: +sap_storage_setup_aws_imds_url: +sap_storage_setup_aws_vmsize_url: -sap_storage_aws_vmsize: +sap_storage_setup_aws_vmsize: # IBM Cloud variables # diff --git a/roles/sap_storage_setup/meta/runtime.yml b/roles/sap_storage_setup/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_storage_setup/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_storage_setup/tasks/generic_tasks/configure_swap.yml b/roles/sap_storage_setup/tasks/generic_tasks/configure_swap.yml index 14bfe9293..b09f3ee2c 100644 --- a/roles/sap_storage_setup/tasks/generic_tasks/configure_swap.yml +++ b/roles/sap_storage_setup/tasks/generic_tasks/configure_swap.yml @@ -29,6 +29,7 @@ - name: SAP Storage Setup - (swap file) Allocate space ansible.builtin.shell: | fallocate -l {{ swap_file.disk_size | int * 1024 }}MB {{ swap_file.swap_path }} + changed_when: true when: - not check_swapfile.stat.exists @@ -41,6 +42,7 @@ ansible.builtin.shell: | mkswap {{ swap_file.swap_path }} swapon {{ swap_file.swap_path }} + changed_when: true when: - not check_swapfile.stat.exists @@ -80,7 +82,7 @@ - name: SAP Storage Setup - Check if swap partition exists ansible.builtin.shell: | - lsblk | grep SWAP || echo "no active swap" + set -o pipefail && lsblk | grep SWAP || echo "no active swap" register: check_swap_partition changed_when: false @@ -95,6 +97,7 @@ - name: SAP Storage Setup - Enable swap ansible.builtin.shell: | swapon /dev/{{ swap_volume.lvm_vg_name | default('vg_swap') }}/{{ swap_volume.lvm_lv_name | default('lv_swap') }} + changed_when: true when: - not ansible_check_mode - swap_volume.lvm_lv_name | default("lv_swap") not in check_swap_partition.stdout diff --git a/roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml b/roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml index 571eb89f0..d55ee4738 100644 --- a/roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml +++ b/roles/sap_storage_setup/tasks/generic_tasks/remove_storage.yml @@ -1,7 +1,7 @@ --- ## Unmount Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Unmount Filesystem +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Unmount Filesystem # mount: # path: "{{ item.value.directory }}" # state: absent @@ -9,19 +9,19 @@ ## INFO: ## this only works right using community Ansible Galaxy filesystem module ## only interested with native Ansible modules for now -## - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Filesystem +## - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Filesystem ## filesystem: ## dev: "/dev/mapper/{{ item.value.vg }}/{{ item.value.lv }}" ## state: absent # ## Remove Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem # shell: | # /sbin/wipefs --all -f /dev/mapper/{{ item.value.vg }}-{{ item.value.lv }} # ignore_errors: yes # ## Remove Logical Volume -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume # lvol: # lv: "{{ item.value.lv }}" # vg: "{{ item.value.vg }}" @@ -29,7 +29,7 @@ # force: yes # ## Remove Volume Group -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group # lvg: # vg: "{{ item.value.vg }}" # state: absent diff --git a/roles/sap_storage_setup/tasks/main.yml b/roles/sap_storage_setup/tasks/main.yml index d9e3b26ad..91f3bb4af 100644 --- a/roles/sap_storage_setup/tasks/main.yml +++ b/roles/sap_storage_setup/tasks/main.yml @@ -50,9 +50,9 @@ label: "{{ new_mounts_item.name }}" -# TODO: Cloud Specific Pre-Tasks - call cloud specific pre tasks thru {{ sap_storage_cloud_type }}_main.yml -#- name: SAP Storage Setup - Preparation for '{{ sap_storage_cloud_type }}' -# include_tasks: "{{ sap_storage_cloud_type }}_main.yml" +# TODO: Cloud Specific Pre-Tasks - call cloud specific pre tasks thru {{ sap_storage_setup_cloud_type }}_main.yml +#- name: SAP Storage Setup - Preparation for '{{ sap_storage_setup_cloud_type }}' +# include_tasks: "{{ sap_storage_setup_cloud_type }}_main.yml" # TODO: verify that the number of disks matches the fs definition # TODO: add functionality to work with existing LVM volumes and skip disk assignment diff --git a/roles/sap_storage_setup/tasks/platform_tasks/az_main.yml b/roles/sap_storage_setup/tasks/platform_tasks/az_main.yml index e8ea809e2..9c5416bda 100644 --- a/roles/sap_storage_setup/tasks/platform_tasks/az_main.yml +++ b/roles/sap_storage_setup/tasks/platform_tasks/az_main.yml @@ -8,22 +8,22 @@ ## Create json format of IMDS ## Todo: Ansibilize this -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Create json format of IMDS +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - Create json format of IMDS # shell: | -# curl -H Metadata:true --noproxy "*" "{{ sap_storage_az_imds_url }}" | python3 -mjson.tool +# curl -H Metadata:true --noproxy "*" "{{ sap_storage_setup_az_imds_url }}" | python3 -mjson.tool # register: az_imds_reg # args: # executable: /bin/bash ## If this fails, that means this VM is not Azure? # #- set_fact: -# sap_storage_az_imds_json: "{{ az_imds_reg.stdout }}" +# sap_storage_setup_az_imds_json: "{{ az_imds_reg.stdout }}" # ## Pull VMSize ## Todo: Ansibilize this -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Pull VMSize +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - Pull VMSize # shell: | -# curl -H Metadata:true --noproxy "*" "{{ sap_storage_az_vmsize_url }}" +# curl -H Metadata:true --noproxy "*" "{{ sap_storage_setup_az_vmsize_url }}" # register: az_vmsize_reg # args: # executable: /bin/bash @@ -33,8 +33,8 @@ # - "{{ az_vmsize_reg.stdout }}" # #- set_fact: -# sap_storage_az_vmsize: "{{ az_vmsize_reg.stdout }}" +# sap_storage_setup_az_vmsize: "{{ az_vmsize_reg.stdout }}" # ## Include vars depending on VM Size -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Load Variables for {{ sap_storage_az_vmsize }} -# include_vars: "{{ sap_storage_cloud_type }}_tasks/vmsizes/{{ sap_storage_az_vmsize }}.yml" +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - Load Variables for {{ sap_storage_setup_az_vmsize }} +# include_vars: "{{ sap_storage_setup_cloud_type }}_tasks/vmsizes/{{ sap_storage_setup_az_vmsize }}.yml" diff --git a/roles/sap_storage_setup/tasks/platform_tasks/prepare_storage_az.yml b/roles/sap_storage_setup/tasks/platform_tasks/prepare_storage_az.yml index f9c3d61b8..c3f5f35b4 100644 --- a/roles/sap_storage_setup/tasks/platform_tasks/prepare_storage_az.yml +++ b/roles/sap_storage_setup/tasks/platform_tasks/prepare_storage_az.yml @@ -1,18 +1,18 @@ --- ## Striped volume -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} - Striped +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} - Striped # block: # # # Get LUNs from metadata -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata # shell: | # for i in {1..{{ item.value.numluns }}} # do -# {{ item.value.vg }}${i}lun="{{ sap_storage_az_lun }} \ +# {{ item.value.vg }}${i}lun="{{ sap_storage_setup_az_lun }} \ # `awk '/caching/ { r=""; f=1 } f { r = (r ? r ORS : "") $0 } \ # /writeAcceleratorEnabled/ \ # { if (f && r ~ /{{ item.value.name }}${i}/) print r; f=0 }' \ -# {{ sap_storage_az_imds_json }} \ +# {{ sap_storage_setup_az_imds_json }} \ # | grep lun | sed 's/[^0-9]*//g'`" # echo ${{ item.value.vg }}${i}lun # done @@ -24,14 +24,14 @@ # pvs_list: "{{ pvs_reg.stdout.split() }}" # # # Create Volume Group -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Volume Group Striped +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Volume Group Striped # lvg: # vg: "{{ item.value.vg }}" # pvs: "{{ pvs_list | join(',') }}" # force: yes # # # Create Logical Group -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Logical Volume - Striped +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Logical Volume - Striped # lvol: # vg: "{{ item.value.vg }}" # lv: "{{ item.value.lv }}" @@ -42,17 +42,17 @@ # - "item.value.numluns != '1'" # ## Single volume -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} - Single Volume +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} - Single Volume # block: # # # Get LUNs from metadata -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata # shell: | -# {{ item.value.vg }}lun="{{ sap_storage_az_lun }} \ +# {{ item.value.vg }}lun="{{ sap_storage_setup_az_lun }} \ # `awk '/caching/ { r=""; f=1 } f { r = (r ? r ORS : "") $0 } \ # /writeAcceleratorEnabled/ \ # { if (f && r ~ /{{ item.value.name }}/) print r; f=0 }' \ -# {{ sap_storage_az_imds_json }} \ +# {{ sap_storage_setup_az_imds_json }} \ # | grep lun | sed 's/[^0-9]*//g'`" # echo ${{ item.value.vg }}lun # args: @@ -63,14 +63,14 @@ # pvs_one: "{{ pvs_reg.stdout }}" # # # Create Volume Group -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Volume Group One +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Volume Group One # lvg: # vg: "{{ item.value.vg }}" # pvs: "{{ pvs_one }}" # force: yes # # # Create Logical Group -# - name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Logical Volume - One +# - name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Logical Volume - One # lvol: # vg: "{{ item.value.vg }}" # lv: "{{ item.value.lv }}" @@ -80,13 +80,13 @@ # - "item.value.numluns == '1'" # ## Create Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Filesystem +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Filesystem # filesystem: # fstype: xfs # dev: "/dev/{{ item.value.vg }}/{{ item.value.lv }}" # ## Mount Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Mount +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ sap_storage_setup_az_vmsize }} - {{ item.value.name }} Mount # mount: # path: "{{ item.value.directory }}" # fstype: xfs diff --git a/roles/sap_storage_setup/tasks/platform_tasks/remove_storage_az.yml b/roles/sap_storage_setup/tasks/platform_tasks/remove_storage_az.yml index 3468ebb58..e7c8fe9bc 100644 --- a/roles/sap_storage_setup/tasks/platform_tasks/remove_storage_az.yml +++ b/roles/sap_storage_setup/tasks/platform_tasks/remove_storage_az.yml @@ -1,18 +1,18 @@ --- ## Unmount Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Unmount Filesystem +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Unmount Filesystem # mount: # path: "{{ item.value.directory }}" # state: absent # ## Remove Filesystem -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem # shell: | # /sbin/wipefs --all -f /dev/mapper/{{ item.value.vg }}-{{ item.value.lv }} # ## Remove Logical Volume -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume # lvol: # lv: "{{ item.value.lv }}" # vg: "{{ item.value.vg }}" @@ -20,7 +20,7 @@ # force: yes # ## Remove Volume Group -#- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group +#- name: SAP Storage Preparation - {{ sap_storage_setup_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group # lvg: # vg: "{{ item.value.vg }}" # state: absent diff --git a/roles/sap_swpm/meta/runtime.yml b/roles/sap_swpm/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_swpm/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0' diff --git a/roles/sap_vm_preconfigure/meta/runtime.yml b/roles/sap_vm_preconfigure/meta/runtime.yml deleted file mode 100644 index c2ea65887..000000000 --- a/roles/sap_vm_preconfigure/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.12.0'