Loading salt/network/files/netplan/01-netcfg.yaml +28 −2 Original line number Diff line number Diff line network: version: 2 renderer: networkd ethernets: ethernets: {% if opts.id not in ['rna-03', 'rna-04'] %} eth0: dhcp4: yes dhcp6: no {% endif %} {% if opts.id in ['rna-04'] %} eth0: addresses: - 10.8.1.2/24 dhcp4: no dhcp6: no {% endif %} {% if opts.id in ['rna-03'] %} eth0: addresses: - 10.8.1.3/24 dhcp4: no dhcp6: no {% endif %} {% if opts.id in ['rna-03', 'rna-04'] %} eth1: dhcp4: yes dhcp6: no {% endif %} {% if opts.id in ['rna-05'] %} eth1: dhcp4: no dhcp6: no eth2: dhcp4: no dhcp6: no {% endif %} wifis: wlan0: access-points: LARN-5GHz: password: "larn1914" dhcp4: true dhcp4: true {% if opts.id in ['rna-05'] %} bridges: br0: interfaces: [eth1, eth2] dhcp4: no parameters: stp: false forward-delay: 0{% endif %} salt/network/init.sls +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ netplan_cfg: - source: salt://network/files/netplan - user: root - group: root - clean: True - template: jinja - file_mode: keep netplan_run: Loading Loading
salt/network/files/netplan/01-netcfg.yaml +28 −2 Original line number Diff line number Diff line network: version: 2 renderer: networkd ethernets: ethernets: {% if opts.id not in ['rna-03', 'rna-04'] %} eth0: dhcp4: yes dhcp6: no {% endif %} {% if opts.id in ['rna-04'] %} eth0: addresses: - 10.8.1.2/24 dhcp4: no dhcp6: no {% endif %} {% if opts.id in ['rna-03'] %} eth0: addresses: - 10.8.1.3/24 dhcp4: no dhcp6: no {% endif %} {% if opts.id in ['rna-03', 'rna-04'] %} eth1: dhcp4: yes dhcp6: no {% endif %} {% if opts.id in ['rna-05'] %} eth1: dhcp4: no dhcp6: no eth2: dhcp4: no dhcp6: no {% endif %} wifis: wlan0: access-points: LARN-5GHz: password: "larn1914" dhcp4: true dhcp4: true {% if opts.id in ['rna-05'] %} bridges: br0: interfaces: [eth1, eth2] dhcp4: no parameters: stp: false forward-delay: 0{% endif %}
salt/network/init.sls +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ netplan_cfg: - source: salt://network/files/netplan - user: root - group: root - clean: True - template: jinja - file_mode: keep netplan_run: Loading