Hey folks, I''m wondering if there is a way to have puppet check for the existence of a line in a file and then alter said file to include that line if it is missing. The file I''m wanting to examine is /etc/services Thanks, Matt Delves --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Matt http://reductivelabs.com/trac/puppet/wiki/Recipes/SimpleText can do it John 2009/10/7 Matt Delves <m.delves@ballarat.edu.au>> > Hey folks, > I''m wondering if there is a way to have puppet check for the existence of a > line in a file and then alter said file to include that line if it is > missing. > > The file I''m wanting to examine is /etc/services > > Thanks, > Matt Delves > > > > >-- John Warburton Ph: 0417 299 600 Email: jwarburton@gmail.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John Warburton wrote:> Hi Matt > > http://reductivelabs.com/trac/puppet/wiki/Recipes/SimpleText can do it >Augeas and a lens could be another approach to this. I believe the augeas package comes with an /etc/services lens. Regards James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSswu2CFa/lDkFHAyAQKkjQgAqJGOGzwwD6rREU4XuNu/z/EWjCtoDdOY CQjJdhtxiX7jyAxK9xQwuttoBxiMzdvqkzETqwb5PC3vXHqv8e0aFDOQrBR5IL+x d5ZYwLwTHaZKHXJ+wgIEfdjg0cl/dpwzp6zu15RtbpQMLl0HP5qWThHVoJeHIMh7 cVXgGZ2JKjsCFCocKEYywQRHmkywdlkIVgUQm5csX7HUVQyuftafn14cVAYB/0bh mndTvxYdWYDIJxLjbDfnRL+KTb//l2NA2nF75fAvY+kqhEBP9E6v3A1Wmf5q8ZQu P/+93QWJeLvhBdbRmxyURd4vyOvPF1RRY7Ls3vWndGeib1aUjI3z0g==/a1s -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi>> http://reductivelabs.com/trac/puppet/wiki/Recipes/SimpleText can do it > > > Augeas and a lens could be another approach to this. > > I believe the augeas package comes with an /etc/services lens.An example: http://puppet.git.puzzle.ch/?p=module-sshjump.git;a=blob;f=manifests/tunnel.pp;h=17d14ebfce5d1a136406d8692287e482947153a8;hb=d2efd078a0e75caeac808ecfa3b2317a8d0c6b20#l50 cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---