salt icon indicating copy to clipboard operation
salt copied to clipboard

peer_run: glob, pcre matching. Better docs

Open mlister2006 opened this issue 13 years ago • 3 comments

In master config file. peer_run seems to match pcre by default. This may not be an issue, but just an observation as I was expecting little different. salt master/client version: 0.14.0 (centos 6.x) Running following from minions to salt master.

salt-call publish.runner cache.grains

(example: 1)
peer_run:
  '*example.com':
    - cache.*

ERROR:this (simple glob) fails. (tried without quotes around *.example.com above as well)

(example: 2)
peer_run:
  .*example.com:
    - cache.*

WORKS: well. (even w/ quotes around '.*example.com'). looks like default match is pcre.

(example:3)
peer_run:
  .*example.com:
    - match: pcre
    - cache.*

ERROR: (even w/ quotes around '.*example.com'). when specifying match: pcre

Not a show stopper, but this user experience is little different than when working with top.sls files or pillar sls files. If it is intended this way, then no worries.

mlister2006 avatar Apr 04 '13 21:04 mlister2006

Yes, this is something that I debated about a lot, but in the end decided to use pcre for peer, eauth, peer_run and client acl. Just because you can easily require that extra power, it should be documented better though

thatch45 avatar Apr 05 '13 15:04 thatch45

sounds perfect.

mlister2006 avatar Apr 11 '13 21:04 mlister2006

Fixed with #30215.

rallytime avatar Jan 07 '16 22:01 rallytime