1

I am only using Saltstack to run commands on multiple servers, e.g. to check if a specific TYPO3 extension exists on any server. I want to suppress empty output of minions (i.e. the hostname) and want to see if a minion could not be reached.

Sample output of how it is at the moment:

serverA:

serverB:

serverC:
    /var/www/vhosts/example.com/httpdocs/typo3conf/ext/news/ext_emconf.php:  'version' => '4.2.1',
serverD:

Sample output of how it should be (let's assume serverX is down):

serverC:
    /var/www/vhosts/example.com/httpdocs/typo3conf/ext/news/ext_emconf.php:  'version' => '4.2.1',
serverX: is down!
1

Use output in one line (--out txt)

salt --out txt '*' cmd.run 'if [ -f /tmp/xxx ];then echo 'hello';fi'

will output if file exists:

minion1: hello

will output nothing if file doesn't exist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.