Skip to content

Commit

Permalink
Remove obsolete files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimmo Forss committed Sep 23, 2024
1 parent 5b02bd5 commit 8538d39
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 1,038 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
---
- name: ORACLE ASM - Gather Logical volumes created in 1.5.1
# /*---------------------------------------------------------------------------8
# | |
# | Oracle ASM mounts |
# | |
# +------------------------------------4--------------------------------------*/

- name: "2.6.3 ORACLE ASM - Mounts: Gather Logical volumes created in 1.5.1"
ansible.builtin.include_vars: disks_config_asm.yml

- name: ORACLE ASM - Set the NFS Server name list
- name: "2.6.3 ORACLE ASM - Mounts: Set the NFS Server name list"
ansible.builtin.set_fact:
nfs_server_temp: "{{ nfs_server_temp | default([]) + [item] }}"
with_items:
- "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') }}"
- "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') }}"

- name: ORACLE ASM - Set the NFS Server name
- name: "2.6.3 ORACLE ASM - Mounts: Set the NFS Server name"
ansible.builtin.set_fact:
nfs_server: "{{ nfs_server_temp | first }}"
when: NFS_provider == "NONE"

- name: ORACLE ASM - Check if LVs exists.
- name: "2.6.3 ORACLE ASM - Mounts: Check if LVs exists."
ansible.builtin.stat:
path: "{{ dev_path_from_lv_item }}"
loop: "{{ logical_volumes }}"
register: oravgstat

- name: "ORACLE ASM - Mount SAP Filesystems on Database for installation when using Shared File systems"
- name: "2.6.3 ORACLE ASM - Mounts: Mount SAP Filesystems on Database for installation when using Shared File systems"
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
Expand All @@ -33,16 +39,16 @@
when:
- NFS_provider != "NONE"

- name: ORACLE ASM - Print oravgstat
- name: "2.6.3 ORACLE ASM - Mounts: Print oravgstat"
ansible.builtin.debug:
var: oravgstat
verbosity: 2

- name: ORACLE ASM - Gather existing LVs
- name: "2.6.3 ORACLE ASM - Mounts: Gather existing LVs"
ansible.builtin.set_fact:
lvexists: "{{ oravgstat.results | selectattr('stat.exists', 'equalto', true) | map(attribute='item.lv') | list }}"

- name: ORACLE ASM - Print lvexists
- name: "2.6.3 ORACLE ASM - Mounts: Print lvexists"
ansible.builtin.debug:
var: lvexists
verbosity: 2
Expand All @@ -51,7 +57,7 @@

# Same as 2.6.2-oracle-mounts.yaml from here on.

- name: "ORACLE ASM : Create sap_deployment_automation folder"
- name: "2.6.3 ORACLE ASM - Mounts: Create sap_deployment_automation folder"
become: true
become_user: root
ansible.builtin.file:
Expand All @@ -61,12 +67,12 @@
owner: oracle
group: oinstall

- name: "ORACLE ASM: Make orasid:dba as owners for Oracle directories - check flag file"
- name: "2.6.3 ORACLE ASM - Mounts: Make orasid:dba as owners for Oracle directories - check flag file"
ansible.builtin.stat:
path: /etc/sap_deployment_automation/filepermission.txt
register: oracle_permissions_set

- name: "ORACLE ASM : Make oracle:oinstall as owners"
- name: "2.6.3 ORACLE ASM - Mounts: Make oracle:oinstall as owners"
become: true
become_user: root
ansible.builtin.file:
Expand All @@ -77,7 +83,7 @@
when:
- not oracle_permissions_set.stat.exists

- name: "ORACLE ASM : Create filepermission.txt"
- name: "2.6.3 ORACLE ASM - Mounts: Create filepermission.txt"
become: true
become_user: root
ansible.builtin.file:
Expand All @@ -86,7 +92,7 @@
state: touch

# Mount Filesystems
- name: "ORACLE ASM : Mount SAP File systems on Database for installation"
- name: "2.6.3 ORACLE ASM - Mounts: Mount SAP File systems on Database for installation"
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
Expand All @@ -104,7 +110,7 @@


# Mount install file system on Observer node.
- name: "ORACLE ASM : Mount SAP : Mount Install folder when using AFS"
- name: "2.6.3 ORACLE ASM - Mounts: Mount Install folder when using AFS"
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
Expand All @@ -121,7 +127,7 @@
- use_AFS

# Debug for testing
- name: "ORACLE ASM : Print oracle filesystems"
- name: "2.6.3 ORACLE ASM - Mounts: Print oracle filesystems"
ansible.builtin.debug:
var: oracle_filesystem_mounts
verbosity: 2
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
---
# /*---------------------------------------------------------------------------8
# | |
# | Prerequisites for Oracle ASM |
# | |
# +------------------------------------4--------------------------------------*/

- name: Gather Logical volumes created in roles-os/1.5.1.1
ansible.builtin.include_vars: disks_config_asm.yml
- name: "2.6.3 ORACLE ASM - Prerequisites: Gather Logical volumes created in roles-os/1.5.1.1"
ansible.builtin.include_vars: disks_config_asm.yml

- name: Set the NFS Server name list
- name: "2.6.3 ORACLE ASM - Prerequisites: Set the NFS Server name list"
ansible.builtin.set_fact:
nfs_server_temp: "{{ nfs_server_temp | default([]) + [item] }}"
with_items:
- "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_SCS') }}"
- "{{ query('inventory_hostnames', '{{ sap_sid | upper }}_DB') }}"

- name: Set the NFS Server name
- name: "2.6.3 ORACLE ASM - Prerequisites: Set the NFS Server name"
ansible.builtin.set_fact:
nfs_server: "{{ nfs_server_temp | first }}"
when: NFS_provider == "NONE"

- name: Check if LVs exists.
- name: "2.6.3 ORACLE ASM - Prerequisites: Check if LVs exists."
ansible.builtin.stat:
path: "{{ dev_path_from_lv_item }}"
loop: "{{ logical_volumes }}"
register: oravgstat
path: "{{ dev_path_from_lv_item }}"
loop: "{{ logical_volumes }}"
register: oravgstat

- name: Print oravgstat
- name: "2.6.3 ORACLE ASM - Prerequisites: Print oravgstat"
ansible.builtin.debug:
var: oravgstat
verbosity: 2

- name: Gather existing LVs
- name: "2.6.3 ORACLE ASM - Prerequisites: Gather existing LVs"
ansible.builtin.set_fact:
lvexists: "{{ oravgstat.results | selectattr('stat.exists', 'equalto', true) | map(attribute='item.lv') | list }}"

- name: Print lvexists
- name: "2.6.3 ORACLE ASM - Prerequisites: Print lvexists"
ansible.builtin.debug:
var: lvexists
verbosity: 2

- name: "SAP Mounts: - Create SAP Directories (sapmnt)"
- name: "2.6.3 ORACLE ASM - Prerequisites: Create SAP Directories (sapmnt)"
ansible.builtin.file:
owner: root
group: sapsys
Expand All @@ -45,13 +50,13 @@
when:
- node_tier == "oracle-asm"

- name: "Mount SAP Filesystems on Database for usrsap and oracle"
- name: "2.6.3 ORACLE ASM - Prerequisites: Mount SAP Filesystems on Database for usrsap and oracle"
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: "{{ item.type }}"
opts: defaults
state: mounted
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: "{{ item.type }}"
opts: defaults
state: mounted
loop:
- { type: 'xfs', src: '/dev/vg_sap/lv_usrsap', path: '/usr/sap' }
- { type: 'xfs', src: '/dev/vg_oracle/lv_oracle', path: '/oracle' }
Expand All @@ -60,20 +65,20 @@


# Mount Filesystems when AFS is not used.
- name: "Mount SAP Filesystems on Database for installation when using NFS Cluster"
- name: "2.6.3 ORACLE ASM - Prerequisites: Mount SAP Filesystems on Database for installation when using NFS Cluster"
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: "{{ item.type }}"
opts: defaults
state: mounted
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: "{{ item.type }}"
opts: defaults
state: mounted
loop:
- { type: 'nfs4', src: '{{ nfs_server }}:{{ target_media_location }}', path: '{{ target_media_location }}' }
- { type: 'nfs4', src: '{{ nfs_server }}:/sapmnt/{{ db_sid | upper }}', path: '/sapmnt/{{ db_sid | upper }}' }
when:
- NFS_provider == "NONE"

- name: "ORACLE: Create sap_deployment_automation folder"
- name: "2.6.3 ORACLE ASM - Prerequisites: Create sap_deployment_automation folder"
become: true
become_user: root
ansible.builtin.file:
Expand Down
4 changes: 2 additions & 2 deletions deploy/ansible/roles-sap-os/2.6-sap-mounts/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
when:
- "'scs' in supported_tiers"
- usr_sap_install_mountpoint is undefined
- not is_executed_by_acss or (is_executed_by_acss and single_server)
- not is_executed_by_acss or ( is_executed_by_acss and ( ansible_play_hosts_all | length == 1 ) )

- name: "1.5 Disk setup - Check if installation root directory exists"
ansible.builtin.stat:
Expand Down Expand Up @@ -268,7 +268,7 @@
- node_tier != 'scs'
- "'scs' not in supported_tiers"
- usr_sap_install_mountpoint is not defined
- not is_executed_by_acss or (is_executed_by_acss and single_server)
- not is_executed_by_acss or (is_executed_by_acss and (is_executed_by_acss and ( ansible_play_hosts_all | length == 1) ))

# Mount File systems for SCS server in Multi-SID installations
- name: "2.6 SAP Mounts: - Mount local sapmnt (scs) for oracle shared home installation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@
changed_when: false
register: hana_system_started

- name: "5.5.4.1 HANA Pacemaker configuration - Wait 5 minutes for SAP system to start"
- name: "5.5.4.1 HANA Pacemaker configuration - Wait {{ hana_wait_for_start_in_sec }} seconds for SAP system to start"
ansible.builtin.pause:
seconds: 300
seconds: "{{ hana_wait_for_start_in_sec }}"

- name: "5.5.4.1 HANA Pacemaker configuration - Ensure maintenance mode is disabled"
ansible.builtin.command: crm configure property maintenance-mode=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@
# or cluster_group_moved.stderr is not search('is already active on')
# )

- name: "5.6 SCS/ERS Validation: Wait 300 seconds for the StartService {{ sap_sid | upper }} to finish"
- name: "5.6 SCS/ERS Validation: Wait {{ scs_wait_for_start_in_sec }} seconds for the StartService {{ sap_sid | upper }} to finish"
ansible.builtin.debug:
msg: "Wait for 300 seconds for the StartService {{ sap_sid | upper }} to finish"
msg: "Wait for {{ scs_wait_for_start_in_sec }} seconds for the StartService {{ sap_sid | upper }} to finish"
when:
- ansible_hostname == primary_instance_name
- cluster_group_location.stdout_lines != primary_instance_name
- scs_running_on is not defined

- name: "5.6 SCS/ERS Validation: Wait 300 seconds for the StartService {{ sap_sid | upper }} to finish"
- name: "5.6 SCS/ERS Validation: Wait {{ scs_wait_for_start_in_sec }} seconds for the StartService {{ sap_sid | upper }} to finish"
ansible.builtin.wait_for:
timeout: 300
timeout: "{{ scs_wait_for_start_in_sec }}"
when:
- ansible_hostname == primary_instance_name
- cluster_group_location.stdout_lines != primary_instance_name
Expand Down

0 comments on commit 8538d39

Please sign in to comment.