From 7ba73570ea7c3a0936a617a1e92b8939984619e2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 21 Dec 2022 16:03:21 -0300 Subject: Fix: merge nodo::utils::tor into nodo::utils::network::tor --- manifests/role/tor.pp | 2 +- manifests/utils/network/tor.pp | 12 ++++++++++-- manifests/utils/tor.pp | 9 --------- 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 manifests/utils/tor.pp diff --git a/manifests/role/tor.pp b/manifests/role/tor.pp index 07ae5a0..cf6dc30 100644 --- a/manifests/role/tor.pp +++ b/manifests/role/tor.pp @@ -1,4 +1,4 @@ class nodo::role::tor inherits nodo::base::virtual { include tor::daemon - include nodo::utils::tor + include nodo::utils::network::tor } diff --git a/manifests/utils/network/tor.pp b/manifests/utils/network/tor.pp index 88c29ce..78b08a4 100644 --- a/manifests/utils/network/tor.pp +++ b/manifests/utils/network/tor.pp @@ -1,6 +1,8 @@ -# This class currently only manages the repository definition and key +# This class currently mostly manages the repository definition and key # Use the "tor" or "onion" modules to manage package installation and service configuration -class nodo::utils::network::tor { +class nodo::utils::network::tor ( + $ensure = 'installed', +) { nodo::subsystem::apt::repo { 'torproject.org': definition => "deb [signed-by=/etc/apt/trusted.gpg.d/torproject.org.gpg] https://deb.torproject.org/torproject.org ${::lsbdistcodename} main", key_source => 'puppet:///modules/nodo/etc/apt/trusted.gpg.d/torproject.org.gpg', @@ -10,4 +12,10 @@ class nodo::utils::network::tor { ensure => present, require => Nodo::Subsystem::Apt::Repo['torproject.org'], } + + package { [ + 'tor-arm', + ]: + ensure => $ensure, + } } diff --git a/manifests/utils/tor.pp b/manifests/utils/tor.pp deleted file mode 100644 index e229009..0000000 --- a/manifests/utils/tor.pp +++ /dev/null @@ -1,9 +0,0 @@ -class nodo::utils::tor ( - $ensure = 'installed', -) { - package { [ - 'tor-arm', - ]: - ensure => $ensure, - } -} -- cgit v1.2.3