salt.cloud.clouds.vultrpy
Vultr Cloud Module using python-vultr bindings
New in version 2016.3.0.
The Vultr cloud module is used to control access to the Vultr VPS system.
Use of this module only requires the api_key
parameter.
Set up the cloud configuration at /etc/salt/cloud.providers
or /etc/salt/cloud.providers.d/vultr.conf
:
my-vultr-config: # Vultr account api key api_key: <supersecretapi_key> driver: vultr
Set up the cloud profile at /etc/salt/cloud.profiles
or /etc/salt/cloud.profiles.d/vultr.conf
:
nyc-4gb-4cpu-ubuntu-14-04: location: 1 provider: my-vultr-config image: 160 size: 95 enable_private_network: True
This driver also supports Vultr's startup script feature. You can list startup scripts in your account with
salt-cloud -f list_scripts <name of vultr provider>
That list will include the IDs of the scripts in your account. Thus, if you have a script called 'setup-networking' with an ID of 493234 you can specify that startup script in a profile like so:
nyc-2gb-1cpu-ubuntu-17-04: location: 1 provider: my-vultr-config image: 223 size: 13 startup_script_id: 493234
Similarly you can also specify a fiewall group ID using the option firewall_group_id. You can list firewall groups with
salt-cloud -f list_firewall_groups <name of vultr provider>
To specify SSH keys to be preinstalled on the server, use the ssh_key_names setting
nyc-2gb-1cpu-ubuntu-17-04: location: 1 provider: my-vultr-config image: 223 size: 13 ssh_key_names: dev1,dev2,salt-master
You can list SSH keys available on your account using
salt-cloud -f list_keypairs <name of vultr provider>
-
return available firewall groups
salt.cloud.clouds.vultrpy.avail_firewall_groups(conn=None)
-
Return available images
salt.cloud.clouds.vultrpy.avail_images(conn=None)
-
return available SSH keys
salt.cloud.clouds.vultrpy.avail_keys(conn=None)
-
return available datacenter locations
salt.cloud.clouds.vultrpy.avail_locations(conn=None)
-
return available startup scripts
salt.cloud.clouds.vultrpy.avail_scripts(conn=None)
-
Return available sizes ("plans" in VultrSpeak)
salt.cloud.clouds.vultrpy.avail_sizes(conn=None)
-
Create a single VM from a data dict
salt.cloud.clouds.vultrpy.create(vm_)
-
Remove a node from Vultr
salt.cloud.clouds.vultrpy.destroy(name)
-
Return the first configured instance
salt.cloud.clouds.vultrpy.get_configured_provider()
-
return list of firewall groups
salt.cloud.clouds.vultrpy.list_firewall_groups(conn=None, call=None)
-
return list of SSH keys
salt.cloud.clouds.vultrpy.list_keypairs(conn=None, call=None)
-
Return basic data on nodes
salt.cloud.clouds.vultrpy.list_nodes(**kwargs)
-
Return all data on nodes
salt.cloud.clouds.vultrpy.list_nodes_full(**kwargs)
-
Return a list of the VMs that are on the provider, with select fields
salt.cloud.clouds.vultrpy.list_nodes_select(conn=None, call=None)
-
return list of Startup Scripts
salt.cloud.clouds.vultrpy.list_scripts(conn=None, call=None)
-
Show the details from the provider concerning an instance
salt.cloud.clouds.vultrpy.show_instance(name, call=None)
-
return list of SSH keys
salt.cloud.clouds.vultrpy.show_keypair(kwargs=None, call=None)
-
Execute a "start" action on a VM
salt.cloud.clouds.vultrpy.start(*args, **kwargs)
-
Execute a "stop" action on a VM
salt.cloud.clouds.vultrpy.stop(*args, **kwargs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/clouds/all/salt.cloud.clouds.vultrpy.html