diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b73cc1 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +Slurm +===== + +Install and configure Slurm + +Role Variables +-------------- + +All variables are optional. However, if unset, the role will essentially do nothing. See the [defaults][defaults] and [example playbook](#example-playbook) for examples. + +You need to define a `slurm_user` like this, unless you want to override anything. + +```yaml +slurm_user: {} +``` + +For the various roles a slurm node can play, you can either set group names, or add values to a list, `slurm_roles`. + +- group slurmservers or `slurm_roles: ['controller']` +- group slurmexechosts or `slurm_roles: ['exec']` +- group slurmdbdservers or `slurm_roles: ['dbd']` + +Dependencies +------------ + +None. + +Example Playbook +---------------- + +```yaml +- name: Slurm all in One + hosts: all + vars: + slurm_user: {} + slurm_roles: ['controller', 'exec', 'dbd'] + roles: + - galaxyproject.slurm +``` + +License +------- + +MIT + +Author Information +------------------ + +[Nate Coraor](https://github.com/natefoo) +[Helena Rasche](https://github.com/erasche) + +[View contributors on GitHub](https://github.com/galaxyproject/ansible-cvmfs/graphs/contributors) diff --git a/defaults/main.yml b/defaults/main.yml index 9cad024..65c0058 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,3 @@ --- - slurm_upgrade: no +slurm_roles: [] diff --git a/tasks/main.yml b/tasks/main.yml index de53ad0..49f3791 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,15 +24,15 @@ - name: Include controller installation tasks include: slurmctld.yml - when: "'slurmservers' in group_names" + when: "'slurmservers' in group_names or 'controller' in slurm_roles" - name: Include execution host installation tasks include: slurmd.yml - when: "'slurmexechosts' in group_names" + when: "'slurmexechosts' in group_names or 'exec' in slurm_roles" - name: Include DB installation tasks include: slurmdbd.yml - when: "'slurmdbdservers' in group_names" + when: "'slurmdbdservers' in group_names 'dbd' in slurm_roles" - name: Install Slurm client (apt) apt: @@ -129,18 +129,18 @@ name: "{{ slurmdbd_service_name }}" enabled: yes state: started - when: "'slurmdbdservers' in group_names" + when: "'slurmdbdservers' in group_names 'dbd' in slurm_roles" - name: Ensure slurmctld is running service: name: "{{ slurmctld_service_name }}" enabled: yes state: started - when: "'slurmservers' in group_names" + when: "'slurmservers' in group_names or 'controller' in slurm_roles" - name: Ensure slurmd is running service: name: "{{ slurmd_service_name }}" enabled: yes state: started - when: "'slurmexechosts' in group_names" + when: "'slurmexechosts' in group_names or 'exec' in slurm_roles"