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

Feature #8628

add append_line native type

Added by Dan Bode about 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:07/26/2011
Priority:NormalDue date:07/27/2011
Assignee:Dan Bode% Done:

0%

Category:typeEstimated time:3.00 hours
Target version:stdlib 1.0.0
Keywords: Branch:

We've Moved!

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

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

We should have a define stdlib::append_line added to the stdlib module.

It should be able to detect if a certain line exists in a file and add it if necessary.

History

#1 Updated by Dan Bode about 3 years ago

  • Status changed from Unreviewed to Merged - Pending Release
e82370a26d15181b6c3b17b25c2349752e41ed38
(#8628) Add append_line native type

This commit adds a native type that can check if
a line exists and append it to a file.

This use case seems common enough to warrant its
inclusion into stdlib.

Reviewed-by: Jeff McCune

#2 Updated by Dan Bode about 3 years ago

  • Subject changed from add append_line define to add append_line native type

#3 Updated by Peter Meier about 3 years ago

shouldn’t this rather be named something like line?

#4 Updated by Jeff McCune about 3 years ago

Peter Meier wrote:

shouldn’t this rather be named something like line?

Yes. To be explicit about what we’re doing I recommend “whole_line” which matches the grep man page for the -x flag.

#5 Updated by Jeff McCune about 3 years ago

  • Due date set to 07/27/2011
  • Status changed from Merged - Pending Release to Accepted
  • Assignee set to Dan Bode
  • Estimated time set to 3.00
  • 16 set to accounts

Updating

We’re going to change this to a noun. Something like “whole_line”, “full_line” or “file_line”

#6 Updated by Jeff McCune almost 3 years ago

  • Category set to stdlib
  • Status changed from Accepted to Closed

Closed

This is published along with the 1.0.0 release.

It’s still named “append_line” unfortunately, sorry Peter.

-Jeff

#7 Updated by Jeff McCune over 2 years ago

  • Project changed from Puppet Labs Modules to Standard Library
  • Category deleted (stdlib)

#8 Updated by Jeff McCune over 2 years ago

  • Category set to type
  • Target version set to stdlib 1.0.0

Also available in: Atom PDF