Skip to content

Commit

Permalink
Added flag galaxy_restart_handler_enabled to control restart handling
Browse files Browse the repository at this point in the history
Also fixed typo in travis.yml
  • Loading branch information
nuwang committed Dec 14, 2017
1 parent 0ce83af commit e0790e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install:
- ansible localhost -c local -m wait_for -a "port=8080 delay=5 state=started timeout=150"

# Wait for Galaxy to respond
- ansible localhost -c local -m uri -a "url=http://localhost:8080/ register=result until='result.status[0] in [\"2\", \"3\"]' retries=50 delay=3 ignore_error=True"
- ansible localhost -c local -m uri -a "url=http://localhost:8080/ register=result until='result.status[0] in [\"2\", \"3\"]' retries=50 delay=3 ignore_errors=True"
script:
# Check the role works in the test playbook.
- ansible-playbook -i "localhost," -c local -e galaxy_tools_galaxy_instance_url=http://127.0.0.1:8080 -e galaxy_runs_in_docker=yes -e galaxy_tools_api_key=admin test_playbook.yml
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ galaxy_tools_install_workflows: no
galaxy_tools_create_bootstrap_user: no
galaxy_tools_delete_bootstrap_user: no

# If enabled, the restart handler will attempt to restart Galaxy after tool
# installation, assuming Galaxy is controlled by run.sh, docker or supervisor.
galaxy_restart_handler_enabled: no

# A URL or an IP address for the Galaxy instance where the tools are to be
# installed
galaxy_tools_galaxy_instance_url: 127.0.0.1:8080
Expand Down
1 change: 1 addition & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- name: ansible-galaxy-tools restart galaxy
include: restart_galaxy.yml
when: galaxy_restart_handler_enabled|bool

0 comments on commit e0790e4

Please sign in to comment.