Search code examples
puppetdsc

Puppet DSC module: Could not evaluate: Convert property 'authenticationinfo' value from type 'INSTANCE[]' to type 'INSTANCE' failed


I'm attempting to use dsc_authenticationinfo => {"Anonymous"=>false, "Basic"=>false, "Digest"=>false, "Windows"=>true}, getting could not evaluate error below. This property is inside of dsc_xwebsite{}.

dsc_xwebsite{$app_dns_name:
  dsc_ensure                    => 'Present',
  dsc_name                      => $app_dns_name,
  dsc_state                     => 'Started',
  dsc_physicalpath              => $app_webroot_path,
  dsc_applicationpool           => $app_pool_name,
  dsc_bindinginfo               => [{
    protocol => 'HTTP',
    port     => 80,
    hostname => $app_dns_name,
  }],
  dsc_authenticationinfo => {"Anonymous"=>true, "Basic"=>true, "Digest"=>true, "Windows"=>true},
}

I'm getting the following error on my windows 2012 R2 host.

Error: /Stage[main]/Profiles::Iis_tools/Dsc_xwebsite[tools-dev.domain.com]: Could not evaluate: Convert property 'authenticationinfo' value from type 'INSTANCE[]' to type 'INSTANCE' failed
 At line:31, char:2
 Buffer:
ls-dev.domain.com";
};^

insta

Solution

  • This was an issue with 1) documentation on Microsoft's DSC code. 2) Improper implementation in puppetlabs\dsc module. The MS documentation was fixed and the DSC module was fixed as of version 1.2.0.