Ask Your Question
2

stop overwriting my changes

asked 2013-09-18 20:08:36 -0500

stoomy gravatar image

updated 2013-09-18 21:13:51 -0500

GregLarkin gravatar image

I'd like to use puppet to deploy some files, but not change them after deployment.

I have this working:

file { '$rhelver.file':
    path    => '/usr/local/somefile.file',
    group   => '10100',
    mode    => '700',
    owner   => '10100',
    source  => "puppet:///modules/somemod/somefile.file",
}

But, whenever I make changes to the deployed file, puppet wipes the changes out.

I have the same problem with user deployment. If a user changes his password, puppet sees the change in /etc/shadow and "fixes it". This is definitely useful in some cases, but irritating in others.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2013-09-18 21:16:08 -0500

GregLarkin gravatar image

Add the replace => false attribute to your file resource, and you should be all set. See http://docs.puppetlabs.com/references/latest/type.html#file-attribute-replace for further details.

edit flag offensive delete link more

Comments

Awesome, works great. Thanks!

stoomy gravatar imagestoomy ( 2013-09-18 21:55:02 -0500 )edit

Glad to hear it, and please mark my answer as correct when you have a moment - thank you!

GregLarkin gravatar imageGregLarkin ( 2013-09-18 21:58:39 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-09-18 20:08:36 -0500

Seen: 841 times

Last updated: Sep 18 '13