Saltstack-gdlwolf Self-study summary of the fifth (method case): Pkg module initialization installation system common software package

Source: Internet
Author: User
Tags saltstack

First we use the PKG module to install a commonly used RPM package for an initial installation of the CentOS system , for example:vim unzip wget, etc.


Here is how to configure the SLS file

mkdir/srv/salt/init-pvvi/srv/salt/init/pkg-install.sls# Add the following: common_packages:pkg.installed:-pkgs:-Unzip -Dos2unix #提示如果还有其他要初始化的例如: gcc, gcc-c++ on the next add-on.

#执行操作

[[Email protected] init] #salt   ' salt02 '  state.sls init.pkg-installsalt02:----------           ID: common_packages     function: pkg.installed      result: true      Comment: The following packages were installed/updated: dos2unix,  unzip     started: 14:00:56.508285    duration:  17426.738 ms     changes:                  ----------               dos2unix:                   ----------                   new:                       3.1-37.el6                   old:               unzip:                   ----------                   new:                       6.0-2.el6_6                   old: Summary------------succeeded: 1  (changed=1) failed:    0------------total  States run:     1[[email protected] init]# 

#这样salt02这个minion上就安装上你指定的安装包了.

#查看minion端

[Email protected] ~]# Rpm-qa Dos2unix unzipdos2unix-3.1-37.el6.x86_64unzip-6.0-2.el6_6.x86_64



Of course if you need to show the installation of more common software packages, you can continue to follow

Pkg-install.sls

Format to continue adding the package name you need.


Of course if you need to execute more Minion objects, please refer to:

Saltstack-gdlwolf Self-study summary of the third article: Salt common Instructions

http://gdlwolf.blog.51cto.com/343866/1786908

Refer to section 3rd above: The methods in all operation target parameters, executed to more Minion end in different ways.


This article is from the "Gdlwolf blog" blog, make sure to keep this source http://gdlwolf.blog.51cto.com/343866/1786919

Saltstack-gdlwolf Self-study summary of the fifth (method case): Pkg module initialization installation system common software package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.