hello guyz here my playbook
- name: Play on switch
hosts: Paris
gather_facts: no
tasks:
- name: set fact
ios_facts:
gather_subset: all
register: ansible_net_interfaces
- debug:
var: ansible_net_interfaces
- name: Ajouter ligne COS_in
ios_config:
lines:
- service-policy input COS-IN
parents: interface {{ item.key }}
with_dict: "{{ ansible_net_interfaces }}"
when: item.value.operstatus == "up"
and i got this error
TASK [Ajouter ligne COS_in]
********************************************************************************************
fatal: [Paris]: FAILED! => {"msg": "The conditional check
'item.value.operstatus == \"up\"' failed. The error was: error while
evaluating conditional (item.value.operstatus == \"up\"): 'bool object' has
no attribute 'operstatus'\n\nThe error appears to be in
'/etc/ansible/playbooks/erase.yaml': line 13, column 7, but may\nbe
elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n\n - name: Ajouter ligne COS_in\n
^ here\n"}
did somebody can help ?
regards
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CABYnFz8TsGGweGsqG3%2BdyZgQ_9%3DC3Lb%2BnyWCsxdSSUgsr4mKJg%40mail.gmail.com.