salt.thorium.check

The check Thorium state is used to create gateways to commands, the checks make it easy to make states that watch registers for changes and then just succeed or fail based on the state of the register, this creates the pattern of having a command execution get gated by a check state via a requisite.

salt.thorium.check.contains(name, value, count_lt=None, count_lte=None, count_eq=None, count_gte=None, count_gt=None, count_ne=None)

Only succeed if the value in the given register location contains the given value

USAGE:

foo:
  check.contains:
    - value: itni

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.eq(name, value)

Only succeed if the value in the given register location is equal to the given value

USAGE:

foo:
  check.eq:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.event(name)

Chekcs for a specific event match and returns result True if the match happens

USAGE:

salt/foo/*/bar:
  check.event

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: salt/foo/*/bar

salt.thorium.check.gt(name, value)

Only succeed if the value in the given register location is greater than the given value

USAGE:

foo:
  check.gt:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.gte(name, value)

Only succeed if the value in the given register location is greater or equal than the given value

USAGE:

foo:
  check.gte:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_eq(name, value)

Only succeed if the length of the given register location is equal to the given value.

USAGE:

foo:
  check.len_eq:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_gt(name, value)

Only succeed if length of the given register location is greater than the given value.

USAGE:

foo:
  check.len_gt:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_gte(name, value)

Only succeed if the length of the given register location is greater or equal than the given value

USAGE:

foo:
  check.len_gte:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_lt(name, value)

Only succeed if the length of the given register location is less than the given value.

USAGE:

foo:
  check.len_lt:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_lte(name, value)

Only succeed if the length of the given register location is less than or equal the given value

USAGE:

foo:
  check.len_lte:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.len_ne(name, value)

Only succeed if the length of the given register location is not equal to the given value.

USAGE:

foo:
  check.len_ne:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.lt(name, value)

Only succeed if the value in the given register location is less than the given value

USAGE:

foo:
  check.lt:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.lte(name, value)

Only succeed if the value in the given register location is less than or equal the given value

USAGE:

foo:
  check.lte:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

salt.thorium.check.ne(name, value)

Only succeed if the value in the given register location is not equal to the given value

USAGE:

foo:
  check.ne:
    - value: 42

run_remote_ex:
  local.cmd:
    - tgt: '*'
    - func: test.ping
    - require:
      - check: foo

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/thorium/all/salt.thorium.check.html