michaelrigart / ansible-role-interfaces

An ansible role for configuring different network interfaces
GNU General Public License v3.0
83 stars 62 forks source link

'network_ether_interfaces' is undefined #3

Closed markgoddard closed 7 years ago

markgoddard commented 7 years ago

OS: RHEL 7.3 Ansible: 2.2

When configuring a bridge interface I hit the following error (in the ethernet tasks):

TASK [MichaelRigart.interfaces : RedHat | Write configuration files for rhel route configuration] ***
fatal: [control01]: FAILED! => {"failed": true, "msg": "'network_ether_interfaces' is undefined"}
        to retry, use: --limit @/home/stack/kayobe/ansible/net.retry

PLAY RECAP *********************************************************************
control01                  : ok=2    changed=0    unreachable=0    failed=1   

Applying the following patch resolved the issue:

diff --git a/tasks/ethernet_configuration.yml b/tasks/ethernet_configuration.yml
index 10b80d0..72f7525 100644
--- a/tasks/ethernet_configuration.yml
+++ b/tasks/ethernet_configuration.yml
@@ -11,7 +11,7 @@
   template:
     src: 'route_{{ ansible_os_family }}.j2'
     dest: '{{ interfaces_net_path[ansible_os_family|lower] }}/route-{{ item.device }}'
-  with_items: '{{ network_ether_interfaces }}'
+  with_items: '{{ interfaces_ether_interfaces }}'
   when: item.route is defined and ansible_os_family == 'RedHat'

 - name: Bounce ethernet devices

PR incoming.