ScriptResourceModel plugin can't use script-args and script-interpreter
Reported by Alex-SF | May 11th, 2012 @ 08:52 AM | in Rundeck 1.4.3 (closed)
- Issue Type: Bug
- Rundeck version: 1.4.2
- JDK Version: 1.6
- Server OS: Mac OS X
- Install type: Jar
Issue:
There is a bug when you specify script-args, and the
script-interpreter.
Rundeck is passing the whole filename + args as the filename to the
interpreter.
Caught: java.io.FileNotFoundException: /Users/alexh/rundeck/libext/cache/groovy-script-plugin/mock.groovy -u http:/localhost:8080 -t Server (/Users/alexh/rundeck/libext/cache/groovy-script-plugin/mock.groovy -u http:/localhost:8080 -t Server)
Reproduce:
Here is a plugin.yaml showing the desired syntax:
name: Groovy Mock Plugin
version: 1.0
rundeckPluginVersion: 1.0
author: alexh
date: 5/10/12
providers:
- name: groovy-mock-plugin
service: ResourceModelSource
plugin-type: script
script-interpreter: /usr/bin/groovy
script-file: mock.groovy
script-args: "-u ${config.url} -t ${config.nodetype}"
title: Groovy Mock Plugin
description: Generates some fake node data in xml
resource-format: resourcexml
config:
- type: String
name: nodetype
title: Node Type
description: The NodeType to search
default: Server
- type: String
name: url
title: URL
description: The node authority URL
default: ''
Comments and changes to this ticket
-
Greg Schueler May 15th, 2012 @ 04:58 PM
- State changed from new to needs_verification
(from [ec5ec829a77ceeb98911fd21a0dd6adbc5e7d146]) Add 'interpreter-args-quoted' boolean for script plugins and script source
[#571 state:needs_verification] https://github.com/dtolabs/rundeck/commit/ec5ec829a77ceeb98911fd21a...
-
Greg Schueler May 15th, 2012 @ 05:28 PM
- Tag changed from plugins to needs documentation, plugins
add 'interpreter-args-quoted' boolean provider variable, which defaults to 'false'. If true, the script file and args will be used as a single argument to the interpreter. If false, the script file and args will be multiple arguments to the interpreter.
interpreter-args-quoted: true
- means that the execution will be done as ${interpreter} "${file} ${arg1} ${arg2}..."interpreter-args-quoted: false
- means that the execution will be done as ${interpreter} ${file} ${arg1} ${arg2}... -
Greg Schueler May 16th, 2012 @ 10:37 AM
(from [8bfa61a66f51fc875ae89eebf8184f6d9022fda1]) Add documentation for interpreter-args-quoted
[#571] https://github.com/dtolabs/rundeck/commit/8bfa61a66f51fc875ae89eebf...
-
Greg Schueler May 16th, 2012 @ 05:07 PM
- Tag changed from needs documentation, plugins to plugins
-
Greg Schueler June 19th, 2012 @ 07:38 PM
- State changed from needs_verification to resolved
-
donna1205 May 5th, 2023 @ 12:58 AM
The tone of your sumplete unlimited article was spot-on - neither too dry nor too informal.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues