diff options
author | Andrew Shafer <andrew@reductivelabs.com> | 2008-12-01 02:58:09 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-12-01 21:00:27 +1100 |
commit | 3eff2254e69cf66b6e9f94631900fba26172c850 (patch) | |
tree | f7a994f9f3d9f7338993e7aa3bf01da09bebcd2d /lib/puppet | |
parent | fa9820baaebe29675defb14bc9d64f6cb9b75211 (diff) | |
download | puppet-3eff2254e69cf66b6e9f94631900fba26172c850.tar.gz puppet-3eff2254e69cf66b6e9f94631900fba26172c850.tar.xz puppet-3eff2254e69cf66b6e9f94631900fba26172c850.zip |
Feature 1696 Add support for branded zones
Applied the patch from the ticket and wrote tests with the changes
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/provider/zone/solaris.rb | 11 | ||||
-rw-r--r-- | lib/puppet/type/zone.rb | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/puppet/provider/zone/solaris.rb b/lib/puppet/provider/zone/solaris.rb index 24bbb99ec..a5a18198c 100644 --- a/lib/puppet/provider/zone/solaris.rb +++ b/lib/puppet/provider/zone/solaris.rb @@ -36,9 +36,8 @@ Puppet::Type.type(:zone).provide(:solaris) do # Perform all of our configuration steps. def configure # If the thing is entirely absent, then we need to create the config. - str = %{create -b -set zonepath=%s -} % @resource[:path] + # Is there someway to get this on one line? + str = "create -b #{@resource[:create_args]}\nset zonepath=%s\n" % @resource[:path] # Then perform all of our configuration steps. It's annoying # that we need this much internal info on the resource. @@ -66,7 +65,11 @@ set zonepath=%s end def install - zoneadm :install + if @resource[:install_args] + zoneadm :install, @resource[:install_args].split(" ") + else + zoneadm :install + end end # Look up the current status. diff --git a/lib/puppet/type/zone.rb b/lib/puppet/type/zone.rb index 7601ec47b..8c4261241 100644 --- a/lib/puppet/type/zone.rb +++ b/lib/puppet/type/zone.rb @@ -357,6 +357,14 @@ end end end + newparam(:create_args) do + desc "Arguments to the zonecfg create command. This can be used to create branded zones." + end + + newparam(:install_args) do + desc "Arguments to the zoneadm install command. This can be used to create branded zones." + end + newparam(:realhostname) do desc "The actual hostname of the zone." end |