I also have a similar problem. I want to create/append a file (automount map) whose lines are independent. For me the best way to handle it would be splitting it into chunks and then decide based on the manifest file which chunk a group of hosts should get on the server. Is it possible ?
Em quinta-feira, 7 de abril de 2011 10h35min14s UTC-3, Brett Cave escreveu: > > > > On Thu, Apr 7, 2011 at 3:04 PM, Felix Frank > <felix...@alumni.tu-berlin.de<javascript:> > > wrote: > >> note here http://docs.puppetlabs.com/references/stable/type.html#file >> that sourceselect "is only used in recursive copies". >> > > ah ok. thanks > > Single files cannot be merged. After all, how would you define the merge >> of two files? >> > > concat :p - i.e. append file contents to each in the order they are listed > > >> If you want to concatenate the files, you may want to abuse the >> template() function for that. But please don't ;-) >> > > I did come across this too - http://projects.puppetlabs.com/issues/5158, > and implemented this: > custom function added: > > module Puppet::Parser::Functions > newfunction(:cat, :type => :rvalue) do |args| > args.join("") > end > end > > > files then uses content: > content => cat(file("/etc/puppet/modules/app/files/sysconfig-base"), > file("/etc/puppet/modules/app/files/$env/sysconfig.$hostname")), > > Just need to add in some path detection or some variable so that I don't > have to specify the path the files (is there a variable available that > gives $module_path? ) > > brett > > >> Regards, >> Felix >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> puppet-users...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/d2zYQCwvLjwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.