We do the following:
class mail::aliases {
file {
"/etc/aliases" :
mode => 644,
owner => "root",
group => "root",
alias => 'aliases';
}
exec {
"newaliases" :
command => "/usr/bin/newaliases",
refreshonly => true,
subscribe => File['aliases'];
}
}
So /etc/aliases is defined as a resource, however no contents are
actually managed. You could use this on nodes where you don't want to
manage the contents of the alias. We have another class that is
included on some machines that sets the root forwarding in
/etc/aliases just like your example did.
Matt
On Wed, Sep 23, 2009 at 10:21 AM, John Ingersoll <jh.ing...@gmail.com>
We do the following:
class mail::aliases {
file {
"/etc/aliases" :
mode => 644,
owner => "root",
group => "root",
alias => 'aliases';
}
exec {
"newaliases" :
command => "/usr/bin/newaliases",
refreshonly => true,
subscribe => File['aliases'];
}
}
So /etc/aliases is defined as a resource, however no contents are
actually managed. You could use this on nodes where you don't want to
manage the contents of the alias. We have another class that is
included on some machines that sets the root forwarding in
/etc/aliases just like your example did.
Matt