myhelp:saltstack
Refresh Pillars
# salt <SERVERNAME> saltutil.refresh_pillar
List keys
List all keys
# salt-key
List all accepted keys
# salt-key -l acc
List all unaccepted keys
# salt-key -l un
Salt Module to jinja template
Info is from stackoverflow.
The simple command runs fine on the commandline, but to make it work in a jinja template is not that easy.
# salt-ssh -i 'myhost' lowpkg.info postfix attr=version
This delivers just the version. For example: 2.3.4
{%- set postfixversion = salt['lowpkg.info']('postfix',attr='version')['postfix']['version'] %}
The following will return a dictionary and not just the expacted nummer: {'postfix': {'version': '3.0.5'}}
{%- set postfixversion = salt['lowpkg.info']('postfix',attr='version') %}
myhelp/saltstack.txt · Last modified: by ulrich
