putting the cmd into arg is most likely causing an issue with how it is being interpreted.
this could have been tested by you by logging into a minion in question and just running salt-call state.apply -l debug. it will show what it is doing. the command being run. the output of that command. and the comparison.
next. with this much pipes and stdio being manipulated here. you will want to use python_shell being true. just to make sure it python isn’t getting in the way of the command.
next. data.subdict_match is WAY the wrong item you should be using. cmd.run is all strings. it doesn’t return a dict. so that will always resolve to false.
you don’t even need a campare_operator. that is only if you need to manipulate the data in stream.
test_loops:
loop.until_no_eval:
- name: cmd.run
- expected: -----BEGIN CERTIFICATE-----
- period: 8
- timeout: 30
- kwargs:
cmd: 'echo | /usr/bin/openssl s_client -connect server.masterr:8886 2>&1 | sed -ne "/-BEGIN CERTIFICATE-/p"'
python_shell: true
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/402a87da-92aa-4679-8d45-5ddf04864f16n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/38aaaf9d-7af2-4ea7-8de6-b56b523de9f9n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/Lw25goQtKiQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAPaX09inwNV_X8cB9-ctOfWTxnjjTc5rheY5XkTTjP%2BM9%3DM1dw%40mail.gmail.com.