The priority part of the filename should be zero-padded, otherwise a config with priority => 5 will lexically come after one with priority => 10.
sudo::conf { 'high-prio':
priority => 5,
content => '# This is high prio',
}
sudo ::conf { 'normal-prio':
content => '# This is normal prio',
}
Will result in: 10_normal-prio, 5_high-prio, while it should be 05_high-prio, 10_normal-prio.
This is also mentioned in the man pages:
Be aware that because the sorting is lexical, not numeric, /etc/sudoers.d/1_whoops would be loaded after /etc/sudoers.d/10_second. Using a consistent number of leading zeroes in the file names can be used to avoid such problems.
The priority part of the filename should be zero-padded, otherwise a config with
priority => 5
will lexically come after one withpriority => 10
.Will result in:
10_normal-prio
,5_high-prio
, while it should be05_high-prio
,10_normal-prio
.This is also mentioned in the man pages: