saz/puppet-sudo

sudo::purge_ignore: '*[!_puppet]' erase more then *_puppet

stuffitt opened this issue · 1 comments

With regex in README.md, the module remove also files not end with '_puppet'.

The regex match all files end with a single character:
'_', 'p', 'u', 'e' or 't'

As example following files would be removed from sudoers.d
userrule, tmp_, philip, luke

saz commented

You're right! The ignore parameter on the file type uses Ruby's globbing engine and *[!_puppet] will match according to https://en.wikipedia.org/wiki/Glob_(programming)#Unix

I don't think it's possible to use this feature as documented 😞