summaryrefslogtreecommitdiff
path: root/manifests/vncserver.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vncserver.pp')
-rw-r--r--manifests/vncserver.pp43
1 files changed, 43 insertions, 0 deletions
diff --git a/manifests/vncserver.pp b/manifests/vncserver.pp
new file mode 100644
index 0000000..a68e07d
--- /dev/null
+++ b/manifests/vncserver.pp
@@ -0,0 +1,43 @@
+# @summary VNC Server configuration
+#
+# @param enabled
+# True if VNC connections should be allowed
+# @param command
+# Command to run Xvnc server with
+# @param port
+# TCP/IP port to listen for connections on
+# @param listen_address
+# Host/address to listen for VNC connections (use all addresses if not present)
+# @param width
+# Width of display to use
+# @param height
+# Height of display to use
+# @param depth
+# Color depth of display to use
+class lightdm::vncserver (
+ Boolean $enabled = false,
+ Optional[String] $command = undef,
+ Optional[Stdlib::Port] $port = undef,
+ Optional[String] $listen_address = undef,
+ Optional[Integer[0]] $width = undef,
+ Optional[Integer[0]] $height = undef,
+ Optional[Integer[0]] $depth = undef,
+) {
+ $conf = {
+ 'enabled' => $enabled,
+ 'command' => $command,
+ 'port' => $port,
+ 'listen-address' => $listen_address,
+ 'width' => $width,
+ 'height' => $height,
+ 'depth' => $depth,
+ }
+
+ concat::fragment { 'lightdm - config - vncserver':
+ target => $lightdm::config::filename,
+ order => $lightdm::conf::seat_fragment_min + 2,
+ content => {
+ sections => { 'VNCServer' => $conf },
+ },
+ }
+}