}
file { 'configure-apt-proxy':
+ ensure => $proxy_set,
path => "${apt_conf_d}/proxy",
content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
notify => Exec['apt_update'],
- ensure => $proxy_set,
}
# Need anchor to provide containment for dependencies.
define apt::ppa(
$release = $::lsbdistcodename,
- $options = "-y"
+ $options = '-y'
) {
include apt::params
include apt::update
}
if defined(Class[apt]) {
- $proxy_host = getparam(Class[apt], "proxy_host")
- $proxy_port = getparam(Class[apt], "proxy_port")
+ $proxy_host = getparam(Class[apt], 'proxy_host')
+ $proxy_port = getparam(Class[apt], 'proxy_port')
case $proxy_host {
- false, "": {
+ false, '': {
$proxy_env = []
}
default: {$proxy_env = ["http_proxy=http://${proxy_host}:${proxy_port}", "https_proxy=http://${proxy_host}:${proxy_port}"]}
}
exec { "add-apt-repository-${name}":
environment => $proxy_env,
- command => "/usr/bin/add-apt-repository ${options} ${name}",
- creates => "${sources_list_d}/${sources_list_d_filename}",
- logoutput => 'on_failure',
- require => [
+ command => "/usr/bin/add-apt-repository ${options} ${name}",
+ creates => "${sources_list_d}/${sources_list_d_filename}",
+ logoutput => 'on_failure',
+ notify => Exec['apt_update'],
+ require => [
File[$sources_list_d],
- Package["${package}"],
+ Package[$package],
],
- notify => Exec['apt_update'],
}
file { "${sources_list_d}/${sources_list_d_filename}":
# Declare Apt key for apt.puppetlabs.com source
apt::key { 'puppetlabs':
- key => '4BD6EC30',
- key_server => 'pgp.mit.edu',
- key_options => "http-proxy=\"http://proxyuser:proxypass@example.org:3128\"",
+ key => '4BD6EC30',
+ key_server => 'pgp.mit.edu',
+ key_options => 'http-proxy=\"http://proxyuser:proxypass@example.org:3128\"',
}