Skip to content

Commit

Permalink
Support specification of job metrics plugin config in YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Jun 2, 2021
1 parent 528caf4 commit 36fd303
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Expand Up @@ -200,6 +200,9 @@ galaxy_app_config_default:
tool_config_file: "{{ galaxy_tool_config_files | join(',') }}"
shed_tool_config_file: "{{ galaxy_shed_tool_config_file }}"

# Static configs that default to .xml files in the config dir but the role writes as .yml if configured
job_metrics_config_file: "{{ galaxy_config_dir }}/job_metrics_conf.{{ 'yml' if galaxy_job_metrics_plugins is defined else 'xml' }}"

# Everything else
visualization_plugins_directory: "config/plugins/visualizations"

Expand Down
10 changes: 10 additions & 0 deletions tasks/static_setup.yml
Expand Up @@ -72,6 +72,16 @@
label: "{{ galaxy_dynamic_job_rules_dir }}/{{ ((item | dirname) != '') | ternary ((item | dirname) ~ '/', '') }}__init__.py"
with_items: "{{ galaxy_dynamic_job_rules }}"

- name: Create Galaxy Job Metrics configuration file
copy:
dest: "{{ galaxy_config_merged[galaxy_app_config_section].job_metrics_config_file }}"
content: |
---
## This file is managed by Ansible. ALL CHANGES WILL BE OVERWRITTEN.
{{ galaxy_job_metrics_plugins | to_nice_yaml }}
mode: "0644"
when: galaxy_job_metrics_plugins is defined

- name: Create Galaxy configuration file
template:
src: "{{ galaxy_config_file_template }}"
Expand Down

0 comments on commit 36fd303

Please sign in to comment.