Questions tagged [netplan]
42 questions
6
votes
2 answers
cloud-init ignoring static IP network configuration
I running the Ubuntu 18.04 cloud image and trying to configure networking through cloud-init. For some reason it is ignoring my networking when I try to assign a static IP and just falls back to using DHCP. I'm not sure why and I'm not sure how to…

Brennan Cheung
- 4,271
- 4
- 30
- 29
3
votes
4 answers
Replacing lines in a yaml file
I'm trying to create a script that will replace the parameters of a given network interface in the 01-network-manager-all.yaml file.
The file looks something like this:
# Let NetworkManager manage all devices on this system
network:
version: 2
…

Marcos Peres
- 31
- 3
3
votes
3 answers
netplan not working after change default python
in ubuntu 18.04, when i change default python from python 3.6 to other version by this command:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
sudo update-alternatives --install /usr/bin/python python…

Ali Mohammadi
- 1,306
- 1
- 14
- 28
3
votes
2 answers
Armbian Ubuntu Netplan match with different wifi adapters
I'm trying to configure my orangepi to connect to a wifi hotspot using different wifi adapters.
Configuring a single wifi adapter in my Netplan /etc/netplan/armbian-default.yaml works smoothly. config below:
network:
version: 2
ethernets:
…

Salem
- 311
- 2
- 12
3
votes
0 answers
Netplan: Configure Failover IP on Ubuntu 18.04
I have a VM (hosted by OVH) which has several IPs:
the first one is given by OVH, one per machine, and can change (when we reset the machine for instance)
the other ones are failover IPs, purchased to be the IPs used for inbound and outbound…

frinux
- 2,052
- 6
- 26
- 47
2
votes
0 answers
How to get netplan to replace sections instead of merge?
I am trying so set netplan so the yaml files only contain portions of the configuration.
The idea is to use a specific config file when a machine should use a specific DNS.
In order to do that, I have 2 yaml config files: /etc/netplan/01-netcfg.yaml…

E. Jaep
- 2,095
- 1
- 30
- 56
2
votes
1 answer
Configure netplan programmatically
Is there a way to configure netplan programmatically using a coding language (e.g. c or c++)?
What I mean is calling api functions instead of writing /etc/netplan/config.yaml and calling sudo netplan apply.

hudac
- 2,584
- 6
- 34
- 57
2
votes
1 answer
Replicate netplan nameserver configuration for centos
First of a warning: I'm a junior level with little experience using centos.
I'm running a puppet environment with a few different machines some example modules I'm running is consul and puppet-dns for the ubuntu machines I have used netplan to…

Petter Östergren
- 973
- 4
- 14
- 27
2
votes
2 answers
Ansible replace module duplicates replace values
PROBLEM: Ansible 2.9 will duplicate entries in the "replace: " field of the replace module.
FILE TO CHANGE (/etc/netplan/50-cloud-init.yaml):
network:
ethernets:
ens160:
addresses:
- 10.10.8.112/24
gateway4: 10.10.8.1
…

Dave
- 727
- 1
- 9
- 20
2
votes
0 answers
Why after netplan apply I got error: System has not been booted with systemd as init system (PID 1). Can't operate
I am trying to set up a static IP for my Linux Ubuntu 18.04. I found some recommendations to create file 01-netcfg.yaml in /etc/netplan/. I wrote there:
network:
version: 2
renderer: networkd
ethernets:
…

dablDev
- 61
- 4
1
vote
1 answer
Ansible regexp for netplan config dhcp4
I'm trying to edit the 01-netcfg.yml file with Ansible. Below is the file:
network:
version: 2
renderer: NetworkManager
ethernets:
enp0s31f6:
dhcp4: no
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
enp12s0:
dhcp4:…

Krish
- 19
- 4
1
vote
1 answer
My scheduled task in ubuntu shown some errors but it worked
I am new here. So, if there is something absurd in my expression, don't hesitate to let me know. Thanks very much.
Background
The network of my server(Ubuntu 20.04.1 LTS) got wrong sometimes. And I needed to reconnect it using the command below:
cp…

Yuankuan Zhang
- 11
- 3
1
vote
1 answer
How to fill netplan config file with routes via ansible
I'm trying to manage netplan by using ansible. That worked well in the past, where I used the following template:
network:
version: 2
renderer: networkd
ethernets:
{{ ansible_default_ipv4.interface }}:
match:
macaddress:…

Mrk
- 13
- 1
- 5
1
vote
0 answers
How many virtual adapters can be configured with netplan on Ubuntu 20.04?
I have an ethernet interface on my Ubuntu 20 server machine called enp65s0f1. I want to create a number of virtual interfaces each with their own mac address and ip address that piggy back on this interface and get their own IP address from my DHCP…

Brian Dilley
- 3,888
- 2
- 24
- 24
1
vote
1 answer
How to add multiple values to specific key in yaml? Neplan related
I am trying to config IPv6 addresses in Linux and I struggle how am I suppose to add values to netplan's YAML file, here is the file:
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
addresses:…

Michal Žídek
- 128
- 1
- 7