原文:AnsibleUndefinedVariable: 'unicode object' has no attribute u'xxx'

Ansible通過jinja 模塊對后綴為.j 的文件進行jinja模板渲染,某一次在引用一個類似python dict的配置文件變量時報出了如上錯誤。 這里直接參考一個ansible github issue中的示例進行解釋: AnsibleUndefinedVariable: unicode object has no attribute when dict in json format Is ...

2021-02-23 16:16 0 618 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM