noderings.cloud.game_server module – Order and manage NodeRings game servers
Note
This module is part of the noderings.cloud collection (version 0.2.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 noderings.cloud.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: noderings.cloud.game_server.
New in noderings.cloud 0.1.0
Synopsis
Orders a game server (for example Minecraft or Valheim) from a hosting provider on the NodeRings marketplace, keeps its name, startup variables, container image and power state as configured, and deletes it.
Choose what to order with
plan_id, or let the module pick an offer fromplan_code,countryandcity. List the games a plan can run with noderings.cloud.game_server_game_info.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
Accept the game’s end-user licence agreement. Required when the game has one. Choices:
|
|
When Choices:
|
|
How many times a request is retried after rate limiting (HTTP 429) or a gateway error (HTTP 502, 503 or 504). Orders (virtual machines, game servers, snapshots) are never retried blindly. Default: |
|
Timeout in seconds for a single HTTP request. Default: |
|
A NodeRings service-account token. Create one in the NodeRings console under If not set, the value of the |
|
Base URL of the NodeRings API. If not set, the value of the Default: |
|
City of the offer. Required with |
|
Country of the offer. Required with |
|
Container image the game runs in. Must be one of the game’s images (see noderings.cloud.game_server_info). |
|
Startup variables, such as the game version or player limit. Only the keys listed are managed. Default: |
|
Game to install, by name (for example Required when the server is ordered. |
|
ID of an existing server. |
|
Name of the server, 1 to 64 characters. Used to find an existing server, so keep it unique. Required unless |
|
Organization to act in, sent as the Defaults to the organization the token belongs to. If not set, the value of the |
|
Game-server plan to order. Mutually exclusive with |
|
Only consider offers from this hosting provider, given by its provider ID, its storefront slug (for example A name that more than one provider uses fails; give the provider ID or storefront slug then. Without a provider the module picks the best offer from any provider (see Mutually exclusive with |
|
Only consider offers from this provider. |
|
Region to place the server in. Defaults to the region of the node it lands on. |
|
How to choose between offers. Choices:
|
|
Choices:
|
|
Whether to validate the API’s TLS certificate. Choices:
|
|
Game version to install. Only used when the server is ordered; later, set the version variable in |
|
Wait until the operation has finished before returning. Choices:
|
|
How long to wait, in seconds, when Default: |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying the target. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode. |
Notes
Note
All modules in this collection belong to the
noderings.cloud.noderingsaction group, so connection options can be set once withmodule_defaults.
Examples
- name: A Minecraft server in Frankfurt
noderings.cloud.game_server:
name: survival
plan_code: SC-GS-4C-8G-50
country: Germany
city: Frankfurt
billing_type: subscription
game: Minecraft
accept_eula: true
environment:
MAX_PLAYERS: "20"
state: running
register: mc
- name: Tell players where to connect
ansible.builtin.debug:
msg: "{{ mc.game_server.primary_ip }}:{{ mc.game_server.primary_port }}"
- name: Stop it
noderings.cloud.game_server:
name: survival
state: offline
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The server. Empty after Returned: always Sample: |