Running newaliases for 'mailalias'

861 views
Skip to first unread message

Darryl Ross

unread,
Sep 14, 2008, 7:30:07 PM9/14/08
to Puppet Users
Hi All,

Should puppet automatically run the newaliases system command on Linux after
adding an alias using the 'mailalias' type? None of my CentOS 5 systems or
Ubuntu 8.10a5 laptop have done this.

I'm having a read through the source, but I'm a python person, not a ruby
programmer, so it's taking me a while.

If puppet does not automatically run newaliases, is there something I can set
up an Exec to Subscribe to?

Regards
Darryl

AJ

unread,
Sep 14, 2008, 7:37:32 PM9/14/08
to puppet...@googlegroups.com
Mailalias { notify => Exec['newaliases']} in your highest available
scope will set the defaults for mailalias

Darryl Ross

unread,
Sep 14, 2008, 10:16:46 PM9/14/08
to puppet...@googlegroups.com
AJ wrote:
> Mailalias { notify => Exec['newaliases']} in your highest available
> scope will set the defaults for mailalias

Worked a treat, thanks.

Jeroen van Meeuwen (GMail)

unread,
Sep 15, 2008, 3:09:29 AM9/15/08
to puppet...@googlegroups.com
Darryl Ross wrote:
> AJ wrote:
>> Mailalias { notify => Exec['newaliases']} in your highest available
>> scope will set the defaults for mailalias
>
> Worked a treat, thanks.
>

In addition, you could make the Exec["newaliases"] say:

exec { "newaliases":
cmd => "/path/to/newaliases",
refreshonly => true
}

so that it is only executed if there really is a change in mail alias
resources managed by puppet.

Kind regards,

Jeroen van Meeuwen
-kanarip

Reply all
Reply to author
Forward
0 new messages