我得到了缩进错误:当我试图运行ansiple剧本时需要一个缩进的块。我在https://yaml-online-parser.appspot.com/中进行了验证。在
类似的yml也适用于其他服务器
---
# Getting thename of the .txt file
- name: Getting name for anchor.txt
shell: "ls /mule/ansible/mule-enterprise-standalone-3.4.1/*.txt"
register: the_file
- debug: msg="{{ the_file }}"
- set_fact: app_folder="{{ the_file.stdout | replace('-anchor.txt','') }}"
- debug: msg="{{ app_folder }}"
# Delete the .txt file
- name: Delete the anchor.txt file
file: path="{{ the_file.stdout }}" state=absent
# Wait until the app folder disappears
- name: Wait for the folder to
wait_for: path="{{ app_folder }}" state=absent
# Copy the zip file
- name: Copy the zip file
copy: src="../analytic-mule-services-mule-3.0.0-SNAPSHOT.zip" dest="/mule/ansible/mule-enterprise-standalone-3.4.1"
提示(可能报告人工制品):非工作的在初始^{之前有一个空格(至少在问题中)
删除了非工作版本中前导空格的(统一)diff):
因此,如果没有外来字符(
\r
或标签中混有空格,可能在复制、粘贴和提交到So服务器时丢失),那么我唯一注意到的就是上面的提示。请使用@bent blue或hextump/xxd/whatnot我在评论中建议的编辑器,以确保脚本收到您想要的。在从操作更新: 即使我有同样的错误,我也修改了。 我一行一行地浏览,但都没有(“意想不到的”空白或制表符)
^{pr2}$相关问题 更多 >
编程相关推荐