summaryrefslogtreecommitdiff
path: root/cloudinit/stages.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-02-14 11:06:36 -0500
committerScott Moser <smoser@brickies.net>2017-02-14 11:06:36 -0500
commit1cd8cfaf1b4d0e3a97c693469d6d987d55014280 (patch)
tree8d58eaeeb8b47714155403b68b29d7981a2ff356 /cloudinit/stages.py
parent65529b6fca5915438612c161c01fe7b57c2a59b1 (diff)
downloadvyos-cloud-init-1cd8cfaf1b4d0e3a97c693469d6d987d55014280.tar.gz
vyos-cloud-init-1cd8cfaf1b4d0e3a97c693469d6d987d55014280.zip
apply the runtime configuration written by ds-identify.
When the ds-identify code landed, it started writing /run/cloud.cfg but at the moment, nothing was reading that. The result is that ds-identify only worked to disable cloud-init entirely.
Diffstat (limited to 'cloudinit/stages.py')
-rw-r--r--cloudinit/stages.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 21763810..5bed9032 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -11,7 +11,8 @@ import sys
import six
from six.moves import cPickle as pickle
-from cloudinit.settings import (PER_INSTANCE, FREQUENCIES, CLOUD_CONFIG)
+from cloudinit.settings import (
+ FREQUENCIES, CLOUD_CONFIG, PER_INSTANCE, RUN_CLOUD_CONFIG)
from cloudinit import handlers
@@ -834,6 +835,10 @@ class Modules(object):
return self._run_modules(mostly_mods)
+def read_runtime_config():
+ return util.read_conf(RUN_CLOUD_CONFIG)
+
+
def fetch_base_config():
return util.mergemanydict(
[
@@ -841,6 +846,8 @@ def fetch_base_config():
util.get_builtin_cfg(),
# Anything in your conf.d or 'default' cloud.cfg location.
util.read_conf_with_confd(CLOUD_CONFIG),
+ # runtime config
+ read_runtime_config(),
# Kernel/cmdline parameters override system config
util.read_conf_from_cmdline(),
], reverse=True)