X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Finit.pp;h=b9087cfb7abae68714edd30ab66c2c28df5216d5;hb=9ad4fd682d3223fbd6be3192e5841c366c156cf6;hp=578d73356e5655d8f5374da85dda369da33b8600;hpb=2cf089576d234ec276f454f736e6bcafb414b235;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/init.pp b/manifests/init.pp index 578d733..b9087cf 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -45,6 +45,9 @@ class apt( $_purge = merge($::apt::purge_defaults, $purge) validate_hash($proxy) + if $proxy['ensure'] { + validate_re($proxy['ensure'], ['file', 'present', 'absent']) + } if $proxy['host'] { validate_string($proxy['host']) } @@ -64,8 +67,9 @@ class apt( validate_hash($settings) validate_hash($ppas) - if $proxy['host'] { + if $_proxy['ensure'] == 'absent' or $_proxy['host'] { apt::setting { 'conf-proxy': + ensure => $_proxy['ensure'], priority => '01', content => template('apt/_conf_header.erb', 'apt/proxy.erb'), }