salt.cloud.clouds.saltify

Saltify Module

The Saltify module is designed to install Salt on a remote machine, virtual or bare metal, using SSH. This module is useful for provisioning machines which are already installed, but not Salted.

Changed in version 2018.3.0: The wake_on_lan capability, and actions destroy, reboot, and query functions were added.

Use of this module requires some configuration in cloud profile and provider files as described in the Getting Started with Saltify documentation.

salt.cloud.clouds.saltify.avail_images(call=None)

This function returns a list of images available for this cloud provider.

salt-cloud --list-images saltify

returns a list of available profiles.

New in version 2018.3.0.

salt.cloud.clouds.saltify.avail_locations(call=None)

This function returns a list of locations available.

salt-cloud --list-locations my-cloud-provider

[ saltify will always return an empty dictionary ]

salt.cloud.clouds.saltify.avail_sizes(call=None)

This function returns a list of sizes available for this cloud provider.

salt-cloud --list-sizes saltify

[ saltify always returns an empty dictionary ]

salt.cloud.clouds.saltify.create(vm_)

if configuration parameter deploy is True,

Provision a single machine, adding its keys to the salt master

else,

Test ssh connections to the machine

Configuration parameters:

  • deploy: (see above)

  • provider: name of entry in salt/cloud.providers.d/??? file

  • ssh_host: IP address or DNS name of the new machine

  • ssh_username: name used to log in to the new machine

  • ssh_password: password to log in (unless key_filename is used)

  • key_filename: (optional) SSH private key for passwordless login

  • ssh_port: (default=22) TCP port for SSH connection

  • wake_on_lan_mac: (optional) hardware (MAC) address for wake on lan

  • wol_sender_node: (optional) salt minion to send wake on lan command

  • wol_boot_wait: (default=30) seconds to delay while client boots

  • force_minion_config: (optional) replace the minion configuration files on the new machine

See also Miscellaneous Salt Cloud Options and Getting Started with Saltify

CLI Example:

salt-cloud -p mymachine my_new_id
salt.cloud.clouds.saltify.destroy(name, call=None)

Destroy a node.

New in version 2018.3.0.

Disconnect a minion from the master, and remove its keys.

Optionally, (if remove_config_on_destroy is True),

disables salt-minion from running on the minion, and erases the Salt configuration files from it.

Optionally, (if shutdown_on_destroy is True),

orders the minion to halt.

CLI Example:

salt-cloud --destroy mymachine
salt.cloud.clouds.saltify.get_configured_provider()

Return the first configured instance.

salt.cloud.clouds.saltify.list_nodes(call=None)

List the nodes which have salt-cloud:driver:saltify grains.

salt-cloud -Q

returns a list of dictionaries of defined standard fields.

New in version 2018.3.0.

salt.cloud.clouds.saltify.list_nodes_full(call=None)

Lists complete information for all nodes.

salt-cloud -F

returns a list of dictionaries.

for 'saltify' minions, returns dict of grains (enhanced).

New in version 2018.3.0.

salt.cloud.clouds.saltify.list_nodes_select(call=None)

Return a list of the minions that have salt-cloud grains, with select fields.

salt.cloud.clouds.saltify.reboot(name, call=None)

Reboot a saltify minion.

New in version 2018.3.0.

name

The name of the VM to reboot.

CLI Example:

salt-cloud -a reboot vm_name
salt.cloud.clouds.saltify.show_instance(name, call=None)

List the a single node, return dict of grains.