aboutsummaryrefslogtreecommitdiff
path: root/manifests/nodo.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-27 17:33:58 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-27 17:33:58 -0200
commit3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12 (patch)
tree8de651c5a7ea1bb03e45bd9d16fe53b550e7b3e6 /manifests/nodo.pp
parent7ee3f146160d77d1c5010891c1eb86f480c07316 (diff)
downloadpuppet-nodo-3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12.tar.gz
puppet-nodo-3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12.tar.bz2
Removing use_apt variable and adding proxy configuration
Diffstat (limited to 'manifests/nodo.pp')
-rw-r--r--manifests/nodo.pp59
1 files changed, 34 insertions, 25 deletions
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index 43d6d4f..566ee19 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -57,43 +57,52 @@ class nodo {
'','exim',default: { include exim::tls }
}
+ #
# Apt configuration
- if $use_apt != false {
- class { 'apt':
- include_src => hiera('nodo::apt_include_src', false),
- use_next_release => hiera('nodo::apt_use_next_release', false),
- custom_key_dir => hiera('nodo::apt_custom_key_dir', 'puppet:///modules/site_apt/keys.d')
- }
+ #
+ class { 'apt':
+ include_src => hiera('nodo::apt_include_src', false),
+ use_next_release => hiera('nodo::apt_use_next_release', false),
+ custom_key_dir => hiera('nodo::apt_custom_key_dir', 'puppet:///modules/site_apt/keys.d')
+ }
- include apt::unattended_upgrades
+ include apt::unattended_upgrades
- $apt_domain_source = hiera('nodo::apt_domain_source', false)
+ $apt_domain_source = hiera('nodo::apt_domain_source', false)
- apt::sources_list { "${::domain}.list":
- source => "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::domain}.list",
- ensure => $apt_domain_source ? {
- true => present,
- default => absent,
- }
+ apt::sources_list { "${::domain}.list":
+ source => "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::domain}.list",
+ ensure => $apt_domain_source ? {
+ true => present,
+ default => absent,
}
+ }
- # Preferences file can't have dots in the filename
- $apt_domain_preferences = regsubst($::domain, '\.', '-', 'G')
+ # Preferences file can't have dots in the filename
+ $apt_domain_preferences = regsubst($::domain, '\.', '-', 'G')
- file { "/etc/apt/preferences.d/${apt_domain_preferences}":
- source => [ "puppet:///modules/site_apt/preferences.d/${::operatingsystem}/${::domain}",
- "puppet:///modules/nodo/preferences.d/custom" ],
- ensure => $apt_domain_source ? {
- true => present,
- default => absent,
- }
+ file { "/etc/apt/preferences.d/${apt_domain_preferences}":
+ source => [ "puppet:///modules/site_apt/preferences.d/${::operatingsystem}/${::domain}",
+ "puppet:///modules/nodo/preferences.d/custom" ],
+ ensure => $apt_domain_source ? {
+ true => present,
+ default => absent,
}
+ }
+
+ $apt_proxy = hiera('nodo::apt_proxy', false)
- package { 'apt-transport-https':
- ensure => present,
+ if $apt_proxy != false {
+ class { 'apt::proxy_client':
+ proxy => $apt_proxy,
+ port => hiera('nodo::apt_proxy_port', ''),
}
}
+ package { 'apt-transport-https':
+ ensure => present,
+ }
+
# SSH Server
#
# We need to restrict listen address by default so multiple