stefan.schulte@taunusstein.net
2010-Aug-23 08:56 UTC
[Puppet Users] Realize different user/groups on different systems
Hi Puppetusers, i want to mangage HP-UX, Solaris and SLES with puppet and eventhough the content of configurationfiles is often the same, the owner und groups are different. On SLES I''ve got root:root most of the times. On Solaris it''s often ''root:sys'' (sometimes its root:others). On HP-UX root:sys and bin:bin (together with mode r--r--r--) is common. Because I''m no expert here and I dont know the reason for the different groups I want to stick to the schema of a fresh installation. I''m not aware of the implications when generalize to root:root for example. So my question is: How would you deal with this? One thought was to define the default File-ressource depending on $operatingsystem. So I choosed root:root for SLES and root:sys for Solaris and HP-UX. But when I have a file that uses bin:bin on HP-UX how do I realize that? Because the following file { ''/foo'', group => $operatingsystem ? { ''HP-UX'' => ''bin'', }, } is not allowed because I will get and error under SLES (No matching value for selector param ''SLES''). Adding "default => undef" works but it doesnt mean ''take the default for other OSes here'' but ''the gid doesnt bother me at all''. Another thought was to define a few global varibales like $group_root und $group_bin and setting group_bin to "bin" on HP-UX, "sys" on Solaris and "root" on SLES. That will keep my ressourcedefinitions short but may be a bit confusing. And eventually it will break my leg sometime when I realize there is a configfile I want to manage with bin:bin under Solaris. Maybe the best approach is to have a definition that will figure out the right owner and group by looking at the opertingsystem and the path of the file (like ''all files under /etc/ should have root:sys under solaris und bin:bin under HP-UX). Unfortunatly for me the which-owner-which-group-schema seems to be nearly completly random and I didnt find reliable rules on the net. -Stefan ---------------------------------------------------------------- Powered by http://www.taunusstein.net Wir speichern nicht -- 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.
Darren Chamberlain
2010-Aug-23 16:32 UTC
Re: [Puppet Users] Realize different user/groups on different systems
* Stefan Schulte <stefan.schulte at taunusstein.net> [2010/08/23 10:56]:> Maybe the best approach is to have a definition that will figure > out the right owner and group by looking at the opertingsystem and > the path of the file (like ''all files under /etc/ should have > root:sys under solaris und bin:bin under HP-UX).I solved a similar problem by defining a node per OS and setting system-specific defaults in it, and then inheriting from those in my node definitions. node solaris { File { owner => "root", group => "sys" } ... } node hpux { File { owner => "bin", group => "bin" } ... } node sparky inherits solaris { } node hockeypuck inherits hpux { } -- When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong. -- R. Buckminster Fuller -- 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.