Options in Rundeck job email notifications

30 views
Skip to first unread message

Roger McCarrick

unread,
Feb 23, 2026, 10:57:45 AMFeb 23
to rundeck-discuss
in a Rundeck 4.15, I have a job that has an option names 'switch'.
So for example switch can be equal to "sw1.acme.corp"
In notifications an email is sent on success or failure with subject:

Juniper-Switch-Update - Success - ${option.switch} 
or
Juniper-Switch-Update - Failure - ${option.switch}

but in the email the subject is literally "Juniper-Switch-Update - Failure - ${option.switch}"

It is supposed to be "Juniper-Switch-Update - Failure - sw1.acme.corp"

what am I doing wrong?

rac...@rundeck.com

unread,
Mar 3, 2026, 12:11:04 PMMar 3
to rundeck-discuss

Hi Roger,

Can you please share your job definition? I just tried with the following one successfully:

- defaultTab: nodes description: '' executionEnabled: true id: 33121f4c-557a-46d9-865b-7703c64f7841 loglevel: INFO name: HelloWorld nodeFilterEditable: false notification: onsuccess: email: attachLog: true attachLogInFile: true recipients: dev...@example.net subject: hello ${option.opt1} notifyAvgDurationThreshold: null options: - name: opt1 value: world plugins: ExecutionLifecycle: {} scheduleEnabled: true sequence: commands: - exec: whoami keepgoing: false strategy: node-first user: admin uuid: 33121f4c-557a-46d9-865b-7703c64f7841

Thanks!

Roger McCarrick

unread,
Mar 3, 2026, 12:49:07 PMMar 3
to rundeck-discuss
- defaultTab: nodes
  description: |-
    Update Juniper switch
    <br><br>[Documentation](https://mydocs/rundeck/rddocs.shtml?file=21f606f0-c45c-4b37-b192-a1f41986fd9c.html) [SHIFT-CLICK to open in new window]
  executionEnabled: true
  id: 21f606f0-c45c-4b37-b192-a1f41986fd9c
  loglevel: INFO
  maxMultipleExecutions: '8'
  multipleExecutions: true
  name: Juniper-Switch-UpdateSingle
  nodeFilterEditable: false
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: NYTXNODE
  nodesSelectedByDefault: true
  notification:
    onfailure:
      email:
        recipients: 'all.n...@acme.com,m...@acme.com'
        subject: Juniper-Switch-Update - Failure - ${option.switch}
    onsuccess:
      email:
        recipients:  'all.n...@acme.com,m...@acme.com'

        subject: Juniper-Switch-Update - Success - ${option.switch}
  notifyAvgDurationThreshold: null
  options:
  - description: |+
      Enter the FQDN of the switch.
      <br>For example :

      <br>
       AAAAA-CL-SW01.acme.corp

    label: Switch Name
    name: switch
    required: true
  - description: |
      Select the Juniper switch OS version.
    enforced: true
    label: Required Version
    name: reqVer
    value: 21.4R3-S5.4
    values:
    - 21.4R3-S5.4
    - 21.4R3.15
    - 20.2R3.9
    valuesListDelimiter: ','
    valuesUrl: file:/home/rundeck/RDProjects/static/juniperVer.json
  - hidden: true
    label: apiUsername
    name: apiUsername
    value: NONE
  - hidden: true
    label: imageOnly
    name: imageOnly
    required: true
    value: 'NO'
  plugins:
    ExecutionLifecycle: null
  scheduleEnabled: true
  sequence:
    commands:
    - exec: E:\AZDO-UAT\acme.rundeck.network\Juniper\JuniperSwitch-Upgrade.ps1 -imageOnly
        ${option.imageOnly} -switch ${option.switch} -reqVer ${option.reqVer} -jobusername
        ${job.username} -apiUsername ${option.apiUsername}
    keepgoing: false
    strategy: node-first
  uuid: 21f606f0-c45c-4b37-b192-a1f41986fd9c
Reply all
Reply to author
Forward
0 new messages