ngine_io.vultr.vultr_server_info – Gather information about the Vultr servers available.

From Get docs
Ansible/docs/2.10/collections/ngine io/vultr/vultr server info module


ngine_io.vultr.vultr_server_info – Gather information about the Vultr servers available.

Note

This plugin is part of the ngine_io.vultr collection (version 1.0.0).

To install it use: ansible-galaxy collection install ngine_io.vultr.

To use it in a playbook, specify: ngine_io.vultr.vultr_server_info.


New in version 0.1.0: of ngine_io.vultr


Synopsis

  • Gather information about servers available.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.6

Parameters

Parameter Choices/Defaults Comments

api_account

string

Default:

"default"

Name of the ini section in the vultr.ini file.

The ENV variable VULTR_API_ACCOUNT is used as default, when defined.

api_endpoint

string

URL to API endpint (without trailing slash).

The ENV variable VULTR_API_ENDPOINT is used as default, when defined.

Fallback value is https://api.vultr.com if not specified.

api_key

string

API key of the Vultr API.

The ENV variable VULTR_API_KEY is used as default, when defined.

api_retries

integer

Amount of retries in case of the Vultr API retuns an HTTP 503 code.

The ENV variable VULTR_API_RETRIES is used as default, when defined.

Fallback value is 5 retries if not specified.

api_retry_max_delay

integer

Retry backoff delay in seconds is exponential up to this max. value, in seconds.

The ENV variable VULTR_API_RETRY_MAX_DELAY is used as default, when defined.

Fallback value is 12 seconds.

api_timeout

integer

HTTP timeout to Vultr API.

The ENV variable VULTR_API_TIMEOUT is used as default, when defined.

Fallback value is 60 seconds if not specified.

validate_certs

boolean

  • no
  • yes

Validate SSL certs of the Vultr API.



Notes

Note


Examples

- name: Gather Vultr servers information
  ngine_io.vultr.vultr_server_info:
  register: result

- name: Print the gathered information
  debug:
    var: result.vultr_server_info

Return Values

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

Key Returned Description

vultr_api

complex

success

Response from Vultr API with a few additions/modification


api_account

string

success

Account used in the ini file to select the key


Sample:

default

api_endpoint

string

success

Endpoint used for the API requests


Sample:

api_retries

integer

success

Amount of max retries for the API requests


Sample:

5

api_retry_max_delay

integer

success

Exponential backoff delay in seconds between retries up to this max delay value.


Sample:

12

api_timeout

integer

success

Timeout used for the API requests


Sample:

60

vultr_server_info

complex

success

Response from Vultr API


allowed_bandwidth_gb

integer

success

Allowed bandwidth to use in GB


Sample:

1000

auto_backup_enabled

boolean

success

Whether automatic backups are enabled


cost_per_month

float

success

Cost per month for the server


Sample:

5.0

current_bandwidth_gb

integer

success

Current bandwidth used for the server


date_created

string

success

Date when the server was created


Sample:

2017-08-26 12:47:48

default_password

string

success

Password to login as root into the server


Sample:

p3EWYJm$qDWYaFr

disk

string

success

Information about the disk


Sample:

Virtual 25 GB

firewall_group

string

success and available

Firewall group the server is assigned to


Sample:

CentOS 6 x64

id

string

success

ID of the server


Sample:

10194376

internal_ip

string

success

Internal IP


kvm_url

string

success

URL to the VNC


Sample:

name

string

success

Name (label) of the server


Sample:

ansible-test-vm

os

string

success

Operating system used for the server


Sample:

CentOS 6 x64

pending_charges

float

success

Pending charges


Sample:

0.01

plan

string

success

Plan used for the server


Sample:

1024 MB RAM,25 GB SSD,1.00 TB BW

power_status

string

success

Power status of the server


Sample:

running

ram

string

success

Information about the RAM size


Sample:

1024 MB

region

string

success

Region the server was deployed into


Sample:

Amsterdam

server_state

string

success

State about the server


Sample:

ok

status

string

success

Status about the deployment of the server


Sample:

active

tag

string

success

TBD


v4_gateway

string

success

IPv4 gateway


Sample:

45.32.232.1

v4_main_ip

string

success

Main IPv4


Sample:

45.32.233.154

v4_netmask

string

success

Netmask IPv4


Sample:

255.255.254.0

v6_main_ip

string

success

Main IPv6


v6_network

string

success

Network IPv6


v6_network_size

string

success

Network size IPv6


v6_networks

list / elements=string

success

Networks IPv6


vcpu_count

integer

success

Virtual CPU count


Sample:

1




Authors

  • Yanis Guenane (@Spredzy)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ngine_io/vultr/vultr_server_info_module.html