Ask Your Question
0

How to list a files and its names in Puppet ( Linux )

asked 2016-01-13 04:16:50 -0500

updated 2016-01-13 04:22:59 -0500

We are having multiple unstructured static IpAddress configuration in linux.

Like the below :

( i ) ifcfg-eth0
( ii ) ifcfg-eth0:1
( iii ) ifcfg-eth0:2
( iv ) ifcfg-eth1
( v ) ifcfg-eth2:2
( vi) ifcfg-eth3:5

Each machine, We are going to have some sorts of files ( like the above unstructured way).

I would like create new file with new ipaddress. Inorder to do that We need to know the last used file / used filename.

I think we could achieve it from the custom function, but not sure. Any help would be much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-14 07:32:43 -0500

simplest way would be to have the interface name/ip address/subnet mask in hiera - then one source of data for this - i.e. puppet controls all the interfaces - otherwise you could run into issues like I have in some clients where they have application scripts that bring up/down interfaces and could run into conflicts.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-13 04:16:50 -0500

Seen: 83 times

Last updated: Jan 14 '16