0

I just found out that I could not target minion using glob matching if the number to be matched is composed of more than one digit :

salt 'mail[1-4]*' test.ping

OK

salt 'mail[11-14]*' test.ping

Does NOT

I know I could use regxp switch for that, but I am just wondering if this is standard behaviour in salt ? (and in python by extension)

Thanks

Pier
  • 618
  • 2
  • 8
  • 23

1 Answers1

0

Yes, this is standard behavior of shell-style globbing that's used in Salt. docs.

You still can target minions with glob matching, you just have to glob each digit separately.

salt 'mail[1-9][1-9]*' test.ping

For details on glob see man 7 glob.

beezz
  • 2,398
  • 19
  • 15
  • Thanks for your answer, I found these 2 pages before asking anyway, but I am still not able to found the piece of text that explains that specific behaviour. Especially given the fact that this function is called "Unix filename pattern matching". I was expecting something more accurate than these 2 pages. Thanks anyway. – Pier Jan 11 '17 at 19:16
  • I edited my answer and added link to the linux man page which describe how the glob-ing works in more detail. – beezz Jan 11 '17 at 21:56