Skip to content

fix skipped cases in ifdown/ifup #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

- shell: ifdown {{ item.item.device }}; ifup {{ item.item.device }}
with_items: ether_result.results
when: ether_result is defined and item.changed
when: ether_result is defined and 'results' in ether_result and item.changed

- name: Create the network configuration file for bridge devices
template: src=bridge_{{ ansible_os_family }}.j2 dest={{ net_path }}/ifcfg-{{ item.device }}
Expand All @@ -56,7 +56,7 @@

- shell: ifdown {{ item.item.device }}; ifup {{ item.item.device }}
with_items: bridge_result.results
when: bridge_result is defined and item.changed
when: bridge_result is defined and 'results' in bridge_result and item.changed

- name: Create the network configuration file for port on the bridge devices
template: src=bridge_port_{{ ansible_os_family }}.j2 dest={{ net_path }}/ifcfg-{{ item.1 }}
Expand All @@ -68,7 +68,7 @@

- shell: ifdown {{ item.item.1 }}; ifup {{ item.item.1 }}
with_items: bridge_port_result.results
when: bridge_port_result is defined and item.changed
when: bridge_port_result is defined and 'results' in bridge_port_result and item.changed

- name: Create the network configuration file for bond devices
template: src=bond_{{ ansible_os_family }}.j2 dest={{ net_path }}/ifcfg-{{ item.device }}
Expand All @@ -87,7 +87,7 @@

- shell: ifdown {{ item.item.device }}; ifup {{ item.item.device }}
with_items: bond_result.results
when: bond_result is defined and item.changed
when: bond_result is defined and 'results' in bond_result and item.changed

- name: Create the network configuration file for slave in the bond devices
template: src=bond_slave_{{ ansible_os_family }}.j2 dest={{ net_path }}/ifcfg-{{ item.1 }}
Expand All @@ -99,8 +99,8 @@

- shell: ifdown {{ item.item.1 }}; ifup {{ item.item.1 }}
with_items: bond_port_result.results
when: bond_port_result is defined and item.changed
when: bond_port_result is defined and 'results' in bond_port_result and item.changed

- shell: ifdown {{ item.item.device }}; ifup {{ item.item.device }}
with_items: bond_result.results
when: bond_result is defined and item.changed and ansible_os_family == 'RedHat'
when: bond_result is defined and 'results' in bond_result and item.changed and ansible_os_family == 'RedHat'