On Mon, Nov 22, 2010 at 07:48:18AM +0000, Paul Nasrat wrote: > I think there is an augeas lens for /etc/services - see eg > > http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas#Adding+a+service+that+uses+both+TCP+and+UDP+to+/etc/services > > So you possibly could write a define or something to do what you want there. > > Paul
But I think that will mean, that I have to deploy augeas to all my
machines. I was trying to avoid that. And I think that this file is
worth it to be supported by puppet directly.
I just had another thought:
* Use name and protocol as a combined key to identify an entry. (I have
to find out if parsedfile supports that directly or if I can fake that
by munging name). The result whould be that
port {'telnet':
number => 22,
protocol => tcp,
}
will not override a telnet udp entry. But if I want to specify both
udp and tcp its really ugly:
port {'telnet_udp':
name => 'telnet',
number => 22
protocol => udp,
}
* create two types and provider. tcpport and udport. You can now say
tcpport {'telnet': number => 22},
udpport {'telnet': number => 22},
But I dont know what happens if two different types want to handle the
same file. If both ports are absent I guess the tcpprovier will
override /etc/services with telnet 22/tcp and then udpport will
override /etc/services, thus telnet 22/tcp is absent again.
-Stefan
pgp8nHGEPweF1.pgp
Description: PGP signature
