On Thursday, October 10, 2013 4:54:31 AM UTC-5, [email protected] 
wrote:
>
> Hey Folks,
>
> I have two question, which I hope are minor. First off I would like an 
> array with all IPs for a system. This would come in handy for sshkeys, 
> hosts and the likes.
>
>

That kind of information can be provided to the master only in the form of 
one or more node facts, but node facts are always strings.  Therefore, you 
would need a custom function to produce the array you're after.  The 
standard node facts do include per-interface IP addresses, though, so your 
function probably just needs to collect those into an array.  Look for fact 
names of the form ipaddress_<ifc>, where <ifc> is any of the elements of 
the comma-delimited list provided by the 'interfaces' fact.  Be prepared 
for some interfaces to not have corresponding addresses, and ignore the 
plain 'ipaddress' fact, which will be a duplicate of one of the others.

 

> Second, and more important, I need to add a line into a file for every 
> host. To clarify here is an example:
>
> - I have 3 (theoretical) nameservers, which configs (zones) get 
> distributed over puppet.
> - I want, in each zonefile a line
>
> "mydomain.de. IN NS <$fqdn::dns::server>."
>
> Furthermore I want those lines purged if a NS does clean/deactivated.
>
>
Install PuppetLabs's useful 'stdlib' add-in module, which provides a 
File_line resource type that should do what you want.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to