diff options
author | Nate House nathan.house@rackspace.com <> | 2014-01-28 08:48:47 -0600 |
---|---|---|
committer | Nate House nathan.house@rackspace.com <> | 2014-01-28 08:48:47 -0600 |
commit | dd95d5e0a90031f19a68b255510476fb176126a6 (patch) | |
tree | 1c6fa51fe6beba7299e34deafa187a3945335614 /cloudinit/config | |
parent | 79d1eccc9fa751325fcb574fd9385a14bf2bbba6 (diff) | |
download | vyos-cloud-init-dd95d5e0a90031f19a68b255510476fb176126a6.tar.gz vyos-cloud-init-dd95d5e0a90031f19a68b255510476fb176126a6.zip |
exclude modules fix 1
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_disk_setup.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_growpart.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_puppet.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_seed_random.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_set_hostname.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_set_passwords.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_ssh.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_ssh_authkey_fingerprints.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_ssh_import_id.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_timezone.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_update_etc_hosts.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_update_hostname.py | 3 | ||||
-rw-r--r-- | cloudinit/config/cc_users_groups.py | 3 |
13 files changed, 13 insertions, 26 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index 7b5e2f3d..d0274ba6 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -40,8 +40,7 @@ def handle(_name, cfg, cloud, log, _args): See doc/examples/cloud-config_disk-setup.txt for documentation on the format. """ - if cloud.is_excluded(_name): - return + disk_setup = cfg.get("disk_setup") if isinstance(disk_setup, dict): update_disk_setup_devices(disk_setup, cloud.device_name_to_device) diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py index 91f472af..03b53a3c 100644 --- a/cloudinit/config/cc_growpart.py +++ b/cloudinit/config/cc_growpart.py @@ -213,8 +213,7 @@ def resize_devices(resizer, devices): def handle(_name, cfg, _cloud, log, _args): - if _cloud.is_excluded(_name): - return + if 'growpart' not in cfg: log.debug("No 'growpart' entry in cfg. Using default: %s" % DEFAULT_CONFIG) diff --git a/cloudinit/config/cc_puppet.py b/cloudinit/config/cc_puppet.py index 35fbb251..717734d1 100644 --- a/cloudinit/config/cc_puppet.py +++ b/cloudinit/config/cc_puppet.py @@ -49,8 +49,7 @@ def _autostart_puppet(log): def handle(name, cfg, cloud, log, _args): - if cloud.is_excluded(name): - return + # If there isn't a puppet key in the configuration don't do anything if 'puppet' not in cfg: log.debug(("Skipping module named %s," diff --git a/cloudinit/config/cc_seed_random.py b/cloudinit/config/cc_seed_random.py index 2b695ee7..1676dd0a 100644 --- a/cloudinit/config/cc_seed_random.py +++ b/cloudinit/config/cc_seed_random.py @@ -39,8 +39,7 @@ def _decode(data, encoding=None): def handle(name, cfg, cloud, log, _args): - if cloud.is_excluded(name): - return + if not cfg or "random_seed" not in cfg: log.debug(("Skipping module named %s, " "no 'random_seed' configuration found"), name) diff --git a/cloudinit/config/cc_set_hostname.py b/cloudinit/config/cc_set_hostname.py index fe8e5e47..38246b57 100644 --- a/cloudinit/config/cc_set_hostname.py +++ b/cloudinit/config/cc_set_hostname.py @@ -22,8 +22,7 @@ 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) diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py index fc76edab..b9dc0cc0 100644 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -36,8 +36,7 @@ PW_SET = (letters.translate(None, 'loLOI') + def handle(_name, cfg, cloud, log, args): - if cloud.is_excluded(_name): - return + if len(args) != 0: # if run from command line, and give args, wipe the chpasswd['list'] password = args[0] diff --git a/cloudinit/config/cc_ssh.py b/cloudinit/config/cc_ssh.py index 0dc1d15d..64a5e3cb 100644 --- a/cloudinit/config/cc_ssh.py +++ b/cloudinit/config/cc_ssh.py @@ -56,8 +56,7 @@ KEY_FILE_TPL = '/etc/ssh/ssh_host_%s_key' def handle(_name, cfg, cloud, log, _args): - if cloud.is_excluded(_name): - return + # remove the static keys from the pristine image if cfg.get("ssh_deletekeys", True): key_pth = os.path.join("/etc/ssh/", "ssh_host_*key*") diff --git a/cloudinit/config/cc_ssh_authkey_fingerprints.py b/cloudinit/config/cc_ssh_authkey_fingerprints.py index 948bbba0..8b2708b1 100644 --- a/cloudinit/config/cc_ssh_authkey_fingerprints.py +++ b/cloudinit/config/cc_ssh_authkey_fingerprints.py @@ -92,8 +92,7 @@ def _pprint_key_entries(user, key_fn, key_entries, hash_meth='md5', def handle(name, cfg, cloud, log, _args): - if cloud.is_excluded(name): - return + if 'no_ssh_fingerprints' in cfg: log.debug(("Skipping module named %s, " "logging of ssh fingerprints disabled"), name) diff --git a/cloudinit/config/cc_ssh_import_id.py b/cloudinit/config/cc_ssh_import_id.py index 51e0bc0b..50d96e15 100644 --- a/cloudinit/config/cc_ssh_import_id.py +++ b/cloudinit/config/cc_ssh_import_id.py @@ -32,8 +32,7 @@ distros = ['ubuntu'] def handle(_name, cfg, cloud, log, args): - if cloud.is_excluded(_name): - return + # import for "user: XXXXX" if len(args) != 0: user = args[0] diff --git a/cloudinit/config/cc_timezone.py b/cloudinit/config/cc_timezone.py index da195b0a..bddcd0e9 100644 --- a/cloudinit/config/cc_timezone.py +++ b/cloudinit/config/cc_timezone.py @@ -26,8 +26,7 @@ frequency = PER_INSTANCE def handle(name, cfg, cloud, log, args): - if cloud.is_excluded(name): - return + if len(args) != 0: timezone = args[0] else: diff --git a/cloudinit/config/cc_update_etc_hosts.py b/cloudinit/config/cc_update_etc_hosts.py index ce0a3ae8..3e3b4228 100644 --- a/cloudinit/config/cc_update_etc_hosts.py +++ b/cloudinit/config/cc_update_etc_hosts.py @@ -27,8 +27,7 @@ frequency = PER_ALWAYS def handle(name, cfg, cloud, log, _args): - if cloud.is_excluded(name): - return + manage_hosts = util.get_cfg_option_str(cfg, "manage_etc_hosts", False) if util.translate_bool(manage_hosts, addons=['template']): (hostname, fqdn) = util.get_hostname_fqdn(cfg, cloud) diff --git a/cloudinit/config/cc_update_hostname.py b/cloudinit/config/cc_update_hostname.py index 5ee38630..56f6ebb7 100644 --- a/cloudinit/config/cc_update_hostname.py +++ b/cloudinit/config/cc_update_hostname.py @@ -27,8 +27,7 @@ frequency = PER_ALWAYS 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 updating the hostname in module %s"), name) diff --git a/cloudinit/config/cc_users_groups.py b/cloudinit/config/cc_users_groups.py index 7ddd9f2d..30bf455d 100644 --- a/cloudinit/config/cc_users_groups.py +++ b/cloudinit/config/cc_users_groups.py @@ -27,8 +27,7 @@ frequency = PER_INSTANCE def handle(name, cfg, cloud, _log, _args): - if cloud.is_excluded(name): - return + (users, groups) = ds.normalize_users_groups(cfg, cloud.distro) for (name, members) in groups.items(): cloud.distro.create_group(name, members) |