summaryrefslogtreecommitdiff
path: root/tools/render-cloudcfg
diff options
context:
space:
mode:
authorRobert Schweikert <rjschwei@suse.com>2017-09-21 07:38:48 -0400
committerScott Moser <smoser@brickies.net>2017-09-21 14:15:50 -0400
commit0451a9f60960da56e3af4f97bbcece3d98482f86 (patch)
tree6028fe4d5ba2cde48545bfc8a2a6142785ace7b6 /tools/render-cloudcfg
parent243ec59fb62a8710430f9ba1e2490ee964c1abc0 (diff)
downloadvyos-cloud-init-0451a9f60960da56e3af4f97bbcece3d98482f86.tar.gz
vyos-cloud-init-0451a9f60960da56e3af4f97bbcece3d98482f86.zip
suse: updates to templates to support openSUSE and SLES.
Things done here: - identify 'suse' as a variant in util.system_info and also tools/render-cloudcfg. - update systemd and cloud.cfg templates for suse specific changes. LP: #1718640
Diffstat (limited to 'tools/render-cloudcfg')
-rwxr-xr-xtools/render-cloudcfg5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
index e624541a..8b7cb875 100755
--- a/tools/render-cloudcfg
+++ b/tools/render-cloudcfg
@@ -4,6 +4,8 @@ import argparse
import os
import sys
+VARIANTS = ["bsd", "centos", "fedora", "rhel", "suse", "ubuntu", "unknown"]
+
if "avoid-pep8-E402-import-not-top-of-file":
_tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.insert(0, _tdir)
@@ -14,11 +16,10 @@ if "avoid-pep8-E402-import-not-top-of-file":
def main():
parser = argparse.ArgumentParser()
- variants = ["bsd", "centos", "fedora", "rhel", "ubuntu", "unknown"]
platform = util.system_info()
parser.add_argument(
"--variant", default=platform['variant'], action="store",
- help="define the variant.", choices=variants)
+ help="define the variant.", choices=VARIANTS)
parser.add_argument(
"template", nargs="?", action="store",
default='./config/cloud.cfg.tmpl',