diff options
author | varac <varacanero@zeromail.org> | 2016-11-03 00:45:34 +0100 |
---|---|---|
committer | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2017-01-21 14:54:03 -0500 |
commit | ee49b28eeac4f0e7e746aafc6a000adfa89b3687 (patch) | |
tree | 9321b266cfb1bd1fb1c46ffc936c6df4ec0f22bb | |
parent | 0b9e32d9ce49a3a74be559b0b487e0beba1c3298 (diff) |
Use undef as default for source parameter
-rw-r--r-- | manifests/apt_conf.pp | 6 | ||||
-rw-r--r-- | manifests/sources_list.pp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/manifests/apt_conf.pp b/manifests/apt_conf.pp index 949f615..fa8cfa3 100644 --- a/manifests/apt_conf.pp +++ b/manifests/apt_conf.pp @@ -1,15 +1,15 @@ define apt::apt_conf( $ensure = 'present', - $source = '', + $source = undef, $content = undef, $refresh_apt = true ) { - if $source == '' and $content == undef { + if $source == undef and $content == undef { fail("One of \$source or \$content must be specified for apt_conf ${name}") } - if $source != '' and $content != undef { + if $source != undef and $content != undef { fail("Only one of \$source or \$content must specified for apt_conf ${name}") } diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index 7565bce..6ff4fc3 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -1,15 +1,15 @@ # Configure an apt source define apt::sources_list ( - $ensure = 'present', - $source = '', + $ensure = 'present', + $source = undef, $content = undef ) { if $ensure == 'present' { - if $source == '' and $content == undef { + if $source == undef and $content == undef { fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}") } - if $source != '' and $content != undef { + if $source != undef and $content != undef { fail("Only one of \$source or \$content must specified for apt_sources_snippet ${name}") } } |