Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#14529) Add registry::value defined type #16

Merged

Conversation

jeffmccune
Copy link
Contributor

Ready for review

(#14529) Add registry::value defined type

Without this patch we don't have an easy to use way to abstract away the
management of a value and the key it's in.

This patch fixes the problem by creating a new defined resource type in
Puppet that builds on top of the native registry_key and
registry_value resource types.

This registry::value type allows the user to manage values without
worrying about also managing the key the value exists in. For example:

registry::value { 'MyAPP - Owner Email':
  key   => 'HKLM\Software\Puppet Labs',
  value => 'Owner Email',
  data  => 'jeff@puppetlabs.com',
}

This resource will automatically manage the parent key if it does not
exist and manage the value. The key and value will be created in the
native architecture of the hive. That is to say, the 64 bit hive on a
64 bit system and the 32 bit hive on a 32 bit system.

@jeffmccune
Copy link
Contributor Author

@joshcooper 0533126 is ready for review.

registry_key { "${key}": }
}

registry_value { "${pre32}${key}\\${value_real}":
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre32 shouldn't be here.

@jeffmccune
Copy link
Contributor Author

Addressed my own comment. c506e14 should be good to go.

@jeffmccune
Copy link
Contributor Author

There was a duplicate resource problem with c506e14 but this has been fixed and the tests improved in cbb7cb0.

Should be good to go now.

Without this patch we don't have an easy to use way to abstract away the
management of a value and the key it's in.

This patch fixes the problem by creating a new defined resource type in
Puppet that builds on top of the native `registry_key` and
`registry_value` resource types.

This registry::value type allows the user to manage values without
worrying about also managing the key the value exists in.  For example:

    registry::value { 'MyAPP - Owner Email':
      key   => 'HKLM\Software\Puppet Labs',
      value => 'Owner Email',
      data  => 'jeff@puppetlabs.com',
    }

This resource will automatically manage the parent key if it does not
exist and manage the value.  The key and value will be created in the
native architecture of the hive.  That is to say, the 64 bit hive on a
64 bit system and the 32 bit hive on a 32 bit system.
@jeffmccune
Copy link
Contributor Author

Argh, added one more test case to cover the (default) value.

bf44208 amends and replaces cbb7cb0.

Should (really) be good to go now.

joshcooper added a commit that referenced this pull request May 16, 2012
@joshcooper joshcooper merged commit e74c4c3 into puppetlabs:master May 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants