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.
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.
This function returns a list of locations available.
salt-cloud --list-locations my-cloud-provider
[ saltify will always return an empty dictionary ]
This function returns a list of sizes available for this cloud provider.
salt-cloud --list-sizes saltify
[ saltify always returns an empty dictionary ]
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
Destroy a node.
New in version 2018.3.0.
Disconnect a minion from the master, and remove its keys.
remove_config_on_destroy
is True
),disables salt-minion from running on the minion, and erases the Salt configuration files from it.
shutdown_on_destroy
is True
),orders the minion to halt.
CLI Example:
salt-cloud --destroy mymachine
Return the first configured instance.
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.
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.
Return a list of the minions that have salt-cloud grains, with select fields.
Reboot a saltify minion.
New in version 2018.3.0.
The name of the VM to reboot.
CLI Example:
salt-cloud -a reboot vm_name
List the a single node, return dict of grains.