Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'jcpunk-vnc', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
vnc
Manage tigervnc now that it expects systemd-logind support.
Table of Contents
- Description
- Setup - The basics of getting started with vnc
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module manages VNC servers utilizing the new tigervnc scripts from tigervnc 1.11 and later.
Users can optionally be given rights to restart their own servers.
Setup
What vnc affects
This will impact your VNC sessions, configs in /etc/tigervnc (parameter), and policykit for systemd (if user restart is granted).
Setup Requirements OPTIONAL
No special requirements at this time. Eventually novnc support will be added, but that comes later.
Beginning with vnc
Usage
If the defaults are workable for you, basic usage is:
class { 'vnc::server':
vnc_servers => {
'userA' => {
'comment' => 'Optional comment',
'displaynumber' => 1,
'user_can_manage' => true,
}
}
Or via hiera
vnc::server::vnc_servers:
userA:
comment: Optional comment
displaynumber: 1
user_can_manage: true
The most interesting parameter is vnc::server::vnc_servers
.
It has a structure of:
username:
comment: (optional) comment
displaynumber: The VNC screen, like 1, 2, 3, etc
ensure: service ensure, default is 'running'
enable: service enable, default is 'true'
user_can_manage: Boolean value to permit a user to run `systemctl restart vncserver@:#.service`
where the `#` is their listed displaynumber.
Similarly, VNC clients can be loaded with:
class { 'vnc::client::gui': }
Limitations
This requires the systemd units from tigervnc 1.11+.
Eventually novnc support will be added.
Development
See the linked repo in metadata.json
Reference
Table of Contents
Classes
Public Classes
vnc::client::gui
: Install the VNC GUI clientsvnc::server
: Install and configure the tigervnc server
Private Classes
vnc::server::config
: Configure the VNC servicesvnc::server::install
: Install the vnc server pacakgesvnc::server::service
: Ensure the VNC Server services are right
Classes
vnc::client::gui
Install the VNC GUI clients
Parameters
The following parameters are available in the vnc::client::gui
class:
manage_packages
Data type: Boolean
Should this class manage the packages
packages
Data type: Array
List of packages to install
packages_ensure
Data type: String
Ensure state of the vnc client packages
vnc::server
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
The following parameters are available in the vnc::server
class:
manage_packages
packages
packages_ensure
manage_config
config_defaults_file
config_defaults
config_mandatory_file
config_mandatory
vncserver_users_file
polkit_file
manage_services
systemd_template_startswith
systemd_template_endswith
vnc_servers
manage_packages
Data type: Boolean
Should this class manage the packages
packages
Data type: Array
List of packages to install
packages_ensure
Data type: String
Ensure state of the vnc server packages
manage_config
Data type: Boolean
Should this class manage the config
config_defaults_file
Data type: Stdlib::Absolutepath
Your /etc/tigervnc/vncserver-config-defaults
config_defaults
Data type: Hash[String, Variant[String, Undef]]
Settings to put in /etc/tigervnc/vncserver-config-defaults
config_mandatory_file
Data type: Stdlib::Absolutepath
Your /etc/tigervnc/vncserver-config-mandatory
config_mandatory
Data type: Hash[String, Variant[String, Undef]]
Settings to put in /etc/tigervnc/vncserver-config-mandatory
vncserver_users_file
Data type: Stdlib::Absolutepath
Your /etc/tigervnc/vncserver.users
polkit_file
Data type: Stdlib::Absolutepath
Your /etc/polkit-1/rules.d/25-puppet-vncserver.rules
manage_services
Data type: Boolean
Should this class manage the vncserver services
systemd_template_startswith
Data type: String
What does the vnc template service start with, including the '@'
systemd_template_endswith
Data type: String
What does the vnc template service end with (not including the '.')
vnc_servers
Data type: Hash[String, Hash[Enum['displaynumber', 'user_can_manage', '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 userB: displaynumber: 2 ensure: stopped enable: false user_can_manage: false
Dependencies
- puppetlabs/concat (>= 4.2.0 < 8.0.0)