diff options
-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 |