Resource Type: zone

Defined in:
lib/puppet/type/zone.rb
Providers:
solaris

Overview

Manages Solaris zones.

Properties

  • brand

    The zone's brand type

  • ensure (defaults to: running)

    The running state of the zone. The valid states directly reflect the states that zoneadm provides. The states are linear, in that a zone must be configured, then installed, and only then can be running. Note also that halt is currently used to stop zones.

  • id

    The numerical ID of the zone. This number is autogenerated and cannot be changed.

  • iptype

    Displays exclusive or shared instance of IP.

  • zonepath

    The path to zone's file system.

Parameters

  • archive

    The archive file (UAR) containing an archived zone.

  • archived_zonename

    If the UAR contains multiple zones. The archived zone to configure and install

  • clone

    Instead of installing the zone, clone it from another zone. If the zone root resides on a zfs file system, a snapshot will be used to create the clone; if it resides on a ufs filesystem, a copy of the zone will be used. The zone from which you clone must not be running.

  • config_profile

    Path to the config_profile to use to configure a solaris zone. This is set when providing a sysconfig profile instead of running the sysconfig SCI tool on first boot of the zone.

  • install_args

    Arguments to the zoneadm install command. This can be used to create branded zones.

  • name (namevar)

    The name of the zone.

  • sysidcfg

    %text to go into the sysidcfg file when the zone is first booted. The best way is to use a template:

    # $confdir/modules/site/templates/sysidcfg.erb
    system_locale=en_US
    timezone=GMT
    terminal=xterms
    security_policy=NONE
    root_password=<%= password %>
    timeserver=localhost
    name_service=DNS {domain_name=<%= domain %> name_server=<%= nameserver %>
    network_interface=primary realhostname %>
      ip_address=<%= ip %>
      netmask=<%= netmask %>
      protocol_ipv6=no
      default_route=<%= defaultroute %>
    nfs4_domain=dynamic
    

    And then call that:

    zone { myzone:
      ip           => "bge0:192.168.0.23",
      sysidcfg     => template("site/sysidcfg.erb"),
      path         => "/opt/zones/myzone",
      realhostname => "fully.qualified.domain.name"
    }
    

    The sysidcfg only matters on the first booting of the zone, so Puppet only checks for it at that time.}

  • zonecfg_archive

    Archive to use to configure the zone. Additional commands may be added via zonecfg_export.

  • zonecfg_export

    Contains the zone configuration information. This can be passed in in the form of a file generated by the zonecfg command, in the form of a template, or a string.