0
1
I'd like to remove a line from the sudoers. All works fine as long as I give the exact line. But there might be differences in white space on some machines. Couldn't find a workaround even with "match".
file_line { '/etc/sudoers':
ensure => absent,
path => '/etc/sudoers',
line => 'myuser ALL=NOPASSWD:/bin/su -', }
Any ideas? Thanks Acki
(1) Did you “discover” this by thinking and experimenting, or did you read it somewhere? If you read it somewhere, you must say so and identify the source. Linking to the source document and saying “More details here” isn’t sufficient; you must *say* that you copied your answer from there. (2) Likewise, you should link to documentation when you quote it. (If you have a better source for the information about
match_for_absence
, please add it.) (3) Since the objective is to match whitespace, you should probably use *
(space + star) rather than *`.`**. – Scott – 2019-06-01T20:29:57.0071
By the way, I noticed that your user profile has a typo: “Words cam later.”
– Scott – 2019-06-01T20:29:59.200It is e lionka combination of both. I read the link that I posted, and did some experimenting on my own. The answer the I posted is my own answer for something I was doing. – Scottie H – 2019-06-02T21:08:53.270