stephrobert.scaleway.instance_server_info module – Gather information about Scaleway Instance servers
Note
This module is part of the stephrobert.scaleway collection (version 0.7.0).
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 stephrobert.scaleway.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: stephrobert.scaleway.instance_server_info.
New in stephrobert.scaleway 0.1.0
Synopsis
Get the details of a specified Instance.
List all Instances in a specified Availability Zone, e.g. `fr-par-1`.
Requirements
The below requirements are needed on the host that executes this module.
scaleway >= 2.9.0
Parameters
Parameter |
Comments |
|---|---|
Scaleway API access key. |
|
Allow the API endpoint to be reached without verifying its TLS certificate. Falls back to the Scaleway configuration file, then to Choices:
|
|
Seconds allowed for a single API call, connection and read. Without a limit a silent connection would hang the module forever: the Scaleway SDK issues its requests with no timeout at all. This bounds a single call, not a whole wait. Modules that can wait for a state bound the overall wait separately. Default: |
|
URL of the Scaleway API endpoint. Point it at a local emulator to exercise a playbook without credentials. Falls back to the Scaleway configuration file, then to |
|
List Instances of this commercial type. |
|
Path to the Scaleway configuration file. |
|
Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”). |
|
Define the order of the returned servers. Choices:
|
|
List only Instances of this Organization ID. |
|
Default Organization ID used when an operation does not name one. |
|
List Instances by private_ip. (IP address) Deprecated by the Scaleway API contract. |
|
List Instances in this Private Network. |
|
List Instances from the given Private Networks (use commas to separate them). |
|
List Instances associated with the given private NIC MAC address. |
|
Name of the profile to read in the Scaleway configuration file. |
|
List only Instances of this Project ID. |
|
Default Project ID used when an operation does not name one. |
|
Scaleway API secret key. |
|
UUID of the Instance you want to get. |
|
List Instances from these server ids (use commas to separate them). |
|
List Instances in this state. Choices:
|
|
List Instances with these exact tags (to filter with several tags, use commas to separate them). |
|
Value of the User-Agent header sent to the API. |
|
List Instances by IP (both private_ip and public_ip are supported). (IP address) |
|
List Instances that are not attached to a public IP. Choices:
|
|
The zone you want to target Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
This module only reads, so check mode changes nothing about how it runs. |
|
Support: none |
This module changes nothing, so it has no difference to report. |
Notes
Note
Every option can be set from its environment variable, respectively
SCW_PROFILE,SCW_CONFIG_PATH,SCW_ACCESS_KEY,SCW_SECRET_KEY,SCW_API_URL,SCW_DEFAULT_ORGANIZATION_IDandSCW_DEFAULT_PROJECT_ID.Module options take precedence over environment variables, which take precedence over the configuration file.
Examples
# This module only reads: it never changes anything, and check mode
# is native.
#
# `server_id` decides which of the two reads runs: given, the
# module returns that one resource; omitted, it lists them all,
# walking every page rather than returning the first one in silence.
- name: Get an Instance
stephrobert.scaleway.instance_server_info:
zone: fr-par-1
server_id: 11111111-2222-3333-4444-555555555555
register: result
- name: List all Instances
stephrobert.scaleway.instance_server_info:
zone: fr-par-1
register: result
- name: Filter Scaleway Instance servers by tags
stephrobert.scaleway.instance_server_info:
zone: fr-par-1
tags:
- production
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Get the details of a specified Instance. Returned: when server_id is provided |
|
A base64 encoded string containing the admin password encrypted with the public key pointed to by admin_password_encryption_ssh_key_id. This value is reset when admin_password_encryption_ssh_key_id is set to an empty string. Returned: when the API returns it |
|
UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS. The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated. Returned: when the API returns it |
|
List of allowed actions on the Instance. Returned: when the API returns it |
|
Instance architecture. Returned: when the API returns it |
|
Instance boot type. Returned: when the API returns it |
|
Instance commercial type (eg. GP1-M). Returned: when the API returns it |
|
Instance creation date. (RFC 3339 format) Returned: when the API returns it |
|
Public DNS of the server. Returned: when the API returns it |
|
True if a dynamic IPv4 is required. Returned: when the API returns it |
|
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
True if the Instance type has reached end of service. Returned: when the API returns it |
|
List of attached filesystems. Returned: when the API returns it |
|
Instance host name. Returned: when the API returns it |
|
Instance unique ID. Returned: when the API returns it |
|
Information about the Instance image. Returned: when the API returns it |
|
Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Instance location. Returned: when the API returns it |
|
The server’s MAC address. Returned: when the API returns it |
|
Instance planned maintenance. Returned: when the API returns it |
|
Instance modification date. (RFC 3339 format) Returned: when the API returns it |
|
Instance name. Returned: when the API returns it |
|
Instance Organization ID. Returned: when the API returns it |
|
Instance placement group. Returned: when the API returns it |
|
Private IP address of the Instance (deprecated and always `null` when `routed_ip_enabled` is `True`). Returned: when the API returns it |
|
Instance private NICs. Returned: when the API returns it |
|
Instance Project ID. Returned: when the API returns it |
|
Defines whether the Instance protection option is activated. Returned: when the API returns it |
|
Information about the public IP (deprecated in favor of `public_ips`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Information about all the public IPs attached to the server. Returned: when the API returns it |
|
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated. Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Instance security group. Returned: when the API returns it |
|
Instance state. Returned: when the API returns it |
|
Detailed information about the Instance state. Returned: when the API returns it |
|
Tags associated with the Instance. Returned: when the API returns it |
|
Instance volumes. Returned: when the API returns it |
|
Zone in which the Instance is located. Returned: when the API returns it |
|
List all Instances in a specified Availability Zone, e.g. `fr-par-1`. Returned: when server_id is omitted |
|
A base64 encoded string containing the admin password encrypted with the public key pointed to by admin_password_encryption_ssh_key_id. This value is reset when admin_password_encryption_ssh_key_id is set to an empty string. Returned: when the API returns it |
|
UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS. The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated. Returned: when the API returns it |
|
List of allowed actions on the Instance. Returned: when the API returns it |
|
Instance architecture. Returned: when the API returns it |
|
Instance boot type. Returned: when the API returns it |
|
Instance commercial type (eg. GP1-M). Returned: when the API returns it |
|
Instance creation date. (RFC 3339 format) Returned: when the API returns it |
|
Public DNS of the server. Returned: when the API returns it |
|
True if a dynamic IPv4 is required. Returned: when the API returns it |
|
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
True if the Instance type has reached end of service. Returned: when the API returns it |
|
List of attached filesystems. Returned: when the API returns it |
|
Instance host name. Returned: when the API returns it |
|
Instance unique ID. Returned: when the API returns it |
|
Information about the Instance image. Returned: when the API returns it |
|
Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Instance location. Returned: when the API returns it |
|
The server’s MAC address. Returned: when the API returns it |
|
Instance planned maintenance. Returned: when the API returns it |
|
Instance modification date. (RFC 3339 format) Returned: when the API returns it |
|
Instance name. Returned: when the API returns it |
|
Instance Organization ID. Returned: when the API returns it |
|
Instance placement group. Returned: when the API returns it |
|
Private IP address of the Instance (deprecated and always `null` when `routed_ip_enabled` is `True`). Returned: when the API returns it |
|
Instance private NICs. Returned: when the API returns it |
|
Instance Project ID. Returned: when the API returns it |
|
Defines whether the Instance protection option is activated. Returned: when the API returns it |
|
Information about the public IP (deprecated in favor of `public_ips`). Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Information about all the public IPs attached to the server. Returned: when the API returns it |
|
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated. Deprecated by the Scaleway API contract. Returned: when the API returns it |
|
Instance security group. Returned: when the API returns it |
|
Instance state. Returned: when the API returns it |
|
Detailed information about the Instance state. Returned: when the API returns it |
|
Tags associated with the Instance. Returned: when the API returns it |
|
Instance volumes. Returned: when the API returns it |
|
Zone in which the Instance is located. Returned: when the API returns it |