Add an apt source for torproject
Add a repo_class parameter with default value 'tor::repo::apt' for Debian-based operating systems. Default elsewhere is false, which disables the feature, and class user may provide this value explicitly to do this.
This commit is contained in:
parent
7466921055
commit
2385cb27c4
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
tor::user: 'root'
|
||||
tor::group: 'root'
|
||||
tor::repo_class: false
|
||||
|
|
|
@ -3,3 +3,4 @@ tor::user: 'debian-tor'
|
|||
tor::group: 'debian-tor'
|
||||
tor::tor_service: 'tor'
|
||||
tor::tor_package: 'tor'
|
||||
tor::repo_class: 'tor::repo::apt'
|
||||
|
|
|
@ -37,11 +37,18 @@ class tor (
|
|||
$group,
|
||||
$tor_service,
|
||||
$tor_package,
|
||||
$repo_class,
|
||||
) {
|
||||
|
||||
if $repo_class {
|
||||
class { $repo_class:
|
||||
before => Package['tor'],
|
||||
}
|
||||
}
|
||||
|
||||
package { 'tor':
|
||||
name => $tor_package,
|
||||
ensure => installed,
|
||||
ensure => latest,
|
||||
}
|
||||
|
||||
if $identity_key_source {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# ex: syntax=puppet si ts=4 sw=4 et
|
||||
|
||||
class tor::repo::apt {
|
||||
apt::source { 'torproject':
|
||||
location => 'http://deb.torproject.org/torproject.org',
|
||||
release => $::lsbdistcodename,
|
||||
repos => 'main',
|
||||
required_packages => 'deb.torproject.org-keyring',
|
||||
key => '886DDD89',
|
||||
key_server => 'keys.gnupg.net',
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue