saltstack/salt — pull request #17226 by hvnsweeting (2014-11-06 10:08:39+00:00)
Title: default run as root user because ``erlexec`` need HOME env to be set

with salt2014.1.10, we got this problem:

````
Nov 3 07:16:06 rmq-1 salt-minion[9209] salt.loaded.int.module.cmdmod: Command '/usr/sbin/rabbitmq-plugins list -m -e' failed with return code: 1
Nov 3 07:16:06 rmq-1 salt-minion[9209] salt.loaded.int.module.cmdmod: output: erlexec: HOME must be set
Nov 3 07:16:06 rmq-1 salt-minion[9209] salt.loaded.int.module.cmdmod: Command '/usr/sbin/rabbitmq-plugins enable rabbitmq_management' failed with return code: 1
Nov 3 07:16:06 rmq-1 salt-minion[9209] salt.loaded.int.module.cmdmod: stderr: erlexec: HOME must be set
Nov 3 07:16:06 rmq-1 salt-minion[9209] salt.state: {'pid': 13533, 'retcode': 1, 'stderr': 'erlexec: HOME must be set', 'stdout': ''}

````

It caused by when call /usr/sbin/rabbitmq-plugins, salt module run it with user ``root`` but not set ENV - which will be set it user specify ``runas``, so the state will fail if user does not set runas to an user.

This only happen when call the minion from master , because if run with salt-call (--local) on minion, salt will get env from running bash session.