salt.modules.beacons

Module for managing the Salt beacons on a minion

New in version 2015.8.0.

salt.modules.beacons.add(name, beacon_data, **kwargs)

Add a beacon on the minion

Parameters
  • name (str) -- Name of the beacon to configure

  • beacon_data (dict) -- Dictionary or list containing configuration for beacon.

Returns

Boolean and status message on success or failure of add.

Return type

dict

CLI Example:

salt '*' beacons.add ps "[{'processes': {'salt-master': 'stopped', 'apache2': 'stopped'}}]"
salt.modules.beacons.delete(name, **kwargs)

Delete a beacon item.

Parameters

name (str) -- Name of the beacon to delete.

Returns

Boolean and status message on success or failure of delete.

Return type

dict

CLI Example:

salt '*' beacons.delete ps

salt '*' beacons.delete load
salt.modules.beacons.disable(**kwargs)

Disable all beacons jobs on the minion.

Returns

Boolean and status message on success or failure of disable.

Return type

dict

CLI Example:

salt '*' beacons.disable
salt.modules.beacons.disable_beacon(name, **kwargs)

Disable a beacon on the minion.

Parameters

name (str) -- Name of the beacon to disable.

Returns

Boolean and status message on success or failure of disable.

Return type

dict

CLI Example:

salt '*' beacons.disable_beacon ps
salt.modules.beacons.enable(**kwargs)

Enable all beacons on the minion.

Returns

Boolean and status message on success or failure of enable.

Return type

bool

CLI Example:

salt '*' beacons.enable
salt.modules.beacons.enable_beacon(name, **kwargs)

Enable a beacon on the minion.

Parameters

name (str) -- Name of the beacon to enable.

Returns

Boolean and status message on success or failure of enable.

Return type

dict

CLI Example:

salt '*' beacons.enable_beacon ps
salt.modules.beacons.list_(return_yaml=True, include_pillar=True, include_opts=True, **kwargs)

List the beacons currently configured on the minion.

Parameters
  • return_yaml (bool) -- Whether to return YAML formatted output, default True.

  • include_pillar (bool) -- Whether to include beacons that are configured in pillar, default is True.

  • include_opts (bool) -- Whether to include beacons that are configured in opts, default is True.

Returns

List of currently configured Beacons.

Return type

list

CLI Example:

salt '*' beacons.list
salt.modules.beacons.list_available(return_yaml=True, **kwargs)

List the beacons currently available on the minion.

Parameters

return_yaml (bool) -- Whether to return YAML formatted output, default True.

Returns

List of currently available Beacons.

Return type

list

CLI Example:

salt '*' beacons.list_available
salt.modules.beacons.modify(name, beacon_data, **kwargs)

Modify an existing beacon.

Parameters
  • name (str) -- Name of the beacon to configure.

  • beacon_data (dict) -- Dictionary or list containing updated configuration for beacon.

Returns

Boolean and status message on success or failure of modify.

Return type

dict

CLI Example:

salt '*' beacons.modify ps "[{'salt-master': 'stopped'}, {'apache2': 'stopped'}]"
salt.modules.beacons.reset(**kwargs)

Reset the beacon configuration on the minion.

CLI Example:

salt '*' beacons.reset
salt.modules.beacons.save(**kwargs)

Save all configured beacons to the minion config.

Returns

Boolean and status message on success or failure of save.

Return type

dict

CLI Example:

salt '*' beacons.save