Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-lmod', '5.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-lmod
Overview
The lmod module handles the configuration of a system to use Lmod. Additional details regarding Lmod can be found at http://lmod.readthedocs.io/en/latest/index.html.
Usage
lmod
Install Lmod through package repositories:
class { 'lmod': }
This is an example install Lmod from source.
class { 'lmod':
prefix => '/apps',
modulepath_root => '/apps/modulefiles',
version => '8.4.26',
install_method => 'source',
source_with_flags => {
'spiderCacheDir' => '/apps/lmodcache/cacheDir',
'updateSystemFn' => '/apps/lmodcache/system.txt',
},
}
If you wish to manage the Lmod install outside Puppet:
class { 'lmod':
prefix => '/apps',
modulepath_root => '/apps/modulefiles',
install_method => 'none',
}
To customize the avail layout (since Lmod 5.7.5)
class { 'lmod':
avail_styles => ['grouped', 'system'],
}
Below is an example that adds several paths to default MODULEPATH, sets a default module, sets LMOD_PACKAGE_PATH and sets LMOD_SYSTEM_NAME.
class { 'lmod':
modulepaths => ['$LMOD_sys', 'Core'],
set_lmod_package_path => true,
set_default_module => true,
default_module => 'mycluster',
}
Reference
Reference
Table of Contents
Classes
Public Classes
lmod
: Manage Lmod
Private Classes
lmod::install
: Install Lmod package and dependencieslmod::install::source
: Install Lmod from sourcelmod::load
: Manage Lmod load config files
Classes
lmod
Manage Lmod
Examples
To install Lmod from existing package repositories
class { 'lmod':
install_method => 'package',
}
Parameters
The following parameters are available in the lmod
class:
ensure
version
package_ensure
prefix
install_method
manage_epel
source_dir
source_with_flags
package_name
runtime_packages
build_packages
manage_alternatives
modulepath_root
modulepaths
set_lmod_package_path
lmod_package_path
set_default_module
default_module
avail_styles
lmod_admin_file
system_name
site_name
cached_loads
modules_bash_path
modules_bash_template
modules_bash_source
modules_csh_path
modules_csh_template
modules_csh_source
stdenv_bash_path
stdenv_bash_template
stdenv_bash_source
stdenv_csh_path
stdenv_csh_template
stdenv_csh_source
with_fish
modules_fish_path
modules_fish_template
modules_fish_source
stdenv_fish_path
stdenv_fish_template
stdenv_fish_source
ensure
Data type: Enum['present','absent']
The ensure parameter for this module. If set to 'absent', managed files are removed. If lmod_package_from_repo is true and ensure is 'absent', then the lmod package is also removed.
Default value: 'present'
version
Data type: String
Version of Lmod to install when installing from source
Default value: '8.4.26'
package_ensure
Data type: String
The ensure value for Lmod package. Only applies when lmod_package_from_repo is true.
Default value: 'present'
prefix
Data type: Stdlib::Absolutepath
The prefix used when lmod was compiled.
Default value: '/usr/share'
install_method
Data type: Enum['package','source','none']
How Lmod should be installed
Default value: 'package'
manage_epel
Data type: Boolean
Boolean that determines if EPEL should be mananged by this module for systems installing Lmod via yum.
Default value: true
source_dir
Data type: Stdlib::Absolutepath
Directory to store Lmod source
Default value: '/usr/src'
source_with_flags
Data type: Hash
Key/value pair of flags to turn into --with-= passed to configure when installing from source
Default value: {}
package_name
Data type: String
Lmod package name if lmod_package_from_repo is true.
Default value: 'Lmod'
runtime_packages
Data type: Array
Lmod runtime package dependencies, only installed if lmod_package_from_repo is false
Default value: []
build_packages
Data type: Array
Lmod runtime devel package dependencies, only installed if manage_build_packages is true
Default value: []
manage_alternatives
Data type: Boolean
Sets whether alternatives are managed by this module Only used for Debian and Ubuntu systems
Default value: true
modulepath_root
Data type: Optional[Stdlib::Absolutepath]
The modulepath for your lmod installation. Default is 'UNSET'. If the value is 'UNSET' then the path $prefix/modulefiles is used.
Default value: undef
modulepaths
Data type: Array
An Array of modulepaths to be defined in the module.sh and module.csh.
Default value: ['$LMOD_sys', 'Core']
set_lmod_package_path
Data type: Boolean
Boolean that determines if the LMOD_PACKAGE_PATH environment variable should be set in modules.sh and modules.csh.
Default value: false
lmod_package_path
Data type: String
Value given to the LMOD_PACKAGE_PATH environment variable in modules.sh and modules.csh.
Default value: '$MODULEPATH_ROOT/Site'
set_default_module
Data type: Boolean
Boolean will disable the management of the files that define the default module.
Default value: false
default_module
Data type: String
The name of the default module to be loaded when users login. This will not be set if set_default_module is false.
Default value: 'StdEnv'
avail_styles
Data type: Array
An Array used to set the LMOD_AVAIL_STYLES environment variable. An empty Array prevents this environment variable from being set.
Default value: ['system']
lmod_admin_file
Data type: Optional[Stdlib::Absolutepath]
Defines path used for LMOD_ADMIN_FILE.
Default value: undef
system_name
Data type: Optional[String]
Value used for LMOD_SYSTEM_NAME.
Default value: undef
site_name
Data type: Optional[String]
Value used for LMOD_SITE_NAME.
Default value: undef
cached_loads
Data type: Optional[Boolean]
Value used for LMOD_CACHED_LOADS.
Default value: undef
modules_bash_path
Data type: Stdlib::Absolutepath
Path to script to load bash modules environment
Default value: '/etc/profile.d/modules.sh'
modules_bash_template
Data type: String
Module bash load template
Default value: 'lmod/modules.sh.erb'
modules_bash_source
Data type: Optional[String]
Module bash load source
Default value: undef
modules_csh_path
Data type: Stdlib::Absolutepath
Path to script to load csh modules environment
Default value: '/etc/profile.d/modules.csh'
modules_csh_template
Data type: String
Module csh load template
Default value: 'lmod/modules.csh.erb'
modules_csh_source
Data type: Optional[String]
Module csh load source
Default value: undef
stdenv_bash_path
Data type: Stdlib::Absolutepath
Path to bash script that loads default modules
Default value: '/etc/profile.d/z00_StdEnv.sh'
stdenv_bash_template
Data type: String
Default module bash load template
Default value: 'lmod/z00_StdEnv.sh.erb'
stdenv_bash_source
Data type: Optional[String]
Default module bash load source
Default value: undef
stdenv_csh_path
Data type: Stdlib::Absolutepath
Path to csh script that loads default modules
Default value: '/etc/profile.d/z00_StdEnv.csh'
stdenv_csh_template
Data type: String
Default module csh load template
Default value: 'lmod/z00_StdEnv.csh.erb'
stdenv_csh_source
Data type: Optional[String]
Default module bash load source
Default value: undef
with_fish
Data type: Boolean
Enable fish support
Default value: false
modules_fish_path
Data type: Stdlib::Absolutepath
Path to script to load fish modules environment
Default value: '/etc/fish/conf.d/modules.fish'
modules_fish_template
Data type: String
Module fish load template
Default value: 'lmod/modules.fish.erb'
modules_fish_source
Data type: Optional[String]
Module fish load source
Default value: undef
stdenv_fish_path
Data type: Stdlib::Absolutepath
Path to fish script that loads default modules
Default value: '/etc/fish/conf.d/z00_StdEnv.fish'
stdenv_fish_template
Data type: String
Default module fish load template
Default value: 'lmod/z00_StdEnv.fish.erb'
stdenv_fish_source
Data type: Optional[String]
Default module bash load source
Default value: undef
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v5.0.0 (2024-10-22)
Changed
v4.0.0 (2023-12-14)
Changed
Added
v3.3.2 (2022-09-02)
Fixed
v3.3.1 (2022-09-02)
Fixed
v3.3.0 (2022-09-02)
Added
v3.2.0 (2022-04-21)
Added
v3.1.0 (2021-09-23)
Added
v3.0.1 (2021-09-16)
Fixed
v3.0.0 (2021-09-08)
Changed
Added
v2.0.0 (2021-03-10)
Changed
- BREAKING Major refactor (read pull request description) #28 (treydock)
- Drop Puppet 5 support #27 (treydock)
- Drop support for EL6, Debian 8, Ubuntu 14.04 #24 (treydock)
Added
v1.3.0 (2019-05-10)
Added
- Use puppet strings #22 (treydock)
- Use Hiera v5 data #21 (treydock)
- Support Debian 8 and 9 and Ubuntu 18.04 #20 (treydock)
- Use PDK #19 (treydock)
- Support Puppet 5 and 6 and use Beaker 4 #18 (treydock)
- Make EPEL optional #17 (treydock)
1.2.0 (2018-06-25)
Added
1.1.0 (2018-04-18)
Added
1.0.2 (2017-11-09)
Fixed
1.0.1 (2017-10-28)
1.0.0 (2017-10-28)
Added
- Add package_ensure parameter. Only used when lmod_package_from_repo=true #11 (treydock)
- Remove EL5 package list #10 (treydock)
- Update bash init script to check for various commands in multiple locations #9 (treydock)
- BREAKING: Drop support for Puppet 3 and use Puppet datatypes #8 (treydock)
0.0.1 (2017-10-19)
Added
- Drop puppet 2.7 testing, sync test matrix #6 (jabl)
- Support Ubuntu 16.04 LTS #3 (jabl)
- Support Ubuntu, and allow lmod package to be installed from repo #1 (jabl)
Fixed
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 9.0.0 <10.0.0)
- puppet/epel (>= 2.0.0 <6.0.0)
- puppet/archive (>= 1.0.0 <8.0.0)
- puppet/alternatives (>= 2.1.0 <7.0.0)
Copyright (C) 2017 Trey Dockendorf <treydock@gmail.com> 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.