{% if 1 == salt['cmd.retcode']('test -f /tmp/woo.test') %} ack: file.touch: - name: /tmp/woo.test {% endif %}