summaryrefslogtreecommitdiff
path: root/manifests/key.pp
blob: cb70ec6acf801f3a71b7e5151181a573daff2084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
define apt::key ($source, $ensure = 'present') {
  validate_re(
    $name, '\.gpg$',
    'An apt::key resource name must have the .gpg extension',
  )

  file {
    "/etc/apt/trusted.gpg.d/${name}":
      ensure => $ensure,
      source => $source,
      notify => Exec['apt_updated'],
  }
}