Deployment Ansible语法-校验和部署

Deployment Ansible语法-校验和部署,deployment,syntax,ansible,nexus,checksum,Deployment,Syntax,Ansible,Nexus,Checksum,我正在编写一个脚本,允许我的部署返回nexus工件部署的校验和。when:条件下的所有内容对于脚本来说都是新的。有些变量在这里没有定义,比如校验和,但是我在它上面放了一个默认过滤器,这样Ansible在找不到值时仍然可以使用变量 with_indexed_items: app_deployments.keys()|sort when: | deploy_results.results[item.0].md5sum|d().local|d()|match(nx_app_deployment

我正在编写一个脚本,允许我的部署返回nexus工件部署的校验和。
when:
条件下的所有内容对于脚本来说都是新的。有些变量在这里没有定义,比如
校验和
,但是我在它上面放了一个默认过滤器,这样Ansible在找不到值时仍然可以使用变量

with_indexed_items: app_deployments.keys()|sort
when: |
    deploy_results.results[item.0].md5sum|d().local|d()|match(nx_app_deployments[item.1].checksum|d(deploy_results.results[item.0].md5sum)
不幸的是,我一直被这个错误击中(很可能是因为语法)

在此方面的任何帮助都将不胜感激。非常感谢

您的
匹配(
未被
终止)

Error: TASK: [nexusArtifacts | STAGE | Stage deployments] ****************************
fatal: [ari001-app1] => Failed to template {% if deploy_results.results[item.0].md5sum|d().local|d()|match(nx_app_deployments[i                                                                                tem.1].checksum|d(deploy_results.results[item.0].md5sum) and
stageNexus|d()|bool and
app_deployments[item.1].name is defined and
app_deployments[item.1].active|d(1)|bool and
deploy_toggles|d({})[item.1]|d(1)|bool and
(item in eapDeployList|d(item.1) or 'all' in eapDeployList|d(item)) and
(app != 'springBatch' or
    item in sbDeployList|d(item.1)|listParse) and
item in key_list|d([item.1])
 %} True {% else %} False {% endif %}: template error while templating string: unexpected "}", expected ")"

FATAL: all hosts have already failed -- aborting