puppet:文件,模板和variables
我试图创build一个基于模板的文件,但我得到一个错误,无法find模板。 我的目录设置是/ etc / puppet / modules // templates / 在模板下,如果每个主机都有一个目录,再加上一个通用模板。 在主机目录下,我有一个特定于该主机的模板。 /server/puppet/modules//manifests/init.pp class { file { "/tmp/<file>": ensure => present, content => template('<module>/${hostname}/default.erb', '<module>/common.erb'), audit => content, notify => File["/tmp/<file2>"], } file { "/tmp/<file2>": ensure => present, source => "/tmp/file", audit => content, } } 当我运行木偶代理时,出现第一个文件语句的内容选项的错误。 我不知道模板函数是否需要直接在模板目录下的模板,或者是否不正确地解释主机名variables。