最近發現puppet 日誌中報警告信息,以下: shell
puppet puppet-master[17329]: Deprecation notice: Resource references should now be capitalized on line 21 in file /etc/puppet/environments/production/modules/check_mk/manifests/debian.pp api
通過查看,原來是puppet 3.x 棄用了一些2.7 的寫法,具體以下: ssh
file 與exec 依賴關係
file {"/tmp/check_upgrade.sh":
mode => 755,
owner => root,
group => root,
source => "puppet:///check_mk/check_upgrade.sh"
}
exec {"/tmp/check_upgrade.sh":
cwd => "/tmp",
user => root,
subscribe => File["/tmp/check_upgrade.sh"],
refreshonly => true, ####若是/tmp/check_upgrade.sh 文件發生變化則執行改shell 文件
}
棄用原來的以下:
file {"/tmp/check_upgrade.sh":
source => "puppet:///check_mk/check_upgrade.sh"
alias => check,
}
exec {"/tmp/check_upgrade.sh"
require => File ["check"],
} ui
} this
http://hi.baidu.com/nessus1/item/5d1012514c82954e4eff20d0 spa