You've already forked ansible-role-networking
This commit is contained in:
38
templates/systemd.netdev.j2
Normal file
38
templates/systemd.netdev.j2
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
{% if item.netdev_options is defined and item.netdev_options | length > 0 %}
|
||||
[NetDev]
|
||||
{% for netdev_option in item.netdev_options %}
|
||||
{{ netdev_option.key }}={{ netdev_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.bond_options is defined and item.bond_options | length > 0 %}
|
||||
[Bond]
|
||||
{% for bond_option in item.bond_options %}
|
||||
{{ bond_option.key }}={{ bond_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.bridge_options is defined and item.bridge_options | length > 0 %}
|
||||
[Bridge]
|
||||
{% for bridge_option in item.bridge_options %}
|
||||
{{ bridge_option.key }}={{ bridge_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.wireguard_options is defined and item.wireguard_options | length > 0 %}
|
||||
[WireGuard]
|
||||
{% for wireguard_option in item.wireguard_options %}
|
||||
{{ wireguard_option.key }}={{ wireguard_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.wireguard_peer_options is defined and item.wireguard_peer_options | length > 0 %}
|
||||
[WireGuardPeer]
|
||||
{% for wireguard_peer_option in item.wireguard_peer_options %}
|
||||
{{ wireguard_peer_option.key }}={{ wireguard_peer_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
42
templates/systemd.network.j2
Normal file
42
templates/systemd.network.j2
Normal file
@ -0,0 +1,42 @@
|
||||
#jinja2: lstrip_blocks: "True", trim_blocks: "True"
|
||||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
{% if item.match_options is defined and item.match_options | length > 0 %}
|
||||
[Match]
|
||||
{% for match_option in item.match_options %}
|
||||
{{ match_option.key }}={{ match_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.network_options is defined and item.network_options | length > 0 %}
|
||||
[Network]
|
||||
{% for network_option in item.network_options %}
|
||||
{{ network_option.key }}={{ network_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.dhcp_options is defined and item.dhcp_options | length > 0 %}
|
||||
[DHCP]
|
||||
{% for dhcp_option in item.dhcp_options %}
|
||||
{{ dhcp_option.key }}={{ dhcp_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.addresses is defined and item.addresses | length > 0 %}
|
||||
{% for address in item.addresses %}
|
||||
[Address]
|
||||
{% for address_option in address.options %}
|
||||
{{ address_option.key }}={{ address_option.value }}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if item.route_options is defined and item.route_options | length > 0 %}
|
||||
[Route]
|
||||
{% for route_option in item.route_options %}
|
||||
{{ route_option.key }}={{ route_option.value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
Reference in New Issue
Block a user