Feature #2225
Abililty to manage a user only if it already exists
| Status: | Accepted | Start date: | 05/06/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | 3.X | |||
| Affected Puppet version: | 0.24.7 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
I have a situation at a site where accounts can’t be removed, as they need to keep track of which users particular uid’s have been assigned to for the life of the server. As a result doing:
user { foo: ensure => absent }
is not applicable. For those systems, we need to lock the accounts. I’ve been using
user { foo: password => “LK”, shell => “/bin/false” }
Problem is that if I add new servers to the environment, the foo user will be created (in a locked form of course) which is not required. Perhaps something like ensure => ifpresent or similar?
History
Updated by Luke Kanies about 3 years ago
- Status changed from Unreviewed to Accepted
- Target version set to 2.6.0
- 3 changed from Unknown to Trivial
The problem here is that the user’s ensure parameter defaults to ‘present’ if the user is managed, and it probably shouldn’t be.
This will be a backward compatibility concern, but is a trivial fix – just remove the ‘defaultto’ block.
I’d say 0.26 should have a compatibility warning, and then the value should be changed in a later release.
Updated by James Turnbull over 2 years ago
- Target version changed from 2.6.0 to 2.7.x
Updated by Nigel Kersten about 1 year ago
- Target version changed from 2.7.x to 3.X