Expand environment variables and tildes passed to commands generically across the board.

remotes/origin/release1.5.3
Michael DeHaan 11 years ago committed by Michael DeHaan
parent 72c7841c57
commit dbfcf0325e

@ -1017,6 +1017,9 @@ class AnsibleModule(object):
msg = "Argument 'args' to run_command must be list or string"
self.fail_json(rc=257, cmd=args, msg=msg)
# expand things like $HOME and ~
args = [ os.path.expandvars(os.path.expanduser(x)) for x in args ]
rc = 0
msg = None
st_in = None

Loading…
Cancel
Save