https://github.com/turgon37/ansible-network
Ansible role to configure network interfaces
https://github.com/turgon37/ansible-network
ansible networking
Last synced: about 2 months ago
JSON representation
Ansible role to configure network interfaces
- Host: GitHub
- URL: https://github.com/turgon37/ansible-network
- Owner: Turgon37
- License: mit
- Created: 2016-11-16T17:53:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T00:54:55.000Z (over 7 years ago)
- Last Synced: 2025-06-06T06:27:49.888Z (about 1 year ago)
- Topics: ansible, networking
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Role network
========
This roles allow configuration of network components such interface, address(es), dns, vlan
## OS Family
This role is available for Debian and CentOS
## Features
At this day the role can be used to configure :
* Ethernet Interfaces
* Bridge Interfaces
* Vlan interfaces
* IPv4 addresses
* route(s) per interface
* dns serveur
* dns search and domain
## Configuration
The variables that can be passed to this role and a brief description about them are as follows:
| Name | Description |
| -------- | --------------------------------------------------------- |
| network__ether_interfaces | The list of ethernet interfaces to be added to the sytem |
| network__bridge_interfaces | The list of bridge interfaces to be added to the sytem |
| network__vlan_interfaces | The list of vlan interfaces to be added to the sytem |
| network__dhcp_hostname | The hostname to use when the host introduce itself to the DHCP server (for distribution that allow this parameter) |
| network__conflict_pkgs | The list of package(s) that conflict with this role (commonly NetworkManager) |
### Example
* Simple ethernet network
```
network__ether_interfaces:
- device: 'eth0'
name: net
type: ethernet
onboot: True
bootproto: static
ipv4:
address: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.254
```
* Simple ethernet network with DNS (resolv.conf) and route
```
network__ether_interfaces:
- device: 'eth0'
name: common
type: ethernet
onboot: True
bootproto: static
ipv4:
address: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.254
route:
- network: 10.0.1.0
netmask: 255.255.255.0
gateway: 192.168.1.250
domain: domain.com
dns:
- 192.168.1.254