puppet-lmod

Overview

The lmod module handles the configuration of a system to use Lmod. Additional details regarding Lmod can be found at 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

treydock.github.io/puppet-lmod/

Compatibility

Tested using

  • CentOS/RedHat 7, 8

  • Ubuntu 18.04, 20.04

  • Debian 9, 10