我使用 saltstack 来部署我的服务器。我想在一台服务器上安装所有“tomcat7”pkg。所以我写了一个这样的sls文件:
^tomcat7.*:
pkg:
- installed
- require:
- pkg: openjdk-7-jdk
但最后,它收到一个错误:
----------
State: - pkg
Name: ^tomcat7.*
Function: installed
Result: False
Comment: Package ^tomcat7.* failed to install
Changes:
但事实上,服务器已经成功安装了所有的 ^tomcat7.* 包。
root@vagrant-ubuntu-raring-64:~# dpkg -l tomcat7*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii tomcat7 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine
ii tomcat7-admin 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine -- admin web applications
ii tomcat7-common 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine -- common files
ii tomcat7-docs 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine -- documentation
ii tomcat7-examples 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine -- example web applications
ii tomcat7-user 7.0.35-1~exp2ubuntu1.1 all Servlet and JSP engine -- tools to create user instances
如何解决这个问题呢?我需要一一写所有 ^tomcat7.* pkgs 吗?