我正在使用以下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执行install资源并输出日志消息,但似乎没有执行instance资源或第二个log语句。
以下是相关的编译目录部分:
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
正在运行的资源?
暂无答案!
目前还没有任何答案,快来回答吧!