Open Fabian1976 opened 3 years ago
Seems like it is in this part of the code: https://github.com/hercules-team/augeasproviders_pam/blob/5f8eb29fdf4d06082e331bdda17e0f643e2e8be9/lib/puppet/provider/pam/augeas.rb#L45
Compare is only done by service, type, module and control. It doesn't look at the parameters. So if those 4 are the same but the arguments differ, the above happens.
Can anyone fix this?
I have a workaround, which is to have Puppet put the 2nd rule in a new service file, e.g., 'service => password-auth-custom', and then include that service in the main password-auth config, e.g.: ... service => 'password-auth', type => 'auth', control => 'include', module => 'password-auth-custom', ...
It's not very scalable but it does work.
I'm trying to accomplish this in
/etc/pam.d/password-auth
:And i'm using this code:
But each puppet-run the first block get applied (preauth) and then the second one corrects the first one (authfail). So in the end, I only have this line:
Am I missing something?
I've also tried changed
ensure => present
toensure => positioned
and adding a position, but that didn't work either.I gave the top block this position:
And the bottom one this:
But the result is the same.
Any ideas or suggestions would be helpfull.