标签:pkg
pkg状态模块使用各个操作系统自带的包管理工具来安装各种软件包,例如RedHat系列使用YUM安装软件包,Ubuntu使用apt-get安装等
/usr/lib/python2.6/site-packages/salt/states/pkg.py
‘‘‘ Installation of packages using OS package managers such as yum or apt-get ========================================================================= Salt can manage software packages via the pkg state module, packages can be set up to be installed, latest, removed and purged. Package management declarations are typically rather simple: .. code-block:: yaml vim: pkg.installed A more involved example involves pulling from a custom repository. Note that the pkgrepo has a require_in clause. This is necessary and can not be replaced by a require clause in the pkg. .. code-block:: yaml base: pkgrepo.managed: - humanname: Logstash PPA - name: ppa:wolfnet/logstash - dist: precise - file: /etc/apt/sources.list.d/logstash.list - keyid: 28B04E4A - keyserver: keyserver.ubuntu.com - require_in: - pkg: logstash logstash: pkg.installed ‘‘‘
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1651012
标签:pkg
原文地址:http://john88wang.blog.51cto.com/2165294/1651012