> I've been trying to get some modules written for CentOS/RedHat working > on my Ubuntu systems, and wondering the best way to do this myself. A > good example is the differences between Apache on the two kinds of > system: > > Apache runs as 'www' on the RH systems, and 'www-data' on the > Debian-ish systems. > The default docroot is different as well - '/var/www/html' on RH and > '/var/www' on Debian/Ubuntu. > > The best solution I can think of at the module level is custom facts - > ideally derived from a source of truth like the apache packages > themselves.
I have done that by pretty and/or ugly statements like the following $vhosts_dir = $operatingsystem ? { centos => "$apache::centos::config_dir/vhosts.d", gentoo => "$apache::gentoo::config_dir/vhosts.d", debian => "$apache::debian::config_dir/vhosts.d", ubuntu => "$apache::ubuntu::config_dir/vhosts.d", openbsd => "$apache::openbsd::config_dir/vhosts.d", default => '/etc/apache2/vhosts.d', } [1] so far it works quite well. cheers pete [1] http://git.puppet.immerda.ch/?p=module-apache.git;a=blob;f=manifests/vhost/file.pp;h=caa649d12dba0d37108eb2878ed824077d93cacf;hb=00c03fcdaad9322c7610437953ee0fb4c009d4b5#l20 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.