Forge Home

bashrc

Configure the BashRC and Profile

26,235 downloads

17,427 latest version

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

  • 0.0.7 (latest)
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.2
  • 0.0.1
released Jun 16th 2018
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.0.0 < 5.0.0
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'lvicainne-bashrc', '0.0.7'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add lvicainne-bashrc
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install lvicainne-bashrc --version 0.0.7

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

lvicainne/bashrc — version 0.0.7 Jun 16th 2018

BashRC

Build Status

Table of Contents

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

Description

A Puppet module to manage the files used by BashRC

Setup

What BashRC module affects

  • modify the files for the machine linked to BashRC in /etc (/etc/bashrc and /etc/profile)
  • modify the skelton files used for new created users in /etc/skel
  • according to your configuration, modify the bashrc files for the selected users Warning : this package will modify the bashrc files (and its skelton files) ! Your console may be directly affected if you already customized it ! Otherwise, you can use it safely.

Beginning with BashRC

A basic example is as follows:

  include ::bashrc

Usage

You can also use natively Hiera :

  include ::bashrc
bashrc::aliases:
    - 'sayhello="echo Bonjour"'
bashrc::users:
    - username: 'root'
      homedirectory: '/root'
      managelocalbashrc: true
    - username: 'myotherusername'
      homedirectory: '/home/myotherusername'
      managelocalbashrc: true

If you use Hiera and you want to use the hierarchy using this Puppet syntax :

  class { '::bashrc':
    aliases    => hiera_array('bashrc::aliases'),
    users      => hiera_array('bashrc::users'),
    extensions => hiera_array('bashrc::extensions'),
  }

In this way, you can merge (with hiera_array) the parameters

Reference

Public Classes

Class: bashrc

A class for managing the bashrc configuration files

Attributes

aliases
bashrcdirectory
bashrcd_puppet_filename
etcbashfile
extensions
grep_color_value
maildirectory
manage_custom_bashrc
manage_etc_file
manage_skeltons
profileddirectory
ps1_colored
ps1_default
ps1_screen
selected_pager
selected_editor
selected_editor_path
skeldirectory
template_etc_bashrc
template_etc_profile
users
history_control
history_size
history_file_size
history_time_format

Limitations

This module has only been tested on my Debian and Centos servers. I can not guarantee for any other Operating System

Development

You are pleased to fork this module and adapt it for you needs. I am open to any Pull Request :-)

Release Notes/Contributors/Etc.

Thanks to contributors : lvicainne, beckonconn, markruys

  • v0.0.7 Support puppetlabs/concat 4.2.1
  • v0.0.6 Metadata.json correction
  • v0.0.5 Adding in the ability to customize the bash history controls in the user bashrc. Also fixed the "WARNING: arrow should be on the right operands line" that would come up on puppet lint.
  • v0.0.4 Rename lvicainne-bashrc to puppet-bashrc
  • v0.0.3 Enable autocompletion
  • v0.0.2 Improve the history command with datetime, improve the order of the bashrc using concat
  • v0.0.1 First Running version