A question:
I want to make a class to delete all lines (if any) in /etc/hosts and
add this two new lines:
class hosts {
host { "$hostname":
ensure => present,
ip => "$ipaddress",
alias => ["$hostname"],
name => ["$fqdn"],
}
host { "localhost":
ensure => present,
ip => "127.0.0.1",
name => ["localhost"],
alias => ["localhost.localdomain"],
}
}
What do I need to add my class to delete all lines of every server and
add ONLY this two hosts above?
regards,
Israel.
On Sep 2, 2:48 am, Avi Miller <[email protected]> wrote:
> On 02/09/2009, at 5:43 PM, David Schmitt wrote:
>
> >> alias => ["$fqdn", "$hostname"]
>
> > yes, but you have to "include host" somewhere in the node.
>
> Also, don't put the $fqdn into the alias field. It is automatically
> added by the host provider. You just need the $hostname.
>
> cYa,
> Avi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---