This class manages additions to bashrc system-wide. This facilitates a means to run a pre-defermined list of scripts which are fed data derived from puppet for all users on the system.
templated files are displayed like this
/etc/bashrc
/etc/profile.d/prompt.sh
/usr/local/etc/svcstat.conf
/etc/profile.d/svcstat.sh
include bashrc
This module is intended to be a foundation which can accept other extensions. Each piece of functionality is enabled or disabled in topscope, which inherits its' parameter values from class topscope.
Each submodule has default values in bashrc::config.
bashrc::setup is reponsible for the alterations to /etc/bashrc
and the creation of /etc/profile.d
bashrc::prompt is responsible for prompt customizations like enabling or disabling and changing the colorization, enabling git branch awareness and enhancements.
profile::bashrc::enable_git_completion: true
profile::bashrc::enable_prompt_color: true
profile::bashrc::enable_prompt_mods: true
profile::bashrc::enable_svcstat: true
profile::bashrc::prompt_git_color: 'cyan'
profile::bashrc::prompt_git_enable: true
profile::bashrc::prompt_leftblock: '\u'
profile::bashrc::prompt_primary_color: 'blue'
profile::bashrc::prompt_rightblock: '\h \W'
profile::bashrc::prompt_secondary_color: 'green'
profile::bashrc::prompt_separator: '@'
profile::bashrc::svcstat_hash:
apache: {
name: 'Apache',
string: 'apache2'
}
bashrc Class
Sets the location of the directory to place our rcscripts. Set to /etc/profile.d for most Linux distros.
Whether or not to deploy the git completion script to integrate git into tab awareness https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
Whether or not to enable colorization of the shell prompt
Whether or not to put ps1 under puppet control
Whether or not to enable the svcstat script. default: true
Whether or not to enable the colorization of the shell prompt
The color to display the git branch in. Supported options: red , green , yellow , blue , purple , cyan , white
Whether or not to display git info of the working directory in the prompt
What to set the left side of the prompt to. Reference the TLDP bash PS1 variable guide for inspiration
What color the left portion of the prompt should be. Supported options: red , green , yellow , blue , purple , cyan , white
What to set the right side of the prompt to. Reference the TLDP bash PS1 variable guide for inspiration
What color the right portion of the prompt should be. Supported options: red , green , yellow , blue , purple , cyan , white
The character(s) used to separate the left side of the prompt from the right. default: '@'
for each key/value pair contained within this hash, a line will be added to the /usr/local/etc/svcstat.conf file. The keys are:
bashrc::prompt class
bashrc::setup Class
bashrc::svcstat Class
/usr/local/bin
The path to place svcstat.py. This should not need to be changed.
The path to lay down the configfile for svcstat. This should not need to be changed.
Wolf Noble wolf@wolfspyre.com
Please fork this project, add your improvements, and submit a pull request. This way, we'll all get better tools