Skip to content

Latest commit

 

History

History
261 lines (155 loc) · 6.44 KB

REFERENCE.md

File metadata and controls

261 lines (155 loc) · 6.44 KB

Reference

Table of Contents

Defined types

  • registry::service: Defined resource type that manages service entries
  • registry::value: High level abstraction on top of registry_key and registry_value resources

Resource types

Defined types

registry::service

Manages the values in the key HKLM\System\CurrentControlSet\Services$name\

  • Note This defined resource type manages service entries in the Microsoft service control framework by managing the appropriate registry keys and values.

This is an alternative approach to using INSTSRV.EXE [1].

[1] http://support.microsoft.com/kb/137890

Examples

Sample Usage:
registry::service { puppet:
  ensure       => present,
  display_name => 'Puppet Agent',
  description  => 'Periodically fetches and applies
                   configurations from a Puppet Server.',
  command      => 'C:\PuppetLabs\Puppet\service\daemon.bat',
}

Parameters

The following parameters are available in the registry::service defined type:

ensure

Data type: Enum['present', 'absent', 'UNSET']

Ensures the presence or absence of a registry key. Valid values: 'present', 'absent', 'UNSET'.

Default value: 'UNSET'

display_name

Data type: String[1]

The Display Name of the service. Defaults to the title of the resource.

Default value: 'UNSET'

description

Data type: String[1]

A description of the service. String value set to 'UNSET' by default.

Default value: 'UNSET'

command

Data type: String[1]

The command to execute. Set to 'UNSET' by default.

Default value: 'UNSET'

start

Data type: Enum['automatic', 'manual', 'disabled', 'UNSET']

The starting mode of the service. (Note, the native service resource can also be used to manage this setting.) Valid values: 'automatic', 'manual', 'disabled'

Default value: 'UNSET'

registry::value

Actions:

  • Manage the parent key if not already managed.
  • Manage the value

Requires:

  • Registry Module
  • Stdlib Module
  • Note This defined resource type provides a higher level of abstraction on top of the registry_key and registry_value resources. Using this defined resource type, you do not need to explicitly manage the parent key for a particular value. Puppet will automatically manage the parent key for you.

Examples

This example will automatically manage the key. It will also create a value named 'puppetserver' inside this key.
class myapp {
  registry::value { 'puppetserver':
    key => 'HKLM\Software\Vendor\PuppetLabs',
    data => 'puppet.puppetlabs.com',
  }
}

Parameters

The following parameters are available in the registry::value defined type:

key

Data type: Pattern[/^\w+/]

The path of key the value will placed inside.

value

Data type: Optional[String]

The name of the registry value to manage. This will be copied from the resource title if not specified. The special value of '(default)' may be used to manage the default value of the key.

Default value: undef

type

Data type: Pattern[/^\w+/]

The type the registry value. Defaults to 'string'. See the output of puppet describe registry_value for a list of supported types in the "type" parameter.

Default value: 'string'

data

Data type:

Optional[Variant[
      String,
      Numeric,
      Array[String]
  ]]

The data to place inside the registry value.

Default value: undef

Resource types

registry_key

Manages registry keys on Windows

Properties

The following properties are available in the registry_key type.

ensure

Valid values: present, absent

The basic property that the resource should be in.

Default value: present

Parameters

The following parameters are available in the registry_key type.

path

The path to the registry key to manage

provider

The specific backend to use for this registry_key resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.

purge_values

Valid values: true, false

Common boolean for munging and validation.

Default value: false

registry_value

Manages registry values on Windows systems.

Properties

The following properties are available in the registry_value type.

data

The data stored in the registry value.

ensure

Valid values: present, absent

The basic property that the resource should be in.

Default value: present

type

Valid values: string, array, dword, qword, binary, expand

The Windows data type of the registry value.

Default value: string

Parameters

The following parameters are available in the registry_value type.

path

The path to the registry value to manage.

provider

The specific backend to use for this registry_value resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.