serverscom.sc_api.sc_cloud_computing_regions_info (0.1.0) — module

Information about available cloud computing regions.

| "added in version" 1.0.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

Module searches for computing cloud regions.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather information for avaliable regions
  serverscom.sc_api.sc_cloud_computing_regions_info:
    token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MzgxMjEsInR5cGUiOiJVc2VyIiwiYWNjZXNzX2dyYW50X2lkIjoyNjgwNywiZXhwIjoyMjI2OTk3NjMwfQ.rO4nGXNgXggjNmMJBLXovOh1coNrDWl4dGrGFupYXJE'
  register: sc_info
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print all regions
  debug: var=item.name
  with_items: '{{ sc_info.regions }}'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Search for region
  serverscom.sc_api.sc_cloud_computing_regions_info:
    search_pattern: 'WAS'

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

search_pattern:
    description:
    - Search for substring in regions names and codes.
    - Case insensitive.
    type: str

Outputs

api_url:
  description: URL for the failed request
  returned: on failure
  type: str
regions:
  contains:
    code:
      description:
      - Code for the location.
      type: str
    id:
      description:
      - ID of the location.
      type: str
    name:
      description:
      - Name of the location.
      type: str
  description: List of cloud compute regions
  returned: on success
  type: complex
status_code:
  description: Status code for the request
  returned: always
  type: int