Friday, 15 August 2014

ruby - Reading user-specific environment variables in Chef -


I'm new to Chef and Ruby and trying to understand how I can read an environment variable from a specific Linux / Windows user. And use it to keep a file.

What do I have to do, update our Oracle tnsnames.ora files for customer and DB installations.

These files can be in a code such as C: \ oracle or C: \ program files \ oracle> Windows or / u01 App / Oracle / Product / 11.2 / Network / Admin or /u01/app/oracle/producdt/10.2/network/admin in Linux / 100% I can not believe that I did not read any prescription in the dough and using it would know the exact location.

I can not find out if it is the type of syntax, whether I use it or not.

I doubt

  template "# {Dir.home ( "Oracle")} / network / admin / tnsnames.ora "source" tnsnames.ora.erb "[...] end   

Do you want to do almost this only if it works only When there is no difference in the operating system except the location of the home directory.

No comments:

Post a Comment