pcg.alpaca_operator.alpaca_system module – Manage ALPACA Operator systems via REST API
Note
This module is part of the pcg.alpaca_operator collection (version 2.2.0).
You might already have this collection installed if you are using the ansible package.
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 pcg.alpaca_operator.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: pcg.alpaca_operator.alpaca_system.
New in pcg.alpaca_operator 1.0.0
Synopsis
This module allows you to create, update or delete ALPACA Operator systems using the REST API. In addition to general system properties, it supports assigning agents and variables. Communication is handled using token-based authentication.
Requirements
The below requirements are needed on the host that executes this module.
ALPACA Operator >= 5.6.0
Parameters
Parameter |
Comments |
|---|---|
A list of agents to assign to the system. Each entry must include: - `name` (string): The agent’s name. |
|
Name of the agent. |
|
Connection details for accessing the ALPACA Operator API. |
|
Hostname of the ALPACA Operator server. Default: |
|
Password for authentication against the ALPACA Operator API. |
|
Port of the ALPACA Operator API. Default: |
|
Protocol to use. Can be Choices:
|
|
Validate SSL certificates. Choices:
|
|
Username for authentication against the ALPACA Operator API. |
|
Disable automatic system health checks. Choices:
|
|
Description of the system. |
|
ID of the group (used if |
|
Name of the group to which the system should belong. |
|
Custom numeric field between 0 and 59. Can be used for arbitrary logic in your setup. Choices:
|
|
Unique name (hostname) of the system. |
|
Optional new name for the system. If the system specified in |
|
Connection details for accessing the ALPACA Operator API. |
|
Client for RFC connection. |
|
Hostname or IP address of the RFC target system. |
|
Instance number of the RFC connection. Choices:
|
|
Logon group (used with |
|
Password for the RFC connection.
IMPORTANT: If you specify the password in your playbook, the module will ALWAYS report a change (changed=true) on every run, even if nothing has changed. This happens because the API does not return the current password for security reasons, making it impossible to compare the desired password with the current one. The module cannot determine if the password needs to be updated or not.
To maintain idempotency, comment out or remove the |
|
SAProuter string used to establish the RFC connection. |
|
SAP system ID (SID), consisting of 3 uppercase alphanumeric characters (A-Z, 0-9). |
|
Enable or disable SNC. Choices:
|
|
Type of RFC connection. Can be Choices:
|
|
Username for RFC connection. |
|
Desired state of the system. Choices:
|
|
A list of variables to assign to the system. Each entry must include: - `name` (string): The name of the variable. - `value` (string): The value to assign to the variable. |
|
Name of variable. |
|
Value of variable. |
|
Controls how variables are handled when updating the system.
Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. Note: If |
Examples
- name: Ensure system exists
pcg.alpaca_operator.alpaca_system:
name: system01
description: My Test System
magic_number: 42
checks_disabled: false
group_name: test-group
rfc_connection:
type: instance
host: test-host
instance_number: 30
sid: ABC
logon_group: my-logon-group
username: rfc_myUser
password: rfc_myPasswd
client: 123
sap_router_string: rfc_SAPRouter
snc_enabled: false
agents:
- name: localhost
- name: testjan01-agent
variables:
- name: "<BKP_DATA_CLEANUP_INT>"
value: "19"
- name: "<BKP_DATA_CLEANUP_INT2>"
value: "this is a string"
- name: "<BKP_DATA_DEST2>"
value: "11"
state: present
api_connection:
host: localhost
port: 8443
protocol: https
username: secret
password: secret
tls_verify: false
- name: Ensure system is absent
pcg.alpaca_operator.alpaca_system:
name: system01
state: absent
api_connection:
host: localhost
port: 8443
protocol: https
username: secret
password: secret
tls_verify: false
- name: Rename an existing system
pcg.alpaca_operator.alpaca_system:
name: system01
new_name: system_renamed
api_connection:
host: localhost
port: 8443
protocol: https
username: secret
password: secret
tls_verify: false
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether any change was made Returned: always |
|
Status message Returned: always |
|
System details Returned: when state is present |