Get User ID / Managing Port Numbers
I have a custom module that uses other modules to set 'good' values for internal use. For example creating a virtualhost takes two hiera lines and automatically figures out home and log directories etc etc.
I am using PHP FPM with Ubuntu 14.04 and need a way to calculate port numbers so other developers don't have to specify them. Each user on the system has their own FPM pool (which requires a unique port for this setup). As each pool has a unique user my initial thought was to get the users id and prefix a number. For example:
3 (prefix) + 1009 (uid) = Port 31009
Can Puppet get a users id? If not what is a better approach to generate port numbers that can be retrieved for later use in a module?