Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-3408

Error in puppetlabs-registry module when managing registry value & parent key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: registry
    • Environment:

      Operating System: Windows Server 2012 R2 Standard
      Puppet Agent 3.8.4

    • Template:

      Description

      When defining a registry value & parent key in one declaration, I get the following error when Puppet tries to apply the resource:

      Error: Could not set 'present' on ensure: The parameter is incorrect. at 67:/etc
      /puppet/environments/test_env/modules/registry/manifests/value.pp
      Error: Could not set 'present' on ensure: The parameter is incorrect. at 67:/etc
      /puppet/environments/test_env/modules/registry/manifests/value.pp
      Wrapped exception:
      The parameter is incorrect.
      

      Puppet code declaring my resource is:

      registry::value { 'XRTE-DefaultFilePath':
        key      => 'HKLM\SOFWARE\Wow6432Node\Polaris\XRTE',
        value   => 'DefaultFilePath',
        data     => $xrte_default_file_path,
        require => Package['XRTE Configuration Utility'],
      }
      

      Having looked at the module's code, it seems to occur when the applying the defaults for the Registry_key type:

      # Resource defaults.
      Registry_key { ensure => present }
      Registry_value { ensure => present }
       
      if !defined(Registry_key[$key]) {
        registry_key { $key: }
      }
      

        Attachments

          Activity

            People

            Assignee:
            drmarconi Luke Anderson
            Reporter:
            drmarconi Luke Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support