salt.modules.beacons

Module for managing the Salt beacons on a minion

2015.8.0 新版功能.

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

Add a beacon on the minion

参数:
  • name -- Name of the beacon to configure
  • beacon_data -- Dictionary or list containing configuration for beacon.
返回:

Boolean and status message on success or failure of add.

CLI Example:

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

Delete a beacon item

参数:name -- Name of the beacon to delete
返回:Boolean and status message on success or failure of delete.

CLI Example:

salt '*' beacons.delete ps

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

Disable all beaconsd jobs on the minion

返回:Boolean and status message on success or failure of disable.

CLI Example:

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

Disable beacon on the minion

Name:Name of the beacon to disable.
返回:Boolean and status message on success or failure of disable.

CLI Example:

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

Enable all beacons on the minion

返回:Boolean and status message on success or failure of enable.

CLI Example:

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

Enable beacon on the minion

Name:Name of the beacon to enable.
返回:Boolean and status message on success or failure of enable.

CLI Example:

salt '*' beacons.enable_beacon ps
salt.modules.beacons.list(return_yaml=True)

List the beacons currently configured on the minion

参数:return_yaml -- Whether to return YAML formatted output, default True
返回:List of currently configured Beacons.

CLI Example:

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

Modify an existing beacon

参数:
  • name -- Name of the beacon to configure
  • beacon_data -- Dictionary or list containing updated configuration for beacon.
返回:

Boolean and status message on success or failure of modify.

CLI Example:

salt '*' beacons.modify ps "{'salt-master': 'stopped', 'apache2': 'stopped'}"
salt.modules.beacons.save()

Save all beacons on the minion

返回:Boolean and status message on success or failure of save.

CLI Example:

salt '*' beacons.save