Saltstack--pillar

Source: Internet
Author: User

5. Pillar
pillar and grains are not the same, they are defined on the master 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.aming.com ' Pillar.items

Configure the Custom pillar

Vim/etc/salt/master//operation on Master

Locate the following configuration:
pillar_roots:
Base:
-/srv/pillar
remove the front siren.
Mkdir/srv/pillar
Vi/srv/pillar/test.sls//content is as follows
conf:/etc/123.conf

Vi/srv/pillar/top.sls//content is as follows
Base:
' client.aming.com ':
-Test

Module name cannot be a number

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:
Salt ' * ' saltutil.refresh_pillar

Verify:

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


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.