如何解决Puppet tomcat 安装不运行链式实例资源
我正在使用以下 puppet 代码安装 tomcat 并在 aws linux 2 ami 上设置实例:
# install Tomcat package
::tomcat::install { '/usr/share/tomcat':
catalina_home => '/usr/share/tomcat',install_from_source => false,package_name => 'tomcat'
} ->
notify { 'log0':
message => 'Tomcat install',} ->
::tomcat::instance { $tomcat_instance:
catalina_home => '/usr/share/tomcat',manage_service => false
} ->
notify { 'log1':
message => 'tomcat instance',} ->
Puppet 执行安装资源并输出日志消息,但随后似乎没有执行实例资源或第二条日志语句。
这是相关的编译目录部分:
Debug: Adding relationship from Tomcat::Install[/usr/share/tomcat] to Notify[log0] with 'before'
Debug: Adding relationship from Notify[log0] to Tomcat::Instance[default] with 'before'
Debug: Adding relationship from Tomcat::Instance[default] to Notify[log1] with 'before'
这是运行的输出:
Debug: Executing: '/usr/bin/yum -e 0 -y install tomcat'
Notice: /Stage[main]/Rk_tomcat::Tomcat/Tomcat::Install[/usr/share/tomcat]/Tomcat::Install::Package[tomcat]/Package[tomcat]/ensure: created
Debug: /Package[tomcat]: The container Tomcat::Install::Package[tomcat] will propagate my refresh event
Debug: Tomcat::Install::Package[tomcat]: The container Tomcat::Install[/usr/share/tomcat] will propagate my refresh event
Debug: Tomcat::Install[/usr/share/tomcat]: The container Class[Rk_tomcat::Tomcat] will propagate my refresh event
Notice: Tomcat install
Notice: /Stage[main]/Rk_tomcat::Tomcat/Notify[log0]/message: defined 'message' as 'Tomcat install'
Debug: /Stage[main]/Rk_tomcat::Tomcat/Notify[log0]: The container Class[Rk_tomcat::Tomcat] will propagate my refresh event
Debug: Finishing transaction 28638820
Debug: Storing state
Debug: Pruned old state cache entries in 0.00 seconds
Debug: Stored state in 0.01 seconds
Notice: Applied catalog in 4.01 seconds
Tomcat 安装成功:
Server version: Apache Tomcat/7.0.76
Server built: Jun 22 2020 23:34:41 UTC
Server number: 7.0.76.0
OS Name: Linux
OS Version: 4.14.231-173.361.amzn2.x86_64
Architecture: amd64
JVM Version: 1.8.0_282-b08
JVM vendor: Red Hat,Inc.
为什么在运行 log0
资源后没有链接的资源?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。