]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Feat: adds nodo::utils::network::tor
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 20 Dec 2022 16:30:16 +0000 (13:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 20 Dec 2022 16:30:16 +0000 (13:30 -0300)
files/etc/apt/trusted.gpg.d/torproject.org.gpg [new file with mode: 0644]
manifests/utils/network/tor.pp [new file with mode: 0644]

diff --git a/files/etc/apt/trusted.gpg.d/torproject.org.gpg b/files/etc/apt/trusted.gpg.d/torproject.org.gpg
new file mode 100644 (file)
index 0000000..7614b20
Binary files /dev/null and b/files/etc/apt/trusted.gpg.d/torproject.org.gpg differ
diff --git a/manifests/utils/network/tor.pp b/manifests/utils/network/tor.pp
new file mode 100644 (file)
index 0000000..88c29ce
--- /dev/null
@@ -0,0 +1,13 @@
+# This class currently only manages the repository definition and key
+# Use the "tor" or "onion" modules to manage package installation and service configuration
+class nodo::utils::network::tor {
+  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',
+  }
+
+  package { "deb.torproject.org-keyring":
+    ensure  => present,
+    require => Nodo::Subsystem::Apt::Repo['torproject.org'],
+  }
+}