diff --git a/README.md b/README.md index 0447b00d..c8893634 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ package in the image. `openhpc_login_only_nodes`: Optional. If using "configless" mode specify the name of an ansible group containing nodes which are login-only nodes (i.e. not also control nodes), if required. These nodes will run `slurmd` to contact the control node for config. +`openhpc_module_system_install`: Optional, default true. Whether or not to install an environment module system. If true, lmod will be installed. If false, You can either supply your own module system or go without one. + ### slurm.conf `openhpc_slurm_partitions`: list of one or more slurm partitions. Each partition may contain the following values: diff --git a/defaults/main.yml b/defaults/main.yml index 5b65e8e2..0a2917f1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -51,3 +51,4 @@ ohpc_release_repos: openhpc_slurm_configless: false openhpc_munge_key: '' openhpc_login_only_nodes: '' +openhpc_module_system_install: true diff --git a/tasks/install.yml b/tasks/install.yml index f58e6c24..7cd5847a 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -39,11 +39,11 @@ set_fact: openhpc_slurm_pkglist: "{{ openhpc_slurm_pkglist | default([]) + item.value }}" loop: "{{ ohpc_slurm_packages | dict2items }}" - when: "openhpc_enable.get(item.key, false)" + when: openhpc_enable.get(item.key, false) - name: Install required slurm packages yum: - name: "{{ openhpc_slurm_pkglist }}" + name: "{{ openhpc_slurm_pkglist | reject('eq', '') }}" when: openhpc_slurm_pkglist | default(false, true) - name: Install packages from openhpc_packages variable diff --git a/vars/ohpc-1.3 b/vars/ohpc-1.3 index 6ac6d1de..b099e4ba 100644 --- a/vars/ohpc-1.3 +++ b/vars/ohpc-1.3 @@ -14,7 +14,7 @@ ohpc_slurm_packages: - "munge-ohpc" - "slurm-slurmd-ohpc" - "slurm-example-configs-ohpc" - - "lmod-ohpc" + - "{{ 'lmod-ohpc' if openhpc_module_system_install else '' }}" database: - "slurm-slurmdbd-ohpc" ... diff --git a/vars/ohpc-2 b/vars/ohpc-2 index 50ff2601..d86c9274 100644 --- a/vars/ohpc-2 +++ b/vars/ohpc-2 @@ -14,7 +14,7 @@ ohpc_slurm_packages: - "munge" - "slurm-slurmd-ohpc" - "slurm-example-configs-ohpc" - - "lmod-ohpc" + - "{{ 'lmod-ohpc' if openhpc_module_system_install else '' }}" database: - "slurm-slurmdbd-ohpc" ...