Skip to content

Instantly share code, notes, and snippets.

@0xf10e
Created January 27, 2016 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xf10e/4fe9e5eec65bb5f992dd to your computer and use it in GitHub Desktop.
Save 0xf10e/4fe9e5eec65bb5f992dd to your computer and use it in GitHub Desktop.
user@workstation:/srv/salt/formulas/openstack-formula.git% cat /srv/salt/base.hg/test.sls
pillarkey_to_check:
test.check_pillar:
- string: 'nova:database:password'
user@workstation:/srv/salt/formulas/openstack-formula.git% sudo salt con\* state.sls test
controller:
----------
ID: pillarkey_to_check
Function: test.check_pillar
Result: True
Comment:
Started: 17:05:28.890215
Duration: 1.563 ms
Changes:
Summary
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
user@workstation:/srv/salt/formulas/openstack-formula.git% cat ./test.sls
pillarkey_to_check:
test.check_pillar:
- string: 'nova:database:password'
user@workstation:/srv/salt/formulas/openstack-formula.git% sudo salt con\* state.sls test saltenv=openstack
controller:
----------
ID: pillarkey_to_check
Function: test.check_pillar
Result: False
Comment: Pillar key "nova:database:password" is missing.
Started: 17:05:47.288721
Duration: 1.365 ms
Changes:
Summary
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment