summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_set_hostname.py
diff options
context:
space:
mode:
authorNate House nathan.house@rackspace.com <>2014-01-27 12:22:21 -0600
committerNate House nathan.house@rackspace.com <>2014-01-27 12:22:21 -0600
commit309457a96a84132d2e570bf902c464b2a1aa9d0b (patch)
treea6962fcd17eccaae448b1bccb06cea3f7d6a7800 /cloudinit/config/cc_set_hostname.py
parent8f6c9ff5ed7e301db2efa9ffa9a4bf454eb819e9 (diff)
downloadvyos-cloud-init-309457a96a84132d2e570bf902c464b2a1aa9d0b.tar.gz
vyos-cloud-init-309457a96a84132d2e570bf902c464b2a1aa9d0b.zip
Adds distro module exclude support
Diffstat (limited to 'cloudinit/config/cc_set_hostname.py')
-rw-r--r--cloudinit/config/cc_set_hostname.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/config/cc_set_hostname.py b/cloudinit/config/cc_set_hostname.py
index 5d7f4331..fe8e5e47 100644
--- a/cloudinit/config/cc_set_hostname.py
+++ b/cloudinit/config/cc_set_hostname.py
@@ -22,6 +22,8 @@ from cloudinit import util
def handle(name, cfg, cloud, log, _args):
+ if cloud.is_excluded(name):
+ return
if util.get_cfg_option_bool(cfg, "preserve_hostname", False):
log.debug(("Configuration option 'preserve_hostname' is set,"
" not setting the hostname in module %s"), name)