Skip to content

Commit

Permalink
Fix installing rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Nov 22, 2024
1 parent 07d8a26 commit 35afd3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
31 changes: 11 additions & 20 deletions roles/yoda_rulesets/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,24 @@
become: true
ansible.builtin.pip:
requirements: /etc/irods/yoda-ruleset/requirements.txt
extra_args: --user
executable: "{{ yoda_rulesets_pip2_path }}"
extra_args: --user --break-system-packages
executable: "{{ yoda_rulesets_pip3_path }}"


- name: Ensure pysqlcipher3 is installed
become_user: '{{ irods_service_account }}'
become: true
ansible.builtin.pip:
name: pysqlcipher3==1.0.4
executable: "{{ yoda_rulesets_pip2_path }}"
executable: "{{ yoda_rulesets_pip3_path }}"
extra_args: --user
when: ansible_os_family == 'RedHat'


- name: Check installed version of pysqlcipher3
become_user: "{{ irods_service_account }}"
become: true
ansible.builtin.shell: "{{ yoda_rulesets_pip2_path }} show pysqlcipher3 | grep Version | cut -d ' ' -f 2"
ansible.builtin.shell: "{{ yoda_rulesets_pip3_path }} show pysqlcipher3 | grep Version | cut -d ' ' -f 2"
ignore_errors: true
changed_when: false
register: pysqlcipher3_version
Expand All @@ -134,26 +134,17 @@
become: true
ansible.builtin.pip:
name: pysqlcipher3==1.0.4
executable: "{{ yoda_rulesets_pip2_path }}"
executable: "{{ yoda_rulesets_pip3_path }}"
state: absent
when: ansible_os_family == 'Debian' and '1.0.4' in pysqlcipher3_version.stdout


- name: Ensure custom build of pysqlcipher3 is installed globally for ruleset
become_user: "{{ irods_service_account }}"
become: true
ansible.builtin.command: # noqa no-changed-when
cmd: python3 -m easy_install --user https://github.com/UtrechtUniversity/pysqlcipher3/releases/download/v1.2.1/pysqlcipher3-1.2.1-py2.7-linux-x86_64.egg
when: ansible_os_family == 'Debian' and '1.2.1' not in pysqlcipher3_version.stdout


- name: Ensure Python 3 jsonschema is installed
become_user: '{{ irods_service_account }}'
become: true
ansible.builtin.pip:
name: jsonschema==4.19.1
executable: "{{ yoda_rulesets_pip3_path }}"
extra_args: --user
#- name: Ensure custom build of pysqlcipher3 is installed globally for ruleset

Check failure on line 142 in roles/yoda_rulesets/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[comments]

Missing starting space in comment
# become_user: "{{ irods_service_account }}"
# become: true
# ansible.builtin.command: # noqa no-changed-when
# cmd: python3 -m easy_install --user https://github.com/UtrechtUniversity/pysqlcipher3/releases/download/v1.2.1/pysqlcipher3-1.2.1-py2.7-linux-x86_64.egg
# when: ansible_os_family == 'Debian' and '1.2.1' not in pysqlcipher3_version.stdout


- name: Link ruleset directory
Expand Down
1 change: 0 additions & 1 deletion roles/yoda_rulesets/vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
# copyright Utrecht University

yoda_rulesets_pip2_path: /usr/local/bin/pip2
yoda_rulesets_pip3_path: /usr/bin/pip3
yoda_rulesets_python3_interpreter: /usr/bin/python3
1 change: 0 additions & 1 deletion roles/yoda_rulesets/vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
# copyright Utrecht University

yoda_rulesets_pip2_path: /usr/bin/pip
yoda_rulesets_pip3_path: /usr/local/bin/pip3
yoda_rulesets_python3_interpreter: /usr/local/bin/python3

0 comments on commit 35afd3f

Please sign in to comment.