Created
January 5, 2015 20:18
-
-
Save mprymek/089409060b44c5d0ff49 to your computer and use it in GitHub Desktop.
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 | |
import os.path | |
def run(): | |
files = {} | |
pillar_root = __opts__['pillar_roots'][__env__][0] | |
priv_root = '%s/_priv/%s'%(pillar_root,__opts__['id']) | |
for dirname, dirnames, fnames in os.walk(priv_root): | |
for fname in fnames: | |
files[fname] = open(os.path.join(priv_root,fname)).read() | |
return { | |
'files': files, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment