bash: File:: init.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Cobash::common: File:: common.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu)bash::common::debian: File:: common/debian.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@ubash::common::redhat: File:: common/redhat.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@ubash::params: File:: params.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu)
bash::config: File:: config.pp Author:: Sebastien Varrette (Sebastien.Varrette@uni.lu) Copyright:: Copyright (c) 2015 Sebastien Varrettebash::setup: File:: setup.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) C
File:: init.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Class: bash
Configure and manage Bash dotfiles and profiles
== Parameters:
$ensure:: Default: 'present'. Ensure the presence (or absence) of ULHPC/bash $aliases:: Hash of key / command values to place in a aliases files $aliases_file:: Default: '/etc/profiles.d/bash_aliases.sh' config file where the aliases are placed. $dotfiles_provider:: Default: 'git'. Type of dotfiles provider $dotfiles_src:: Default: 'https://github.com/ULHPC/dotfiles.git'. [Git] repository URL of the dotfiles. $dotfiles_revision:: Default: 'master'. [git] branch / revision / tag to use.
== Actions:
Install and configure bash
== Requires:
n/a
== Sample Usage:
include 'bash'
You can then specialize the various aspects of the configuration, for instance:
class { 'bash':
ensure => 'present',
dotfiles_src => 'https://github.com/Falkor/dotfiles',
}
== Warnings
/!\ Always respect the style guide available here[http://docs.puppetlabs.com/guides/style_guide]
[Remember: No empty lines between comments and class definition]
The following parameters are available in the bash class:
Data type: Any
Default value: $bash::params::aliases
Data type: Any
Default value: $bash::params::aliases_file
Data type: Any
Default value: $bash::params::ensure
Data type: Any
Default value: $bash::params::dotfiles_provider
Data type: Any
Default value: $bash::params::dotfiles_src
Data type: Any
Default value: $bash::params::dotfiles_revision
File:: common.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Class: bash::common
Base class to be inherited by the other bash classes, containing the common code.
Note: respect the Naming standard provided here[http://projects.puppetlabs.com/projects/puppet/wiki/Module_Standards]
File:: common/debian.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Class: bash::common::debian
Specialization class for Debian systems
File:: common/redhat.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Class: bash::common::redhat
Specialization class for Redhat systems
File:: params.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Class: bash::params
In this class are defined as variables values that are used in other bash classes. This class should be included, where necessary, and eventually be enhanced with support for more OS
== Warnings
/!\ Always respect the style guide available here[http://docs.puppetlabs.com/guides/style_guide]
The usage of a dedicated param classe is advised to better deal with parametrized classes, see http://docs.puppetlabs.com/guides/parameterized_classes.html
[Remember: No empty lines between comments and class definition]
File:: config.pp Author:: Sebastien Varrette (Sebastien.Varrette@uni.lu) Copyright:: Copyright (c) 2015 Sebastien Varrette (www[]) License:: GPLv3
= Class: bash::config
Configure a new hook part of the bash configuration.
== Pre-requisites
- The class 'bash' should have been instanciated
== Parameters
[ensure] default to 'present', can be 'absent'. Default: 'present'
[content] Specify the contents of the bash::config entry as a string. Newlines, tabs, and spaces can be specified using the escaped syntax (e.g., \n for a newline)
[source] Copy a file as the content of the bash::config entry. Uses checksum to determine when a file should be copied. Valid values are either fully qualified paths to files, or URIs. Currently supported URI types are puppet and file. In neither the 'source' or 'content' parameter is specified, then the following parameters can be used to set the console entry.
[owner] Specifies the owner of the destination file. Valid options: a string containing a username. Default: 'root'
[group] Specifies a permissions group for the destination file. Valid options: a string containing a group name. Default: 'root'
[mode] Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation. Default: '0644'
[rootdir] Specifies a root directory hosting the bash configuration file. Set it to a homedir (and precise the owner and group directives) to make the configuration local and placed to /.bash.d/<title>.bash Default: /etc/profile.d
[before_hook] Specifies if the bash configuration should be placed as a before hook. Only valid if rootdir is set. Then the configuration file will be placed in /.bash.before.d/<title>.bash Default: false
[warn] Specifies whether to add a header message at the top of the destination file. Valid options: the booleans 'true' and 'false', or a string to serve as the header. Default: 'false'.
=== Sample usage
include 'bash'
bash::local::before { 'sysadminrc':
ensure => 'present',
path => '/var/lib/localadmin',
content => "[[ -f '~/.sysadminrc' ]] && source ~/.sysadminrc"
}
== Warnings
/!\ Always respect the style guide available here[http://docs.puppetlabs.com/guides/style_guide]
[Remember: No empty lines between comments and class definition]
The following parameters are available in the bash::config defined type:
Data type: Any
Default value: 'present'
Data type: Any
Default value: ''
Data type: Any
Default value: ''
Data type: Any
Default value: ''
Data type: Any
Default value: false
Data type: Any
Default value: false
Data type: Any
Default value: 'root'
Data type: Any
Default value: 'root'
Data type: Any
Default value: '0644'
File:: setup.pp Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) Copyright:: Copyright (c) 2011-2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team License:: Apache-2.0
= Defines: bash::setup
Configures .bashrc and many other dotfiles (screenrc, bash aliases etc. ) for a given user
== Parameters
[ensure] Default: 'present'. Ensure the presence (or absence) of setup
[path] If the title of the resource is not the homedir to consider, use path to precise the homedir to setup
[user] Default: 'root' User that run the setup. BEWARE: it SHALL be the owner of the home directory you're trying to setup!!!!
[group] Default: 'root' As above but for the group operating the commands. BEWARE again to use the appropriate group!
== Actions
Configure the .bashrc etc. into a given home directory using specific configuration (see https://github.com/ULHPC/dotfiles). Actually, it not only creates the symlinks for .bashrc, .inputrc but also for .screenrc and .gitconfig that are provided as part of the config.
Note that it is expected that the dotfiles directory to contains an installation script 'install.sh' at the root of the repository that accept the '--delete' command.
== Requires
$path must be set (or $name will be considered as the basedir for installation)
== Usage
Configuration for /root
bash::setup { '/root': }
Configuration for the user $user
bash::setup { "/home/${user}":
ensure => 'present'
user => "${user}",
group => "${user}",
}
=== Authors
The UL HPC Management team (see http://hpc.uni.lu)
== Warnings
/!\ Always respect the style guide available here[http://docs.puppetlabs.com/guides/style_guide]
[Remember: No empty lines between comments and class definition]
The following parameters are available in the bash::setup defined type:
Data type: Any
Default value: ''
Data type: Any
Default value: 'present'
Data type: Any
Default value: 'root'
Data type: Any
Default value: 'root'