This file contains 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
##### 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/pillar |
This file contains 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
#!py | |
import yaml | |
def run(): | |
config = yaml.load(file('/srv/pillar/common/nginx.sls', 'r')) | |
name = {'server_name': 'another-salt-test.com'} | |
root = {'root': '/var/www/another-salt-test.com/current/web'} |
This file contains 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
[ERROR ] Error in function _pillar: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1458, in run_func | |
ret = getattr(self, func)(load) | |
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1214, in _pillar | |
pillar = salt.pillar.Pillar( | |
AttributeError: 'dict' object has no attribute 'Pillar' |
This file contains 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
#!py | |
import yaml | |
def run(): | |
config = yaml.load(file('/srv/pillar/common/nginx.sls', 'r')) | |
name = {'server_name': 'another-salt-test.com'} | |
root = {'root': '/var/www/another-salt-test.com/current/web'} |