1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix template module

This commit is contained in:
Michael DeHaan 2012-03-14 19:08:10 -04:00
parent 6b152c94b9
commit 917f929e86

View file

@ -31,8 +31,13 @@ except ImportError:
# to a dictionary # to a dictionary
# FIXME: make more idiomatic # FIXME: make more idiomatic
args = " ".join(sys.argv[1:]) if len(sys.argv) == 1:
items = shlex.split(args) sys.exit(1)
argfile = sys.argv[1]
if not os.path.exists(argfile):
sys.exit(1)
items = shlex.split(open(argfile, 'r').read())
params = {} params = {}
for x in items: for x in items:
(k, v) = x.split("=") (k, v) = x.split("=")