diff --git a/salt/states/cmd.py b/salt/states/cmd.py index f1a3e8e42f..f3e733ced9 100644 --- a/salt/states/cmd.py +++ b/salt/states/cmd.py @@ -231,7 +231,7 @@ def _run_check(cmd_kwargs, onlyif, unless, cwd, user, group, shell): def wait(name, onlyif=None, unless=None, - cwd='/root', + cwd=None, user=None, group=None, shell=None, @@ -280,7 +280,7 @@ def wait_script(name, template=None, onlyif=None, unless=None, - cwd='/root', + cwd=None, user=None, group=None, shell=None, @@ -445,7 +445,7 @@ def script(name, template=None, onlyif=None, unless=None, - cwd='/root', + cwd=None, user=None, group=None, shell=None, @@ -505,7 +505,7 @@ def script(name, 'name': name, 'result': False} - if not os.path.isdir(cwd): + if cwd and not os.path.isdir(cwd): ret['comment'] = 'Desired working directory is not available' return ret