sap.sap_operations.service (1.25.0) — module

Manage SAP HANA services

| "added in version" 1.0.0 of sap.sap_operations"

Authors: Ondra Machacek (@machacekondra)

Install collection

Install with ansible-galaxy collection install sap.sap_operations:==1.25.0


Add to requirements.yml

  collections:
    - name: sap.sap_operations
      version: 1.25.0

Description

Start and stop SAP HANA services


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Start the service and wait for service to be available using unix socket
  sap.sap_operations.service:
    instance_number: "0"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Start the service and wait for service to be available using username/password
  sap.sap_operations.service:
    username: "npladm"
    password: "secret123!"
    hostname: "sap.system.example.com"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Start the service and do not wait for service to be up and running
  sap.sap_operations.service:
    username: "npladm"
    password: "secret123!"
    hostname: "sap.system.example.com"
    instance_number: "0"
    state: started
    wait: false
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Stop the service and wait for termination
  sap.sap_operations.service:
    username: "npladm"
    password: "secret123!"
    hostname: "sap.system.example.com"
    state: stopped
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Stop the service and do not wait
  sap.sap_operations.service:
    username: "npladm"
    password: "secret123!"
    hostname: "sap.system.example.com"
    state: stopped
    wait: false

Inputs

    
wait:
    default: true
    description:
    - Wait for the operation to complete before returning.
    - If set to C(true), module will wait for service to start/ or stop.
    - If set to C(false), module will schedule the right operation and return immediately.
    type: bool

state:
    choices:
    - started
    - stopped
    default: started
    description:
    - State of the managed service.
    type: str

secure:
    choices:
    - strict
    - insecure
    - none
    default: strict
    description:
    - I(secure) specify if secure communication should be enforced.
    - By default system CA store is used. User can pass custom CA by I(ca_file) parameter.
    type: str

ca_file:
    description:
    - I(ca_file) use CA certificate to secure the communication. By default system CA
      store is used.
    type: str

hostname:
    description:
    - I(hostname) of the SAP system
    type: str

password:
    description:
    - I(password) of the SAP system
    type: str

username:
    description:
    - I(username) of the SAP system
    type: str

wait_timeout:
    default: 600
    description:
    - Wait timeout for the operation to complete before returning.
    type: int

instance_number:
    description:
    - I(instance_number) is the instance number to be managed.
    required: true
    type: str

Outputs

instances:
  contains:
    dispstatus:
      description: status of the instance
      sample: SAPControl-GREEN
      type: str
    features:
      description: features of the instance
      sample: MESSAGESERVER|ENQUE
      type: str
    hostname:
      description: hostname where SAP instance is running
      sample: vhcalnplcs
      type: str
    httpPort:
      description: http port of the instance
      sample: 50113
      type: str
    httpsPort:
      description: https port of the instance
      sample: 50114
      type: str
    instanceNr:
      description: instance number
      sample: 1
      type: str
    startPriority:
      description: start priority of the instance
      sample: 1
      type: str
  description: Instance parameters
  returned: always
  type: dict