json - Proper syntax for adding Rundeck Ansible "Extra Vars"
问题描述
Im using Rundeck 3.0.7 with Ansible 2.7 and cant figure out the correct syntax to pass variables to my Ansible playbook. If I run it from the command line it works fine.
ansible-playbook test-playbook.yml -i hosts -e "FirstName=John LastName=Doe OfficePhone=365"
However when I add those vars to the "Extra Variables" section of the Rundeck Job I add the following and it doesnt work.
-e "FirstName=John LastName=Doe OfficePhone=365"
Does anyone know the proper syntax?
解决方案
在您的工作流程中,使用以下选项定义您的剧本额外参数:
-e "test1=${option.test1} test2=${option.test2}"
这样,您就可以在 ansible-playbook 的参数中获得这些变量名称的选项值。
推荐阅读
- wcf - wsdl 未显示 XML-WCF
- swift - 使用 Swift 的 withUnsafeMutableBytes 包装器的问题
- ajax - ajax 错误的传单层可视化问题:未调用 parseResponse
- c# - 使用 DataGridView 和 TextBox 在 C# 中的格式问题
- node.js - 节点 ECONNRESET 隧道-ssh 和猫鼬
- java - Spring Data 与 mongodb 查询以从数组中获取一些元素
- swift - 如何告诉另一个视图控制器播放表格视图中列出的歌曲?
- java - 管理端点安全和测试方法
- python - Python制作一个循环列表以超出范围索引
- flutter - 在 Flutter 中使用 NotificationListener 为自定义 Appbar 设置动画