deploy/ansible/roles-db/4.0.3-hdb-install-scaleout/tasks/main.yaml [530:614]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - name:                      "SAP HANA SCALE OUT-HSR: HANA Install: flag"
              ansible.builtin.file:
                path:                    "/etc/sap_deployment_automation/{{ db_sid | upper }}/sap_deployment_hdb.txt"
                state:                   touch
                mode:                    0755

            - name:                      "Retrieve Subscription ID and Resource Group Name"
              ansible.builtin.uri:
                url:                     http://169.254.169.254/metadata/instance?api-version=2021-02-01
                use_proxy:               false
                headers:
                  Metadata:              true
              register:                  azure_metadata

            - name:                      "Extract details"
              ansible.builtin.set_fact:
                subscription_id:         "{{ azure_metadata.json.compute.subscriptionId }}"
                resource_group_name:     "{{ azure_metadata.json.compute.resourceGroupName }}"

            - name:                      "Show the subscription and resource group"
              ansible.builtin.debug:
                msg:
                  - "Subscription ID: {{ subscription_id }}"
                  - "Resource Group Name: {{ resource_group_name }}"

            - name:                        "Include deploy/ansible/roles-misc/0.6-ARM-Deployment"
              ansible.builtin.include_role:
                name:                    roles-misc/0.6-ARM-Deployment
              vars:
                subscriptionId:          "{{ subscription_id }}"
                resourceGroupName:       "{{ resource_group_name }}"

            - name:                      "SAP HANA SCALE OUT-HSR: ARM Deployment flag"
              ansible.builtin.file:
                path:                    "/etc/sap_deployment_automation/{{ db_sid | upper }}/sap_deployment_hdb_arm.txt"
                state:                   touch
                mode:                    0755

            - name:                      "SAP HANA SCALE OUT-HSR: remove install response file"
              ansible.builtin.file:
                path:                    "{{ dir_params }}/{{ sap_inifile }}"
                state:                   absent

            - name:                      "SAP HANA SCALE OUT-HSR: remove custom config response file"
              ansible.builtin.file:
                path:                    "{{ dir_params }}/{{ sap_custom_config }}"
                state:                   absent

          when:
            - hana_installation.rc is defined
            - hana_installation.rc < 1

        - name:                          "4.0.3 - SAP HANA SCALE OUT-HSR: Create backup folder"
          ansible.builtin.file:
            path:                        "{{ hana_backup_path }}"
            state:                       directory
            group:                       sapsys
            owner:                       "{{ db_sid | lower }}adm"
            mode:                        0755

        - name:                          "4.0.3 - SAP HANA SCALE OUT-HSR: Configure global.ini"
          block:
            - name:                      "Prepare global.ini for domain name resolution."
              become_user:               root
              become:                    true
              community.general.ini_file:
                path:                    "/hana/shared/{{ db_sid | upper }}/global/hdb/custom/config/global.ini"
                section:                 communication
                state:                   present
                mode:                    0644
                option:                  listeninterface
                value:                   .internal

            - name:                      "Prepare global.ini for installation in non-shared environment"
              become_user:               root
              become:                    true
              community.general.ini_file:
                path:                    "/hana/shared/{{ db_sid | upper }}/global/hdb/custom/config/global.ini"
                section:                 persistence
                state:                   present
                mode:                    0644
                option:                  basepath_shared
                value:                   "{{ _rsp_basepath_shared }}"
              tags:
               - skip_ansible_lint
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy/ansible/roles-db/4.0.3-hdb-install-scaleout/tasks/main.yaml [809:893]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - name:                        "SAP HANA SCALE OUT-HSR: HANA Install: flag"
              ansible.builtin.file:
                path:                      "/etc/sap_deployment_automation/{{ db_sid | upper }}/sap_deployment_hdb.txt"
                state:                     touch
                mode:                      0755

            - name:                        "Retrieve Subscription ID and Resource Group Name"
              ansible.builtin.uri:
                url:                       http://169.254.169.254/metadata/instance?api-version=2021-02-01
                use_proxy:                 false
                headers:
                  Metadata:                true
              register:                    azure_metadata

            - name:                        "Extract details"
              ansible.builtin.set_fact:
                subscription_id:           "{{ azure_metadata.json.compute.subscriptionId }}"
                resource_group_name:       "{{ azure_metadata.json.compute.resourceGroupName }}"

            - name:                        "Show the subscription and resource group"
              ansible.builtin.debug:
                msg:
                  - "Subscription ID: {{ subscription_id }}"
                  - "Resource Group Name: {{ resource_group_name }}"

            - name:                        "Include deploy/ansible/roles-misc/0.6-ARM-Deployment"
              ansible.builtin.include_role:
                name:                      roles-misc/0.6-ARM-Deployment
              vars:
                subscriptionId:            "{{ subscription_id }}"
                resourceGroupName:         "{{ resource_group_name }}"

            - name:                        "SAP HANA SCALE OUT-HSR: ARM Deployment flag"
              ansible.builtin.file:
                path:                      "/etc/sap_deployment_automation/{{ db_sid | upper }}/sap_deployment_hdb_arm.txt"
                state:                     touch
                mode:                      0755

            - name:                        "SAP HANA SCALE OUT-HSR: remove install response file"
              ansible.builtin.file:
                path:                      "{{ dir_params }}/{{ sap_inifile }}"
                state:                     absent

            - name:                        "SAP HANA SCALE OUT-HSR: remove custom config response file"
              ansible.builtin.file:
                path:                      "{{ dir_params }}/{{ sap_custom_config }}"
                state:                     absent

          when:
            - hana_installation.rc is defined
            - hana_installation.rc < 1

        - name:                            "4.0.3 - SAP HANA SCALE OUT-HSR: Create backup folder"
          ansible.builtin.file:
            path:                          "{{ hana_backup_path }}"
            state:                         directory
            group:                         sapsys
            owner:                         "{{ db_sid | lower }}adm"
            mode:                          0755

        - name:                            "4.0.3 - SAP HANA SCALE OUT-HSR: Configure global.ini"
          block:
            - name:                        "Prepare global.ini for domain name resolution."
              become_user:                 root
              become:                      true
              community.general.ini_file:
                path:                      "/hana/shared/{{ db_sid | upper }}/global/hdb/custom/config/global.ini"
                section:                   communication
                state:                     present
                mode:                      0644
                option:                    listeninterface
                value:                     .internal

            - name:                        "Prepare global.ini for installation in non-shared environment"
              become_user:                 root
              become:                      true
              community.general.ini_file:
                path:                      "/hana/shared/{{ db_sid | upper }}/global/hdb/custom/config/global.ini"
                section:                   persistence
                state:                     present
                mode:                      0644
                option:                    basepath_shared
                value:                     "{{ _rsp_basepath_shared }}"
              tags:
               - skip_ansible_lint
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



