noderings.cloud.marketplace_addon_info module – List add-ons sold on the NodeRings marketplace

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.marketplace_addon_info.

New in noderings.cloud 0.1.0

Synopsis

  • Lists add-ons such as backups and additional IP addresses, with their prices.

  • With virtual_machine, lists the add-ons the VM’s hosting provider sells for that VM.

  • One of virtual_machine or provider_id is required.

Requirements

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

  • python >= 3.9

Parameters

Parameter

Comments

addon_type

string

Only add-ons of this type.

Choices:

  • "backup"

  • "additional_ip"

  • "snapshot"

api_retries

integer

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: 5

api_timeout

integer

Timeout in seconds for a single HTTP request.

Default: 60

api_token

aliases: token

string

A NodeRings service-account token.

Create one in the NodeRings console under Organization > Service accounts.

If not set, the value of the NODERINGS_TOKEN, NODERINGS_API_TOKEN or NR_API_TOKEN environment variable is used.

api_url

string

Base URL of the NodeRings API.

If not set, the value of the NODERINGS_API_URL environment variable is used.

Default: "https://api.noderings.com"

billing_type

string

Only add-ons with this billing type.

Choices:

  • "usage"

  • "subscription"

  • "free"

code

string

Only add-ons with this code, for example DAILY-BACKUP.

organization_id

string

Organization to act in, sent as the X-Organization-ID header.

Defaults to the organization the token belongs to.

If not set, the value of the NODERINGS_ORGANIZATION_ID or NR_ORGANIZATION_ID environment variable is used.

provider_id

string

Only add-ons from this provider.

validate_certs

boolean

Whether to validate the API’s TLS certificate.

Choices:

  • false

  • true ← (default)

virtual_machine

aliases: vm

string

Hostname or ID of a VM. Only add-ons for that VM.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying the target.

diff_mode

Support: none

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.noderings action group, so connection options can be set once with module_defaults.

Examples

- name: Backup options for a VM
  noderings.cloud.marketplace_addon_info:
    vm: db-1
    addon_type: backup
  register: backups

Return Values

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

Key

Description

addons

list / elements=dictionary

The add-ons.

Returned: always

Sample: [{"addon_type": "backup", "code": "DAILY-BACKUP", "id": "1f2e3d4c-0000-0000-0000-000000000000", "name": "Daily backup", "prices": [{"billing_period": "month", "currency": "USD", "pricing_model": "usage_based", "unit_amount": "0.000041", "unit_name": "per GB-hour"}]}]

Authors

  • Shaygun (@shaygun)