In the type reference (http://reductivelabs.com/trac/puppet/wiki/ TypeReference), under the file resource, it says "As Puppet matures, it expected that the file resource will be used less and less to manage content, and instead native resources will be used to do so. If you find that you are often copying files in from a central location, rather than using native resources, please contact Reductive Labs and we can hopefully work with you to develop a native resource to support what you are doing." I thought there was previously even stronger wording that implied this would eventually go away (that stronger wording seems to have disappeared in the last few days, along with the TOC). I''m finding the file type ideal for handling configuration files. I''ve got a set of MySQL slaves that receive their my.cnf file this way, and its templated to assign them all unique server-ids (required for MySQL replication). Re the comment above, is there a better way to get these configuration files on each host? What native resource would I use to accomplish this? Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Westin wrote:> In the type reference (http://reductivelabs.com/trac/puppet/wiki/ > TypeReference), under the file resource, it says "As Puppet matures, > it expected that the file resource will be used less and less to > manage content, and instead native resources will be used to do so. > If you find that you are often copying files in from a central > location, rather than using native resources, please contact Reductive > Labs and we can hopefully work with you to develop a native resource > to support what you are doing." I thought there was previously even > stronger wording that implied this would eventually go away (that > stronger wording seems to have disappeared in the last few days, along > with the TOC). > > I''m finding the file type ideal for handling configuration files. > I''ve got a set of MySQL slaves that receive their my.cnf file this > way, and its templated to assign them all unique server-ids (required > for MySQL replication). > > Re the comment above, is there a better way to get these configuration > files on each host? What native resource would I use to accomplish > this?The point of the statement is that copying out complete my.cnf files is inflexible, since you can only copy it once. A native my.cnf type could look like this: mysql_option { ''bind_address'': ensure => ''127.0.0.1''; } Giving you the possibility of handling configuration as resources which enables much nice functionality like overriding/inheritance and export/collect. Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sure, but I''m using content => template(...) to fill in the file. This appears in a baser class, and various other classes and defines are layered on top that, providing substitution variable values at different levels. It seems unlikely that native resources could be created for all such possible files since there are so many packages out there that have their own configuration files. Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Westin wrote:> Sure, but I''m using content => template(...) to fill in the file. > This appears in a baser class, and various other classes and defines > are layered on top that, providing substitution variable values at > different levels.Problem is that some files really beg for being filled in from very different places in the manifests. A typical example would be the /etc/sysconfig/iptables file (in RedHat); you would normally want the parts of your manifest that deals with configuring email to add iptables rules for accessing the SMTP, IMAP and POP ports, while rules for accessing the HTTP port are in the manifest parts dealing with Apache.> It seems unlikely that native resources could be created for all such > possible files since there are so many packages out there that have > their own configuration files.That''s why we have things like Augeas, defines, and custom types, so we users of Puppet can create those resource types as we need them. /Bellman --~--~---------~--~----~------------~-------~--~----~ 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 Chris Westin wrote:> Sure, but I''m using content => template(...) to fill in the file. > This appears in a baser class, and various other classes and defines > are layered on top that, providing substitution variable values at > different levels. > > It seems unlikely that native resources could be created for all such > possible files since there are so many packages out there that have > their own configuration files. >The statement is also somewhat aspirational. There are a lot more types I''d like to see - network types for example would be highly useful - but they aren''t critical because the file (and to some extend the augeas) types - combined with templates for example - fill this void. 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/ iQEVAwUBSsOGbyFa/lDkFHAyAQJgigf+IAI8H5QTdNCVCiEemf/d8l53RUYh7Ywg BZ9QXc+lqAvjo3jNACejv2jH85udtck+q6qLV8l7OpRSHiN0cw2+ptuaFaXyr/7Q Pdc/VeNmQkPDwzT90+xJr+Ik9TR47ljjXPTokikQhUNDOKNSxWJb1VXtbRAq8tiw Q/K26gCARlEGQS/EAKsBFEkPbajl5RadEGT62oxG5ztnayr7y0VtqLSsDYVC8IOh rJag0WY8wtcxK+pkOvblmo7NwibxAe74QRyGUj2r48zgd0zW/KdDre6RRlFRF98O n/oRpV0Ce14Q+FdSnX+xveUuZUVZRmQR5QKRI+aBTbU4m2zQbE6anw==ZwhH -----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 -~----------~----~----~----~------~----~------~--~---