Skip to content

Commit

Permalink
Add nginx to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed May 8, 2024
1 parent 6d01368 commit da01bf9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "plugin-nginx"]
path = plugin-nginx
url = https://gitlab.com/dometto/plugin-nginx.git
branch = molecule_compatibility
3 changes: 0 additions & 3 deletions galaxysrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
state: present

- name: Set Galaxy socket upstream definition
tags: molecule-notest
block:

- name: Find Galaxy socket upstream definition
Expand Down Expand Up @@ -64,7 +63,6 @@
name: www-data
groups: "{{ galaxy_user }}"
append: true
tags: molecule-notest
notify: restart nginx

- name: Get Galaxy service Status
Expand Down Expand Up @@ -95,7 +93,6 @@

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

Expand Down
11 changes: 11 additions & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@
name: ansible
version: 9.4.0
state: present

- name: Run nginx component
ansible.builtin.import_playbook: ../../plugin-nginx/plugin-nginx.yml
vars:
rsc_nginx_authorization_endpoint: http://localhost
rsc_nginx_user_info_endpoint: http://localhost
rsc_nginx_service_url: http://localhost
nginx_enable_ssl: false
nginx_enable_auth: true
rsc_nginx_oauth2_application:
client_id: foo
1 change: 1 addition & 0 deletions plugin-nginx
Submodule plugin-nginx added at dd7ca3
5 changes: 4 additions & 1 deletion tasks/set_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

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

- name: Load component variables
ansible.builtin.include_vars: vars/src_galaxy_vars.yml

- name: Load nginx variables
ansible.builtin.include_vars: vars/nginx_vars.yml

- name: Load Galaxy role variables
ansible.builtin.include_vars: vars/galaxy_vars.yml
1 change: 1 addition & 0 deletions vars/internal_vars.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Internal variables that are not user configurable
_molecule_active: "{{ true if 'molecule-notest' in ansible_skip_tags else false }}"
_molecule_idempotence: "{{ true if 'molecule-idempotence-notest' in ansible_skip_tags else false }}"
_galaxy_bootstrap_api_key: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_lowercase', 'digits'], length=15) }}"
_galaxy_remote_user_maildomain: "src.surf-hosted.nl"
Expand Down
2 changes: 1 addition & 1 deletion vars/nginx_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ galaxy_nginx_vhost_config:
- name: galaxy
location: /
backend: http://galaxy
auth: sram
auth: "{{ _molecule_active | ternary(None, 'sram') | default(omit, true) }}"
- name: static
location: /static
alias: "{{ galaxy_server_dir }}/static"
Expand Down

0 comments on commit da01bf9

Please sign in to comment.