Replace use of local apt module with upstream.
Change-Id: Idcf8af9712f8d10b50cfffc0aa74f7caa1a24c77 Reviewed-on: https://review.openstack.org/10833 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
246566d65e
commit
fd2f6b4944
@ -4,7 +4,7 @@ if ! puppet help module >/dev/null 2>&1 ; then
|
||||
apt-get install -y -o Dpkg::Options::="--force-confold" puppet facter
|
||||
fi
|
||||
|
||||
MODULES="puppetlabs-mysql puppetlabs-dashboard puppetlabs-vcsrepo"
|
||||
MODULES="puppetlabs-apt puppetlabs-mysql puppetlabs-dashboard puppetlabs-vcsrepo"
|
||||
MODULE_LIST=`puppet module list`
|
||||
|
||||
for MOD in $MODULES ; do
|
||||
|
@ -1,17 +0,0 @@
|
||||
define apt::builddep($ensure = present) {
|
||||
case $ensure {
|
||||
present: {
|
||||
exec { "Install build-deps for $name":
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
environment => "HOME=/root",
|
||||
command => "apt-get -y --force-yes build-dep $name",
|
||||
user => "root",
|
||||
group => "root",
|
||||
logoutput => on_failure,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail "Invalid 'ensure' value '$ensure' for apt::builddep"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
define apt::key($keyid, $ensure, $keyserver = "keyserver.ubuntu.com") {
|
||||
case $ensure {
|
||||
present: {
|
||||
exec { "Import $keyid to apt keystore":
|
||||
path => "/bin:/usr/bin",
|
||||
environment => "HOME=/root",
|
||||
command => "gpg --keyserver $keyserver --recv-keys $keyid && gpg --export --armor $keyid | apt-key add -",
|
||||
user => "root",
|
||||
group => "root",
|
||||
unless => "apt-key list | grep $keyid",
|
||||
logoutput => on_failure,
|
||||
}
|
||||
}
|
||||
absent: {
|
||||
exec { "Remove $keyid from apt keystore":
|
||||
path => "/bin:/usr/bin",
|
||||
environment => "HOME=/root",
|
||||
command => "apt-key del $keyid",
|
||||
user => "root",
|
||||
group => "root",
|
||||
onlyif => "apt-key list | grep $keyid",
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail "Invalid 'ensure' value '$ensure' for apt::key"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
define apt::ppa($ensure = present) {
|
||||
$has_ppa = "/usr/bin/test -f /etc/apt/sources.list.d/`echo $name | cut -f2 -d: | tr / -`*list"
|
||||
case $ensure {
|
||||
present: {
|
||||
exec { "Add $name PPA":
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
environment => "HOME=/root",
|
||||
command => "add-apt-repository $name ; apt-get update",
|
||||
user => "root",
|
||||
group => "root",
|
||||
logoutput => on_failure,
|
||||
unless => "$has_ppa",
|
||||
}
|
||||
}
|
||||
absent: {
|
||||
exec { "Add $name PPA":
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
environment => "HOME=/root",
|
||||
command => "add-apt-repository --remove $name ; apt-get update",
|
||||
user => "root",
|
||||
group => "root",
|
||||
logoutput => on_failure,
|
||||
unless => "$has_ppa",
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail "Invalid 'ensure' value '$ensure' for ppa"
|
||||
}
|
||||
}
|
||||
}
|
@ -5,21 +5,21 @@ class jenkins_master($site, $serveradmin, $logo,
|
||||
) {
|
||||
|
||||
include pip
|
||||
include apt
|
||||
|
||||
#This key is at http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key
|
||||
apt::key { "D50582E6":
|
||||
keyid => "D50582E6",
|
||||
ensure => present,
|
||||
apt::key { "jenkins":
|
||||
key => "D50582E6",
|
||||
key_source => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key",
|
||||
require => Package["wget"]
|
||||
}
|
||||
|
||||
file { '/etc/apt/sources.list.d/jenkins.list':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
content => "deb http://pkg.jenkins-ci.org/debian binary/",
|
||||
replace => 'true',
|
||||
require => Apt::Key['D50582E6'],
|
||||
apt::source { 'jenkins':
|
||||
location => "http://pkg.jenkins-ci.org/debian",
|
||||
release => "binary/",
|
||||
repos => "",
|
||||
require => Apt::Key['jenkins'],
|
||||
notify => Class['Apt::Update']
|
||||
}
|
||||
|
||||
file { '/etc/apache2/sites-available/jenkins':
|
||||
@ -88,14 +88,18 @@ class jenkins_master($site, $serveradmin, $logo,
|
||||
}
|
||||
|
||||
$packages = [
|
||||
"jenkins",
|
||||
"python-babel",
|
||||
"apache2"
|
||||
"apache2",
|
||||
"wget",
|
||||
]
|
||||
|
||||
package { $packages:
|
||||
ensure => "present",
|
||||
require => [File['/etc/apt/sources.list.d/jenkins.list'], Exec["update apt cache"]],
|
||||
}
|
||||
|
||||
package { "jenkins":
|
||||
ensure => "present",
|
||||
require => Apt::Source['jenkins'],
|
||||
}
|
||||
|
||||
service { "versions":
|
||||
|
@ -1,6 +1,6 @@
|
||||
class openstack_project::pypi {
|
||||
include tmpreaper
|
||||
include apt::unattended-upgrades
|
||||
include unattended_upgrades
|
||||
include openstack_project
|
||||
|
||||
# include jenkins slave so that build deps are there for the pip download
|
||||
|
@ -1,7 +1,7 @@
|
||||
class openstack_project::slave {
|
||||
include openstack_project
|
||||
include tmpreaper
|
||||
include apt::unattended-upgrades
|
||||
include unattended_upgrades
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => []
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ class openstack_project::template ($iptables_public_tcp_ports) {
|
||||
include ntp
|
||||
include ssh
|
||||
include snmpd
|
||||
include apt::unattended-upgrades
|
||||
include unattended_upgrades
|
||||
|
||||
class { 'iptables':
|
||||
public_tcp_ports => $iptables_public_tcp_ports,
|
||||
|
@ -1,18 +1,18 @@
|
||||
class apt::unattended-upgrades($email='') {
|
||||
class unattended_upgrades($ensure = present) {
|
||||
package { 'unattended-upgrades':
|
||||
ensure => present;
|
||||
ensure => $ensure;
|
||||
}
|
||||
|
||||
package { 'mailutils':
|
||||
ensure => present;
|
||||
ensure => $ensure;
|
||||
}
|
||||
|
||||
file { '/etc/apt/apt.conf.d/10periodic':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
source => "puppet:///modules/apt/10periodic",
|
||||
ensure => $ensure,
|
||||
source => "puppet:///modules/unattended_upgrades/10periodic",
|
||||
replace => 'true',
|
||||
}
|
||||
|
||||
@ -20,8 +20,8 @@ class apt::unattended-upgrades($email='') {
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
source => "puppet:///modules/apt/50unattended-upgrades",
|
||||
ensure => $ensure,
|
||||
source => "puppet:///modules/unattended_upgrades/50unattended-upgrades",
|
||||
replace => 'true',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user