diff options
-rw-r--r-- | cloudinit/transforms/disable_ec2_metadata.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/transforms/disable_ec2_metadata.py b/cloudinit/transforms/disable_ec2_metadata.py index 3c0dd57b..c7d26029 100644 --- a/cloudinit/transforms/disable_ec2_metadata.py +++ b/cloudinit/transforms/disable_ec2_metadata.py @@ -27,7 +27,10 @@ frequency = PER_ALWAYS reject_cmd = ['route', 'add', '-host', '169.254.169.254', 'reject'] -def handle(_name, cfg, _cloud, _log, _args): +def handle(name, cfg, _cloud, log, _args): disabled = util.get_cfg_option_bool(cfg, "disable_ec2_metadata", False) if disabled: util.subp(reject_cmd) + else: + log.debug(("Skipping transform named %s," + " disabling the ec2 route not enabled"), name) |