cfengine/core — pull request #1413 by skreuzer (2014-02-12 23:33:01+00:00)
Title: Add speical variable 'user' which can be used to access information about the current user during execution

This will currently introduce 5 new special variables that contain some basic information about the user who is currently running cf-agent. This can be useful so you have have folks run cf-agent by hand to configure their environment

```
bundle agent user
{

reports:

freebsd::

"$(const.dollar)(user.name) = $(user.name)";
"$(const.dollar)(user.uid) = $(user.uid)";
"$(const.dollar)(user.gid) = $(user.gid)";
"$(const.dollar)(user.homedir) = $(user.homedir)";
"$(const.dollar)(user.shell) = $(user.shell)";
}
```

```
$ cf-agent -K -f ./test.cf -b user
R: $(user.name) = skreuzer
R: $(user.uid) = 1002
R: $(user.gid) = 1002
R: $(user.homedir) = /home/skreuzer
R: $(user.shell) = /usr/local/bin/zsh
```