From 8620351be7cc8bcfee858be8190c37956a3f1c56 Mon Sep 17 00:00:00 2001 From: Frederick Lefebvre Date: Fri, 6 Dec 2019 21:18:24 +0000 Subject: Add an Amazon distro in the redhat OS family From original work by: Andrew Jorgensen Reviewed-by: Matt Nierzwicki Reviewed-by: Ethan Faust --- cloudinit/distros/__init__.py | 2 +- cloudinit/distros/amazon.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) mode change 100644 => 100755 cloudinit/distros/__init__.py create mode 100644 cloudinit/distros/amazon.py diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py old mode 100644 new mode 100755 index 2ec79577..2b559fe6 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -36,7 +36,7 @@ ALL_DISTROS = 'all' OSFAMILIES = { 'debian': ['debian', 'ubuntu'], - 'redhat': ['centos', 'fedora', 'rhel'], + 'redhat': ['amazon', 'centos', 'fedora', 'rhel'], 'gentoo': ['gentoo'], 'freebsd': ['freebsd'], 'suse': ['opensuse', 'sles'], diff --git a/cloudinit/distros/amazon.py b/cloudinit/distros/amazon.py new file mode 100644 index 00000000..ff9a549f --- /dev/null +++ b/cloudinit/distros/amazon.py @@ -0,0 +1,26 @@ +# Copyright (C) 2012 Canonical Ltd. +# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. +# Copyright (C) 2012 Yahoo! Inc. +# Copyright (C) 2014 Amazon.com, Inc. or its affiliates. +# +# Author: Scott Moser +# Author: Juerg Haefliger +# Author: Joshua Harlow +# Author: Andrew Jorgensen +# +# This file is part of cloud-init. See LICENSE file for license information. + +from cloudinit.distros import rhel + +from cloudinit import log as logging + +LOG = logging.getLogger(__name__) + + +class Distro(rhel.Distro): + + def update_package_sources(self): + return None + + +# vi: ts=4 expandtab -- cgit v1.2.3