> The problem in this case is this declaration inside your "preseed"
> definition:
>
> file { "/etc/dhcp/dhcpd.conf-$name":
> ...
> path => "/etc/dhcp/dhcpd.conf",
> ...
> } #file
>
> Note that you are giving a literal path to a resource declared within
> a defined type. That would work if you only declared one instance of
> the defined type, but it creates a conflict if you declare more than
> one.
>
> The solution looks easy in this case, because the problematic
> declaration doesn't really depend on its context (that should have
> been your first clue that it didn't belong there). Pull it out and
> make it a sibling of the preseed { ... } declaration block:
>
> preseed {
> "node1":
> ...
>
> } # preseed
>
> file { "/etc/dhcp/dhcpd.conf":
> ...
>
> } #file
>
> John
Hi,
unfortunately this doesnt work. In preseed {...} i declare variables
for each node, which are then used in file {"/etc/dhcp/dhcpd.conf":}
in template content => template("preseed/dhcpd.conf.erb").
If I make file {"/etc/dhcp/dhcpd.conf":} sibling of preseed {...},
then variables from preseed are not available in template.
I want to perform this. For each node I want to add one line into /etc/
dhcp/dhcpd.conf :
...
host n1 { hardware ethernet 78:e7:d1:24:5c:10; fixed-address
192.168.1.1; }
host n2 { hardware ethernet 78:e7:d1:24:5c:11; fixed-address
192.168.1.2; }
host nx { hardware ethernet 78:e7:d1:24:5c:1@; fixed-address
192.168.1.x; }
...
Jiri
--
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.