Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more flexible ondemand.d configurations. #258

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main/ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ hide_app_version: false
# google_analytics_tag_id: null

motd_render_html: false

# ood_ondemand_d_configs: {}
1 change: 1 addition & 0 deletions molecule/default/fixtures/ondemand.d/motd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
motd_render_html: true
2 changes: 2 additions & 0 deletions molecule/default/tasks/verify_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- { src: "fixtures/apps/bc_desktop/", dest: "bc_desktop/" }
- { src: "fixtures/config/auth_openidc.conf", dest: "auth_openidc.conf" }
- { src: "fixtures/ondemand.d/ondemand_custom.yml", dest: "ondemand.yml" }
- { src: "fixtures/ondemand.d/motd.yml", dest: "motd.yml" }

- name: Verify config files
ansible.builtin.command: "diff /tmp/{{ item.left }} {{ item.right }}"
Expand All @@ -23,6 +24,7 @@
- { left: "bc_desktop/submit/submit.yml.erb", right: "{{ ood_base_conf_dir }}/apps/bc_desktop/submit/submit.yml.erb" }
- { left: "auth_openidc.conf", right: "{{ apache_conf_dir }}/auth_openidc.conf" }
- { left: "ondemand.yml", right: "{{ ood_base_conf_dir }}/ondemand.d/ondemand.yml" }
- { left: "motd.yml", right: "{{ ood_base_conf_dir }}/ondemand.d/motd.yml" }
changed_when: false

- name: Verify sys/jupyter was installed correctly
Expand Down
5 changes: 5 additions & 0 deletions molecule/default/vars/ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ globus_endpoints:
google_analytics_tag_id: 'abc123'

motd_render_html: true

ood_ondemand_d_configs:
motd:
content:
motd_render_html: true
10 changes: 10 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
dest: "{{ ood_base_conf_dir }}/ondemand.d/ondemand.yml"
mode: 'u=rw,g=r,o=r'

- name: Create other ondemand.d files
copy:
content: "{{ ood_ondemand_d_configs[item].content | to_nice_yaml }}"
dest: "{{ ood_base_conf_dir }}/ondemand.d/{{ item }}.yml"
mode: "{{ ood_ondemand_d_configs[item].mode | default('644') }}"
group: "{{ ood_ondemand_d_configs[item].group | default('root') }}"
loop: "{{ ood_ondemand_d_configs | list | default([]) }}"
when: ood_ondemand_d_configs is defined


- name: Enable Debian apache mods
ansible.builtin.file:
src: "{{ apache_etc_dir }}/mods-available/{{ item }}.load"
Expand Down
Loading