Ask Your Question
0

Better way to execute python scripts in puppet

asked 2015-06-23 13:16:17 -0500

R gravatar image

I have a bunch of python scripts (jython to be more specific) which does various configs within Weblogic and Oracle Fusion Middleware. I plan to use exec to puppetize them, however before that i wanted to check here if anybody knows of a better way to invoke python scripts via puppet.

Thanks in advance R

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-24 00:24:26 -0500

GregLarkin gravatar image

Nope, that's the way to do it. You will want to make sure that if you have a number of exec resources that need to be executed in order, each one has a dependency on the previous or next one in the sequence. Also make sure that your exec resources are properly "idempotentized" (I just made that up) so they don't fire unnecessarily.

Longer term, you'll benefit from analyzing the scripts to see if their contents can be converted to non-exec Puppet resources. For instance, do the scripts write customized config files, create directories, install packages, etc.? If so, any of that can be rewritten in standard Puppet DSL, and you'll eventually be able to retire the scripts themselves and the exec resources that invoke them.

edit flag offensive delete link more

Comments

"Idempotentized" haha, thanks a lot Greg.

R gravatar imageR ( 2015-06-24 02:00:09 -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-06-23 13:16:17 -0500

Seen: 591 times

Last updated: Jun 24 '15