dresden-weekly / ansible-network-interfaces

Ansible roles to manage Ubuntu network interface configuration
MIT License
86 stars 62 forks source link

Error with Ansible 2.0 #13

Closed kaistian closed 8 years ago

kaistian commented 8 years ago

This configuration i working on 1.9.4 but fails on 2.0.0

roles:
  -role: network-interfaces
    network_manage_devices: yes
    network_interfaces:
    - device: eth0
      desciption: eth0
      auto: true
      family: inet
      method: static
      address: 192.168.1.10
      netmask: 255.255.255.0
      gateway: 192.168.1.1
      nameservers:
      - 192.168.1.1

with the following message:

ERROR! The conditional check '(0 != item.1 | selectattr('changed') | list | length) and ((0 != item.1 | selectattr('item.auto', 'undefined') | list | length)
  or (true in item.1 | selectattr('item.auto') | list))' failed.

The error was: ERROR! error while evaluating conditional ((0 != item.1 | selectattr('changed') | list | length) and ((0 != item.1 | selectattr('item.auto', 'undefined') | list | length)
  or (true in item.1 | selectattr('item.auto') | list))): ERROR! 'unicode object' has no attribute 'changed'

The error appears to have been in 'network-interfaces/tasks/main.yml': line 50, column 3, but may be elsewhere in the file depending on the exact syntax problem.

Does anyone have a fix for this?

arBmind commented 8 years ago

Thank you for reporting the issue. We have not yet tried Ansible 2.0.