automatics.automatics.automatics_system module – Manages systems in automatics

Note

This module is part of the automatics.automatics collection (version version_filler).

To install it, use: ansible-galaxy collection install automatics.automatics.

To use it in a playbook, specify: automatics.automatics.automatics_system.

Synopsis

  • Manages systems in automatics

Parameters

Parameter

Comments

auth_token

string / required

automatics authentication bearer token returned from automatics_login module

execution_timeout

integer

Execution timeout in minutes for the triggered executions in automatics

hostname

string / required

Hostname of the automatics server.

include_db_for_sap_systems

boolean

whether database components should be included when applying the given state to a system of type ‘sap’

Choices:

  • false ← (default)

  • true

include_sap_for_hana_systems

boolean

whether sap-systems should be included when applying the given state to a system of type ‘sap-hana-db’

Choices:

  • false ← (default)

  • true

include_wdp_for_hana_systems

boolean

whether webdispatcher should be included when applying the given state to a system of type ‘sap-hana-db’

Choices:

  • false ← (default)

  • true

include_wdp_for_sap_systems

boolean

whether webdispatcher should be included when applying the given state to a system of type ‘sap’

Choices:

  • false ← (default)

  • true

state

string / required

The desired state for the provided systems that automatics will ensure

Choices:

  • "started"

  • "stopped"

  • "restarted"

system

list / elements=dictionary

systems in automatics to select for the operation (name matching)

dict containing ‘type’, ‘name’ and ‘client’ that must match the automatics system-type, name and client

for systems of type ‘sap’ and ‘sap-hana-db’, the ‘name’ equals the SAP SID

for systems of type ‘sap-wdp’, the ‘name’ equals <sapsid>@<node>

client

string

the client to which the system is assigned

can either be the client id or client name

Default: "default client (id=1)"

name

string / required

must match the automatics system name

type

string / required

must match the automatics system-type

Choices:

  • "sap"

  • "sap-hana-db"

  • "sap-wdp"

system_id

list / elements=integer

systems in automatics to select for the operation (id matching)

must match the automatics system-id

validate_certs

boolean

Verify the https certificate of the automatics server.

Choices:

  • false

  • true ← (default)

Notes

Note

  • either ‘system’ or ‘system_id’ is required

Examples

- name: Start single SAP-system with automatics
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      type: sap
      name: AUT
    state: started

- name: Stop multiple SAP-systems with automatics
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      - type: sap
        name: AUT
      - type: sap
        name: AUS
      - type: sap-hana-db
        name: HDB
    state: stopped

- name: Restart multiple SAP-systems in different clients with automatics
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      - type: sap
        name: AUT
        client: client_1
      - type: sap-hana-db
        name: DB1
        client: client_1
      - type: sap
        name: AUT
        client: client_2
      - type: sap-hana-db
        name: DB1
        client: 21
    state: restarted

- name: Restart multiple SAP-systems including database and webdispatcher dependencies
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      - type: sap
        name: AUT
      - type: sap
        name: AUS
    include_db_for_sap_systems: true
    include_wdp_for_sap_systems: true
    state: restarted

- name: Restart multiple SAP-HANA-systems including SAP-system and webdispatcher dependencies
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      - type: sap-hana-db
        name: DB1
      - type: sap-hana-db
        name: DB2
    include_sap_for_hana_systems: true
    include_wdp_for_hana_systems: true
    state: restarted

- name: Stopping multiple systems of different type including all dependencies
  automatics.automatics.automatics_system:
    hostname: automatics.example.org
    auth_token: aW4iLCJlbWFpbCI6ImFkbWluIiw...
    validate_certs: false
    system:
      - type: sap
        name: AUT
      - type: sap
        name: AUS
      - type: sap-hana-db
        name: DB1
      - type: sap-hana-db
        name: DB2
      - type: sap-wdp
        name: WDP
    include_db_for_sap_systems: true
    include_wdp_for_sap_systems: true
    include_sap_for_hana_systems: true
    include_wdp_for_hana_systems: true
    state: stopped

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

info

list / elements=dictionary

Information on all triggered automatics executions

Returned: always

Sample: [{"comment": null, "date_ended": 1676039330, "date_started": 1676039108, "parameters": {"ClientID": {"default": false, "label": "Client ID", "origin": "automatics", "type": "client", "value": "1"}, "ExecutionDelay": {"default": true, "label": "Execution Delay", "origin": "automatics", "type": "timespan", "value": "0"}, "SystemID": {"default": false, "details": {"name": "RD1"}, "label": "System ID", "origin": "automatics", "type": "system", "value": "1035"}, "WorkflowTimeout": {"default": true, "label": "Workflow Timeout", "origin": "automatics", "type": "timespan", "value": "21600"}}, "runtime": 221.4, "status": "succeeded", "user": "ansible", "workflow": {"description": "Start one or more SAP systems including all components", "id": "251af40c-c3f9-4749-a23c-fb79ffd3a5de", "name": "SAP System Start", "origin": "automatics"}}]

Authors

  • Manuel Sanz