Cloud.get_template_filename should start with distro-specific template and fallback to generic template files before warning !found
This bug was originally filed in Launchpad as LP: #1693020
Launchpad details
affected_projects = [] assignee = None assignee_name = None date_closed = None date_created = 2017-05-23T20:23:17.044702+00:00 date_fix_committed = None date_fix_released = None id = 1693020 importance = low is_complete = False lp_url = https://bugs.launchpad.net/cloud-init/+bug/1693020 milestone = None owner = chad.smith owner_name = Chad Smith private = False status = triaged submitter = chad.smith submitter_name = Chad Smith tags = ['bite-size'] duplicates = []
Launchpad user Chad Smith(chad.smith) wrote on 2017-05-23T20:23:17.044702+00:00
We need get_template_filename to always start at a granular cloud distro-scope, if the distro-specific file doesn't exist, fallback to a generic scoped template name and ultimately warn on missing template if neither exist.
This functionality could be used by ntp, hosts and sources template renderers.
Also rename ntp.sles.tmpl -> ntp.suse.tmpl as part of this work.
Are we sure that this is needed? It seems like this might make adding new distros slightly easier, but I wonder if that is worth the engineering effort and maintenance of supporting a fallback path.