Ask Your Question
0 Web.Config - Best Practices

asked 2017-01-23 14:20:23 -0600

senthilvv28 gravatar image

We are trying to come up with the best approaches to manage web.config files through puppet., Following the principal of build package once for all environment , we have package say (.zip) file with application ,bin and other files. Now after the files are placed in the target folder we would like build/create the correct web.config on the servers based on the config details in the Hierra data.

What is the best approach to handle web.config /app.config files which are environment specific through puppet .

edit retag flag offensive close merge delete


I'm not familure with the web.config files, but is there an augeas lens that would allow you to update individual values that are environment specific?

DarylW gravatar imageDarylW ( 2017-01-23 15:58:37 -0600 )edit

Yes that is correct. This file has Key value pairs for config information. 1. This file can be added part of the package . 2. The Values in the config have to replaced after the package is deployed from Artifcatory. The values will change per environment. <add key="ConnectionInfo" value="??"/>

senthilvv28 gravatar imagesenthilvv28 ( 2017-01-23 16:55:17 -0600 )edit

New to Puppet , after your comment read about Augeas lens . Not sure whats the correct way for windows Any suggestions people for replacing configs in xml, JSON files on WINDOWS.

senthilvv28 gravatar imagesenthilvv28 ( 2017-01-23 17:08:20 -0600 )edit

Ah, I didn't realize that augeas wasn't available for windows. Following the example from the question you linked, if it works for you, is a straightforward way to do it. It would be much better if there was a native way to do it.

DarylW gravatar imageDarylW ( 2017-01-24 09:31:42 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-24 21:08:06 -0600

DarylW gravatar image

Thanks to waveclass on the freenode #puppet channel for these recommendations from the forge for interacting with XML. There are probably additional options available beyond these.

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


Asked: 2017-01-23 14:20:23 -0600

Seen: 224 times

Last updated: Jan 24 '17