Skip to content

Commit

Permalink
fix default restarter
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jun 2, 2021
1 parent 74f824f commit a51be37
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Expand Up @@ -279,6 +279,7 @@ galaxy_client_build_steps:


# systemd options
galaxy_restart_handler_name: "{{ 'systemd-handler' if galaxy_systemd.mode == 'mule' else 'default restart galaxy handler' }}"
galaxy_systemd:
env: "" #Any extra env vars
mode: mule
Expand Down
14 changes: 14 additions & 0 deletions handlers/main.yml
Expand Up @@ -13,3 +13,17 @@
subject: "Galaxy instance {{ galaxy_instance_hostname | default( inventory_hostname ) }} is at commit {{ galaxy_commit_id }}"
body: " "
when: galaxy_admin_email_to is defined

- name: daemon reload
systemd:
daemon_reload: yes

- name: galaxy mule start
systemd:
name: galaxy.service
state: started

- name: galaxy mule restart
systemd:
name: galaxy.service
state: restarted
2 changes: 1 addition & 1 deletion tasks/clone.yml
Expand Up @@ -15,7 +15,7 @@
diff: "{{ galaxy_diff_mode_verbose }}"
register: __galaxy_git_update_result
notify:
- "{{ galaxy_restart_handler_name | default('default restart galaxy handler') }}"
- "{{ galaxy_restart_handler_name }}"
- email administrator with commit id

- name: Report Galaxy version change
Expand Down
6 changes: 3 additions & 3 deletions tasks/static_setup.yml
Expand Up @@ -15,7 +15,7 @@
backup: "{{ galaxy_backup_configfiles }}"
with_items: "{{ galaxy_config_files }}"
notify:
- "{{ galaxy_restart_handler_name | default('default restart galaxy handler') }}"
- "{{ galaxy_restart_handler_name }}"

- name: Install additional Galaxy config files (template)
template:
Expand All @@ -24,7 +24,7 @@
backup: "{{ galaxy_backup_configfiles }}"
with_items: "{{ galaxy_config_templates }}"
notify:
- "{{ galaxy_restart_handler_name | default('default restart galaxy handler') }}"
- "{{ galaxy_restart_handler_name }}"

- name: Install local tools
copy:
Expand Down Expand Up @@ -78,7 +78,7 @@
dest: "{{ galaxy_config_file }}"
backup: "{{ galaxy_backup_configfiles }}"
notify:
- "{{ galaxy_restart_handler_name | default('default restart galaxy handler') }}"
- "{{ galaxy_restart_handler_name }}"

remote_user: "{{ galaxy_remote_users.privsep | default(__galaxy_remote_user) }}"
become: "{{ true if galaxy_become_users.privsep is defined else __galaxy_become }}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/systemd-mule.yml
Expand Up @@ -12,7 +12,7 @@
dest: /etc/systemd/system/galaxy.service
notify:
- daemon reload
- galaxy mule start
- galaxy mule restart

- name: Enable Galaxy Unit
systemd:
Expand Down

0 comments on commit a51be37

Please sign in to comment.