deploy/ansible/roles-sap-os/2.6-sap-mounts/tasks/2.6.1-anf-mounts.yaml [425:575]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name:                                "ANF Mount: install:Get the Server name list"
  ansible.builtin.set_fact:
    first_server_temp:                 "{{ first_server_temp | default([]) + [item] }}"
  with_items:
    - "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') }}"
    - "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') }}"

- name:                                "ANF Mount: sap_trans"
  ansible.builtin.include_tasks:       2.6.1.1-anf-mount.yaml
  loop:
    - {
      'type':              'trans',
      'temppath':          'saptrans',
      'mount':             '{{ sap_trans }}',
      'opts':              'rw,hard,rsize=65536,wsize=65536,sec=sys,vers=4.1,tcp',
      'path':              '/usr/sap/trans',
      'permissions':       '0775',
      'set_chattr_on_dir': false,
      'target_nodes':      ['app','pas', 'ers', 'scs'],
      'create_temp_folders': false
    }
  vars:
    primary_host:                     "{{ first_server_temp | first }}"
  when:
    - tier == 'sapos'
    - sap_trans is defined

- name:                                "ANF Mount: install"
  ansible.builtin.include_tasks:       2.6.1.1-anf-mount.yaml
  loop:
    - {
      'type':              'install',
      'temppath':          'sapinstall',
      'folder':            '{{ bom_base_name }}',
      'mount':             '{{ usr_sap_install_mountpoint }}',
      'opts':              'rw,hard,rsize=65536,wsize=65536,sec=sys,vers=4.1,tcp',
      'path':              '/usr/sap/install',
      'permissions':       '0775',
      'set_chattr_on_dir': false,
      'target_nodes':      ['all'],
      'create_temp_folders': true
    }
  vars:
    primary_host:                     "{{ first_server_temp | first }}"
  when:
    - tier == 'sapos'
    - usr_sap_install_mountpoint is defined

# /*---------------------------------------------------------------------------8
# |                                                                            |
# |                   Prepare the OS for running SAP HANA on                   |
# |                   Azure NetApp Files with NFS                              |
# |                                                                            |
# +------------------------------------4--------------------------------------*/
- name:                                "ANF Mount: Prepare the OS for running
                                        SAP HANA on Azure NetApp with NFS"
  block:
    - name:                             "ANF Mount: Create configuration file for the NetApp configuration settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/91-NetApp-HANA.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp configuration high availability"
        block: |
          net.core.rmem_max = 16777216
          net.core.wmem_max = 16777216
          net.core.rmem_default = 16777216
          net.core.wmem_default = 16777216
          net.core.optmem_max = 16777216
          net.ipv4.tcp_rmem = 4096 131072 16777216
          net.ipv4.tcp_wmem = 4096 16384 16777216
          net.core.netdev_max_backlog = 300000
          net.ipv4.tcp_slow_start_after_idle=0
          net.ipv4.tcp_no_metrics_save = 1
          net.ipv4.tcp_moderate_rcvbuf = 1
          net.ipv4.tcp_window_scaling = 1
          net.ipv4.tcp_timestamps = 0
          net.ipv4.tcp_sack = 1
      when:
        - node_tier == 'hana'

    - name:                            "Backward Compatibility - Check required Database HA variables"
      ansible.builtin.set_fact:
        database_high_availability:    "{{ db_high_availability | default(false) }}"
      when:
        - db_high_availability is defined
        - database_high_availability is not defined

    - name:                             "ANF Mount: Create configuration file for the NetApp configuration settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/91-NetApp-HANA.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp configuration standalone"
        block: |
          net.core.rmem_max = 16777216
          net.core.wmem_max = 16777216
          net.core.rmem_default = 16777216
          net.core.wmem_default = 16777216
          net.core.optmem_max = 16777216
          net.ipv4.tcp_rmem = 4096 131072 16777216
          net.ipv4.tcp_wmem = 4096 16384 16777216
          net.core.netdev_max_backlog = 300000
          net.ipv4.tcp_slow_start_after_idle=0
          net.ipv4.tcp_no_metrics_save = 1
          net.ipv4.tcp_moderate_rcvbuf = 1
          net.ipv4.tcp_window_scaling = 1
          net.ipv4.tcp_timestamps = 1
          net.ipv4.tcp_sack = 1
      when:
        - node_tier == 'hana'
        - not database_high_availability

    - name:                             "ANF Mount: Create configuration file
                                          with additional optimization settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/ms-az.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp optimizations"
        block: |
          net.ipv6.conf.all.disable_ipv6 = 1
          net.ipv4.tcp_max_syn_backlog = 16348
          net.ipv4.conf.all.rp_filter = 0
          sunrpc.tcp_slot_table_entries = 128
          vm.swappiness=10
      when:
        - node_tier == 'hana'

    # /*-----------------------------------------------------------------------8
    # | Configure the maximum number of (TCP) RPC requests that can be in      |
    # | flight at a time (to the NFS server) to be 128                         |
    # |--------------------------------4--------------------------------------*/
    - name:                             "ANF Mount: configure the maximum number
                                          of RPC requests for the NFS session"
      ansible.builtin.blockinfile:
        path:                            /etc/modprobe.d/sunrpc.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} NFS RPC Connections"
        block:                           "options sunrpc tcp_max_slot_table_entries=128"
      when:
        - node_tier == 'hana'

  when:
    - tier == 'sapos'
    - node_tier == 'hana'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy/ansible/roles-sap-os/2.6-sap-mounts/tasks/2.6.8-anf-mounts-simplemount.yaml [357:507]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name:                                "ANF Mount: install:Get the Server name list"
  ansible.builtin.set_fact:
    first_server_temp:                 "{{ first_server_temp | default([]) + [item] }}"
  with_items:
    - "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') }}"
    - "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') }}"

- name:                                "ANF Mount: sap_trans"
  ansible.builtin.include_tasks:       2.6.1.1-anf-mount.yaml
  loop:
    - {
      'type':              'trans',
      'temppath':          'saptrans',
      'mount':             '{{ sap_trans }}',
      'opts':              'rw,hard,rsize=65536,wsize=65536,sec=sys,vers=4.1,tcp',
      'path':              '/usr/sap/trans',
      'permissions':       '0775',
      'set_chattr_on_dir': false,
      'target_nodes':      ['app','pas', 'ers', 'scs'],
      'create_temp_folders': false
    }
  vars:
    primary_host:                     "{{ first_server_temp | first }}"
  when:
    - tier == 'sapos'
    - sap_trans is defined

- name:                                "ANF Mount: install"
  ansible.builtin.include_tasks:       2.6.1.1-anf-mount.yaml
  loop:
    - {
      'type':              'install',
      'temppath':          'sapinstall',
      'folder':            '{{ bom_base_name }}',
      'mount':             '{{ usr_sap_install_mountpoint }}',
      'opts':              'rw,hard,rsize=65536,wsize=65536,sec=sys,vers=4.1,tcp',
      'path':              '/usr/sap/install',
      'permissions':       '0775',
      'set_chattr_on_dir': false,
      'target_nodes':      ['all'],
      'create_temp_folders': true
    }
  vars:
    primary_host:                     "{{ first_server_temp | first }}"
  when:
    - tier == 'sapos'
    - usr_sap_install_mountpoint is defined

# /*---------------------------------------------------------------------------8
# |                                                                            |
# |                   Prepare the OS for running SAP HANA on                   |
# |                   Azure NetApp Files with NFS                              |
# |                                                                            |
# +------------------------------------4--------------------------------------*/
- name:                                "ANF Mount: Prepare the OS for running
                                        SAP HANA on Azure NetApp with NFS"
  block:
    - name:                             "ANF Mount: Create configuration file for the NetApp configuration settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/91-NetApp-HANA.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp configuration high availability"
        block: |
          net.core.rmem_max = 16777216
          net.core.wmem_max = 16777216
          net.core.rmem_default = 16777216
          net.core.wmem_default = 16777216
          net.core.optmem_max = 16777216
          net.ipv4.tcp_rmem = 4096 131072 16777216
          net.ipv4.tcp_wmem = 4096 16384 16777216
          net.core.netdev_max_backlog = 300000
          net.ipv4.tcp_slow_start_after_idle=0
          net.ipv4.tcp_no_metrics_save = 1
          net.ipv4.tcp_moderate_rcvbuf = 1
          net.ipv4.tcp_window_scaling = 1
          net.ipv4.tcp_timestamps = 0
          net.ipv4.tcp_sack = 1
      when:
        - node_tier == 'hana'

    - name:                            "Backward Compatibility - Check required Database HA variables"
      ansible.builtin.set_fact:
        database_high_availability:    "{{ db_high_availability | default(false) }}"
      when:
        - db_high_availability is defined
        - database_high_availability is not defined

    - name:                             "ANF Mount: Create configuration file for the NetApp configuration settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/91-NetApp-HANA.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp configuration standalone"
        block: |
          net.core.rmem_max = 16777216
          net.core.wmem_max = 16777216
          net.core.rmem_default = 16777216
          net.core.wmem_default = 16777216
          net.core.optmem_max = 16777216
          net.ipv4.tcp_rmem = 4096 131072 16777216
          net.ipv4.tcp_wmem = 4096 16384 16777216
          net.core.netdev_max_backlog = 300000
          net.ipv4.tcp_slow_start_after_idle=0
          net.ipv4.tcp_no_metrics_save = 1
          net.ipv4.tcp_moderate_rcvbuf = 1
          net.ipv4.tcp_window_scaling = 1
          net.ipv4.tcp_timestamps = 1
          net.ipv4.tcp_sack = 1
      when:
        - node_tier == 'hana'
        - not database_high_availability

    - name:                             "ANF Mount: Create configuration file
                                          with additional optimization settings"
      ansible.builtin.blockinfile:
        path:                            /etc/sysctl.d/ms-az.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} HANA NetApp optimizations"
        block: |
          net.ipv6.conf.all.disable_ipv6 = 1
          net.ipv4.tcp_max_syn_backlog = 16348
          net.ipv4.conf.all.rp_filter = 0
          sunrpc.tcp_slot_table_entries = 128
          vm.swappiness=10
      when:
        - node_tier == 'hana'

    # /*-----------------------------------------------------------------------8
    # | Configure the maximum number of (TCP) RPC requests that can be in      |
    # | flight at a time (to the NFS server) to be 128                         |
    # |--------------------------------4--------------------------------------*/
    - name:                             "ANF Mount: configure the maximum number
                                          of RPC requests for the NFS session"
      ansible.builtin.blockinfile:
        path:                            /etc/modprobe.d/sunrpc.conf
        backup:                          true
        create:                          true
        mode:                            0644
        marker:                          "# {mark} NFS RPC Connections"
        block:                           "options sunrpc tcp_max_slot_table_entries=128"
      when:
        - node_tier == 'hana'

  when:
    - tier == 'sapos'
    - node_tier == 'hana'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



