``profile::pmodules``
=====================

This module manages the `AIT Pmodules
<https://amas.psi.ch/Pmodules/wiki/Pmodules>`_.

It automatically enables Pmodules for all users with

1. a UID >= 1000
2. a username **not** ending in ``-adm``

This makes sure that local service accounts, root, and administrator accounts do
not use Pmodules automatically.


Parameters
----------

==================  ========  ==============================
**Name**            **Type**  **Default**
------------------  --------  ------------------------------
basedir             string    hiera('pmodules::basedir')
==================  ========  ==============================


``basedir``
~~~~~~~~~~~

The subdirectory of ``/afs/psi.ch/sys/`` where the modules can be found, e.g.
``psi.x86_64_slp6`` or ``psi.ra``.


Examples
--------

This profile is included in the base role, but disabled. To enable Pmodules
simply pass ``enable_pmodules => true`` when including the base role::

  class role::some_role () {
    class {'role::base':
      enable_pmodules => true,
      ...
    }
    ...

To customize the base directory, include ``pmodules`` separately::

  class role::some_role () {
    include role::base

    class {'profile::pmodules':
      basedir => 'psi.ra',
    }
    ...
