0
我一直在使用Puppet來自動化我們的部署過程。我們使用Ant工具將代碼部署到Tomcat服務器,並且我正在嘗試開發這種東西的清單在Puppet的exec資源中指定正確的搜索路徑
Puppet無法識別路徑變量中提到的命令,我可以手動運行我的ant命令,它位於/選擇/軟件/螞蟻/斌/螞蟻。
這是我面臨的
exec { "ant themes":
command => "ant build-themes",
cwd => "/opt/liferay6/portal/portal-web",
path => [ "/usr/bin", "/bin", "/opt/softwares/ant/bin/ant" ],
}
Notice: Compiled catalog for liferay in environment production in 0.04 seconds
Notice: /Stage[main]/Main/Exec[ant themes]/returns: current_value notrun, should be 0 (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 13.63 seconds
[email protected]:~/puppet/modules/liferay6/manifests$ sudo puppet apply 1.pp
Notice: Compiled catalog for liferay in environment production in 0.04 seconds
Error: Could not find command 'ant'
Error: /Stage[main]/Main/Exec[ant themes]/returns: change from notrun to 0 failed: Could not find command 'ant'
Notice: Finished catalog run in 13.59 seconds
請告知克服這個問題的錯誤。
嗨菲利克斯弗蘭克...感謝您的快速回復,並指導我解決上述問題.. –
@anilkottam肯定。如果這解決了您的問題,請隨時上傳和/或接受答案。 –