Puppet 木偶使用';hiera.yaml';版本3已弃用。应将其转换为版本5

Puppet 木偶使用';hiera.yaml';版本3已弃用。应将其转换为版本5,puppet,Puppet,在Centos 7和Puppet v4.9.2中,尝试安装java和tomcat。当我运行apply命令时。它发出了警告信息 有任何帮助来解决此警告消息吗 node 'webserver' { class { 'java' : distribution => 'jdk', package => 'java-1.8.0-openjdk-devel' }

在Centos 7和Puppet v4.9.2中,尝试安装java和tomcat。当我运行apply命令时。它发出了警告信息

有任何帮助来解决此警告消息吗

node 'webserver' {          
        class { 'java' :
                distribution  => 'jdk',
                package       => 'java-1.8.0-openjdk-devel'
        }

        tomcat::install { '/opt/tomcat9':
                source_url => 'http://apache.osuosl.org/tomcat/tomcat-9/v9.0.0.M17/bin/apache-tomcat-9.0.0.M17.tar.gz',
        }
        tomcat::instance { 'tomcat9-1':
                catalina_home => '/opt/tomcat9',
                 catalina_base => '/opt/tomcat9/1',
        }
}
信息

Warning: /etc/puppetlabs/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
   (in /etc/puppetlabs/puppet/hiera.yaml)
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/java/manifests/init.pp", 54]:
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/tomcat/manifests/init.pp", 40]:["/etc/puppetlabs/code/environments/production/modules/tomcat/manifests/install.pp", 20]
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_Path. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/concat/manifests/init.pp", 70]:
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README. at ["/etc/puppetlabs/code/environments/production/modules/concat/manifests/init.pp", 71]:
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use match expressions with Stdlib::Compat::String instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions. at ["/etc/puppetlabs/code/environments/production/modules/concat/manifests/init.pp", 72]:
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use match expressions with Stdlib::Compat::Bool instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions. at ["/etc/puppetlabs/code/environments/production/modules/concat/manifests/init.pp", 82]:
   (at /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Notice: Compiled catalog for webserver in environment production in 0.66 seconds
谢谢
Sr

正如Matt指出的,我需要将yaml文件转换为版本5

我已经更新如下。现在我不明白这个警告

version: 5
hierarchy:
  - name: Common
    path: common.yaml
defaults:
  data_hash: yaml_data
  datadir: data
谢谢你的帮助。
Sr

您使用的是哪个版本的tomcat/stdlib模块?@Frap这是我的版本。“名称”:“puppetlabs tomcat”,“版本”:“1.6.1”,“名称”:“puppetlabs stdlib”,“版本”:“4.15.0”,此hiera文件随rpm pacakge提供。是否需要将此文件替换为其他版本?rpm-qf/etc/puppetlabs/puppet/hiera.yaml puppet-agent-1.9.2-1.el7.x86@64从puppet实验室rpm站点安装的最新rpm。name=Puppet Labs PC1存储库el 7-$basearch baseurl=