diff options
Diffstat (limited to 'cloudinit/config/cc_set_hostname.py')
-rw-r--r-- | cloudinit/config/cc_set_hostname.py | 2 |
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) |