-
-
Save dstokes/f3c7f57bc2c26759dfe4 to your computer and use it in GitHub Desktop.
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
import redis | |
def ext_pillar(minion_id, pillar, **kw): | |
data = {} | |
host = kw.get('host', 'localhost') | |
port = kw.get('port', 6379) | |
r = redis.StrictRedis(host=host, port=port, db=0) |
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
- __builtins__ | |
- __doc__ | |
- __file__ | |
- __grains__ | |
- __name__ | |
- __opts__ | |
- __package__ | |
- __pillar__ | |
- __salt__ | |
- ext_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
[ERROR ] Failed to load ext_pillar envs: 'module' object has no attribute 'StrictRedis' | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 515, in ext_pillar | |
key) | |
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 476, in _external_pillar_data | |
ext = self.ext_pillars[key](self.opts['id'], pillar, **val) | |
File "/srv/salt-states/modules/pillar/envs.py", line 9, in ext_pillar | |
r = redis.StrictRedis(host=host, port=port, db=0) | |
AttributeError: 'module' object has no attribute 'StrictRedis' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment