Resource Model Sources provide the means to retrieve Node resources for a Project. You can implement a Resource Model Source using a Java Plugin Type or a Script Plugin Type.

Plugin configuration

The ResourceModelSource (javadoc) service allows the plugins to be configured via the Rundeck Web GUI. You are thus able to declare configuration properties for your plugin, which will be displayed as a web form when the Project is configured, or can be manually configured in the project.properties file.

Java Plugin Type

A ResourceModelSource provider is actually a Factory class. An instance of your ResourceModelSource provider will be re-used, so each time a new ResourceModelSource with a new configuration is required, your Factory class will be invoked to produce it.

Your provider class must implement the interface ResourceModelSourceFactory:

Plugin properties

See Plugin Development - Java Plugins - Descriptions to learn how to create configuration properties for your ResourceModelSource plugin.

Script Plugin Type

See the Script Plugin Development for the basics of developing script-based plugins for Rundeck.

Instance scope properties

Instance scoped properties for ResourceModelSources are loaded from the project’s Resource Model Source entries. A project can define multiple entries, and at execution time, the Instance scoped values come from those entries.


Here is an example plugin.yaml script-based ResourceModelSource plugin declaring a provider called “mysource” that produces resource-format resourceyaml output. The provider declares three config properties (account, url, region) and illustrates the use of three different types (Integer, String, FreeSelect).

Example: plugin.yaml

The script-file entry on line 11 references a script called “nodes.sh” referencing the plugin properties (see script below).

Example script-file: nodes.sh

Provider Script Requirements

The ResourceModelSource service has expectations about the way your provider script behaves.

Exit code:

  • Exit code of 0 indicates success.
  • Any other exit code indicates failure.

Script output:

  • All output on STDOUT will be captured and passed to a ResourceFormatParser for the specified resource-format to create the Node definitions.