忽略包含的yaml文件的错误

忽略包含的yaml文件的错误,yaml,ansible,Yaml,Ansible,我有以下YAML文件,它引用了另一个YAML文件,我想忽略它的错误 --- - hosts: personal gather_facts: no tasks: - name: command1 command: "nodanger command1" register: command1 ignore_errors: yes - debug: var=command1.stdout_lines -include: additional

我有以下YAML文件,它引用了另一个YAML文件,我想忽略它的错误

---
- hosts: personal
  gather_facts: no
  tasks:
    - name: command1
      command: "nodanger command1"
      register: command1
      ignore_errors: yes
    - debug: var=command1.stdout_lines

-include: additional.yml
   ignore_errors: yes
当我运行上面的剧本时,我得到以下错误

ERROR: Syntax Error while loading YAML script, command.yml
Note: The error may actually appear before this position: line 11, column 1


-include: additional.yml

如何忽略包含的yml文件的错误?

yaml文件中的语法错误。修好了

- include: additional.yml
  ignore_errors: yes

yaml文件中的语法错误。修好了

- include: additional.yml
  ignore_errors: yes

由于ignore_errors中的冒号而导致以下错误的修复:注意:错误可能实际出现在此位置之前:第12行第17列-包括:irstatus.yml ignore_errors:yes@Zee你能用你尝试过的更新你的帖子吗。我在运行它时没有问题。由于ignore_errors中的冒号,修复该问题会产生以下错误:注意:错误可能实际出现在此位置之前:第12行第17列-包括:irstatus.yml ignore_errors:yes@Zee你能用你尝试过的更新你的帖子吗。我运行它没有问题。