On 04/24/14 06:37, Ian Mortimer wrote: > On 04/23/14 18:29, Joachim Schrod wrote: > >> I don't understand why the match regex must match the line value. > > Your match needs to be: > > match => '^(% )*/DEFAULTPAPERSIZE \(a4\)', > > It has to match the line value, otherwise on the next puppet run > your modified line won't match and puppet will insert a new > (unwanted) line at the end of the file .
Ah, match replaces the base functionality that "matches the full line, including whitespace at the beginning and end. If the line is not contained in the given file, Puppet will add the line to ensure the desired state." I thought the match regex would be an _additional_ test, and that the check for existance of the line would be done nevertheless. If anybody here has write access to the file_line docs: It would be nice to note that in the description of "match". For this newbie, this was not clear. Thanks for the explanation, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jsch...@acm.org -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ljbflv%24bpa%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.