saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
107 stars 215 forks source link

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

Closed stuffitt closed 1 month ago

stuffitt commented 1 year ago

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 1 month ago

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 :disappointed: