Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

ScriptResourceModel plugin can't use script-args and script-interpreter

#571
  • 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: ''

Reported by Alex-SF · May 11th, 2012 @ 08:52 AM

State: resolved
Milestone: Rundeck 1.4.3
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Greg Schueler
    Greg Schueler
    • State changed from new to needs_verification

    May 15th, 2012 @ 04:58 PM

  2. Greg Schueler
    Greg Schueler
    • 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}...

    May 15th, 2012 @ 05:28 PM

  3. Greg Schueler
  4. Greg Schueler
    Greg Schueler
    • Tag changed from needs documentation, plugins to plugins

    May 16th, 2012 @ 05:07 PM

  5. Greg Schueler
    Greg Schueler
    • State changed from needs_verification to resolved

    June 19th, 2012 @ 07:38 PM

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.