Puppet Class: vnc::server

Inherited by:
vnc::server::config
vnc::server::install
vnc::server::service
Defined in:
manifests/server.pp

Summary

Install and configure the tigervnc server

Overview

This class will install and configure the tigervnc server, setup defaults, and manage the services.

The default state is running/enabled, not user managed

Parameters:

  • manage_packages (Boolean)

    Should this class manage the packages

  • packages (Array)

    List of packages to install

  • packages_ensure (String)

    Ensure state of the vnc server packages

  • manage_config (Boolean)

    Should this class manage the config

  • seed_home_vnc (Boolean)

    Should this class generate a per-user ~/.vnc if it doesn’t exist?

  • config_defaults_file (Stdlib::Absolutepath)

    Your /etc/tigervnc/vncserver-config-defaults

  • config_defaults (Hash[String, Variant[String, Undef]])

    Settings to put in /etc/tigervnc/vncserver-config-defaults

  • config_mandatory_file (Stdlib::Absolutepath)

    Your /etc/tigervnc/vncserver-config-mandatory

  • config_mandatory (Hash[String, Variant[String, Undef]])

    Settings to put in /etc/tigervnc/vncserver-config-mandatory

  • vncserver_users_file (Stdlib::Absolutepath)

    Your /etc/tigervnc/vncserver.users

  • polkit_file (Stdlib::Absolutepath)

    Your /etc/polkit-1/rules.d/25-puppet-vncserver.rules

  • polkit_file_mode (String)

    Your /etc/polkit-1/rules.d/25-puppet-vncserver.rules permissions It should pretty much always be 644

  • manage_services (Boolean)

    Should this class manage the vncserver services

  • user_can_manage (Boolean)

    Should users be able to manage the systemd service by default

  • systemd_template_startswith (String)

    What does the vnc template service start with, including the ‘@’

  • systemd_template_endswith (String)

    What does the vnc template service end with (not including the ‘.’)

  • vnc_servers (Hash[String, Hash[Enum['displaynumber', 'user_can_manage', 'seed_home_vnc', 'comment', 'ensure', 'enable'], Variant[String, Integer, Boolean]]])

    A hash of VNC servers to setup Format: userA:

    comment: Sometimes you've gotta write it down
    displaynumber: 1
    ensure: running
    enable: true
    user_can_manage: true
    seed_home_vnc: false
    

    userB:

    displaynumber: 2
    ensure: stopped
    enable: false
    user_can_manage: false
    


56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'manifests/server.pp', line 56

class vnc::server (
  Boolean $manage_packages,
  Array $packages,
  String $packages_ensure,
  Boolean $manage_config,
  Boolean $seed_home_vnc,
  Stdlib::Absolutepath $config_defaults_file,
  Hash[String, Variant[String, Undef]] $config_defaults,
  Stdlib::Absolutepath $config_mandatory_file,
  Hash[String, Variant[String, Undef]] $config_mandatory,
  Stdlib::Absolutepath $vncserver_users_file,
  Stdlib::Absolutepath $polkit_file,
  String $polkit_file_mode,
  Boolean $manage_services,
  Boolean $user_can_manage,
  String $systemd_template_startswith,
  String $systemd_template_endswith,

  # lint:ignore:140chars
  Hash[String, Hash[Enum['displaynumber', 'user_can_manage', 'seed_home_vnc', 'comment', 'ensure', 'enable'], Variant[String, Integer, Boolean]]] $vnc_servers,
  # lint:endignore
) {
  contain 'vnc::server::install'
  contain 'vnc::server::config'
  contain 'vnc::server::service'

  Class['vnc::server::install'] -> Class['vnc::server::config'] ~> Class['vnc::server::service']
  Class['vnc::server::install'] ~> Class['vnc::server::service']
}