Skip to content

Commit

Permalink
Re-create bin directory for omero wrapper
Browse files Browse the repository at this point in the history
As a result of ome/openmicroscopy#6200,
the bin directory is no longer being created leading to a build
failure in ome/omero-server-docker#41
  • Loading branch information
joshmoore committed Jan 9, 2020
1 parent 19747f0 commit 94f406d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
3 changes: 0 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ omero_server_virtualenv: false
# Python 3?
omero_server_python3: false

# Make bin/omero a wrapper script for the virtualenv omero
omero_server_python3_replace_omero: true

# OMERO database connection parameters
omero_server_dbhost: localhost
omero_server_dbuser: omero
Expand Down
22 changes: 8 additions & 14 deletions tasks/omero-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,28 +224,22 @@
state: absent
when: omero_server_python3

- name: omero server | patch bin/omero to use virtualenv
# Remembering to set OMERODIR everywhere is prone to error
- name: omero server | create bin directory for wrapper
become: true
replace:
mode: 0755
path: "{{ omero_server_omero_command }}"
regexp: "^#!.+python$"
replace: "#!{{ omero_server_virtualenv_basedir }}/bin/python"
when: >-
(not omero_server_python3 and omero_server_virtualenv) or
(omero_server_python3 and not omero_server_python3_replace_omero)
notify:
- omero-server rewrite omero-server configuration
- omero-server restart omero-server
file:
path: "{{ omero_server_omerodir }}/bin/"
state: directory
mode: 0555
when: omero_server_python3

# Remembering to set OMERODIR everywhere is prone to error
- name: omero server | create omero server wrapper
become: true
template:
dest: "{{ omero_server_omero_command }}"
src: bin-omero.j2
mode: 0555
when: omero_server_python3 and omero_server_python3_replace_omero
when: omero_server_python3
notify:
- omero-server rewrite omero-server configuration
- omero-server restart omero-server

0 comments on commit 94f406d

Please sign in to comment.