avantra.core.server module – manage Avantra servers
Note
This module is part of the avantra.core collection (version 23.0.3).
To install it, use: ansible-galaxy collection install avantra.core
.
To use it in a playbook, specify: avantra.core.server
.
New in avantra.core 23.0.0
Synopsis
You can create, delete or update servers in Avantra.
Start, stop, restart servers using Avantra functionality.
A server is always identified with its
server_name
andcustomer_name
.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
The application type for this monitored system. More information can be found here https://docs.avantra.com/product-guide/latest/avantra/glossary/a.html#application-type. |
|
The password or API key for the selected Avantra user. We highly recommend to use Ansible Vaults to protect you sensitive content. |
|
A valid URL pointing to an Avantra UI. For example |
|
Valid Avantra user principal. |
|
Add credentials to this server. See the examples for more information on how to set the different credential types. The key for the child objects is one of the credential keys found in Avantra. |
|
Define custom attributes for the monitored system as key value pairs. See https://docs.avantra.com/product-guide/latest/avantra/custom-attributes.html for an explanation. Default: |
|
The customer name to identify the server. |
|
The description for the server. |
|
Configures the DNS domain for this server. This has to a domain registered in Avantra. |
|
If If Choices:
|
|
Configures how the server can be reached over the network. Can be an IP address or a host name. If |
|
A list of valid host aliases. |
|
Should the monitoring be turned on or off. This applies only to For Choices:
|
|
The notes for the server. |
|
Allows you to configure the behaviour of the run_state changes. Default: |
|
Ignore the current state and just execute the start/stop. Choices:
|
|
Defines a name for the action to be executed. |
|
Avantra checks for known running applications (ie. applications with monitoring turned on) and cancels a stop if some are found. With Choices:
|
|
If If If Choices:
|
|
Defines the wait time in seconds after a server start before executing next steps. Default: |
|
If If Note: if Choices:
|
|
The name to identify the server. |
|
Configures the system role. If By default the following roles are available: |
|
Configures the timezone for the system. |
|
The token used to authenticate during the task execution. A token can be fetched with the avantra.core.login module. If token is defined avantra_api_user and avantra_api_password are not necessary. |
Notes
Note
This module does NOT support
check_mode
.We highly recommend to use Ansible Vaults to protect your sensitive content.
See Also
See also
- Avantra Documentation
The official Avantra documentation.
Examples
- name: Create Server if it doesn't exist
avantra.core.server:
exists: present
server_name: "agent_5432"
customer_name: "Avantra 1"
fqdn_or_ip_address: "host5432"
system_role: "Test"
host_aliases:
- host-5432
credentials:
avantra.basic:
cred_type: basic
username: <username>
password: <password>
avantra.abc:
cred_type: ssh
username: <username>
password: <password>
hostname: home
port: 4321
config:
ssh_option1: <value>
# Start an existing server
- name: Start Server
avantra.core.server:
server_name: "agent_54323"
customer_name: "Avantra 1"
run_state: started
run_options:
always_execute: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
If Returned: present |