cfengine lets you manage you network (including editing files automatically), in an object-oriented manner.