Expose uca_location to override mirror location
Change-Id: I0cfd805a638388f36bafacd4bddaba5c28c63e6b Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
7c15f3039f
commit
ff76ef266a
manifests/repo/debian
releasenotes/notes
spec/classes
@ -37,13 +37,18 @@
|
|||||||
# installing any packages.
|
# installing any packages.
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
#
|
#
|
||||||
|
# [*uca_location*]
|
||||||
|
# (optional) Ubuntu Cloud Archives repository location.
|
||||||
|
# Defaults to $::openstack_extras::repo::debian::params::uca_location
|
||||||
|
#
|
||||||
class openstack_extras::repo::debian::ubuntu(
|
class openstack_extras::repo::debian::ubuntu(
|
||||||
$release = $::openstack_extras::repo::debian::params::release,
|
$release = $::openstack_extras::repo::debian::params::release,
|
||||||
$manage_uca = true,
|
$manage_uca = true,
|
||||||
$repo = 'updates',
|
$repo = 'updates',
|
||||||
$source_hash = {},
|
$source_hash = {},
|
||||||
$source_defaults = {},
|
$source_defaults = {},
|
||||||
$package_require = false
|
$package_require = false,
|
||||||
|
$uca_location = $::openstack_extras::repo::debian::params::uca_location,
|
||||||
) inherits openstack_extras::repo::debian::params {
|
) inherits openstack_extras::repo::debian::params {
|
||||||
if $manage_uca {
|
if $manage_uca {
|
||||||
exec { 'installing ubuntu-cloud-keyring':
|
exec { 'installing ubuntu-cloud-keyring':
|
||||||
@ -56,7 +61,7 @@ class openstack_extras::repo::debian::ubuntu(
|
|||||||
notify => Exec['apt_update'],
|
notify => Exec['apt_update'],
|
||||||
}
|
}
|
||||||
apt::source { $::openstack_extras::repo::debian::params::uca_name:
|
apt::source { $::openstack_extras::repo::debian::params::uca_name:
|
||||||
location => $::openstack_extras::repo::debian::params::uca_location,
|
location => $uca_location,
|
||||||
release => "${::lsbdistcodename}-${repo}/${release}",
|
release => "${::lsbdistcodename}-${repo}/${release}",
|
||||||
repos => $::openstack_extras::repo::debian::params::uca_repos,
|
repos => $::openstack_extras::repo::debian::params::uca_repos,
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- When deploying UCA repositories, allow to customize the URL.
|
@ -131,11 +131,12 @@ describe 'openstack_extras::repo::debian::ubuntu' do
|
|||||||
|
|
||||||
describe 'with overridden uca repo name' do
|
describe 'with overridden uca repo name' do
|
||||||
let :params do
|
let :params do
|
||||||
default_params.merge!({ :repo => 'proposed' })
|
default_params.merge!({ :repo => 'proposed',
|
||||||
|
:uca_location => 'http://mirror.dfw.rax.openstack.org/ubuntu-cloud-archive' })
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ubuntu-cloud-archive').with(
|
it { is_expected.to contain_apt__source('ubuntu-cloud-archive').with(
|
||||||
:location => 'http://ubuntu-cloud.archive.canonical.com/ubuntu',
|
:location => 'http://mirror.dfw.rax.openstack.org/ubuntu-cloud-archive',
|
||||||
:release => 'trusty-proposed/mitaka',
|
:release => 'trusty-proposed/mitaka',
|
||||||
:repos => 'main',
|
:repos => 'main',
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user