Hi all
I have the following playbook
!
---
- hosts: lab
gather_facts: true
connection: local
vars:
creds:
host: "{{ ansible_host }}"
username: cisco
password: cisco
tasks:
- name: ios_facts
ios_facts:
provider: "{{ creds }}"
register: iosfacts
- name: interface description
ios_config:
provider: "{{ creds }}"
lines:
- description test interface
parents: "interface {{ item.key }}"
with_dict: "{{ iosfacts.ansible_facts.ansible_net_interfaces }}"
when: item.value.bandwidth >= 1000000
- name: new task
include: 2.yml
with_dict: "{{ iosfacts.ansible_facts.ansible_net_interfaces }}"
when: item.value.bandwidth <= 1000000
!!!!!!
And I get this error
"reason": "no action detected in task. This often indicates a misspelled module name, or incorrect module path.\n\nThe error appears to have been in '/home/playbooks/varios/2.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- hosts: lab\n ^ here\n\n\nThe error appears to have been in '/home/playbooks/varios/2.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- hosts: lab\n ^ here\n"
If I execute the playbook 2.yml in stand alone it works, if I add it to my other playbook i get errors.
Any ideas???