Hi Laxmi, I could not find a way out to add multiple lines. I did this, which served my purpose. May be it is not suitable for your requirement.
file { "/etc/mytweaks": owner => 'root', group => 'root', mode => '0755', source => "puppet:///modules/tweaks-history_shellprompt/mytweaks", } file_line { 'Adding-To-Bashrc': ensure => present, line => 'source /etc/mytweaks', path => "$bashrc_location", } Regards, Vikas On Tuesday, 27 January 2015 17:40:49 UTC+11, Lakshmi Thampi wrote: > > Could you please tell me which of the solutions worked in this case > As i am also trying to do the same > I am trying to do it with concat like this for /etc/profile file editing > > class postgresql::profilechange{ > > include concat::setup > > concat { '/etc/profile': > > mode => '0775', > > owner => 'root', > > group => 'root', > > ensure => present, > > > } > > > concat::fragment { 'file04_fa': > > target => '/etc/profile', > > content => "PATH=$PATH:/usr/local/pgsql/bin\n", > > order => 01 > > } > > > } > But it is giving me this error > --------------------------------------------------- > > Info: Retrieving plugin > > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb > > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb > > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb > > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb > > Info: Loading facts in > /etc/puppet/modules/concat/lib/facter/concat_basedir.rb > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find class concat::setup for sys-server on node sys-server > > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > Any pointers are appreciated > > > >> -- 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/0012a833-5caf-485c-8304-0175d4099a9a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.