2021-11-23 12:11:36 +00:00
|
|
|
Configure {{ pillar['network']['bridge'] }} connection:
|
|
|
|
cmd.run:
|
2021-11-24 11:42:48 +00:00
|
|
|
- name: nmcli connection add con-name {{ pillar['network']['bridge'] }} type bridge ifname {{ pillar['network']['bridge'] }} ipv4.method manual ipv4.addresses {{ pillar['network']['ip'] }}/24 ipv4.dns "127.0.0.1, 1.1.1.1, 1.1.1.2" ipv6.method disabled connection.zone internal connection.autoconnect yes stp no
|
2021-11-23 12:11:36 +00:00
|
|
|
- unless: nmcli connection show {{ pillar['network']['bridge'] }} > /dev/null
|
|
|
|
|
|
|
|
Add {{ pillar['network']['interface'] }} to bridge {{ pillar['network']['bridge'] }}:
|
|
|
|
cmd.run:
|
|
|
|
- name: nmcli connection add con-name {{ pillar['network']['bridge'] }}-{{ pillar['network']['interface'] }} ifname {{ pillar['network']['interface'] }} type bridge-slave master {{ pillar['network']['bridge'] }} connection.autoconnect yes
|
|
|
|
- unless: nmcli connection show {{ pillar['network']['bridge'] }}-{{ pillar['network']['interface'] }} > /dev/null
|