sap.sap_operations.enq_admin_lock module – Manage enque server locks for ENSA2 SAP instances
Note
This module is part of the sap.sap_operations collection.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install sap.sap_operations
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: sap.sap_operations.enq_admin_lock
.
New in sap.sap_operations 1.29.0
Synopsis
Manage enque server locks for ENSA2 SAP instances
This module will set/release only one lock at a time (parameter n for enq_admin equals 1, see documentation)
If several locks are needed, use this module several times or in loop, see examples
If exclusive lock is set, other locks will not be created, information about existing exclusive lock will be created
Module is idempotent, new locks will not be created if this type of lock or exclusive lock already exists with the same parameters
Value ‘%u’ for parameters is not supported - because only one lock is set/released at a time, this is not handled by this module. Use ansible loops for this.
Requirements
The below requirements are needed on the host that executes this module.
only for ENSA2 instances with enq_admin tool installed
Parameters
Parameter |
Comments |
---|---|
Pattern for lock argument Default: |
|
hostname where enque process is running |
|
Lock type X - Exclusive lock (“Exclusive”) E - Exclusive non cumulative lock (“Write”) S - Shared lock (“Read”) O - Optimistic lock (“Optimistic”) if exclusive lock is set, other locks are not allowed Choices:
|
|
Pattern for lock name Default: |
|
Pattern for dialog lock owner Default: |
|
Pattern for update lock owner Default: |
|
Port where enque process is running |
|
A path to the profile file Either profile_filepath or sid, hostname and port required sid, hostname and port are required together |
|
SAP system id |
|
State of the lock (present or absent) Choices:
|
Notes
Note
This module is community supported
Module interface (parameters, output) expected to be stable but not guaranteed
Module planned to be released on Ansible Automation Hub after collecting some feedback
There is no guarantee that this module will be officially supported by Red Hat
See Also
See also
- Architecture of the Standalone Enqueue Server 2
Architecture of the Standalone Enqueue Server 2
- Parameter Reference of Standalone Enqueue Server 2
Parameter Reference of Standalone Enqueue Server 2
Examples
---
- name: Set lock
sap.sap_operations.enq_admin_lock:
pf: /usr/sap/S4H/SYS/profile/S4H_ASCS20_s4ascsa
state: present
lock_type: E
owner1: DIAG
owner2: ""
name: ANSIBLE
argument: ANSIBLE
- name: Release lock
sap.sap_operations.enq_admin_lock:
pf: /usr/sap/S4H/SYS/profile/S4H_ASCS20_s4ascsa
state: absent
lock_type: E
owner1: DIAG
owner2: ""
name: ANSIBLE
argument: ANSIBLE
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Lock information Returned: if state is present and execution was successful Sample: |