繁体   English   中英

无法自动加载人偶/类型/ dism运行人偶脚本时出错

[英]Could not autoload puppet/type/dism Error on running puppet script

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,
    }   

该模块已正确安装,并且我尝试将其重新安装几次,但是我反复收到下面提到的错误。 我该如何解决?

我正在使用人偶

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

尝试ensure => 'present'

该错误不是很有帮助,但我认为可能是Puppet v4以及解析器如何不同且更加严格。

如果那不起作用,请确保您完全使用了确保。 并非所有资源都是可以保证的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM