with the content
> > > parameter set to a template. In the template you can access the
> variables to
> > > set up that line properly. Of course if you need to add more hosts to a
> > > system it will be sort of a pita.
> > > > Sent from my Verizon Wir
parameter set to a template. In the template you can access the variables to
> > set up that line properly. Of course if you need to add more hosts to a
> > system it will be sort of a pita.
> > > Sent from my Verizon Wireless BlackBerry
>
> > > -Original Message
plate. In the template you can access the variables to
> set up that line properly. Of course if you need to add more hosts to a
> system it will be sort of a pita.
> > Sent from my Verizon Wireless BlackBerry
> >
> > -Original Message-
> > From: ELTigre
> &
Berry
-Original Message-
From: ELTigre
Date: Wed, 2 Sep 2009 18:42:37
To: Puppet Users
Subject: [Puppet Users] Re: Host type usage
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"
riginal Message-
> From: ELTigre
>
> Date: Wed, 2 Sep 2009 18:42:37
> To: Puppet Users
> Subject: [Puppet Users] Re: Host type usage
>
> A question:
>
> I want to make a class to delete all lines (if any) in /etc/hosts and
> add this two new lines:
>
> clas
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 =>
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,
A
swygue wrote:
> I trying to get puppet to add an entry to /etc/hosts, but I can't get
> it to work. I have a class file host.pp with the following content:
>
> class host {
> host { "${fqdn}":
> ensure => present,
> ip => $ipaddress,
> alias =>