Forge Home

bash_user_skel

copy the expected skeleton files into a user's homedir

8,995 downloads

7,557 latest version

2.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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.2 (latest)
  • 0.1.0
released Mar 26th 2016

Start using this module

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

Add this module to your Puppetfile:

mod 'geoffwilliams-bash_user_skel', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add geoffwilliams-bash_user_skel
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install geoffwilliams-bash_user_skel --version 0.1.2

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.

Download

Documentation

geoffwilliams/bash_user_skel — version 0.1.2 Mar 26th 2016

bash_user_skel

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with bash_user_skel
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Populate a sysadmin's home directory with a set of consistent luxury bash configuration files. Files content is determined by this module rather then copying files already on the target system to ensure consistency.

Module Description

Provides:

  • A pretty shell prompt for regular users and a red one for anyone logging in as root
  • A colourful ls command showing sizes
  • Enforced consistency (replaces ~/.bashrc)
  • Extension point for local changes (~/.bash_custom)
  • An easy way of fully setting up a local user with Puppet
  • Method to distribute custom aliases and prompts to required users

Setup

What bash_user_skel affects

  • Creates various dotfiles in the the user home directory, mirroring those in /etc/skel
  • Since ~/.bashrc is managed by Puppet, we provide a means for users to add custom unmanaged code to their shell session by editing ~/.bash_custom

Beginning with bash_user_skel

The module provides a single defined resource type bash_user_skel which needs to be applied for each user you want configure. If your happy to accept the default prompt and alias settings, all you need is:

bash_user_skel { "username": }

Where username is the username you wish to apply the settings to. If you have a small list of users its probably easiest to keep this in hiera and feed the list to the defined resource type, otherwise for larger lists you could look towards a facter based solution or integration with LDAP.

The default settings assume a home directory under /home.

Usage

In cases where you would like to supply different prompts and aliases, or your user has an unusual home directory, you can configure this via the bash_user_skel resource's parameters:

bash_user_skel( "frank_furter":
    $home_dir = "/exports/users/frank_furter",
    $ps1      = "$",
    $aliases  = [
     "ll='/bin/ls -l'",
     "ld='/bin/ls -ld'",
    ],
) {

In this case, we have a custom home directory, a simplified prompt of just $ and a couple of aliases for ls.

Reference

  • bash_user_skel - Install customised dotfiles in user home directories

Limitations

Only Debian and Ubuntu support right now. Should be easy to add other Unix like OS's

Development

PRs accepted