I'm quite new in using Rundeck. I have job that should be executing a python file. Just to give you an overview my device has python 3.8.5 and 3.7. Rundeck uses the version 3.7 even though in my environment variable I set my PY_HOME for version 3.8.5. How can I tell my rundeck to use version 3.8.5? Appreciate the help.
Asked
Active
Viewed 1,956 times
0
-
Welcome to Stack Overflow! Please take the [tour] and read through the [help center](http://stackoverflow.com/help), in particular how to [ask]. Your best bet here is to do your research, search for related topics on SO, and give it a go. After doing more research and searching, post a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) of your attempt and say specifically where you're stuck, which can help you get better answers. – help-info.de Sep 04 '20 at 11:12
1 Answers
0
You can define any interpreter for your scripts (python2, python3, etc) on your scrip steps, just go to your job, on the "Script" step (inline script) or "Script File or URL" step click on the "Advanced" button and add the path of your Python 3.8.5 on "Invocation String" textbox and the ".py" on "Extension" textbox, take a look at this.
I leave a job definition example with this:
<joblist>
<job>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>031b03b4-220f-4ad0-9c47-3ca47506ba82</id>
<loglevel>INFO</loglevel>
<name>HelloWorldPy</name>
<nodeFilterEditable>false</nodeFilterEditable>
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<fileExtension>.py</fileExtension>
<script><![CDATA[print("hello world!")]]></script>
<scriptargs />
<scriptinterpreter>C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe</scriptinterpreter>
</command>
</sequence>
<uuid>031b03b4-220f-4ad0-9c47-3ca47506ba82</uuid>
</job>
</joblist>

MegaDrive68k
- 3,768
- 2
- 9
- 51