community.sap_libs.sapcontrol (1.2.0) — module

Manages SAPCONTROL

| "added in version" 1.1.0 of community.sap_libs"

Authors: Rainer Leber (@RainerLeber), Robert Kraemer (@rkpobe)

Install collection

Install with ansible-galaxy collection install community.sap_libs:==1.2.0


Add to requirements.yml

  collections:
    - name: community.sap_libs
      version: 1.2.0

Description

Provides support for sapstartsrv formaly known as sapcontrol

A complete information of all functions and the parameters can be found here U(https://www.sap.com/documents/2016/09/0a40e60d-8b7c-0010-82c7-eda71af511fa.html)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: GetProcessList with sysnr
  community.sap_libs.sapcontrol:
    hostname: 192.168.8.15
    sysnr: "01"
    function: GetProcessList
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: GetProcessList with custom port
  community.sap_libs.sapcontrol:
    hostname: 192.168.8.15
    function: GetProcessList
    port: 50113
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: ParameterValue
  community.sap_libs.sapcontrol:
    hostname: 192.168.8.15
    sysnr: "01"
    username: hdbadm
    password: test1234#
    function: ParameterValue
    parameter: ztta

Inputs

    
port:
    description:
    - The port number of the sapstartsrv.
    required: false
    type: int

force:
    default: false
    description:
    - Forces the execution of the function C(Stop).
    required: false
    type: bool

sysnr:
    description:
    - The system number of the instance.
    required: false
    type: str

function:
    choices:
    - Start
    - Stop
    - RestartInstance
    - Shutdown
    - InstanceStart
    - GetProcessList
    - Bootstrap
    - InstanceStop
    - StopService
    - StartService
    - RestartService
    - ParameterValue
    - GetStartProfile
    - GetTraceFile
    - GetAlertTree
    - GetAlerts
    - GetEnvironment
    - GetVersionInfo
    - GetQueueStatistic
    - GetInstanceProperties
    - ListDeveloperTraces
    - ReadDeveloperTrace
    - ListLogFiles
    - ReadLogFile
    - AnalyseLogFiles
    - ConfigureLogFileList
    - GetLogFileList
    - CreateSnapshot
    - ReadSnapshot
    - ListSnapshots
    - DeleteSnapshots
    - GetAccessPointList
    - GetProcessParameter
    - SetProcessParameter
    - SetProcessParameter2
    - CheckParameter
    - OSExecute
    - SendSignal
    - GetCallstack
    - GetSystemInstanceList
    - StartSystem
    - StopSystem
    - RestartSystem
    - GetSystemUpdateList
    - UpdateSystem
    - UpdateSCSInstance
    - CheckUpdateSystem
    - AccessCheck
    - GetSecNetworkId
    - GetNetworkId
    - RequestLogonFile
    - UpdateSystemPKI
    - UpdateInstancePSE
    - StorePSE
    - DeletePSE
    - CheckPSE
    - CreatePSECredential
    - HACheckConfig
    - HACheckFailoverConfig
    - HAGetFailoverConfig
    - HAFailoverToNode
    - HASetMaintenanceMode
    - HACheckMaintenanceMode
    - ABAPReadSyslog
    - ABAPReadRawSyslog
    - ABAPGetWPTable
    - ABAPGetComponentList
    - ABAPCheckRFCDestinations
    - ABAPGetSystemWPTable
    - J2EEControlProcess
    - J2EEControlCluster
    - J2EEEnableDbgSession
    - J2EEDisableDbgSession
    - J2EEGetProcessList
    - J2EEGetProcessList2
    - J2EEGetThreadList
    - J2EEGetThreadList2
    - J2EEGetThreadCallStack
    - J2EEGetThreadTaskStack
    - J2EEGetSessionList
    - J2EEGetCacheStatistic
    - J2EEGetCacheStatistic2
    - J2EEGetApplicationAliasList
    - J2EEGetComponentList
    - J2EEControlComponents
    - J2EEGetWebSessionList
    - J2EEGetWebSessionList2
    - J2EEGetEJBSessionList
    - J2EEGetRemoteObjectList
    - J2EEGetVMGCHistory
    - J2EEGetVMGCHistory2
    - J2EEGetVMHeapInfo
    - J2EEGetClusterMsgList
    - J2EEGetSharedTableInfo
    - ICMGetThreadList
    - ICMGetConnectionList
    - ICMGetProxyConnectionList
    - ICMGetCacheEntries
    - WebDispGetServerList
    - WebDispGetGroupList
    - WebDispGetVirtHostList
    - WebDispGetUrlPrefixList
    - EnqGetStatistic
    - EnqGetLockTable
    - EnqRemoveUserLocks
    - StartWait
    - StopWait
    - WaitforStarted
    - WaitforStopped
    - RestartServiceWait
    - WaitforServiceStarted
    - CheckHostAgent
    description:
    - The function to execute.
    required: true
    type: str

hostname:
    default: localhost
    description:
    - The hostname to connect to the sapstartsrv.
    - Could be an IP address, FQDN or hostname.
    required: false
    type: str

password:
    description:
    - The password to connect to the sapstartsrv.
    required: false
    type: str

username:
    description:
    - The username to connect to the sapstartsrv.
    required: false
    type: str

parameter:
    description:
    - The parameter to pass to the function.
    required: false
    type: str

Outputs

msg:
  description: Success-message with functionname.
  returned: always
  sample: 'Succesful execution of: GetProcessList'
  type: str
out:
  description: The full output of the required function.
  elements: dict
  returned: always
  sample:
  - item:
    - description: MessageServer
      dispstatus: SAPControl-GREEN
      elapsedtime: '412:30:50'
      name: msg_server
      pid: 70643
      starttime: 2022 03 13 15:22:42
      textstatus: Running
    - description: EnqueueServer
      dispstatus: SAPControl-GREEN
      elapsedtime: '412:30:50'
      name: enserver
      pid: 70644
      starttime: 2022 03 13 15:22:42
      textstatus: Running
    - description: Gateway
      dispstatus: SAPControl-GREEN
      elapsedtime: '412:30:50'
      name: gwrd
      pid: 70645
      starttime: 2022 03 13 15:22:42
      textstatus: Running
  type: list