summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:12:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-12 17:12:52 -0300
commit5f629355ff36b73968960ec7a98b718d9390c5f9 (patch)
treeea56f17eb75fd33db26b592ef6f730a02a2459bf /manifests/init.pp
downloadpuppet-tunnel-5f629355ff36b73968960ec7a98b718d9390c5f9.tar.gz
puppet-tunnel-5f629355ff36b73968960ec7a98b718d9390c5f9.tar.bz2
Initial import
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp20
1 files changed, 20 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..83ccf1b
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,20 @@
+# autossh tunnel interface
+#
+# TODO: User handling should be put somewhere. Here we are duplicating
+# code from backupninja module. Further developments should consider
+# have an unified user handling, maybe at puppet-user.
+#
+# For now, it's important to preserve the 'backupninja-' like tag
+# otherwise the behavior of this code will conflict with backupninja
+# and we'll see strange things like exported resources not being
+# realized.
+
+# this define realizes all needed resources for a hosted tunnel
+define tunnel_server_realize($host) {
+ User <<| tag == "backupninja-${host}" |>>
+ File <<| tag == "backupninja-${host}" |>>
+ Ssh_authorized_key <<| tag == "backupninja-${host}" |>>
+}
+
+class tunnel {
+}