Extend Ceph repos template to support CentOS8
Parses args.distro to build a repo file for Ceph Nautilus which will work on CentOS8 as well. Change-Id: Ibfbfffa5835200e3909ad873282b0035a81f8bef
This commit is contained in:
parent
5aa9c9a874
commit
b361925cd5
|
@ -45,7 +45,7 @@ DEFAULT_MIRROR_MAP = {
|
|||
CEPH_REPO_TEMPLATE = '''
|
||||
[tripleo-centos-ceph-%(ceph_release)s]
|
||||
name=tripleo-centos-ceph-%(ceph_release)s
|
||||
baseurl=%(mirror)s/centos/7/storage/x86_64/ceph-%(ceph_release)s/
|
||||
baseurl=%(mirror)s/centos/%(centos_release)s/storage/x86_64/ceph-%(ceph_release)s/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
'''
|
||||
|
@ -298,7 +298,9 @@ def _install_priorities():
|
|||
|
||||
def _create_ceph(args, release):
|
||||
"""Generate a Ceph repo file for release"""
|
||||
return CEPH_REPO_TEMPLATE % {'ceph_release': release,
|
||||
centos_release = '7' if args.distro == 'centos7' else '8'
|
||||
return CEPH_REPO_TEMPLATE % {'centos_release': centos_release,
|
||||
'ceph_release': release,
|
||||
'mirror': args.mirror}
|
||||
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ enabled=1
|
|||
expected_repo = '''
|
||||
[tripleo-centos-ceph-jewel]
|
||||
name=tripleo-centos-ceph-jewel
|
||||
baseurl=http://foo/centos/7/storage/x86_64/ceph-jewel/
|
||||
baseurl=http://foo/centos/8/storage/x86_64/ceph-jewel/
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue