Ask Your Question
0

Should I not be using a 'function' here?

asked 2013-04-12 14:50:29 -0500

Red Cricket gravatar image

updated 2013-04-12 16:37:46 -0500

I wanted to use more ruby instead of exec'ing out to a shell script that queries a Oracle DB to get the list of hostnames of my DNS servers, so I updated my custom function list_allow_upates.rb to use oci8 and resolv. I install ruby-oci8 on my puppet master (PE 2.7) but I guess I didn't understand that I would have to install ruby-oci8 on ALL my puppet agents. I do not want to have to do that (install ruby-oci8 on all my puppet agents). Here's what happen after I updated the custom function, list_allow_updates.rb ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-12 15:58:09 -0500

jonn gravatar image

updated 2013-04-12 16:00:00 -0500

No, functions only ever run on the puppet master. However, they are loaded on clients the first time they are downloaded (this is fixed in 3.0 I believe). After the initial download, your functions shouldn't be loaded on clients any more (and you shouldn't get complaints about missing rubygems etc)

The real problem here seems to be with TNS on the puppet master server:

Detail: ORA-12154: TNS:could not resolve the connect identifier specified

Are you using TNS? (The output suggested that your database was local.) Does your code work okay if you try to run it ... (more)

edit flag offensive delete link more

Comments

I am using PE 2.7. Do I need to upgrade to 3.0?

Red Cricket gravatar imageRed Cricket ( 2013-04-12 16:15:38 -0500 )edit
1

No, I don't think so - as long as you can live with the warning that is flagged on the download.

Another option might be to use something like generate ...(more)

jonn gravatar imagejonn ( 2013-04-12 16:40:03 -0500 )edit

did you see my UPDATE for the TNS Error?

Red Cricket gravatar imageRed Cricket ( 2013-04-12 17:12:27 -0500 )edit

I set the ORACLE_HOME in my ruby script now and everything is working fine without having to install ruby-oci8 on my agnets :)

Red Cricket gravatar imageRed Cricket ( 2013-04-12 17:32:16 -0500 )edit

Awesome, glad it got sorted out :)

jonn gravatar imagejonn ( 2013-04-13 01:36:26 -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

Stats

Asked: 2013-04-12 14:50:29 -0500

Seen: 188 times

Last updated: Apr 12 '13