-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a parameter to allow a specific group to access compute nodes without having jobs on the node #350
base: main
Are you sure you want to change the base?
Conversation
@@ -560,7 +560,9 @@ | |||
} | |||
|
|||
# Slurm node class. This is where slurmd is ran. | |||
class profile::slurm::node { | |||
class profile::slurm::node ( | |||
String $pam_access_group = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make this an array instead, we can get rid of the if/else:
Array[String] $pam_acccess_groups = ['wheel']
else { | ||
$access_conf_addon = '' | ||
} | ||
$access_conf = " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$access_conf = @(END)
# Allow root cronjob
+ : root : cron crond :0 tty1 tty2 tty3 tty4 tty5 tty6
# Allow other groups if any
<% for $pam_access_groups.each | $group | { %->
+:<%= $group %>:ALL
<% } -%>
-:ALL:ALL
END
# Allow root cronjob | ||
+ : root : cron crond :0 tty1 tty2 tty3 tty4 tty5 tty6 | ||
# Allow admin to connect, deny all other | ||
+:wheel:ALL | ||
${access_conf_addon} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then access.conf becomes
file { '/etc/security/access.conf':
ensure => present,
content => inline_template($access_conf, { 'pam_access_groups' => $pam_access_groups }),
}
No description provided.