← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1975615] [NEW] Jinja templating doesn't work for config files under /etc/cloud/cloud.cfg.d/

 

Public bug reported:

I am opening a new bug which basically bumps this already filed bug
which expired: https://bugs.launchpad.net/cloud-init/+bug/1913461

I have extensively tested this.

jinja templating only works for #cloud-init config in userdata and
vendordata. The built-in handlers are only invoked for those 2 files
here: https://github.com/canonical/cloud-
init/blob/main/cloudinit/stages.py#L783-L799

It's a really desirable feature to have this work for configs inside
/etc/cloud/cloud.cfg.d/ directory as well. The code is parsing all these
files as part of fetch_base_config() but it simply loads the yaml and
merges the dictionary. https://github.com/canonical/cloud-
init/blob/343d2c72f32db8fbe47eb8afa98c15987e9ffba6/cloudinit/stages.py#L966

** Affects: cloud-init
     Importance: Undecided
         Status: New


** Tags: jinja

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1975615

Title:
  Jinja templating doesn't work for config files under
  /etc/cloud/cloud.cfg.d/

Status in cloud-init:
  New

Bug description:
  I am opening a new bug which basically bumps this already filed bug
  which expired: https://bugs.launchpad.net/cloud-init/+bug/1913461

  I have extensively tested this.

  jinja templating only works for #cloud-init config in userdata and
  vendordata. The built-in handlers are only invoked for those 2 files
  here: https://github.com/canonical/cloud-
  init/blob/main/cloudinit/stages.py#L783-L799

  It's a really desirable feature to have this work for configs inside
  /etc/cloud/cloud.cfg.d/ directory as well. The code is parsing all
  these files as part of fetch_base_config() but it simply loads the
  yaml and merges the dictionary. https://github.com/canonical/cloud-
  init/blob/343d2c72f32db8fbe47eb8afa98c15987e9ffba6/cloudinit/stages.py#L966

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1975615/+subscriptions