Forge Home


Simple user userprefs management


1,256 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.0.0 (latest)
  • 1.0.19
  • 1.0.18
  • 1.0.17
  • 1.0.16
  • 1.0.15
  • 1.0.14
  • 1.0.13
  • 1.0.12
  • 1.0.11
  • 1.0.10
  • 1.0.9
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3 (deleted)
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Feb 12th 2021
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.0 < 7.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'pltraining-userprefs', '2.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add pltraining-userprefs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install pltraining-userprefs --version 2.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



pltraining/userprefs — version 2.0.0 Feb 12th 2021


A simple module that allows users to choose their default editor and, on Linux, default shell.


This will ensure that the proper packages are installed, the configuration files that enable syntax highlighting are written, helpful shell aliases are enabled, and the default editor and shell are set.

Class: userprefs


An optional String indicating the default editor to be set in the user's environment. The choices are platform specific.

Default: undef

Linux valid choices are: 'vim', 'mg', 'nano', or 'emacs'

Windows valid choices are: 'gvim', 'atom', 'sublimetext', or 'npp'

shell (Linux only)

An optional String indicating the shell for the user. Attempting to set this parameter for a Windows machine will cause a catalog compilation failure.

Default: undef

Linux valid choices are: 'bash' or 'zsh'

gitprompt (Linux only)

Boolean specifying whether or not Linux shells should use a default command prompt that includes information about the current git status. Attempting to set this on Windows will be ignored.

Default: true

Example usage:

Customizing the environment:

    class { 'userprefs':
      shell  => 'zsh',  # Linux only - root user's login shell
      editor => 'vim',  # Linux and Windows - default file editor

Classifying a Linux (only) node with classroom defaults:

    include userprefs::defaults  # Linux only

Classifying a Linux (only) node with specific vim options:

    class { 'userprefs::vim':  # Linux only
      monochrome  => true,   # Disable syntax highlighting
      line_number => false,  # Disable display of line numbers