Skip to content

Commit

Permalink
Merge pull request #1003 from kysrpex/patched_pulsar
Browse files Browse the repository at this point in the history
Enable overriding HTCondor cli commands for the Pulsar Condor manager via a patched version of Pulsar (HTCondor migration)
  • Loading branch information
kysrpex authored Nov 21, 2023
2 parents 826d93e + 6afa3e1 commit d8fdbf2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions sn06.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,44 @@
- name: Disable SELinux
selinux:
state: disabled
- name: Inject custom Pulsar build in the Galaxy requirements file (HTCondor migration).
# This Pulsar build makes the `condor_rm` and `condor_submit` commands configurable.
# See https://github.com/kysrpex/pulsar/commits/condor_manager_prefix_option for more details.
block:
- name: Allocate a temporary directory.
ansible.builtin.tempfile:
prefix: ansible.galaxyproject.galaxy_requirements_file
state: directory
changed_when: false
register: galaxy_requirements_file_directory
- name: Clone Galaxy.
git:
dest: "{{ galaxy_requirements_file_directory.path }}/galaxy"
depth: 1
repo: "{{ galaxy_repo }}"
version: "{{ galaxy_commit_id }}"
executable: "{{ git_executable | default(omit) }}"
changed_when: false
- name: Retrieve the requirements file.
ansible.builtin.copy:
remote_src: true
src: "{{ galaxy_requirements_file_directory.path }}/galaxy/lib/galaxy/dependencies/pinned-requirements.txt"
dest: "{{ galaxy_requirements_file_directory.path }}/requirements.txt"
changed_when: false
- name: Replace `pulsar-galaxy-lib` with a patched version in the requirements file.
ansible.builtin.lineinfile:
path: "{{ galaxy_requirements_file_directory.path }}/requirements.txt"
regexp: 'pulsar-galaxy-lib'
line: 'git+https://github.com/kysrpex/pulsar.git@condor_manager_prefix_option#egg=pulsar-galaxy-lib ; python_version >= "3.7" and python_version < "3.12"'
- name: Configure the Galaxy role to use the modified version of the requirements file.
ansible.builtin.set_fact:
galaxy_requirements_file: "{{ galaxy_requirements_file_directory.path }}/requirements.txt"
always:
- name: Remove the Galaxy clone.
changed_when: false
ansible.builtin.file:
path: "{{ galaxy_requirements_file_directory.path }}/galaxy"
state: absent
post_tasks:
- name: Append some users to the systemd-journal group
user:
Expand Down

0 comments on commit d8fdbf2

Please sign in to comment.