diff --git a/salt/states/saltmod.py b/salt/states/saltmod.py index 593e6f6b25..6dc35fdcfc 100644 --- a/salt/states/saltmod.py +++ b/salt/states/saltmod.py @@ -233,6 +233,9 @@ def state(name, if pillar: cmd_kw['kwarg']['pillar'] = pillar + if __opts__.get('pillarenv'): + cmd_kw['kwarg']['pillarenv'] = __opts__['pillarenv'] + cmd_kw['kwarg']['saltenv'] = __env__ cmd_kw['kwarg']['queue'] = queue diff --git a/tests/unit/statemod_test.py b/tests/unit/statemod_test.py new file mode 100644 index 0000000000..6654740ae0 --- /dev/null +++ b/tests/unit/statemod_test.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +''' + :codeauthor: :email:`Eric Radman