Puppet Class: openstack_extras::repo::debian::ubuntu

Inherits:
openstack_extras::repo::debian::params
Defined in:
manifests/repo/debian/ubuntu.pp

Overview

Class: openstack_extras::repo::debian::ubuntu

This repo sets up apt sources for use with the debian osfamily and ubuntu operatingsystem

Parameters:

release

(optional) The OpenStack release to add an Ubuntu Cloud Archive APT source for. Defaults to $::openstack_extras::repo::debian::params::release

manage_uca

(optional) Whether or not to add the default Ubuntu Cloud Archive APT source Defaults to true

repo

(optional) Select with repository we want to use Can be ‘updates’ or ‘proposed’ ‘proposed’ to test upgrade to the next version ‘updates’ to install the latest stable version Defaults to ‘updates’

source_hash

(optional) A hash of apt::source resources to create and manage Defaults to {}

source_defaults

(optional) A hash of defaults to use for all apt::source resources created by this class Defaults to {}

package_require

(optional) Whether or not to run ‘apt-get update’ before installing any packages. Defaults to false

uca_location

(optional) Ubuntu Cloud Archives repository location. Defaults to $::openstack_extras::repo::debian::params::uca_location

Parameters:

  • release (String[1]) (defaults to: $::openstack_extras::repo::debian::params::release)
  • manage_uca (Boolean) (defaults to: true)
  • repo (String[1]) (defaults to: 'updates')
  • source_hash (Hash) (defaults to: {})
  • source_defaults (Hash) (defaults to: {})
  • package_require (Boolean) (defaults to: false)
  • uca_location (String[1]) (defaults to: $::openstack_extras::repo::debian::params::uca_location)


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'manifests/repo/debian/ubuntu.pp', line 44

class openstack_extras::repo::debian::ubuntu(
  String[1] $release       = $::openstack_extras::repo::debian::params::release,
  Boolean $manage_uca      = true,
  String[1] $repo          = 'updates',
  Hash $source_hash        = {},
  Hash $source_defaults    = {},
  Boolean $package_require = false,
  String[1] $uca_location  = $::openstack_extras::repo::debian::params::uca_location,
) inherits openstack_extras::repo::debian::params {

  if $manage_uca {
    exec { 'installing ubuntu-cloud-keyring':
      command     => '/usr/bin/apt-get -y install ubuntu-cloud-keyring',
      logoutput   => 'on_failure',
      tries       => 3,
      try_sleep   => 1,
      refreshonly => true,
      subscribe   => File["/etc/apt/sources.list.d/${::openstack_extras::repo::debian::params::uca_name}.list"],
      notify      => Exec['apt_update'],
    }
    apt::source { $::openstack_extras::repo::debian::params::uca_name:
      location => $uca_location,
      release  => "${facts['os']['distro']['codename']}-${repo}/${release}",
      repos    => $::openstack_extras::repo::debian::params::uca_repos,
    }
  }

  create_resources('apt::source', $source_hash, $source_defaults)

  if $package_require {
    Exec['apt_update'] -> Package<||>
  }
}