-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing NetworkManager/system-connections
EL9 (almalinux,centos,rhel,rocky) have deprecated support for reading old network-scripts files in NetworkManager, though you can still install a package to keep this functionality. These new templates implement (partial) functionality of network-scripts with NetworkManager/system-connections.
- Loading branch information
Showing
9 changed files
with
316 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# {{ ansible_managed }} | ||
|
||
[connection] | ||
id={{ item.device }} | ||
type=bond | ||
interface-name={{ item.device }} | ||
{% if item.zone is defined %} | ||
zone={{ item.zone }} | ||
{% endif %} | ||
|
||
{% for bridge in interfaces_bridge_interfaces %} | ||
{% if item.device in bridge.ports %} | ||
master={{ bridge.device }} | ||
slave-type=bridge | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if item.mtu is defined %} | ||
[ethernet] | ||
mtu={{ item.mtu }} | ||
{% endif %} | ||
|
||
[bond] | ||
mode={{ item.bond_mode }} | ||
|
||
{% if item.bootproto == 'dhcp' or item.netmask is defined %} | ||
[ipv4] | ||
method={{ (item.bootproto == 'static') | ternary('manual', 'auto') }} | ||
{% if item.address is defined and item.netmask is defined %} | ||
address1={{ (item.address ~'/'~ item.netmask) | ipaddr('host/prefix') }} | ||
{% endif %} | ||
{% if item.gateway is defined %} | ||
gateway={{ item.gateway }} | ||
{% endif %} | ||
{% if item.route is defined %} | ||
{% for i in item.route %} | ||
{% if 'gateway' in i %} | ||
route{{ loop.index }}={{ (i.network ~'/'~ i.netmask) | ipaddr('network/prefix') }},{{ i.gateway }} | ||
{% endif %} | ||
{# TODO: dev, table, options #} | ||
{% endfor %} | ||
{% endif %} | ||
{% if item.dnsnameservers is defined %} | ||
dns={{ item.dnsnameservers | join(',') }} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if item.ip6 is defined %} | ||
[ipv6] | ||
method={{ (item.bootproto == 'static') | ternary('manual', 'auto') }} | ||
{% if item.ip6.address is defined and item.ip6.netmask is defined %} | ||
address1={{ (item.ip6.address ~'/'~ item.ip6.netmask) | ipaddr('host/prefix') }} | ||
{% endif %} | ||
{% if item.ip6.gateway is defined %} | ||
gateway={{ item.ip6.gateway }} | ||
{% endif %} | ||
{% if item.ip6.route is defined %} | ||
{% for i in item.ip6.route %} | ||
{% if 'gateway' in i %} | ||
route{{ loop.index }}={{ (i.network ~'/'~ i.netmask) | ipaddr('network/prefix') }},{{ i.gateway }} | ||
{% endif %} | ||
{# TODO: dev, table, options #} | ||
{% endfor %} | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# {{ ansible_managed }} | ||
|
||
[connection] | ||
id={{ item.1 }} | ||
type=ethernet | ||
interface-name={{ item.1 }} | ||
|
||
master={{ item.0.device }} | ||
slave-type=bond |
Oops, something went wrong.