X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fkey.pp;h=77e6095c87e7a0119e2c4c14b452a9ef6e7901ac;hb=fbc49731a7c9b1300c7170c16df589bd9cac8541;hp=256ced4d09d32c967f725dec62338c927403dd0e;hpb=25ef442c309959116dde6f6965814c07e485be56;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/key.pp b/manifests/key.pp index 256ced4..77e6095 100644 --- a/manifests/key.pp +++ b/manifests/key.pp @@ -36,19 +36,19 @@ # Passes additional options to `apt-key adv --keyserver-options`. # define apt::key ( - Pattern[/\A(0x)?[0-9a-fA-F]{8}\Z/, /\A(0x)?[0-9a-fA-F]{16}\Z/, /\A(0x)?[0-9a-fA-F]{40}\Z/] $id = $title, - Enum['present', 'absent', 'refreshed'] $ensure = present, - Optional[String] $content = undef, - Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]] $source = undef, - Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?$/] $server = $::apt::keyserver, - Boolean $weak_ssl = false, - Optional[String] $options = undef, + Pattern[/\A(0x)?[0-9a-fA-F]{8}\Z/, /\A(0x)?[0-9a-fA-F]{16}\Z/, /\A(0x)?[0-9a-fA-F]{40}\Z/] $id = $title, + Enum['present', 'absent', 'refreshed'] $ensure = present, + Optional[String] $content = undef, + Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]] $source = undef, + Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$/] $server = $::apt::keyserver, + Boolean $weak_ssl = false, + Optional[String] $options = $::apt::key_options, ) { case $ensure { /^(refreshed|present)$/: { if defined(Anchor["apt_key ${id} absent"]){ - fail(translate('key with id %{_id} already ensured as absent'), {'_id' => id}) + fail("key with id ${id} already ensured as absent") } if !defined(Anchor["apt_key ${id} present"]) { @@ -83,7 +83,7 @@ define apt::key ( absent: { if defined(Anchor["apt_key ${id} present"]){ - fail(translate('key with id %{_id} already ensured as present', {'_id' => id})) + fail("key with id ${id} already ensured as present") } if !defined(Anchor["apt_key ${id} absent"]){ @@ -100,7 +100,7 @@ define apt::key ( } default: { - fail translate('Invalid \'ensure\' value \'%{_ensure}\' for apt::key', {'_ensure' => ensure}) + fail("Invalid \'ensure\' value \'${ensure}\' for apt::key") } } }