Skip to content

Commit

Permalink
sap_swpm: legacy ascs ha comment out all
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Jun 20, 2024
1 parent 3ca7766 commit 1380d0b
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions roles/sap_swpm/tasks/pre_install/create_os_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
# Legacy code, appears to serve no function but does cause ASCS HA <sid>adm to not default to C Shell
# As test without this code installed ASCS HA successfully, the call to this file has been commented out for removal at later date

- name: SAP SWPM Pre Install - Remove existing {{ sap_swpm_sid | lower + 'adm' }}
block:

# Reason for noqa: We currently do not determine if there are processes to be killed
- name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower + 'adm' }}
ansible.builtin.shell: |
killall -u {{ sap_swpm_sid | lower }}adm
ignore_errors: yes
changed_when: true

- name: SAP SWPM Pre Install - Remove user {{ sap_swpm_sid | lower + 'adm' }}
ansible.builtin.user:
name: '{{ sap_swpm_sid | lower }}adm'
state: absent
remove: yes
force: yes

- name: SAP SWPM Pre Install - Remove group {{ sap_swpm_sid | lower + 'adm' }}
ansible.builtin.group:
name: '{{ sap_swpm_sid | lower }}adm'
state: absent

- name: SAP SWPM Pre Install - Create sapsys group
ansible.builtin.group:
name: 'sapsys'
gid: '{{ sap_swpm_sapsys_gid }}'
state: present

- name: SAP SWPM Pre Install - Create {{ sap_swpm_sid | lower + 'adm' }}
ansible.builtin.user:
name: '{{ sap_swpm_sid | lower }}adm'
comment: "SAP User - {{ sap_swpm_sid }}"
uid: '{{ sap_swpm_sidadm_uid }}'
group: '{{ sap_swpm_sapsys_gid }}'

- name: SAP SWPM Pre Install - Create a /usr/sap/{{ sap_swpm_sid }}
ansible.builtin.file:
path: /usr/sap/{{ sap_swpm_sid }}
state: directory
owner: '{{ sap_swpm_sid | lower }}adm'
group: sapsys
recurse: yes
mode: '0755'

# - name: SAP SWPM Pre Install - Purge parameters so it will not populate inifile.params to prevent SWPM from crashing
# ansible.builtin.set_facts:
# sap_swpm_sapadm_uid: ""
# sap_swpm_sapsys_gid: ""
# sap_swpm_sidadm_uid: ""
# - name: SAP SWPM Pre Install - Remove existing {{ sap_swpm_sid | lower + 'adm' }}
# block:

# # Reason for noqa: We currently do not determine if there are processes to be killed
# - name: SAP SWPM Pre Install - Kill all processes under {{ sap_swpm_sid | lower + 'adm' }}
# ansible.builtin.shell: |
# killall -u {{ sap_swpm_sid | lower }}adm
# ignore_errors: yes
# changed_when: true

# - name: SAP SWPM Pre Install - Remove user {{ sap_swpm_sid | lower + 'adm' }}
# ansible.builtin.user:
# name: '{{ sap_swpm_sid | lower }}adm'
# state: absent
# remove: yes
# force: yes

# - name: SAP SWPM Pre Install - Remove group {{ sap_swpm_sid | lower + 'adm' }}
# ansible.builtin.group:
# name: '{{ sap_swpm_sid | lower }}adm'
# state: absent

# - name: SAP SWPM Pre Install - Create sapsys group
# ansible.builtin.group:
# name: 'sapsys'
# gid: '{{ sap_swpm_sapsys_gid }}'
# state: present

# - name: SAP SWPM Pre Install - Create {{ sap_swpm_sid | lower + 'adm' }}
# ansible.builtin.user:
# name: '{{ sap_swpm_sid | lower }}adm'
# comment: "SAP User - {{ sap_swpm_sid }}"
# uid: '{{ sap_swpm_sidadm_uid }}'
# group: '{{ sap_swpm_sapsys_gid }}'

# - name: SAP SWPM Pre Install - Create a /usr/sap/{{ sap_swpm_sid }}
# ansible.builtin.file:
# path: /usr/sap/{{ sap_swpm_sid }}
# state: directory
# owner: '{{ sap_swpm_sid | lower }}adm'
# group: sapsys
# recurse: yes
# mode: '0755'

# # - name: SAP SWPM Pre Install - Purge parameters so it will not populate inifile.params to prevent SWPM from crashing
# # ansible.builtin.set_facts:
# # sap_swpm_sapadm_uid: ""
# # sap_swpm_sapsys_gid: ""
# # sap_swpm_sidadm_uid: ""

0 comments on commit 1380d0b

Please sign in to comment.