Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Saltstack data system-- pillar

2025-03-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Pillar storage location: masterside, data type: dynamic data, data acquisition method:

Define it on the master side and assign it to the corresponding minion. You can use saltuitl.refresh_pillar to refresh.

Application: stores the data specified by master. Only the specified minion can see it. Used to store sensitive data.

Use an example to understand:

# salt'* 'pillar.items### is not displayed by default. You need to open the configuration option and restore this item to the line # vim / etc/salt/master###552 after the demonstration. Pillar_opts: True### restart service / etc/init.d/salt-master restart### execute salt'* 'pillar.items again and it will be displayed # define pillar data # # vim / etc/salt/master open The following three lines: pillar_roots: base:-/ srv/pillar save exit mkdir / srv/pillar/etc/init.d/salt-master restart#### # vim / srv/pillar/apache.sls {% if grains ['os'] = =' CentOS'%} apache: httpd {% elif grains ['os'] = =' Debian'%} apache: apache2 {% endif%} # vim / srv/pillar/top.slsbase:'*':-apache # # salt'* 'saltutil.refresh_pillar # refresh salt' * 'pillar.items # # pillar location host # # salt-I' apache:httpd' test.ping

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report