diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-27 17:33:58 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-27 17:33:58 -0200 |
commit | 3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12 (patch) | |
tree | 8de651c5a7ea1bb03e45bd9d16fe53b550e7b3e6 | |
parent | 7ee3f146160d77d1c5010891c1eb86f480c07316 (diff) | |
download | puppet-nodo-3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12.tar.gz puppet-nodo-3d9b735928d1e6a4b7c7bacc62f6a4397a21ca12.tar.bz2 |
Removing use_apt variable and adding proxy configuration
-rw-r--r-- | manifests/nodo.pp | 59 |
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 |