- From: Andrew Hodgson <
>
- To: "
" <
>
- Subject: [chef] RE: Re: Chef newbie: Web.config manipulations
- Date: Wed, 23 Sep 2015 10:09:51 +0000
- Accept-language: en-GB, en-US
- Authentication-results: spf=none (sender IP is )
;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
Tensibai wrote:
>
Le 2015-09-22 17:27, Andrew Hodgson a écrit :
>
>
>
>Hi,
>
>
>
>Just wondering if there is any tutorial out there that goes through
>
>modifying Windows .net .config files using Chef whereby the config file is
>
>tokenised in the following way:
>
>
>
> <connectionStrings>
>
> <add name="MyConnectionString" connectionString="Data
>
> Source=__AppDBServer__;Initial Catalog=__AppDatabase__;User
>
> ID=__AppDBUserID__;Password=__AppDBPassword__"
>
> providerName="System.Data.SqlClient" />
>
> </connectionStrings>
>
>
>
>I want a range of tokens which are unique across the different environments
>
>and can be used across apps, and the system will replace the relevant
>
>values with the actual values. I have used DSC XTokenize module to do
>
>similar in the past, but I >>want to see if I can do it in Chef, possibly
>
>using data bags to store the information.
[...]
>
If they are standard text files, templates[1] are the way to go, I would
>
set the attributes in a chef-vault[2] (to keep the password encrypted on
>
the chef-server side) and named the databag item per the environment.
I did look into templates quite a bit, but wanted a more simple token
replacement strategy rather than relying on a more complex Erubis structure.
I went back to using DSC tokenization in the end using the xTokenize module.
Thanks for confirming I was looking in the right direction though.
Best.
Andrew.
Archive powered by MHonArc 2.6.16.