2.4-saltstack Pillar

Source: Internet
Author: User
Tags saltstack

Pillar

Pillar and grains are not the same, they are defined on the server and are some information that is defined for minion. Like some of the more important data (passwords) can exist in pillar, you can also define variables and so on.


View the pillar value for the specified minion (the version I tested is empty):

Salt ' client.wyp.com ' pillar.items


Configure custom pillar on server

Vim/etc/salt/mster

Locate the following configuration:

Pillar_roots:

Base: #空两个空格

-/srv/pillar #继续空两个空格, YAML format. Fixed notation

Remove the previous # number

Mkdir/srv/pillar

VI/SRV/PILLAR/TEST.SLS//content as follows, customize some pillar information, the module name cannot start with a number.

Conf:/etc/123.conf


VI/SRV/PILLAR/TOP.SLS//content is as follows, the total Portal configuration file, otherwise the above configuration does not take effect.

Base

' Client.wyp.com ': #客户端列表

-Test #加载test


Restart Master

/etc/init.d/salt-master restart


After the pillar configuration file is changed, we can get the new pillar state by refreshing the pillar configuration: no reboot required

Salt ' * ' saltutil.refresh_pillar


Verify:

Salt ' * ' Pillar.items

Salt ' * ' Pillar.item test


Pillar can also be used as a matching object for salt. Like what

Salt-i ' conf:/etc/123.conf ' test.ping


2.4-saltstack Pillar

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.