我对ansible并不陌生,并尝试使用ansible循环概念在jira中创建问题。
对于每个jira键(ANS,SEL,PYC),需要创建5个以下问题
Requirements
Deployment
Analysis
Build
Delivery
我写了以下代码
---
- name: create jira issues for multiple project keys
jira:
uri: http://jiraurlhost:8080
username: user
password: pass
project: {{ item.0 }}
operation: create
summary: {{ item.1 }}
description: Created using Ansible
issuetype: Task
with_nested:
- [ ANS, SEL, PYC ]
- [ Requirements, Deployment, Analysis, Build, Delivery ]
我也尝试使用with_nested,但是ansible引发错误。我该如何解决这个问题。