Saturday, February 23, 2013

Puppet tip

I have a custom puppet type called iptables. Not surprisingly it is used to build iptables rules.

Recently I was setting up a router which required MASQUERADING a few virtual network interfaces. I found that the module was lacking the ability to negate a match. For example I wanted a rule:
-A FORWARD ! -s 192.168.1.0/24 -i vnet -j DROP

It seemed like a simple task to add in the ability to insert the !. After all it is mostly just string manipulation.

My puppet setup already has pluginsync enabled and working so I though deploying my changes would be easy too.

I managed to make my changes (even though ruby is quite a foreign language to me). When I ran puppet I could see the changes being pulled down to the client but alas, it did not work correctly.

I checked with several web pages which try to explain how easy it is to add new properties and everything I was doing was correct.

After wasting hours tinkering in the ruby code I had the idea to restart the puppet master and bang, it started working.

Seems so obvious in hindsight.

7 comments:

  1. We should read these messages more often Miranda

    ReplyDelete
  2. This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this.
    girls go games

    ReplyDelete
  3. It is amazingly decent to see the best subtle elements introduced in a simple and understanding way.

    사설토토
    카지노사이트
    파워볼
    온라인카지노

    ReplyDelete
  4. I require you to thank for your period of this extraordinary read !!! I definitely welcome every last bit of it and I have you bookmarked to take a gander at new stuff of your blog a certain prerequisite read blog!

    사설토토
    온라인바카라
    파워볼사이트
    바카라사이트

    ReplyDelete
  5. This site and I consider this web website is extremely instructive! Keep on setting up!

    토토
    스포츠토토
    토토사이트
    먹튀검증

    ReplyDelete