如何用puppet添加apt-keys?

时间:2016-03-14 23:24:42

标签: puppet apt

使用此puppet-module for apt,如何导入此密钥:

https://www.dotdeb.org/dotdeb.gpg 

我想要实现的是两个shell命令的木偶相关解决方案:

wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg 

这个木偶模块的文件对此并不清楚。怎么做?

1 个答案:

答案 0 :(得分:1)

你必须使用apt :: key

https://github.com/puppetlabs/puppetlabs-apt/blob/master/manifests/key.pp

你的hiera中有类似的东西 -

  apt::keys:
      varnish-3.0:
        key: C4DEFFEB
        key_source: http://repo.varnish-cache.org/debian/GPG-key.txt

https://ask.puppetlabs.com/question/4845/add-key-with-puppetlabs-apt/

或在您的木偶清单文件中 -

apt::key {'HEXKEYID':
  source => 'https://www.dotdeb.org/dotdeb.gpg',
  id     => 'ID_OF_YOUR_KEY'
}