Ask Your Question
0

how to append the data in file through puppet script

asked 2015-03-04 07:32:43 -0600

akshay gravatar image

How to append the contents in the file like "/etc/hosts/" I want to append the data in that file. So what code i write in that script to append the code in that file?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-04 08:36:45 -0600

multiple ways! e.g. from cookbook: http://www.puppetcookbook.com/posts/a...

stdlib - use file_line ( https://puppetlabs.com/blog/module-of... )

also multiple modules on the forge ( https://forge.puppetlabs.com/tags/hosts )

I'd probably start with the first suggestion and work your way down as your experience deepens Cheers Stuart

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

1 follower

Stats

Asked: 2015-03-04 07:32:43 -0600

Seen: 3,947 times

Last updated: Mar 04 '15