The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #4183

'replace' should become a metaparameter to allow only managing unset parameters

Added by Jeff McCune over 4 years ago. Updated over 4 years ago.

Status:AcceptedStart date:07/08/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version:0.25.5 Branch:
Keywords:defaults resource type parameter password user file content default attribute audit report

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

Overview: Puppet should facilitate the ability to manage arbitrary resource parameters only if those parameters are in an initial or “unset” state. By initial or unset, I mean their default state.

Detailed Information: There are a number of use cases for this feature. The most common I’ve seen is the ability to manage the password of an user resource only if the password is unset.

Another, which puppet already supports is the ability to manage the contents of a file only if the contents of the file are blank.

Related to the mount resource, puppet should manage the filesystem type field as “auto” only if the filesystem type field is blank.

Expected Behavior: Ideally, this functionality would be a first-class citizen on all resource type parameters, rather than specific to only certain resources like user, file contents, and user passwords.

Additional information: The architecture and design of puppet is to manage state over time, which this feature may be in direct conflict with. However, with auditing and reporting features being introduced into the architecture, the philosophy should still persevere as certain resource parameters could be flagged as “manage once, audit and report forever.” This feature will increase flexibility and provide granularity to the parameter level rather than the resource level.


Related issues

Related to Puppet - Bug #4184: mount will produce invalid fstab records if "options" or ... Needs More Information 07/09/2010

History

#1 Updated by James Turnbull over 4 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies

#2 Updated by Luke Kanies over 4 years ago

  • Subject changed from Resource parameters should allow the user to manage them only if they're "absent" to 'replace' should become a metaparameter to allow only managing unset parameters
  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Luke Kanies)

This seems like a generalization of the ‘replace’ parameter on files – basically, you’re saying you want to be able to set but never replace arbitrary parameters on arbitrary resources.

Sound reasonable?

Also available in: Atom PDF