FAQ
Hi all,

As I used Puppet to set up on my laptop some local website with NGinx, I
often need to add entry to /etc/hosts. I tried to hack that for a long time
using exec and shell script, and - as almost always with exec, it turned
out to be quite cumbersome. I googled a bit a find a module doing that, but
also using exec - so I end up writing my own extension:

Maybe some of you will find that useful:
https://github.com/rpelisse/puppet-local-dns-ext

PS: I'm far from being a Ruby developer, so any comment on the quality of
it, or the lack of respect of some practises in the Ruby world are
appreciated !

--
Romain PELISSE,
*"The trouble with having an open mind, of course, is that people will
insist on coming along and trying to put things in it" -- Terry Pratchett*
Belaran ins Prussia (blog) <http://blog.wordpress.belaran.eu/> (...
finally up and running !)

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Dan White at Dec 21, 2012 at 8:28 pm
    Why re-invent the wheel ?

    http://docs.puppetlabs.com/references/latest/type.html#host
    http://www.puppetcookbook.com/posts/adding-a-host-entry.html

    “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
    Bill Waterson (Calvin & Hobbes)

    ----- Original Message -----
    From: "Romain Pelisse" <belaran@gmail.com>
    To: puppet-users@googlegroups.com
    Sent: Friday, December 21, 2012 2:38:27 PM
    Subject: [Puppet Users] A simple module to manipulate entry in /etc/hosts

    Hi all,


    As I used Puppet to set up on my laptop some local website with NGinx, I often need to add entry to /etc/hosts. I tried to hack that for a long time using exec and shell script, and - as almost always with exec, it turned out to be quite cumbersome. I googled a bit a find a module doing that, but also using exec - so I end up writing my own extension:


    Maybe some of you will find that useful: https://github.com/rpelisse/puppet-local-dns-ext



    PS: I'm far from being a Ruby developer, so any comment on the quality of it, or the lack of respect of some practises in the Ruby world are appreciated !

    --
    Romain PELISSE,
    "The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it" -- Terry Pratchett
    Belaran ins Prussia (blog) (... finally up and running !)

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Romain Pelisse at Dec 21, 2012 at 8:32 pm
    Grrr.... I had googled around for a proper solution for a while before
    doing this. Well, googling does not replace community knowledge, not a
    surprise here. I should have ask around - like on this ML.

    (To be faire, I also did this extension to learn how to make an extension)

    Le 21 déc. 2012 21:28, "Dan White" <ygor@comcast.net> a écrit :

    Why re-invent the wheel ?

    http://docs.puppetlabs.com/references/latest/type.html#host
    http://www.puppetcookbook.com/posts/adding-a-host-entry.html

    “Sometimes I think the surest sign that intelligent life exists elsewhere
    in the universe is that none of it has tried to contact us.”
    Bill Waterson (Calvin & Hobbes)


    ----- Original Message -----
    From: "Romain Pelisse" <belaran@gmail.com>
    To: puppet-users@googlegrou...
    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Dan White at Dec 21, 2012 at 8:45 pm
    No problem.
    With luck, your experience writing a provider/type will not go to waste.

    Enjoy.

    “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
    Bill Waterson (Calvin & Hobbes)

    ----- Original Message -----
    From: "Romain Pelisse" <belaran@gmail.com>
    To: puppet-users@googlegroups.com
    Sent: Friday, December 21, 2012 3:32:25 PM
    Subject: Re: [Puppet Users] A simple module to manipulate entry in /etc/hosts



    Grrr.... I had googled around for a proper solution for a while before doing this. Well, googling does not replace community knowledge, not a surprise here. I should have ask around - like on this ML.

    (To be faire, I also did this extension to learn how to make an extension)



    Le 21 déc. 2012 21:28, "Dan White" < ygor@comcast.net > a écrit :

    Why re-invent the wheel ?

    http://docs.puppetlabs.com/references/latest/type.html#host
    http://www.puppetcookbook.com/posts/adding-a-host-entry.html

    “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
    Bill Waterson (Calvin & Hobbes)



    ----- Original Message -----
    From: "Romain Pelisse" < belaran@gmail.com >
    To: puppet-users@googlegrou... --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com .
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com .
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en .

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com .
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com .
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en .





    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Matthaus Owens at Dec 21, 2012 at 8:36 pm
    Romain,
    Did you try using the built-in host resource type (It shouldn't have
    been necessary to use execs and shell)?
    http://docs.puppetlabs.com/references/latest/type.html#host
    On Fri, Dec 21, 2012 at 11:38 AM, Romain Pelisse wrote:
    Hi all,

    As I used Puppet to set up on my laptop some local website with NGinx, I
    often need to add entry to /etc/hosts. I tried to hack that for a long time
    using exec and shell script, and - as almost always with exec, it turned out
    to be quite cumbersome. I googled a bit a find a module doing that, but also
    using exec - so I end up writing my own extension:

    Maybe some of you will find that useful:
    https://github.com/rpelisse/puppet-local-dns-ext

    PS: I'm far from being a Ruby developer, so any comment on the quality of
    it, or the lack of respect of some practises in the Ruby world are
    appreciated !

    --
    Romain PELISSE,
    "The trouble with having an open mind, of course, is that people will insist
    on coming along and trying to put things in it" -- Terry Pratchett
    Belaran ins Prussia (blog) (... finally up and running !)

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Matthaus Owens
    Release Manager, Puppet Labs

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedDec 21, '12 at 7:38p
activeDec 21, '12 at 8:45p
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase