Skip to content

Commit d44a4b7

Browse files
committed
doc: add 'hide-and-forbid-modules' cookbook recipe
1 parent 03b5fda commit d44a4b7

File tree

18 files changed

+387
-0
lines changed

18 files changed

+387
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#%Module
2+
3+
# hide modules only loaded as dependency
4+
module-hide --soft deplibA deplibB
5+
6+
# hide modules not from user's scientific field
7+
module-hide --soft --not-group bio bioappA bioappB
8+
module-hide --soft --not-group chem chemappA chemappB
9+
10+
# forbid use of modules unless software user agreement is signed
11+
set msg {User agreement for ChemAppA application must be validated to use it
12+
1. Please connect to https://ChemAppA.example.org
13+
2. Read the Term of Use and sign it
14+
3. Send back this signed agreement to our service desk}
15+
module-forbid --not-group chemappA --message $msg chemappA
16+
17+
# fully hide and forbid modules unless user owns a license token
18+
module-hide --hard --not-group appB appB
19+
set msg {Access is restricted to owners of license token}
20+
module-forbid --not-group appB --message $msg appB
21+
22+
# test new version of chemappB prior general availability
23+
module-hide --before 2020-11-18 --not-group pilot chemappB/2.0
24+
25+
# decommission of old version of appA
26+
set nearmsg {appA/1.0 will be decommissioned, please use appA/2.0}
27+
set msg {appA/1.0 is decommissioned, please use appA/2.0}
28+
module-hide --hard --after 2020-11-18 --not-group eol appA/1.0
29+
module-forbid --after 2020-11-18 --not-group eol \
30+
--nearly-message $nearmsg --message $msg appA/1.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#%Module
2+
module load deplibA/1.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#%Module
2+
module load deplibA/2.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#%Module
2+
module load deplibB/1.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#%Module
2+
module load deplibB/2.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#%Module
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#%Module
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#%Module
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#%Module
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#%Module

0 commit comments

Comments
 (0)