pcg.alpaca_operator.alpaca_group module – Manage ALPACA Operator groups 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_group.
New in pcg.alpaca_operator 1.0.0
Synopsis
This module allows you to create, rename or delete ALPACA Operator groups using the REST API.
Requirements
The below requirements are needed on the host that executes this module.
ALPACA Operator >= 5.6.0
Parameters
Parameter |
Comments |
|---|---|
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. |
|
Name of the group. |
|
Optional new name for the group. If the group specified in |
|
Desired state of the group. Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. |
Examples
- name: Ensure group exists
pcg.alpaca_operator.alpaca_group:
name: testgroup01
state: present
api_connection:
host: localhost
port: 8443
protocol: https
username: secret
password: secret
tls_verify: false
- name: Ensure group is absent
pcg.alpaca_operator.alpaca_group:
name: testgroup01
state: absent
api_connection:
host: localhost
port: 8443
protocol: https
username: secret
password: secret
tls_verify: false
- name: Rename an existing group
pcg.alpaca_operator.alpaca_group:
name: testgroup01
new_name: testgroup_renamed
state: present
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 |
|---|---|
Indicates whether any change was made to the group Returned: always Sample: |
|
Numeric ID of the group (if known or newly created) Returned: when state is present or absent and group exists Sample: |
|
Human-readable message describing the outcome Returned: always Sample: |
|
Name of the group (new or existing) Returned: always Sample: |