diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-10-24 13:18:52 -0700 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-10-24 13:18:52 -0700 |
commit | a5c12d448157fe984e60c7bd84fb588b9c2ae035 (patch) | |
tree | f1975c0c9e4fc3992f267dd34f658f1fcd844594 /cloudinit | |
parent | d8307152015808fe655649488afe7fb9bf3eea92 (diff) | |
download | vyos-cloud-init-a5c12d448157fe984e60c7bd84fb588b9c2ae035.tar.gz vyos-cloud-init-a5c12d448157fe984e60c7bd84fb588b9c2ae035.zip |
allow template rendering before passing to add-apt-repository
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_apt_configure.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py index 4f44e4af..5819897d 100644 --- a/cloudinit/config/cc_apt_configure.py +++ b/cloudinit/config/cc_apt_configure.py @@ -178,6 +178,8 @@ def add_sources(srclist, template_params=None, aa_repo_match=None): continue source = ent['source'] + source = templater.render_string(source, template_params) + if aa_repo_match(source): try: util.subp(["add-apt-repository", source]) @@ -185,8 +187,6 @@ def add_sources(srclist, template_params=None, aa_repo_match=None): errorlist.append([source, "add-apt-repository failed"]) continue - source = templater.render_string(source, template_params) - if 'filename' not in ent: ent['filename'] = 'cloud_config_sources.list' |