| Puppet Version: 6.4.1** OS Name/Version: CentOS 7 I have a bit of Puppet code that includes a locally scoped Ini_setting resource default statement. https://gist.github.com/ryanycoleman/0a444e4dfdb568eb3080a9e038347e41 Desired Behavior: The resource default statements for Ini_setting are honored, reducing lines of code in the manifest. Actual Behavior:
[root@pe-lovejoy production]# /opt/puppetlabs/bin/puppet apply -e 'include profile::sssd_ldap' --modulepath=/etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/environments/production/site/ /opt/puppetlabs/puppet/cache/lib/puppet_x/chocolatey/chocolatey_version.rb:8: warning: already initialized constant PuppetX::Chocolatey::ChocolateyVersion::OLD_CHOCO_MESSAGE /etc/puppetlabs/code/environments/production/modules/chocolatey/lib/puppet_x/chocolatey/chocolatey_version.rb:8: warning: previous definition of OLD_CHOCO_MESSAGE was here Warning: Undefined variable '::datacenter'; (file & line not available) Warning: This method is deprecated, please use the stdlib validate_legacy function, with Pattern[]. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/sssd/manifests/init.pp", 125]:["unknown", 1] (location: /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:28:in `deprecation') Notice: Compiled catalog for pe-lovejoy.p9.puppet.net in environment production in 0.21 seconds Error: Could not autoload puppet/type/ini_setting: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/ini_setting'. Set at unknown location Error: Could not autoload puppet/type/ini_setting: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/ini_setting'. Set at unknown location
The last two lines being the most relevant to the problem I've encountered. I'm using puppetlabs-inifile (v3.0.0) Removing the resource default statement and using its parameters explicitly in each ini_setting resource resolved the issue. Based on our documentation, I expected this to work: https://puppet.com/docs/puppet/6.4/lang_defaults.html |