Score:0

configuring config.yaml:8:18 with error in incosistent indentation in ubuntu server 20.04

as flag
network:
  version: 2
  ethernets:
    enp0s3:
      addresses:[192.168.0.243/24,]
      dhcp:no
      gateway4:192.168.0.1
      nameservers:
        addresses:[192.168.0.1,8.8.8.8]

it displays the error of inconsistent indentation at the nameservers: with the arrow at the colon. I have tried different indentations but it did not work pls help..Thanks in advance

Score:1
cn flag

I see several incorrect items in your yaml file. I suggest that you consult:

cat /usr/share/doc/netplan/examples/static.yaml

Carefully amend your yaml to match:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
        - 192.168.0.243/24
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.1,8.8.8.8]

Proofread carefully twice. Save and close the text editor. Follow with:

sudo netplan generate
sudo netplan apply
PE TE avatar
as flag
thanks.. I also had 01-netcfg.yaml that was bringing about a conflict to my undersatnding
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.