diff options
Diffstat (limited to 'cloudinit/config')
24 files changed, 0 insertions, 24 deletions
diff --git a/cloudinit/config/cc_byobu.py b/cloudinit/config/cc_byobu.py index 4821693b..92d428b7 100644 --- a/cloudinit/config/cc_byobu.py +++ b/cloudinit/config/cc_byobu.py @@ -29,7 +29,6 @@ distros = ['ubuntu', 'debian'] def handle(name, cfg, cloud, log, args): - if len(args) != 0: value = args[0] else: diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py index 7b339274..4f2a46a1 100644 --- a/cloudinit/config/cc_ca_certs.py +++ b/cloudinit/config/cc_ca_certs.py @@ -79,7 +79,6 @@ def handle(name, cfg, _cloud, log, _args): @param args: Any module arguments from cloud.cfg """ # If there isn't a ca-certs section in the configuration don't do anything - if "ca-certs" not in cfg: log.debug(("Skipping module named %s," " no 'ca-certs' key in configuration"), name) diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index d0274ba6..0b970e4e 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -40,7 +40,6 @@ def handle(_name, cfg, cloud, log, _args): See doc/examples/cloud-config_disk-setup.txt for documentation on the format. """ - 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 4c5997fa..f52c41f0 100644 --- a/cloudinit/config/cc_growpart.py +++ b/cloudinit/config/cc_growpart.py @@ -255,7 +255,6 @@ def resize_devices(resizer, devices): def handle(_name, cfg, _cloud, log, _args): - if 'growpart' not in cfg: log.debug("No 'growpart' entry in cfg. Using default: %s" % DEFAULT_CONFIG) diff --git a/cloudinit/config/cc_grub_dpkg.py b/cloudinit/config/cc_grub_dpkg.py index 3fd92426..03cdd98c 100644 --- a/cloudinit/config/cc_grub_dpkg.py +++ b/cloudinit/config/cc_grub_dpkg.py @@ -26,7 +26,6 @@ distros = ['ubuntu', 'debian'] def handle(_name, cfg, _cloud, log, _args): - idevs = None idevs_empty = None diff --git a/cloudinit/config/cc_locale.py b/cloudinit/config/cc_locale.py index 68399993..6feaae9d 100644 --- a/cloudinit/config/cc_locale.py +++ b/cloudinit/config/cc_locale.py @@ -22,7 +22,6 @@ from cloudinit import util def handle(name, cfg, cloud, log, args): - if len(args) != 0: locale = args[0] else: diff --git a/cloudinit/config/cc_migrator.py b/cloudinit/config/cc_migrator.py index f7b2211a..facaa538 100644 --- a/cloudinit/config/cc_migrator.py +++ b/cloudinit/config/cc_migrator.py @@ -75,7 +75,6 @@ def _migrate_legacy_sems(cloud, log): def handle(name, cfg, cloud, log, _args): - do_migrate = util.get_cfg_option_str(cfg, "migrate", True) if not util.translate_bool(do_migrate): log.debug("Skipping module named %s, migration disabled", name) diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py index c1ac76d4..80590118 100644 --- a/cloudinit/config/cc_mounts.py +++ b/cloudinit/config/cc_mounts.py @@ -76,7 +76,6 @@ def sanitize_devname(startname, transformer, log): def handle(_name, cfg, cloud, log, _args): - # fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno defvals = [None, None, "auto", "defaults,nobootwait", "0", "2"] defvals = cfg.get("mount_default_fields", defvals) diff --git a/cloudinit/config/cc_package_update_upgrade_install.py b/cloudinit/config/cc_package_update_upgrade_install.py index 85bc0240..73b0e30d 100644 --- a/cloudinit/config/cc_package_update_upgrade_install.py +++ b/cloudinit/config/cc_package_update_upgrade_install.py @@ -49,7 +49,6 @@ def _fire_reboot(log, wait_attempts=6, initial_sleep=1, backoff=2): def handle(_name, cfg, cloud, log, _args): - # Handle the old style + new config names update = _multi_cfg_bool_get(cfg, 'apt_update', 'package_update') upgrade = _multi_cfg_bool_get(cfg, 'package_upgrade', 'apt_upgrade') diff --git a/cloudinit/config/cc_phone_home.py b/cloudinit/config/cc_phone_home.py index 360fd83e..2e058ccd 100644 --- a/cloudinit/config/cc_phone_home.py +++ b/cloudinit/config/cc_phone_home.py @@ -44,7 +44,6 @@ POST_LIST_ALL = [ # post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id # def handle(name, cfg, cloud, log, args): - if len(args) != 0: ph_cfg = util.read_conf(args[0]) else: diff --git a/cloudinit/config/cc_puppet.py b/cloudinit/config/cc_puppet.py index 717734d1..471a1a8a 100644 --- a/cloudinit/config/cc_puppet.py +++ b/cloudinit/config/cc_puppet.py @@ -49,7 +49,6 @@ def _autostart_puppet(log): def handle(name, cfg, cloud, log, _args): - # 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_resizefs.py b/cloudinit/config/cc_resizefs.py index 9d767873..be406034 100644 --- a/cloudinit/config/cc_resizefs.py +++ b/cloudinit/config/cc_resizefs.py @@ -76,7 +76,6 @@ def rootdev_from_cmdline(cmdline): def handle(name, cfg, _cloud, log, args): - if len(args) != 0: resize_root = args[0] else: diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py index feacebcd..879b62b1 100644 --- a/cloudinit/config/cc_resolv_conf.py +++ b/cloudinit/config/cc_resolv_conf.py @@ -92,7 +92,6 @@ def handle(name, cfg, _cloud, log, _args): @param log: Pre-initialized Python logger object to use for logging. @param args: Any module arguments from cloud.cfg """ - if "manage_resolv_conf" not in cfg: log.debug(("Skipping module named %s," " no 'manage_resolv_conf' key in configuration"), name) diff --git a/cloudinit/config/cc_rightscale_userdata.py b/cloudinit/config/cc_rightscale_userdata.py index f99524d1..c771728d 100644 --- a/cloudinit/config/cc_rightscale_userdata.py +++ b/cloudinit/config/cc_rightscale_userdata.py @@ -50,7 +50,6 @@ MY_HOOKNAME = 'CLOUD_INIT_REMOTE_HOOK' def handle(name, _cfg, cloud, log, _args): - try: ud = cloud.get_userdata_raw() except: diff --git a/cloudinit/config/cc_rsyslog.py b/cloudinit/config/cc_rsyslog.py index 7f70167e..0c2c6880 100644 --- a/cloudinit/config/cc_rsyslog.py +++ b/cloudinit/config/cc_rsyslog.py @@ -35,7 +35,6 @@ def handle(name, cfg, cloud, log, _args): # *.* @@syslogd.example.com # process 'rsyslog' - if not 'rsyslog' in cfg: log.debug(("Skipping module named %s," " no 'rsyslog' key in configuration"), name) diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py index b48762c8..53013dcb 100644 --- a/cloudinit/config/cc_salt_minion.py +++ b/cloudinit/config/cc_salt_minion.py @@ -22,7 +22,6 @@ from cloudinit import util def handle(name, cfg, cloud, log, _args): - # If there isn't a salt key in the configuration don't do anything if 'salt_minion' 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 1676dd0a..22a31f29 100644 --- a/cloudinit/config/cc_seed_random.py +++ b/cloudinit/config/cc_seed_random.py @@ -39,7 +39,6 @@ def _decode(data, encoding=None): def handle(name, cfg, cloud, log, _args): - 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 38246b57..5d7f4331 100644 --- a/cloudinit/config/cc_set_hostname.py +++ b/cloudinit/config/cc_set_hostname.py @@ -22,7 +22,6 @@ from cloudinit import util def handle(name, cfg, cloud, log, _args): - 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 ab0ed5ad..646c3f8b 100644 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -36,7 +36,6 @@ PW_SET = (letters.translate(None, 'loLOI') + def handle(_name, cfg, cloud, log, args): - 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_authkey_fingerprints.py b/cloudinit/config/cc_ssh_authkey_fingerprints.py index 8b2708b1..be8083db 100644 --- a/cloudinit/config/cc_ssh_authkey_fingerprints.py +++ b/cloudinit/config/cc_ssh_authkey_fingerprints.py @@ -92,7 +92,6 @@ def _pprint_key_entries(user, key_fn, key_entries, hash_meth='md5', def handle(name, cfg, cloud, log, _args): - if 'no_ssh_fingerprints' in cfg: log.debug(("Skipping module named %s, " "logging of ssh fingerprints disabled"), name) diff --git a/cloudinit/config/cc_timezone.py b/cloudinit/config/cc_timezone.py index bddcd0e9..b9eb85b2 100644 --- a/cloudinit/config/cc_timezone.py +++ b/cloudinit/config/cc_timezone.py @@ -26,7 +26,6 @@ frequency = PER_INSTANCE def handle(name, cfg, cloud, log, args): - 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 3e3b4228..d3dd1f32 100644 --- a/cloudinit/config/cc_update_etc_hosts.py +++ b/cloudinit/config/cc_update_etc_hosts.py @@ -27,7 +27,6 @@ frequency = PER_ALWAYS def handle(name, cfg, cloud, log, _args): - 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 56f6ebb7..e396ba13 100644 --- a/cloudinit/config/cc_update_hostname.py +++ b/cloudinit/config/cc_update_hostname.py @@ -27,7 +27,6 @@ frequency = PER_ALWAYS def handle(name, cfg, cloud, log, _args): - 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 30bf455d..bf5b4581 100644 --- a/cloudinit/config/cc_users_groups.py +++ b/cloudinit/config/cc_users_groups.py @@ -27,7 +27,6 @@ frequency = PER_INSTANCE def handle(name, cfg, cloud, _log, _args): - (users, groups) = ds.normalize_users_groups(cfg, cloud.distro) for (name, members) in groups.items(): cloud.distro.create_group(name, members) |