Puppet Agent - 64位v4.0.0 OS- Windows Server R2 64位
我正在尝试使用Puppet站点的DISM模块(https://forge.puppetlabs.com/puppetlabs/dism)安装IIS。
我正在尝试运行以下脚本。我确定它是正确的。
dism {
'IIS-WebServerRole': ensure => present,
}
dism {
'IIS-WebServer': ensure => present,
}
模块已正确安装,我已尝试多次重新安装,但我反复收到下面提到的错误。我该如何解决这个问题?
我正在使用Puppet
C:\Program Files\Puppet Labs\Puppet\bin>puppet apply IIS_Install.pp
Error: Could not autoload puppet/type/dism: Attempt to redefine method set_present with block
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
答案 0 :(得分:0)
尝试ensure => 'present'
错误不是很有帮助,但我认为它可能是Puppet v4以及解析器的不同之处和更严格。
如果这不起作用,请确保您应该使用ensure。并非所有资源都可以保证。