mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Expand environment variables and tildes passed to commands generically across the board.
This commit is contained in:
parent
0e38f5dfdc
commit
0b0ca95731
1 changed files with 3 additions and 0 deletions
|
@ -1018,6 +1018,9 @@ class AnsibleModule(object):
|
||||||
msg = "Argument 'args' to run_command must be list or string"
|
msg = "Argument 'args' to run_command must be list or string"
|
||||||
self.fail_json(rc=257, cmd=args, msg=msg)
|
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
|
rc = 0
|
||||||
msg = None
|
msg = None
|
||||||
st_in = None
|
st_in = None
|
||||||
|
|
Loading…
Reference in a new issue