* Fix for setting remote_tmp as a subdirectory of a system temp dir (#36143)

Fixes #35666

* Check that system_temps is all absolute paths
This commit is contained in:
Toshio Kuratomi 2018-02-14 17:34:14 -08:00 committed by Brian Coca
parent 9066b17d5d
commit 15fe59ef0c
2 changed files with 25 additions and 1 deletions

View file

@ -1823,6 +1823,13 @@ class ShellModule(ShellBase):
# TODO: add binary module support
def set_options(self, task_keys=None, var_options=None, direct=None):
super(ShellModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
# set env
self.env.update(self.get_option('environment'))
def assert_safe_env_key(self, key):
if not self.safe_envkey.match(key):
raise AnsibleError("Invalid PowerShell environment key: %s" % key)