Skip to content

Instantly share code, notes, and snippets.

View jvblasco's full-sized avatar

José Vicente Blasco Torres jvblasco

  • Sebafactory
  • Valencia
View GitHub Profile
@jvblasco
jvblasco / master.conf
Last active August 29, 2015 14:21
Library salt.pillar assigned to an empty dictionary
##### 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
#!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'}
[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'
#!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'}