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
@ -37,13 +37,18 @@
|
||||
# installing any packages.
|
||||
# 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(
|
||||
$release = $::openstack_extras::repo::debian::params::release,
|
||||
$manage_uca = true,
|
||||
$repo = 'updates',
|
||||
$source_hash = {},
|
||||
$source_defaults = {},
|
||||
$package_require = false
|
||||
$package_require = false,
|
||||
$uca_location = $::openstack_extras::repo::debian::params::uca_location,
|
||||
) inherits openstack_extras::repo::debian::params {
|
||||
if $manage_uca {
|
||||
exec { 'installing ubuntu-cloud-keyring':
|
||||
@ -56,7 +61,7 @@ class openstack_extras::repo::debian::ubuntu(
|
||||
notify => Exec['apt_update'],
|
||||
}
|
||||
apt::source { $::openstack_extras::repo::debian::params::uca_name:
|
||||
location => $::openstack_extras::repo::debian::params::uca_location,
|
||||
location => $uca_location,
|
||||
release => "${::lsbdistcodename}-${repo}/${release}",
|
||||
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
|
||||
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
|
||||
|
||||
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',
|
||||
:repos => 'main',
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user