X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Finit.pp;h=d26a8a2d4304af4bc0bf91743b73eff985c9448d;hb=824da679d4f1818d4c30a54908a9c24623c31900;hp=12db61a6df3b1c9080584436a02cc490e86e82a7;hpb=fd3e07e58fadc6efb25d524168575c39de0c5590;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/init.pp b/manifests/init.pp index 12db61a..d26a8a2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,7 +31,9 @@ class apt( $purge_sources_list_d = false, $purge_preferences = false, $purge_preferences_d = false, - $update_timeout = undef + $update_timeout = undef, + $update_tries = undef, + $sources = undef ) { include apt::params @@ -128,12 +130,21 @@ Package: bogus-package\n", file { 'configure-apt-proxy': ensure => $proxy_set, path => "${apt_conf_d}/proxy", - content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";", + content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";\n", notify => Exec['apt_update'], + mode => '0644', + owner => root, + group => root, } # Need anchor to provide containment for dependencies. anchor { 'apt::update': require => Class['apt::update'], } + + # manage sources if present + if $sources != undef { + validate_hash($sources) + create_resources('apt::source', $sources) + } }