saltstack 学习之pillar
【基本介绍】
Pillar is an interface for Salt designed to offer global values that can be distributed to all minions. Pillar data is managed in a similar way as the Salt State Tree.
pillar是用来存储全局变量的,格式跟state类似
【配置】
文件:/etc/salt/master
配置pillar的路径
##### Pillar settings #####
##########################################
# Salt Pillars allow for the building of global data that can be made selectively
# available to different minions based on minion grain filtering. The Salt
# Pillar is laid out in the same fashion as the file server, with environments,
# a top file and sls files. However, pillar data does not need to be in the
# highstate format, and is generally just key/value pairs.
pillar_roots:
base:
- /srv/salt/pillar
#ext_pillar:
# - hiera: /etc/hiera.yaml
# - cmd_yaml: cat /etc/salt/yaml
# The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate
# errors when contacting the pillar gitfs backend. You might want to set this to
# false if you're using a git backend that uses a self-signed certificate but
# keep in mind that setting this flag to anything other than the default of True
# is a security concern, you may want to try using the ssh transport.
#pillar_gitfs_ssl_verify: True
# The pillar_opts option adds the master configuration file data to a dict in
# the pillar called "master". This is used to set simple configurations in the
# master config file that can then be used on minions.
#pillar_opts: True
【原则】
pillar namespace
1.merge content from multiple pillar files,so long as conflicts are avoided(整合变量忽略冲突的)
【使用】
salt '*' pillar.items 还回所有的pillar
使用方法:{{ pillar['foo'] }}
{{ salt['pillar.get']('foo', 'qux') }}
在state里面使用pillar
[root@vpn pillar]# cat top.sls
base:
'*':
- packages
[root@vpn pillar]# cat packages.sls
hn: hostname
[root@vpn pillar]# cat /srv/salt/sls_config/test.sls
This is test:
cmd.run:
- name: {{ pillar['hn']}}
[root@vpn pillar]#
【参考】
http://docs.saltstack.com/en/latest/topics/pillar/
分享到:
相关推荐
BlackBerry provides a 7-Pillar recommendation to harden automobile electronics from attack. The solution is intended to make it significantly harder for an attacker to create mischief. This paper ...
sbt-pillar-plugin-从sbt管理Cassandra迁移 这个sbt插件允许从sbt运行Cassandra模式/数据迁移(使用)。 有关迁移文件的详细信息,请查看。 cassandra连接配置不是基于Struts的,而是我们使用自己的格式(请参阅 )...
盐栈配置文件前者:用 salt 配置一个 ubuntu 12.10... ./salt/roots/pillar - Struts数据./salt/roots/dot-configs - dot-config sls 状态./salt/roots/salt - 包 sls 状态设置递归克隆数据(包括子模块): git clone ...
ipmb/salt-minion 一个简单的 Dockerfile,用于设置 salt-minion 以对 Salt 状态进行干运行测试。 这对于推送到实时服务器之前的完整性检查格式非常有用。 您可以通过docker pull ipmb/salt-minion下载映像,也可以...
例如 ln -s /srv/salt/extra/pillar/salt_hierarchy_pillar/hierarchy_pillar.py /srv/salt/extra/pillar/在主配置中激活Struts: ext_pillar: - hierarchy_pillar:或更改默认值: ext_pillar: - hie
盐码头工人-centos6使用 Docker ... docker run -d --name=master -h master \ -v `pwd`/srv/salt:/srv/salt:rw \ -v `pwd`/srv/pillar:/srv/pillar:rw \ -v `pwd`/srv/reactor:/srv/reactor:rw ming/salt-masterdocke
The focus of this paper is the operational excellence pillar of the Amazon Web Services (AWS) Well-Architected Framework. It provides guidance to help you apply best practices in the design, delivery,...
老神的Struts 2021年的7天Roguelike
salt-lvs 基于SaltStack进行LVS(Linux Virtual Server)的配置管理 salt/ --> file_roots pillar/ --> pillar_roots
一种铸造双相不锈钢塑性变形的原位拉伸SEM和微柱压缩力学性能研究,郭恩宇,荆涛,本文针对一种铸造奥氏体铁素体双相不锈钢在电子扫描显微中开展了其常温条件下的原位拉伸变形研究。原位观察结果显示在外载荷下,
pillar grid是目前主流三维地质建模软件应用的结构化网格,提供储层流体流动的描述方法。如何更加直观地展示地质体构造形态,将地质体网格数据中三维地质体表面模型提取出来在地质建模中具有较高的应用价值。因此,...
pillar, Pillar管理你的Cassandra数据存储的迁移 柱用于你的数据存储的支柱管理迁移。Pillar希望自动管理Cassandra模式的愿望。 作为代码管理模式能够实现自动化构建和部署,这是组织努力实现持续交付过程的基本实践...
Linux运维-运维构架师-06-SaltStack数据系统-Pillar.mp4
盐 iptables关于尽管iptables配置被设计成一个公式,但它的名称中并没有包含公式,因为它的设计不... 而不是使用单个pillar.example文件,这将与此 repo 中的 iptable 状态的模块化设计不一致。 这个 repo 使用多个 pil
Frequency Domain to Baseband-complex time-domain Modeling in RF Blockset.zip
本资源包含本人用SaltStack之Pillar和Jinja实现一健部署LVS+Keepalived+Haproxy的源码(srv.tar.gz),本人测试通过,有需要的可以下载下来学习。具体可参考本人博客:http://t.cn/ROB68fc 资源内容: ├── pillar...
The focus of this paper is the security pillar of the Well-Architected Framework. It provides guidance to help you apply best practices in the design, delivery, and maintenance of secure AWS ...
中心Struts网 用于点云对象检测的无锚方法。 结果
oracle 存储 pillar 培训资料
generate-secure-pillar [全局选项]命令[命令选项] [参数...] 版本1.0.574 作者 埃德·席尔瓦(Ed Silva) 自制安装 brew tap esilva-everbridge/homebrew-generate-secure-pillar brew install generate-secure-...