Ansible 不可能的错误!冲突的操作语句:var,include\u任务

Ansible 不可能的错误!冲突的操作语句:var,include\u任务,ansible,Ansible,以下是我的代码: - hosts: 11RRvEPG01 gather_facts: no vars_files: - /etc/ansible/epg/epg_command.yml vars: - output: [] tasks: - name: run epg command eric_eccli_command: commands: "{{item}}" with_items: "{{epg_comma

以下是我的代码:

- hosts: 11RRvEPG01
  gather_facts: no
  vars_files:
    - /etc/ansible/epg/epg_command.yml
  vars:
    - output: []  
  tasks:
    - name: run epg command
      eric_eccli_command:
        commands: "{{item}}"
      with_items: "{{epg_command}}"
      register: command_output

    - name: show execution output
      include_tasks:
        file: /etc/ansible/epg_check_output.yml
      var: 
        output: "{{item.stdout|last}}"
      with_items: "{{command_output.results}}" 
运行时收到一条错误消息:

错误!冲突的操作语句:var,include\u任务

正确的语法是

- name: show execution output
  include_tasks:
    file: /etc/ansible/epg_check_output.yml
  vars: 
    output: "{{ item.stdout|last }}"
  with_items: "{{ command_output.results }}" 
(为
vars
更改
var

正确的语法是

- name: show execution output
  include_tasks:
    file: /etc/ansible/epg_check_output.yml
  vars: 
    output: "{{ item.stdout|last }}"
  with_items: "{{ command_output.results }}" 
(为
vars
更改
var