Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'mlehner616-bash', '0.1.6'
Learn more about managing modules with a PuppetfileDocumentation
#puppet-bash
####Table of Contents
- Overview
- Limitations - OS compatibility, module dependencies, etc.
- 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
Dependencies
- puppetlabs/stdlib (>=3.2.0 <5.0.0)
Copyright (C) 2013-2014 Mike Lehner <github.com/mlehner616> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.