community.general.oneandone_server – Create, destroy, start, stop, and reboot a 1&1 Host server.¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.oneandone_server
.
Synopsis¶
Create, destroy, update, start, stop, and reboot a 1&1 Host server. When the server is created it can optionally wait for it to be ‘running’ before returning.
Requirements¶
The below requirements are needed on the host that executes this module.
1and1
python >= 2.6
Parameters¶
Examples¶
- name: Create three servers and enumerate their names
community.general.oneandone_server:
auth_token: oneandone_private_api_key
hostname: node%02d
fixed_instance_size: XL
datacenter: US
appliance: C5A349786169F140BCBC335675014C08
auto_increment: true
count: 3
- name: Create three servers, passing in an ssh_key
community.general.oneandone_server:
auth_token: oneandone_private_api_key
hostname: node%02d
vcore: 2
cores_per_processor: 4
ram: 8.0
hdds:
- size: 50
is_main: false
datacenter: ES
appliance: C5A349786169F140BCBC335675014C08
count: 3
wait: yes
wait_timeout: 600
wait_interval: 10
ssh_key: SSH_PUBLIC_KEY
- name: Removing server
community.general.oneandone_server:
auth_token: oneandone_private_api_key
state: absent
server: 'node01'
- name: Starting server
community.general.oneandone_server:
auth_token: oneandone_private_api_key
state: running
server: 'node01'
- name: Stopping server
community.general.oneandone_server:
auth_token: oneandone_private_api_key
state: stopped
server: 'node01'
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
servers
list
/ elements=string
|
always |
Information about each server that was processed
Sample:
[{"hostname": "my-server", "id": "server-id"}]
|
Authors¶
Amel Ajdinovic (@aajdinov)
Ethan Devenport (@edevenport)