Skip to content

Instantly share code, notes, and snippets.

@alexs77
Created February 28, 2018 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexs77/e615ab4c6b7ef4b8c87a6efb9e38dba7 to your computer and use it in GitHub Desktop.
Save alexs77/e615ab4c6b7ef4b8c87a6efb9e38dba7 to your computer and use it in GitHub Desktop.
Debugging "Multi-Value Options" in Rundeck
<joblist>
<job>
<context>
<options preserveOrder='true'>
<option delimiter=' ' multivalueAllSelected='true' multivalued='true' name='wert' required='true'>
<description>Werte</description>
</option>
</options>
</context>
<description>Debug für Multi-Value Options</description>
<dispatch>
<excludePrecedence>true</excludePrecedence>
<keepgoing>false</keepgoing>
<rankOrder>ascending</rankOrder>
<successOnEmptyNodeFilter>false</successOnEmptyNodeFilter>
<threadcount>1</threadcount>
</dispatch>
<executionEnabled>true</executionEnabled>
<id>85e950d9-d28a-479f-87d8-177c768d947d</id>
<loglevel>INFO</loglevel>
<name>Debug Multi-Value Options</name>
<nodeFilterEditable>false</nodeFilterEditable>
<nodefilters>
<filter>name:ews45</filter>
</nodefilters>
<nodesSelectedByDefault>true</nodesSelectedByDefault>
<scheduleEnabled>false</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<script><![CDATA[#!/bin/bash
echo "1: $1"
echo env: $RD_OPTION_WERT
echo envvar=$RD_OPTION_WERT ;# access message as environment variable.
echo args=$1 ;# read value passed into argument vector
echo message=@option.wert@ ;# access message via replacement token syntax
]]></script>
<scriptargs>${option.wert}</scriptargs>
</command>
</sequence>
<uuid>85e950d9-d28a-479f-87d8-177c768d947d</uuid>
</job>
</joblist>
- description: Debug für Multi-Value Options
executionEnabled: true
id: 85e950d9-d28a-479f-87d8-177c768d947d
loglevel: INFO
name: Debug Multi-Value Options
nodeFilterEditable: false
nodefilters:
dispatch:
excludePrecedence: true
keepgoing: false
rankOrder: ascending
successOnEmptyNodeFilter: false
threadcount: 1
filter: name:ews45
nodesSelectedByDefault: true
options:
- delimiter: ' '
description: Werte
multivalueAllSelected: true
multivalued: true
name: wert
required: true
scheduleEnabled: false
sequence:
commands:
- args: ${option.wert}
script: |
#!/bin/bash
echo "1: $1"
echo env: $RD_OPTION_WERT
echo envvar=$RD_OPTION_WERT ;# access message as environment variable.
echo args=$1 ;# read value passed into argument vector
echo message=@option.wert@ ;# access message via replacement token syntax
keepgoing: false
strategy: node-first
uuid: 85e950d9-d28a-479f-87d8-177c768d947d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment