serverscom.sc_api.sc_baremetal_servers_info (0.1.0) — module

Information about existing dedicated servers

| "added in version" 1.1.0 of serverscom.sc_api"

Authors: George Shuklin (@amarao)

preview | supported by community

Install collection

Install with ansible-galaxy collection install serverscom.sc_api:==0.1.0


Add to requirements.yml

  collections:
    - name: serverscom.sc_api
      version: 0.1.0

Description

Retrive list of all existing dedicated baremetal servers.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all servers
  sc_baremetal_servers_info:
    token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MzgxMjEsInR5cGUiOiJVc2VyIiwiYWNjZXNzX2dyYW50X2lkIjoyNjgwNywiZXhwIjoyMjI2OTk3NjMwfQ.rO4nGXNgXggjNmMJBLXovOh1coNrDWl4dGrGFupYXJE'
    id: '0m592Zmn'
  register: srv_list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Report server information
  debug:
    msg: '{{ item }}'
  loop: '{{ srv_list.baremetal_servers }}'

Inputs

    
token:
    description:
    - Token to use.
    - You can create token for you account in https://portal.servers.com in Profile ->
      Public API section.
    required: true
    type: str

endpoint:
    default: https://api.servers.com/v1
    description:
    - Endpoint to use to connect to API.
    - Do not change until specifically asked to do otherwise.
    type: str

Outputs

baremetal_servers:
  contains:
    id:
      description:
      - ID of the server
      returned: on success
      type: str
    title:
      description:
      - title of server (used as hostname).
      returned: on success
      type: str
    type:
      description:
      - always 'dedicated_server'
      returned: on success
      type: str
  description:
  - List of servers
  returned: on success
  type: complex