serverscom / serverscom.sc_api / 0.1.0 / module / sc_baremetal_servers_info Information about existing dedicated servers | "added in version" 1.1.0 of serverscom.sc_api" Authors: George Shuklin (@amarao) preview | supported by communityserverscom.sc_api.sc_baremetal_servers_info (0.1.0) — module
Install with ansible-galaxy collection install serverscom.sc_api:==0.1.0
collections: - name: serverscom.sc_api version: 0.1.0
Retrive list of all existing dedicated baremetal servers.
- name: Get all servers sc_baremetal_servers_info: token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MzgxMjEsInR5cGUiOiJVc2VyIiwiYWNjZXNzX2dyYW50X2lkIjoyNjgwNywiZXhwIjoyMjI2OTk3NjMwfQ.rO4nGXNgXggjNmMJBLXovOh1coNrDWl4dGrGFupYXJE' id: '0m592Zmn' register: srv_list
- name: Report server information debug: msg: '{{ item }}' loop: '{{ srv_list.baremetal_servers }}'
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
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