我正在使用下面的剧本来更新xml文件中的特定元素值及其抛出错误。我已经安装了python-lxml模块以及ansible版本2.7.8
---
- name: Set element
xml:
path: /home/emsuser/appD_agent_master/machineagent/machine_agent/conf/controller-info.xml
xpath: /controller-info/application-name
value: "Vicom Enterprise blackout Manager"
...
回复:
ERROR! 'xml' is not a valid attribute for a Play
The error appears to have been in '/home/emsuser/playbooks/editMechineAgentConf.yml': line 2, column 4, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: Set element
^ here
我不确定我在哪里做错。请帮帮我。我是新来的。