Skip to content

Commit

Permalink
Abstract nginx conf location
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Jun 4, 2024
1 parent 026d845 commit a4042c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions galaxysrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: Find Galaxy socket upstream definition
ansible.builtin.lineinfile:
path: /etc/nginx/conf.d/ssl_main.conf
path: "{{ _galaxy_nginx_conf }}"
state: absent
line: "upstream galaxy { server {{ galaxy_config.gravity.gunicorn.bind }}; }"
check_mode: true
Expand All @@ -34,7 +34,7 @@

- name: Add Galaxy socket upstream definition
ansible.builtin.lineinfile:
path: /etc/nginx/conf.d/ssl_main.conf
path: "{{ _galaxy_nginx_conf }}"
insertafter: EOF
line: "upstream galaxy { server {{ galaxy_config.gravity.gunicorn.bind }}; }"
when: detect_nginx_upstream.found == 0
Expand Down Expand Up @@ -116,4 +116,4 @@

- name: Galaxy gravity restart
command: "/usr/local/bin/galaxyctl graceful"
listen: "restart galaxy"
listen: "restart galaxy"
2 changes: 2 additions & 0 deletions vars/internal_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ _galaxy_custom_repo_workflow_location: 'workflows'
_galaxy_root: /srv/galaxy
_galaxy_gunicorn_socket_dir: "{{ _galaxy_root}}/run"
_galaxy_gunicorn_socket_path: "{{ _galaxy_gunicorn_socket_dir }}/gunicorn.sock"

_galaxy_nginx_conf: /etc/nginx/conf.d/ssl_main.conf

0 comments on commit a4042c7

Please sign in to comment.