Skip to content

Instantly share code, notes, and snippets.

@jeremykendall
Created September 27, 2013 03:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremykendall/6723786 to your computer and use it in GitHub Desktop.
Save jeremykendall/6723786 to your computer and use it in GitHub Desktop.
Changing apache user and group in /etc/apache2/envvars using sed in a puppet exec. Stolen from https://github.com/Intracto/Puppet/blob/master/apache2/manifests/init.pp#L12-L26
exec { "sed -i 's/www-data/vagrant/g' /etc/apache2/envvars":
onlyif => "/bin/grep -c 'www-data' /etc/apache2/envvars",
notify => Service['apache2'],
require => Package['apache2'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment