Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!py
- import os
- def gen_symlink_struct(filename, basepath, targetdir):
- retdir= {
- 'file.symlink': [
- {"target" : "%s/%s" % (basepath, filename)},
- {"name" : "%s/%s" % (targetdir, filename)}
- ]
- }
- return retdir
- def run():
- retdict={}
- installdir="%s/bin" % pillar['site-mongodb_install_dir']
- for f in os.listdir(installdir):
- retdict["%s_symlink" % f] = gen_symlink_struct(f, installdir, "/usr/bin")
- return retdict
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement