Viewing the State of a Puppet Resource

The following example shows how to view the state of the zone resource type:

# puppet resource zone
zone { 'global':
  ensure   => 'running',
  brand    => 'solaris',
  iptype   => 'shared',
  zonepath => '/',
}
zone { 'myzone':
  ensure   => 'running',
  brand    => 'solaris-kz',
  iptype   => 'excl',
  zonepath => '/system/volatile/zones/myzone/zonepath',
}

This example declares two zone resources: a global zone and an installed kernel zone. Each of these resources has four attributes (or parameters): ensure, brand, iptype, and zonepath. Each attribute has a value associated with it. This value is a central component of Puppet's declarative language.

The following example shows how you would view the state of the service resource type:

# puppet resource service svc:/network
/dns/client:default
service {'svc:/network/dns/client:default':
  ensure => 'running',
  enable =>'true',
}