The DigitalOcean cloud module is used to control access to the DigitalOcean VPS system.
Use of this module requires a requires a personal_access_token
, an ssh_key_file
,
and at least one SSH key name in ssh_key_names
. More ssh_key_names
can be added
by separating each key with a comma. The personal_access_token
can be found in the
DigitalOcean web interface in the "Apps & API" section. The SSH key name can be found
under the "SSH Keys" section.
# Note: This example is for /etc/salt/cloud.providers or any file in the
# /etc/salt/cloud.providers.d/ directory.
my-digital-ocean-config:
personal_access_token: xxx
ssh_key_file: /path/to/ssh/key/file
ssh_key_names: my-key-name,my-key-name-2
driver: digitalocean
requests
Assign a floating IP
New in version 2016.3.0.
CLI Examples:
salt-cloud -f assign_floating_ip my-digitalocean-config droplet_id=1234567 floating_ip='45.55.96.47'
Return a list of the images that are on the provider
Return a dict of all available VM locations on the cloud provider with relevant data
Return a list of the image sizes that are on the provider
Create a single VM from a data dict
Create a new floating IP
New in version 2016.3.0.
CLI Examples:
salt-cloud -f create_floating_ip my-digitalocean-config region='NYC2'
salt-cloud -f create_floating_ip my-digitalocean-config droplet_id='1234567'
Upload a public key
Create a node
Delete a floating IP
New in version 2016.3.0.
CLI Examples:
salt-cloud -f delete_floating_ip my-digitalocean-config floating_ip='45.55.96.47'
Destroy a node. Will check termination protection and warn if enabled.
CLI Example:
salt-cloud --destroy mymachine
Deletes DNS records for the given hostname if the domain is managed with DO.
Return the first configured instance.
Warn if dependencies aren't met.
Return the image object to use
Return the ID of the keyname
Return the VM's location
Return the VM's size. Used by create_node().
Upload public key to cloud provider. Similar to EC2 import_keypair.
New in version 2016.11.0.
file(mandatory): public key file-name keyname(mandatory): public key name in the provider
Return a list of the floating ips that are on the provider
New in version 2016.3.0.
CLI Examples:
salt-cloud -f list_floating_ips my-digitalocean-config
Return a dict of all available VM locations on the cloud provider with relevant data
Return a list of the VMs that are on the provider
Return a list of the VMs that are on the provider
Return a list of the VMs that are on the provider, with select fields
Creates a DNS record for the given name if the domain is managed with DO.
Make a web call to DigitalOcean
Reboot a droplet in DigitalOcean.
New in version 2015.8.8.
The name of the droplet to restart.
CLI Example:
salt-cloud -a reboot droplet_name
Delete public key
Return the script deployment object
Show the details of a floating IP
New in version 2016.3.0.
CLI Examples:
salt-cloud -f show_floating_ip my-digitalocean-config floating_ip='45.55.96.47'
Show the details from DigitalOcean concerning a droplet
Show the details of an SSH keypair
Show pricing for a particular profile. This is only an estimate, based on unofficial pricing sources.
New in version 2015.8.0.
CLI Examples:
salt-cloud -f show_pricing my-digitalocean-config profile=my-profile
Start a droplet in DigitalOcean.
New in version 2015.8.8.
The name of the droplet to start.
CLI Example:
salt-cloud -a start droplet_name
Stop a droplet in DigitalOcean.
New in version 2015.8.8.
The name of the droplet to stop.
CLI Example:
salt-cloud -a stop droplet_name
Unassign a floating IP
New in version 2016.3.0.
CLI Examples:
salt-cloud -f unassign_floating_ip my-digitalocean-config floating_ip='45.55.96.47'