-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from IKIM-Essen/feat/add-snakemake-8-profile
feat: add profile for the upcoming Snakemake 8
- Loading branch information
Showing
4 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
snakemake_profile_name: ikim | ||
|
||
# Inventory group names | ||
slurm_worker_group_name: slurm_worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
- name: Create the profile directory | ||
ansible.builtin.file: | ||
path: "/etc/xdg/snakemake/{{ (inventory_hostname in groups[slurm_worker_group_name]) | ternary('slurm', 'local') }}" | ||
path: "/etc/xdg/snakemake/{{ snakemake_profile_name }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: "0755" | ||
register: snakemake_profile_dir | ||
|
||
- name: Add the profile | ||
- name: Add the legacy profile | ||
ansible.builtin.template: | ||
src: profile.yaml.j2 | ||
dest: "{{ snakemake_profile_dir['path'] }}/config.yaml" | ||
dest: "/etc/xdg/snakemake/{{ snakemake_profile_name }}/config.yaml" | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
when: snakemake_profile_dir['path'] is defined | ||
|
||
- name: Add the Snakemake >=8 profile | ||
ansible.builtin.template: | ||
src: profile.v8+.yaml.j2 | ||
dest: "/etc/xdg/snakemake/{{ snakemake_profile_name }}/config.v8+.yaml" | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
|
||
- name: Set the profile name in the appropriate environment variable | ||
ansible.builtin.template: | ||
src: snakemake.sh.j2 | ||
dest: /etc/profile.d/snakemake.sh | ||
owner: root | ||
group: root | ||
mode: "0755" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if inventory_hostname in groups[slurm_worker_group_name] %} | ||
executor: slurm | ||
{% endif %} | ||
software-deployment-method: | ||
- conda | ||
latency-wait: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export SNAKEMAKE_PROFILE={{ snakemake_profile_name }} |