Ask Your Question

file_line append

asked 2017-08-23 09:57:32 -0600

George Cox gravatar image

I am trying to use the file_line resource too change two lines (which are both the same) in a file, here is my code:

file_line { "Rotate catalina.out":
            path    => "/opt/tomcat/bin/",
            match   => '      >> "\$CATALINA_OUT" 2>&1 "&"',
            line    => '      2>&1 |/usr/bin/cronolog "$CATALINA_BASE/logs/catalina-%Y-%m-%d.out" &',
            multiple => true,
            append_on_no_match => false,

Importantly I want to use the 'appendonno_match' parameter, otherwise on the second puppet run the line will be appended.

When running the puppet agent on a test node I am getting this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'append_on_no_match'

I am using stdlib 4.19.0, which I believe supports this parameter.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-08-24 07:52:43 -0600

Emerson Prado gravatar image

Can you confirm the tag 4.19.0 was correctly deployed? I used to have problems sometimes with that, and I had to erase the module and the cache in the Puppet Masters then deploy again. If there was such problem, you may have still an old version of stdlib, without that parameter, in your Master.

edit flag offensive delete link more



I can confirm 4.19.0 has been correctly deployed, I can see the version in the file. I'm running puppetserver 2.7.2 and the puppet agent 4.10.4 I'm using r10k and a puppetfile to deploy the module

George Cox gravatar imageGeorge Cox ( 2017-08-24 09:59:43 -0600 )edit

answered 2017-09-01 12:21:34 -0600

kiser gravatar image

I had the same problem. After update puppetserver to 2.8.0 it was fixed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-08-23 09:57:32 -0600

Seen: 627 times

Last updated: Sep 01 '17