Cloud-init の netplan を無効化

提供: FirstWiki
ナビゲーションに移動 検索に移動

設定

50-cloud-init.yaml の冒頭にこう書いてあるので

# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}

/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg を作成

network: {config: disabled}

既存の 50-cloud-init.yaml を削除して新しく 99-local.yaml を作成

network:
  ethernets:
    enp3s0:
      accept-ra: false
      addresses:
        - 192.168.1.11/24
      nameservers:
        addresses: [192.168.1.1]
        search: [mydomain.tld]
      routes:
        - to: default
          via: 192.168.1.1
  version: 2