Browse Source

Expose uca_location to override mirror location

Change-Id: I0cfd805a638388f36bafacd4bddaba5c28c63e6b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/01/335101/6
Paul Belanger 5 years ago
committed by Emilien Macchi
parent
commit
ff76ef266a
  1. 9
      manifests/repo/debian/ubuntu.pp
  2. 3
      releasenotes/notes/allow_change_uca_url-b855c119a693b583.yaml
  3. 5
      spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb

9
manifests/repo/debian/ubuntu.pp

@ -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,
}

3
releasenotes/notes/allow_change_uca_url-b855c119a693b583.yaml

@ -0,0 +1,3 @@
---
features:
- When deploying UCA repositories, allow to customize the URL.

5
spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb

@ -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…
Cancel
Save