22.16.2. salt.modules.aliases

Manage the information in the aliases file

salt.modules.aliases.get_target(alias)

Return the target associated with an alias

CLI Example:

salt '*' aliases.get_target alias
salt.modules.aliases.has_target(alias, target)

Return true if the alias/target is set

CLI Example:

salt '*' aliases.has_target alias target
salt.modules.aliases.list_aliases()

Return the aliases found in the aliases file in this format:

{'alias': 'target'}

CLI Example:

salt '*' aliases.list_aliases
salt.modules.aliases.rm_alias(alias)

Remove an entry from the aliases file

CLI Example:

salt '*' aliases.rm_alias alias
salt.modules.aliases.set_target(alias, target)

Set the entry in the aliases file for the given alias, this will overwrite any previous entry for the given alias or create a new one if it does not exist.

CLI Example:

salt '*' aliases.set_target alias target

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.245. salt.modules.zypper

Next topic

22.16.3. salt.modules.alternatives

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.