[lxc-devel] [lxc-ci/master] images/fedora: Override cloud-init network config
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Wed Dec 16 19:52:59 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 303 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201216/85d4870d/attachment.bin>
-------------- next part --------------
From 0448d5662e4eb0499cfb365698d7f9975fd7f7ba Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Wed, 16 Dec 2020 20:42:33 +0100
Subject: [PATCH] images/fedora: Override cloud-init network config
This overrides the default cloud-init network config, and adds dhcp6.
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
images/fedora.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/images/fedora.yaml b/images/fedora.yaml
index 95c002b..b28a503 100644
--- a/images/fedora.yaml
+++ b/images/fedora.yaml
@@ -144,6 +144,16 @@ files:
- name: network-config
generator: cloud-init
+ content: |-
+ {% if config_get("user.network-config", "") == "" %}version: 1
+ config:
+ - type: physical
+ name: {% if instance.type == "virtual-machine" %}enp5s0{% else %}eth0{% endif %}
+ subnets:
+ - type: {% if config_get("user.network_mode", "") == "link-local" %}manual{% else %}dhcp{% endif %}
+ control: auto
+ - type: dhcp6
+ control: auto{% else %}{{ config_get("user.network-config", "") }}{% endif %}
variants:
- cloud
More information about the lxc-devel
mailing list