Ask Your Question
0

Passing a text file as parameter

asked 2015-04-21 12:15:25 -0500

R gravatar image

updated 2015-04-21 15:35:34 -0500

GregLarkin gravatar image

Hi All,

I am trying to automate Oracle client install using Puppet. Currently we use this batch script to install Oracle client automatically.

F:\Oracle_11gr2_clients\win32_11gR2_client\client\setup.exe -silent -noconfig -nowait \
  -responseFile F:\Cognos_10.2.0_BI\automated_install\oracle_admin_client.rsp

I can use "exec" resource type to achieve this but since it is against the best practices wanted to explore the option of installing Oracle client via Puppet. Here .rsp is the response file (which is nothing but a text file) that has to be passed as one of the parameters, other parameters are silent, noconfig, nowait. I kindly request somebody to give me an idea as to how to go about achieving this in puppet.

Thanks in advance Raj

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-04-21 15:40:31 -0500

GregLarkin gravatar image

updated 2015-04-21 16:49:51 -0500

Since there doesn't appear to be an Oracle module for Puppet that supports Windows, I would suggest using an exec resource. There's nothing wrong with that resource type, as long as you don't find yourself with Puppet code filled 99% with execs.

Otherwise, it serves a purpose, and this looks like a good place to use it. You can certainly use file resources to manage the installer package and response file and then tie them all together to apply in the correct order.

UPDATE: As noted by a co-worker of mine, when using the exec resource you have to ensure that the command does not execute repeatedly. The creates, onlyif and unless attributes all offer a way to control that. Please see https://docs.puppetlabs.com/references/latest/type.html#exec for further information and documentation.

edit flag offensive delete link more

Comments

Thanks a lot Greg

R gravatar imageR ( 2015-04-21 21:07:22 -0500 )edit

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: 2015-04-21 12:15:25 -0500

Seen: 265 times

Last updated: Apr 21 '15