mirror of
https://gitea.0xace.cc/ansible-galaxy/network.git
synced 2025-07-20 14:53:08 +00:00
update
This commit is contained in:
37
tasks/RedHat/main.yaml
Normal file
37
tasks/RedHat/main.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Configure network with network-scripts
|
||||
when: network.network_scripts is defined
|
||||
block:
|
||||
- name: Install network scripts
|
||||
package:
|
||||
name: network-scripts
|
||||
state: present
|
||||
|
||||
- name: Create routing table in rt_tables
|
||||
template:
|
||||
src: rt_tables.j2
|
||||
dest: /etc/iproute2/rt_tables
|
||||
|
||||
- name: Configure interfaces and routes with network-scripts
|
||||
vars:
|
||||
iface: "{{ item }}"
|
||||
include_tasks: network_scripts.yaml
|
||||
loop: "{{ network.network_scripts.iface }}"
|
||||
|
||||
|
||||
- name: Configure network with Network Manager
|
||||
when: network.network_manager is defined
|
||||
block:
|
||||
- name: Install NetworkManager-dispatcher-routing-rules
|
||||
package:
|
||||
name:
|
||||
- NetworkManager-dispatcher-routing-rules
|
||||
state: present
|
||||
when: ansible_distribution_major_version == '7'
|
||||
|
||||
- name: Configure interfaces and routes with nmcli
|
||||
vars:
|
||||
iface: "{{ item }}"
|
||||
include_tasks: network_manager.yaml
|
||||
loop: "{{ network.network_manager.iface }}"
|
||||
|
Reference in New Issue
Block a user