salt.states.beacon

Management of the Salt beacons

New in version 2015.8.0.

ps:
  beacon.present:
    - save: True
    - enable: False
    - services:
        salt-master: running
        apache2: stopped

sh:
  beacon.present: []

load:
  beacon.present:
    - averages:
        1m:
          - 0.0
          - 2.0
        5m:
          - 0.0
          - 1.5
        15m:
          - 0.1
          - 1.0

.. versionadded:: Neon

Beginning in the Neon release, multiple copies of a beacon can be configured
using the ``beacon_module`` parameter.

inotify_infs:
  beacon.present:
    - save: True
    - enable: True
    - files:
       /etc/infs.conf:
         mask:
           - create
           - delete
           - modify
         recurse: True
         auto_add: True
    - interval: 10
    - beacon_module: inotify
    - disable_during_state_run: True

inotify_ntp:
  beacon.present:
    - save: True
    - enable: True
    - files:
       /etc/ntp.conf:
         mask:
           - create
           - delete
           - modify
         recurse: True
         auto_add: True
    - interval: 10
    - beacon_module: inotify
    - disable_during_state_run: True
salt.states.beacon.absent(name, save=False, **kwargs)

Ensure beacon is absent.

Parameters
  • name (str) -- The name of the beacon ensured absent.

  • save (bool) -- True updates the beacons.conf file. Default is False.

Returns

A dictionary containing the results of the state run

Return type

dict

Example:

remove_beacon:
  beacon.absent:
    - name: ps
    - save: True
salt.states.beacon.disabled(name, **kwargs)

Disable a beacon.

Parameters

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

Returns

A dictionary containing the results of the state run

Return type

dict

Example:

disable_beacon:
  beacon.disabled:
    - name: ps
salt.states.beacon.enabled(name, **kwargs)

Enable a beacon.

Parameters

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

Returns

A dictionary containing the results of the state run

Return type

dict

Example:

enable_beacon:
  beacon.enabled:
    - name: ps
salt.states.beacon.present(name, save=False, **kwargs)

Ensure beacon is configured with the included beacon data.

Parameters
  • name (str) -- The name of the beacon ensure is configured.

  • save (bool) -- True updates the beacons.conf. Default is False.

Returns

A dictionary of information about the results of the state

Return type

dict

Example:

ps_beacon:
  beacon.present:
    - name: ps
    - save: True
    - enable: False
    - services:
        salt-master: running
        apache2: stopped