Last active
December 12, 2015 09:39
-
-
Save rca/4753083 to your computer and use it in GitHub Desktop.
A python-based pillar `sls` file that uses grains data to create a `Network` object. The network object is returned in a dictionary that is included in the render context.
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
addr={{ pillar['shoe']['network'].addr }} |
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
#!py | |
from somewhere import Network | |
def run(): | |
# the grains variable is available inside the run() function. | |
return { | |
'shoe': { | |
'mirror': 'http://apt:3142/archive.ubuntu.com/ubuntu', | |
'network': Network(grains['nodename']), | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment