FAQ
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.

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.


Thanks for your help in advance!
-Christian.

--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jcbollinger at Oct 10, 2013 at 1:52 pm

    On Thursday, October 10, 2013 4:54:31 AM UTC-5, christian...@googlemail.com 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 puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Christian Reiss Sg at Oct 23, 2013 at 8:39 am
    Hey folks,

    that worked, thanks.

    -Christian.

    Am Donnerstag, 10. Oktober 2013 11:54:31 UTC+2 schrieb
    christian...@googlemail.com:
    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.

    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.


    Thanks for your help in advance!
    -Christian.
    --
    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 puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 10, '13 at 10:47a
activeOct 23, '13 at 8:39a
posts3
users2
websitepuppetlabs.com

2 users in discussion

Christian Reiss Sg: 2 posts Jcbollinger: 1 post

People

Translate

site design / logo © 2021 Grokbase