summaryrefslogtreecommitdiff
path: root/manifests/key.pp
blob: 6ec6523cea6e42cca928d2f7c2de67c2af2cef4a (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['update_apt'],
  }
}