puppet-apache: process_user param

50 views
Skip to first unread message

Daniel Londero

unread,
Jun 14, 2013, 10:31:31 AM6/14/13
to example42-pu...@googlegroups.com
Hi all, I needeed to set a custom user for Apache and reading in the init.pp looks like I should do:

class { 'apache':
  process_user => 'vagrant',
}

But I still see Apache running as www-data (default for Ubuntu). Am I doing something wrong?

Alessandro Franceschi

unread,
Jun 14, 2013, 10:45:03 AM6/14/13
to example42-pu...@googlegroups.com
By default the Apache module, as many other Example42 modules, do not modify existing configuration files unless you don't provide them explicitely.
So, in order to modify the apache use you have to pass a (custom) erb template for httpd.conf where you use the @process_user variable..
Something like:

class { 'apache':
  process_user => 'vagrant',
  template => 'site/apache/httpd.conf.erb',
}

and in site/templates/apache/httpd.conf.erb you need something like:
User <%= @process_user %>

Daniel Londero

unread,
Jun 14, 2013, 10:47:58 AM6/14/13
to example42-pu...@googlegroups.com
That's perfect. I was missing that part.

Thank you very much Alessandro!
Reply all
Reply to author
Forward
0 new messages