我在其中创建了Rundeck密钥存储和存储密码
然后在内联脚本中指定了以下内容(keys / JIRA是Rundeck密码存储)
curl -XN -u user:keys/JIRA
但密码未通过且authnetication失败,我做错了什么?
答案 0 :(得分:3)
密码值在传递给脚本时将被展开。以下是一个例子:
- description: '' executionEnabled: true id: 1f7f5312-0887-4841-a7ef-1c30f712f927 loglevel: INFO name: How to pass Rundeck key storage to script nodeFilterEditable: false options: - name: JiraPass secure: true storagePath: keys/jira.password valueExposed: true scheduleEnabled: true sequence: commands: - args: ${option.JiraPass} script: | #!/usr/bin/env bash jira_password=$1 echo curl -XN -u "user:$1" keepgoing: false strategy: node-first uuid: 1f7f5312-0887-4841-a7ef-1c30f712f927