This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
#require 'vagrant-salt' | |
# apart from the middleware node, create | |
# this many nodes in addition to the middleware | |
INSTANCES=2 | |
# the nodes will be called middleware.example.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
#require 'vagrant-salt' | |
require 'vagrant-hostmanager' | |
# apart from the middleware node, create | |
# this many nodes in addition to the middleware | |
INSTANCES=5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
append-file: | |
cmd: | |
- cwd: /tmp | |
- names: | |
{% for user, number in pillar.get('names', {}).items() %} | |
- echo {{ user }} {{ number }} >> logfile.txt | |
{% endfor %} | |
- run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
names: | |
joe: { 'number': 1, 'dir': '/tmp/1' } | |
mike: { 'number': 2, 'dir': '/tmp/2' } | |
sally: { 'number': 3, 'dir': '/tmp/3' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
append-file: | |
cmd: | |
- cwd: /tmp | |
- names: | |
{% for user, name in pillar['names'].iteritems() %} | |
- echo {{ user }} {{ name.['number'] }} >> logfile.txt | |
{% endfor %} | |
- run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if grains['os'] == 'Debian' %} | |
adm_group: sudo | |
{% else %} | |
adm_group: wheel | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base: | |
'os:OpenBSD': | |
- match: grain | |
- carp | |
- test | |
'db1 or app1': | |
- match: compound | |
- wordpress | |
'db1': | |
- users.admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@saltmaster:~# salt 'db1' state.show_sls users.group1 | |
db1: | |
---------- | |
root@saltmaster:~# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if grains['os'] == 'Debian' %} | |
{% set adm_group = sudo %} | |
{% else %} | |
{% set adm_group = wheel %} | |
{% endif %} | |
users: | |
mbarnett: | |
fullname: Melissa Barnett |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
2013-10-30 17:46:49,198 [salt.master ][ERROR ] Error in function _pillar: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/master.py", line 1494, in run_func | |
ret = getattr(self, func)(load) | |
File "/usr/lib/python2.7/dist-packages/salt/master.py", line 1107, in _pillar | |
data = pillar.compile_pillar() | |
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 451, in compile_pillar | |
pillar, errors = self.render_pillar(matches) | |
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 368, in render_pillar |
OlderNewer