diff options
Diffstat (limited to 'manifests/config.pp')
-rw-r--r-- | manifests/config.pp | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..5251a81 --- /dev/null +++ b/manifests/config.pp @@ -0,0 +1,103 @@ +# @param filename +# File containing the lightdm config +# @param seat_fragment_min +# Minimum value for range of seat configuration. +# This defines the interval in which seats can be allocated. You +# might need to increase the interval if you have MANY seats. +# The XDMCP and VLC server are configured to always be placed just +# after all seats. +# @param seat_fragment_max +# Maximum value for range of seat configuration. See +# seat_fragment_min +# -------------------------------------------------- +# @param start_default_seat +# True to always start one seat if none are defined in the configuration +# @param greeter_user +# User to run greeter as +# @param minimum_display_number +# Minimum display number to use for X servers +# @param minimum_vt +# First VT to run displays on +# @param lock_memory +# True to prevent memory from being paged to disk +# @param user_authority_in_system_dir +# True if session authority should be in the system location +# @param guest_account_script +# Script to be run to setup guest account +# @param logind_check_graphical +# True to on start seats that are marked as graphical by logind +# @param log_directory +# Directory to log information to +# @param run_directory +# Directory to put running state in +# @param cache_directory +# Directory to cache to +# @param sessions_directory +# Directory to find sessions +# @param remote_sessions_directory +# Directory to find remote sessions +# @param greeters_directory +# Directory to find greeters +# @param backup_logs +# True to move add a .old suffix to old log files when opening new ones +# @param dbus_service +# True if LightDM provides a D-Bus service to control it +class lightdm::config ( + Optional[Boolean] $start_default_seat = undef, + Optional[String] $greeter_user = undef, + Optional[Integer] $minimum_display_number = undef, + Optional[Integer] $minimum_vt = undef, + Optional[Boolean] $lock_memory = undef, + Optional[Boolean] $user_authority_in_system_dir = undef, + Optional[String] $guest_account_script = undef, + Optional[Boolean] $logind_check_graphical = undef, + Optional[Stdlib::Absolutepath] $log_directory = undef, + Optional[Stdlib::Absolutepath] $run_directory = undef, + Optional[Stdlib::Absolutepath] $cache_directory = undef, + Optional[Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]] $sessions_directory = undef, + Optional[Stdlib::Absolutepath] $remote_sessions_directory = undef, + Optional[Variant[String, Array[String]]] $greeters_directory = undef, + Optional[Boolean] $backup_logs = undef, + Optional[Boolean] $dbus_service = undef, + + Integer[2] $seat_fragment_min = 20, + Integer $seat_fragment_max = 40, + String $filename = '/etc/lightdm/lightdm.conf', +) { + concat { $filename: + order => 'numeric', + } + + $lightdm_conf = { + 'start-default-seat' => $start_default_seat, + 'greeter-user' => $greeter_user, + 'minimum-display-number' => $minimum_display_number, + 'minimum-vt' => $minimum_vt, + 'lock-memory' => $lock_memory, + 'user-authority-in-system-dir' => $user_authority_in_system_dir, + 'guest-account-script' => $guest_account_script, + 'logind-check-graphical' => $logind_check_graphical, + 'log-directory' => $log_directory, + 'run-directory' => $run_directory, + 'cache-directory' => $cache_directory, + 'sessions-directory' => $sessions_directory, + 'remote-sessions-directory' => $remote_sessions_directory, + 'greeters-directory' => $greeters_directory, + 'backup-logs' => $backup_logs, + 'dbus-service' => $dbus_service, + } + + concat::fragment { 'lightdm - config - header': + target => $filename, + content => "# File managed by Puppet\n", + order => 0, + } + + concat::fragment { 'lightdm - config - main': + target => $filename, + order => 1, + content => epp("${module_name}/ini.epp", { + sections => { 'LightDM' => $lightdm_conf }, + }), + } +} |