hcloud-server-exists

Description

Create a server with the specified name/id exists in your Hetzner hcloud account, if it doesn't exist yet.

If a server exists, nothing is done, even if the 'image' and 'server_type' are different to the deployed server.

Variables

Name Type Default Description

api_token

string --

The hcloud API token. Required

server_name

string --

The name of the cloud server to manage (for now, don't use '_', '-', or other special characters in the server name -- will be fixed later). Required

extra_wait_time

integer 0

Extra wait time after ssh is ready.

image

string ubuntu-18.04

The OS image of the server.

register_var

string _register_hcloud_server

The name of the variable to register the result of this frecklet.

server_type

string cx11

The type of server to create.

ssh_keys

list --

List of SSH key names that correspond to the SSH keys configured for your Hetzner Cloud account access.

wait_for_ssh

boolean True

Whether to wait for ssh to become available

Command-line

frecklecute --community hcloud-server-exists --help

Usage: frecklecute hcloud-server-exists [OPTIONS]

  Create a server with the specified name/id exists in your Hetzner hcloud
  account, if it doesn't exist yet.

  If a server exists, nothing is done, even if the 'image' and 'server_type'
  are different to the deployed server.

Options:
  --api-token API_TOKEN           The hcloud API token.  [required]
  --server-name SERVER_NAME       The name of the cloud server to manage (for
                                  now, don't use '_', '-', or other special
                                  characters in the server name -- will be
                                  fixed later).  [required]
  --extra-wait-time EXTRA_WAIT_TIME
                                  Extra wait time after ssh is ready.
                                  [default: 0]
  --image IMAGE                   The OS image of the server.  [default:
                                  ubuntu-18.04]
  --register-var VAR_NAME         The name of the variable to register the
                                  result of this frecklet.  [default:
                                  _register_hcloud_server]
  --server-type SERVER_TYPE       The type of server to create.  [default:
                                  cx11]
  --ssh-key SSH_KEYS              List of SSH key names that correspond to the
                                  SSH keys configured for your Hetzner Cloud
                                  account access.
  --wait-for-ssh / --no-wait-for-ssh
                                  Whether to wait for ssh to become available
  --help                          Show this message and exit.