Forge Home

bash

Manages bash config

11,176 downloads

9,699 latest version

4.6 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.6 (latest)
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Dec 8th 2014
This version is compatible with:
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'mlehner616-bash', '0.1.6'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mlehner616-bash
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mlehner616-bash --version 0.1.6

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
Tags: bash, linux

Documentation

mlehner616/bash — version 0.1.6 Dec 8th 2014

#puppet-bash

####Table of Contents

  1. Overview
  2. Limitations - OS compatibility, module dependencies, etc.
  3. Usage - Configuration options and functionality

##Overview

Puppet module to manage various bash configuration settings.
Set up as a parameterized class but intended to be used with hiera.
By Default: This module increases history size to 1000. EL default is 500. This is the only change made without explicit definition.

For now, this module manages the following:

  • Global puppet/hiera managed aliases
  • Global bash history, file size, buffer size, & timestamp
  • Puts a puppet-independent custom alias template in the /etc/skel folder for new users
  • Ensures OS standard permissions are enforced on the above managed files
  • Also manages the package based on OS

##Limitations

####Requires Puppet v3 and facter >= 1.7.0 (precautionary, untested on earlier versions)

Compatible with the following platforms (PRs welcome)

  • EL 5
  • EL 6

##Usage A value of <_os default_> will use the Module specified
defaults based on OS. This is usually the same as OS defaults.

aliases

Hash of global aliases and their commands

  • Default: undef
  • Type: hash

#####Example

bash::aliases:
  vi: vim
  ls: ls -alh
  pat: puppet agent -t

aliases_config

Location of the aliases config file on filesystem. By default this file is put in the os profile.d or equivalent directory

  • Default: <os default>
  • Type: string

#####Example bash::aliases_config: /etc/profile.d/aliases.sh

aliases_template

The erb template to be used to generate the alias_config file

  • Default: 'bash/aliases.sh.erb'
  • Type: string

####Example bash::aliases_template: bash/aliases.sh.erb

# will look for the template in <module_path>/bash/templates/aliases.sh.erb

history_config

Location of the history config file on filesystem. By default this file is put in the os profile.d or equivalent directory

  • Default: <os default>
  • Type: string

#####Example bash::aliases_config: /etc/profile.d/history.sh

history_config_template

The erb template to be used to generate the history_config file

  • Default: 'bash/history.sh.erb'
  • Type: string

####Example bash::aliases_template: bash/history.sh.erb

# will look for the template in <module_path>/bash/templates/history.sh.erb

history_file_size

The HISTFILESIZE to be set globally. Read more: GNU Bash history reference

  • Default: <os default>
  • Type: string

####Example bash::history_file_size: 1000

history_size

This HISTSIZE to be set globally. Read more: GNU Bash history reference

  • Default: <os default>
  • Type: string

####Example bash::bash::history_size: 1000

history_time_format

This is the time format to be set globally for bash history. You'll you want to ensure the string contains a trailing space or another delimiting character. Since this will also usually contain '%' you must quote. [HISTTIMEFORMAT].

Read more: GNU Bash history reference

  • Default: undef
  • Type: string

####Example bash::history_time_format: "%F %T "

manage_skel

This is specifies whether or not you want the module to configure the skel

  • Default: false
  • Type: boolean

####Example bash::manage: true

package_ensure

Defines how the bash package should be managed by puppet. Takes the same options as the puppet package resource

  • Default: 'present'
  • Type: string

package_name

Defines the package name. In most cases, you won't have to worry about this for supported operating systems.

  • Default: <os default>
  • Type: array

profile_dir

This is actually almost always '/etc'

  • Default: <os default>
  • Type: string

profile_file

This is the profile file, usually either profile or bashrc; sometimes both.

  • Default: <os default>
  • Type: string

profiled_dir

This defines where the profile.d or equivalent is located

  • Default: <os default>
  • Type: string