salt.roster.cloud

Use the cloud cache on the master to derive IPv4 addresses based on minion ID.

This roster requires that the minion in question was created using at least the 2015.5.0 version of Salt Cloud. Starting with the 2015.5.0 release, Salt Cloud maintains an index of minions that it creates and deletes. This index tracks the provider and profile configuration used to provision the minion, including authentication information. So long as this configuration remains current, it can be used by Salt SSH to log into any minion in the index.

To connect as a user other than root, modify the cloud configuration file usually located at /etc/salt/cloud. For example, add the following:

ssh_username: my_user
sudo: True
salt.roster.cloud.extract_ipv4(roster_order, ipv4)

Extract the preferred IP address from the ipv4 grain

salt.roster.cloud.targets(tgt, tgt_type='glob', **kwargs)

Return the targets from the flat yaml file, checks opts for location but defaults to /etc/salt/roster