Last active
August 29, 2015 13:56
-
-
Save mgwilliams/8986670 to your computer and use it in GitHub Desktop.
Revisions
-
mgwilliams revised this gist
Feb 14, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ #!nacl Service.running(pillar.get('service', 'nginx')) #this is totally contrived interfaces = salt['network.interfaces']() File.exists('interface-tmp', names=['/tmp/interface-{}'.format(i) for i in interfaces.keys()]) -
mgwilliams created this gist
Feb 14, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ import logging try: import nacl.state from nacl.auto import * from nacl.run import run HAS_NACL = True except ImportError: HAS_NACL = False # Set up logging log = logging.getLogger(__name__) __virtualname__ = 'nacl' def __virtual__(): if not HAS_NACL: log.info('NACL Renderer Loaded') return False return True def render(template, saltenv='base', sls='', tmplpath=None, rendered_sls=None, **kws): log.warning(kws) pillar = __pillar__ grains = __grains__ salt = __salt__ exec(template.read()) return 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!nacl Service.running(pillar.get('service', 'nginx'))