Skip to content

Commit

Permalink
Refactor: use external roles from uusrc collection.
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Jul 22, 2024
1 parent 4705055 commit 223c2d9
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 316 deletions.
36 changes: 12 additions & 24 deletions galaxysrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,20 @@
- 'gnutls-bin' # workaround for git-clone issue, https://stackoverflow.com/a/53147659/4326632
state: present

tasks:

- name: Workaround to install requirements.yml on SURF ResearchCloud
ansible.builtin.include_role: { name: install_roles }
tags: molecule-notest

- name: Include role installed using install_roles workaround
ansible.builtin.include_role: { name: galaxyproject.postgresql }

- name: Include role installed using install_roles workaround
ansible.builtin.include_role:
name: galaxyproject.postgresql_objects
apply:
become: true
become_user: postgres

- name: Include role installed using install_roles workaround
ansible.builtin.include_role:
name: galaxyproject.galaxy
roles:
- role: uusrc.general.fact_regular_users
- role: uusrc.general.nginx_reverse_proxy
vars:
nginx_reverse_proxy_locations: "{{ galaxy_nginx_vhost_config }}"
- role: galaxyproject.postgresql
- role: galaxyproject.postgresql_objects
become: true
become_user: postgres
- role: galaxyproject.galaxy
vars:
galaxy_config: "{{ _galaxy_config }}"

tasks:

- name: Add nginx user to galaxy group
ansible.builtin.user:
Expand Down Expand Up @@ -86,11 +79,6 @@
state: absent
notify: galaxy gravity restart

roles:
- role: nginx-reverse_proxy
vars:
nginx_reverse_proxy_locations: "{{ galaxy_nginx_vhost_config }}"

handlers:

- name: Restart nginx
Expand Down
2 changes: 2 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ roles:
collections:
- name: community.general
- name: community.postgresql
- name: https://github.com/UtrechtUniversity/researchcloud-items.git
type: git
14 changes: 0 additions & 14 deletions roles/fact_regular_users/meta/main.yml

This file was deleted.

38 changes: 0 additions & 38 deletions roles/fact_regular_users/molecule/default/molecule.yml

This file was deleted.

21 changes: 0 additions & 21 deletions roles/fact_regular_users/molecule/default/prepare.yml

This file was deleted.

34 changes: 0 additions & 34 deletions roles/fact_regular_users/molecule/default/verify.yml

This file was deleted.

54 changes: 0 additions & 54 deletions roles/fact_regular_users/tasks/main.yml

This file was deleted.

Binary file removed roles/install_roles/.DS_Store
Binary file not shown.
5 changes: 0 additions & 5 deletions roles/install_roles/tasks/main.yml

This file was deleted.

4 changes: 0 additions & 4 deletions roles/nginx-reverse_proxy/defaults/main.yml

This file was deleted.

9 changes: 0 additions & 9 deletions roles/nginx-reverse_proxy/meta/main.yml

This file was deleted.

39 changes: 0 additions & 39 deletions roles/nginx-reverse_proxy/tasks/main.yml

This file was deleted.

62 changes: 0 additions & 62 deletions roles/nginx-reverse_proxy/templates/reverseproxy.conf.j2

This file was deleted.

4 changes: 0 additions & 4 deletions tasks/set_config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: Gather CO info facts
ansible.builtin.include_role: {name: fact_regular_users }
tags: molecule-notest

- name: Load internal variables
ansible.builtin.include_vars: vars/internal_vars.yml

Expand Down
4 changes: 1 addition & 3 deletions vars/internal_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ _galaxy_custom_repo_workflow_location: 'workflows'
# Paths to server dir
_galaxy_root: /srv/galaxy

_galaxy_nginx_conf: /etc/nginx/conf.d/ssl_main.conf
_galaxy_api_localhost_definition: "server { listen localhost:80; include /etc/nginx/app-location-conf.d/api.conf;}"
_galaxy_local_address: localhost:8080

galaxy_src_documentation: https://github.com/UtrechtUniversity/vre-docs
galaxy_src_documentation: https://github.com/UtrechtUniversity/vre-docs
10 changes: 5 additions & 5 deletions vars/nginx_vars.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
galaxy_nginx_vhost_config:
- name: galaxy
location: /
backend: "http://{{ _galaxy_local_address }}"
auth: "{{ _molecule_active | ternary(None, 'sram') | default(omit, true) }}"
proxy_pass: "http://{{ _galaxy_local_address }}"
auth: "{{ _molecule_active | ternary(omit, 'sram') }}"
- name: api
location: /api
backend: "http://{{ _galaxy_local_address }}/api"
auth: "{{ _galaxy_api_exposed | ternary('noauth', 'sram') | default(omit, true) }}"
location: /api/
proxy_pass: "http://{{ _galaxy_local_address }}/api/"
auth: "{{ _galaxy_api_exposed | ternary('noauth', 'sram') }}"
- name: static
location: /static
alias: "{{ galaxy_server_dir }}/static"
Expand Down

0 comments on commit 223c2d9

Please sign in to comment.