Hi,

I'm struggling to know the best method of definining multiple solaris zones
in nodes.pp. I can get it working with one zone but scaling is a problem.
Below is a summary of my problem if you don't mind reading on but in short
it's a request to see how anyone else has defined zones (or virtualised
machines) in nodes.pp

So far I have a nodes definition like this which is basically the host
definition with some key value pairs defining the network portion of a zone
:-

*  node 'ptc37551' {
   $zonename = "zone37551-01"
   $dns_server1 = "10.20.136.11"
   $netmask = "255.255.255.0"
   $ip_address = "10.20.89.99"
   $default_route = "10.20.89.1"
   include node_default
   include physical
   include LDAP, Automount
   include zones*

The class zones at the bottom of the above entry is a module containing an
erb template.This picks up the values defined in the node def and looks like
this:-

*system_locale=en_GB
timezone=GB
terminal=vt100
security_policy=NONE
root_password=Ru3eT4PHOTtzo
timeserver=localhost
name_service=DNS {
       domain_name=test.com
       name_server=<%= dns_server1 %>
}
network_interface=primary {
       hostname=<%= hostname %>
       ip_address=<%= ip_address %>
       netmask=<%= netmask %>
       protocol_ipv6=no
       default_route=<%= default_route %>
}*

The init.pp file in the zones module looks like this:-

class zones {
zone { zone37551-01:
  # This class refers to the file in templates/zones.erb. variable defs held
in nodes.pp

    ip => "bnx0:10.20.89.89",
    sysidcfg => template("zones.erb"),
    path => "/zfs/zone37551-01",
    realhostname => "zone37551-01.test.com",
    inherit => ["/usr", "/sbin", "/platform", "/lib"],
    ensure => running,
}
}
which as you can see is rubbish as it still contains hard coded definitions
rather than values passed from nodes.pp. I'm guessing the answer lies with
define statements along the lines
class zone {
zone::zone1 {
   zone1 details
}

but bringing it all together is causing some brain problems. If anyone has
done something similar already I'd be pleased to hear from them

Thanks
Paul

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to