原文: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