2021-10-26 21:34:13 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install network scripts
|
|
|
|
package:
|
|
|
|
name: network-scripts
|
|
|
|
state: present
|
|
|
|
|
2021-10-27 14:19:40 +00:00
|
|
|
- name: Create routing table in rt_tables
|
|
|
|
template:
|
|
|
|
src: rt_tables.j2
|
|
|
|
dest: /etc/iproute2/rt_tables
|
2021-10-26 21:34:13 +00:00
|
|
|
|
2021-10-27 14:19:40 +00:00
|
|
|
- name: Configure interfaces and routes with network-scripts
|
|
|
|
include: network_scripts.yaml iface={{ item }}
|
|
|
|
loop: "{{ network.network_scripts.iface }}"
|
2021-10-27 13:49:17 +00:00
|
|
|
|
2021-10-27 14:19:40 +00:00
|
|
|
when: network.network_scripts is defined
|
2021-10-27 13:49:17 +00:00
|
|
|
|
2021-10-26 21:34:13 +00:00
|
|
|
- name: Configure interfaces and routes with nmcli
|
|
|
|
include: network_manager.yaml iface={{ item }}
|
|
|
|
when: network.network_manager is defined
|
|
|
|
loop: "{{ network.network_manager.iface }}"
|