Skip to content

Commit

Permalink
rename static
Browse files Browse the repository at this point in the history
  • Loading branch information
mira-miracoli committed Oct 17, 2023
1 parent dda40f2 commit d5d94b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ galaxy_manage_systemd: no # For Galaxy
galaxy_manage_systemd_reports: no # For Reports
galaxy_manage_cleanup: no
galaxy_manage_themes: no
galaxy_manage_static: no
galaxy_manage_subdomain_static: no
galaxy_manage_host_filters: no


Expand Down Expand Up @@ -299,39 +299,39 @@ galaxy_app_config_default:
visualization_plugins_directory: "config/plugins/visualizations"

# Static and themes configuration, will only be added if galaxy_manage_themes
enable_static: "{{ galaxy_manage_static }}"
enable_static: "{{ galaxy_manage_subdomain_static }}"
static_dir_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/'
{% endfor %}
{% endif %} }
static_images_dir_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/images'
{% endfor %}
{% endif %} }
static_welcome_html_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/welcome.html'
{% endfor %}
{% endif %} }
static_scripts_dir_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/scripts'
{% endfor %}
{% endif %} }
static_favicon_dir_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/favicon.ico'
{% endfor %}
{% endif %} }
static_robots_txt_by_host: >
{ {% if galaxy_manage_static %}
{ {% if galaxy_manage_subdomain_static %}
{% for subdomain in galaxy_themes_subdomains %}
'{{ subdomain.name }}.{{ galaxy_themes_instance_domain}}': '{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/robots.txt'
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,18 @@
tags:
- galaxy_manage_cleanup

- name: Include Copy static files
- name: Include create subdomain static dirs and copy static files
ansible.builtin.include_tasks: setup_static_dirs.yml
# fail only if enabled but dictionary is empty
loop: "{{ galaxy_themes_subdomains if galaxy_themes_subdomains|length or \
galaxy_manage_static else [] }}"
loop_control:
loop_var: subdomain
when: galaxy_manage_static
when: galaxy_manage_subdomain_static
tags:
- galaxy_manage_static
- galaxy_manage_subdomain_static

- name: Include Copy themes files
- name: Include copy themes files
ansible.builtin.include_tasks: themes.yml
# fail only if enabled but dictionary is empty
loop: "{{ galaxy_themes_subdomains if galaxy_themes_subdomains|length or \
Expand Down

0 comments on commit d5d94b1

Please sign in to comment.