From adb266501e7256050ebd55f16ca1e2fbfc820527 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Tue, 23 Jan 2024 15:38:15 -0500 Subject: [PATCH 1/5] add 3.1 ood_portal.yml configs --- .../config/ood_portal.yml.custom.apache2 | 24 ++++++++++++ .../config/ood_portal.yml.custom.httpd | 23 ++++++++++++ .../ood_portal.yml.custom.httpd24-httpd | 23 ++++++++++++ .../config/ood_portal.yml.default.apache2 | 23 ++++++++++++ .../config/ood_portal.yml.default.httpd | 23 ++++++++++++ .../ood_portal.yml.default.httpd24-httpd | 23 ++++++++++++ .../config/ood_portal.yml.oidc.apache2 | 23 ++++++++++++ .../fixtures/config/ood_portal.yml.oidc.httpd | 23 ++++++++++++ .../config/ood_portal.yml.oidc.httpd24-httpd | 23 ++++++++++++ templates/ood_portal.yml.j2 | 37 +++++++++++++++++++ 10 files changed, 245 insertions(+) diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 index 572a9b9..67fa203 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 @@ -43,6 +43,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -163,6 +170,23 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' + +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd index df4eeb1..e0cb8b6 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd @@ -43,6 +43,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -163,6 +170,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd index b349e6f..c455329 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd @@ -43,6 +43,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -163,6 +170,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.apache2 b/molecule/default/fixtures/config/ood_portal.yml.default.apache2 index 308db5b..2f8aede 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.default.apache2 @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -161,6 +168,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.httpd b/molecule/default/fixtures/config/ood_portal.yml.default.httpd index 17f4531..e1c89b2 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.default.httpd @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -161,6 +168,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd index 0779f22..9326c2f 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -161,6 +168,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 b/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 index 6c54ad9..4c724bf 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -162,6 +169,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd index 5d56ac2..5e0ab2b 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -162,6 +169,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd index 7846d7a..337d6e2 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd @@ -42,6 +42,13 @@ port: 80 # Default: null (no SSL support) # Default: null (no SSL support) +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +#disable_logs: false + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -162,6 +169,22 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_vhost_directives: [] + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +#custom_location_directives: [] + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' diff --git a/templates/ood_portal.yml.j2 b/templates/ood_portal.yml.j2 index 22566ea..9b09905 100644 --- a/templates/ood_portal.yml.j2 +++ b/templates/ood_portal.yml.j2 @@ -62,6 +62,15 @@ ssl: # Default: null (no SSL support) {% endif %} +# Disable logging entirely. With this you can have custom log directives +# in a seperate configuration file. +# Example: +# disable_logs: true +# Default: false (logs are enabled) +{% if disable_logs is defined %}disable_logs: {{ disable_logs | bool | lower }} +{% else %}#disable_logs: false +{% endif %} + # Root directory of log files (can be relative ServerRoot) # Example: # logroot: '/path/to/my/logs' @@ -208,6 +217,34 @@ auth: - '{{ auth }}' {% endfor %} +# List of custom apache directives to apply to the entire vhost. +# Note this is an array of strings. +# Example: +# custom_vhost_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +{% if custom_vhost_directives is defined %} +{% for directive in custom_vhost_directives %} +- '{{ directive }}' +{% endfor %} +{% else %} +#custom_vhost_directives: [] +{% endif %} + +# List of custom apache directives to apply to the Locations. +# Note this is an array of strings. +# Example: +# custom_location_directives: +# - 'SetEnv SPECIAL_ENV_VAR custom' +# Default: [] (no custom directives) +{% if custom_location_directives is defined %} +{% for directive in custom_location_directives %} +- '{{ directive }}' +{% endfor %} +{% else %} +#custom_location_directives: [] +{% endif %} + # Redirect user to the following URI when accessing root URI # Example: # root_uri: '/my_uri' From 237f23d6b1cb6c0be016bcf20e30330ae85456b5 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Tue, 23 Jan 2024 15:40:30 -0500 Subject: [PATCH 2/5] rm centos:7 support --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f9a041..a274256 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,6 @@ jobs: max-parallel: 4 matrix: image: - - 'centos:7' - 'centos:8' - 'rockylinux:8' - 'rockylinux:9' From 1076ad2ffcaea7a976adde2bb83af7fcc67b1c55 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 29 Jan 2024 15:11:41 -0500 Subject: [PATCH 3/5] fix this template and add test cases for this feature --- .../fixtures/config/ood_portal.yml.custom.apache2 | 9 ++++++--- .../default/fixtures/config/ood_portal.yml.custom.httpd | 8 ++++++-- .../fixtures/config/ood_portal.yml.custom.httpd24-httpd | 8 ++++++-- molecule/default/vars/portal.yml | 8 ++++++++ templates/ood_portal.yml.j2 | 2 ++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 index 67fa203..d6b712e 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 @@ -170,14 +170,16 @@ auth: - 'RequestHeader unset Authorization' - 'Require valid-user' - # List of custom apache directives to apply to the entire vhost. # Note this is an array of strings. # Example: # custom_vhost_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_vhost_directives: [] +custom_vhost_directives: +- '' +- ' SetEnv SPECIAL_PATH /foo/bin' +- '' # List of custom apache directives to apply to the Locations. # Note this is an array of strings. @@ -185,7 +187,8 @@ auth: # custom_location_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_location_directives: [] +custom_location_directives: +- 'SetEnv SPECIAL_PATH /foo/bin' # Redirect user to the following URI when accessing root URI # Example: diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd index e0cb8b6..06568df 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd @@ -176,7 +176,10 @@ auth: # custom_vhost_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_vhost_directives: [] +custom_vhost_directives: +- '' +- ' SetEnv SPECIAL_PATH /foo/bin' +- '' # List of custom apache directives to apply to the Locations. # Note this is an array of strings. @@ -184,7 +187,8 @@ auth: # custom_location_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_location_directives: [] +custom_location_directives: +- 'SetEnv SPECIAL_PATH /foo/bin' # Redirect user to the following URI when accessing root URI # Example: diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd index c455329..4eaaa7b 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd @@ -176,7 +176,10 @@ auth: # custom_vhost_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_vhost_directives: [] +custom_vhost_directives: +- '' +- ' SetEnv SPECIAL_PATH /foo/bin' +- '' # List of custom apache directives to apply to the Locations. # Note this is an array of strings. @@ -184,7 +187,8 @@ auth: # custom_location_directives: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) -#custom_location_directives: [] +custom_location_directives: +- 'SetEnv SPECIAL_PATH /foo/bin' # Redirect user to the following URI when accessing root URI # Example: diff --git a/molecule/default/vars/portal.yml b/molecule/default/vars/portal.yml index f7d37a9..3fbd683 100644 --- a/molecule/default/vars/portal.yml +++ b/molecule/default/vars/portal.yml @@ -14,6 +14,14 @@ security_strict_transport: true pun_pre_hook_exports: 'OIDC_ACCESS_TOKEN,OIDC_CLAIM_EMAIL' pun_pre_hook_root_cmd: '/opt/site/site_pre_hook' +custom_vhost_directives: + - '' + - ' SetEnv SPECIAL_PATH /foo/bin' + - '' + +custom_location_directives: + - 'SetEnv SPECIAL_PATH /foo/bin' + server_aliases: - other-site.notrealdoman.edu diff --git a/templates/ood_portal.yml.j2 b/templates/ood_portal.yml.j2 index 9b09905..803892d 100644 --- a/templates/ood_portal.yml.j2 +++ b/templates/ood_portal.yml.j2 @@ -224,6 +224,7 @@ auth: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) {% if custom_vhost_directives is defined %} +custom_vhost_directives: {% for directive in custom_vhost_directives %} - '{{ directive }}' {% endfor %} @@ -238,6 +239,7 @@ auth: # - 'SetEnv SPECIAL_ENV_VAR custom' # Default: [] (no custom directives) {% if custom_location_directives is defined %} +custom_location_directives: {% for directive in custom_location_directives %} - '{{ directive }}' {% endfor %} From 0fb9a6ba470aa9872f2c7ace1d5ed4e7fc38cf2c Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 29 Jan 2024 15:34:03 -0500 Subject: [PATCH 4/5] make this a real file --- defaults/main/{.ondemand.yml => ondemand.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename defaults/main/{.ondemand.yml => ondemand.yml} (100%) diff --git a/defaults/main/.ondemand.yml b/defaults/main/ondemand.yml similarity index 100% rename from defaults/main/.ondemand.yml rename to defaults/main/ondemand.yml From e1d01cde023f6fffd2a6ff95d2478e9e6d8a07fc Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Tue, 30 Jan 2024 15:23:35 -0500 Subject: [PATCH 5/5] add support for 3.1 (and 3.0) ondemand.d configs --- defaults/main/ondemand.yml | 25 ++++++ .../default/fixtures/ondemand.d/ondemand.yml | 37 +++++++++ .../fixtures/ondemand.d/ondemand_custom.yml | 76 +++++++++++++++++++ .../fixtures/ondemand.d/ondemand_default.yml | 30 ++++++++ molecule/default/tasks/verify_custom.yml | 2 +- molecule/default/tasks/verify_default.yml | 21 +++-- molecule/default/vars/ondemand.yml | 34 +++++++++ templates/ondemand.yml.j2 | 43 +++++++++++ 8 files changed, 259 insertions(+), 9 deletions(-) create mode 100644 molecule/default/fixtures/ondemand.d/ondemand_custom.yml create mode 100644 molecule/default/fixtures/ondemand.d/ondemand_default.yml diff --git a/defaults/main/ondemand.yml b/defaults/main/ondemand.yml index 427054f..e8470cf 100644 --- a/defaults/main/ondemand.yml +++ b/defaults/main/ondemand.yml @@ -68,3 +68,28 @@ # - profile: "team1" # title: "Team 1" # icon: "fas://user" + +files_enable_shell_button: true +bc_dynamic_js: false +bc_clean_old_dirs: false +bc_clean_old_dirs_days: 30 +host_based_profiles: false +disable_bc_shell: false +cancel_session_enabled: false + +# module_file_dir: null +# user_settings_file: ~/.config/ondemand/settings.yml +# facl_domain: null +# auto_groups_filter: null + +bc_simple_auto_accounts: false +remote_files_enabled: false +remote_files_validation: false +upload_enabled: true +download_enabled: true +hide_app_version: false + +# globus_endpoints: null +# google_analytics_tag_id: null + +motd_render_html: false diff --git a/molecule/default/fixtures/ondemand.d/ondemand.yml b/molecule/default/fixtures/ondemand.d/ondemand.yml index f6cf2f9..7b7b5e4 100644 --- a/molecule/default/fixtures/ondemand.d/ondemand.yml +++ b/molecule/default/fixtures/ondemand.d/ondemand.yml @@ -37,3 +37,40 @@ support_ticket: to: support@example.com + + +files_enable_shell_button: false +bc_dynamic_js: true +bc_clean_old_dirs: true +bc_clean_old_dirs_days: 10 +host_based_profiles: true +disable_bc_shell: true +cancel_session_enabled: true + +module_file_dir: /etc/modules.d + +user_settings_file: <%= CurrentUser.home %>/.local/config/ondemand/settings.yml + +facl_domain: osu.edu + +auto_groups_filter: P.+ + +bc_simple_auto_accounts: true +remote_files_enabled: true +remote_files_validation: true +upload_enabled: false +download_enabled: false +hide_app_version: true + +globus_endpoints: + - endpoint: 716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx + endpoint_path: / + path: <%= CurrentUser.home %> + - endpoint: 9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx + endpoint_path: / + path: /project + + +google_analytics_tag_id: abc123 + +motd_render_html: true diff --git a/molecule/default/fixtures/ondemand.d/ondemand_custom.yml b/molecule/default/fixtures/ondemand.d/ondemand_custom.yml new file mode 100644 index 0000000..7b7b5e4 --- /dev/null +++ b/molecule/default/fixtures/ondemand.d/ondemand_custom.yml @@ -0,0 +1,76 @@ + +pinned_apps_menu_length: 10 + +pinned_apps_group_by: "category" + +pinned_apps: + - usr/* + - field_of_science: biology + - category: system + type: dev + - category: minimal + field_of_science: biology + subcategory: class_instruction + type: sys + + +dashboard_layout: + rows: + - columns: + - widgets: + - pinned_apps + - motd + width: 8 + - widgets: + - xdmod_widget_job_efficiency + - xdmod_widget_jobs + width: 4 + + +support_ticket: + attachments: + max_items: 4 + max_size: 6291456 + description: 'My optional description Text for the support ticket feture ' + email: + from: config@example.com + to: support@example.com + + + + +files_enable_shell_button: false +bc_dynamic_js: true +bc_clean_old_dirs: true +bc_clean_old_dirs_days: 10 +host_based_profiles: true +disable_bc_shell: true +cancel_session_enabled: true + +module_file_dir: /etc/modules.d + +user_settings_file: <%= CurrentUser.home %>/.local/config/ondemand/settings.yml + +facl_domain: osu.edu + +auto_groups_filter: P.+ + +bc_simple_auto_accounts: true +remote_files_enabled: true +remote_files_validation: true +upload_enabled: false +download_enabled: false +hide_app_version: true + +globus_endpoints: + - endpoint: 716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx + endpoint_path: / + path: <%= CurrentUser.home %> + - endpoint: 9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx + endpoint_path: / + path: /project + + +google_analytics_tag_id: abc123 + +motd_render_html: true diff --git a/molecule/default/fixtures/ondemand.d/ondemand_default.yml b/molecule/default/fixtures/ondemand.d/ondemand_default.yml new file mode 100644 index 0000000..09d73db --- /dev/null +++ b/molecule/default/fixtures/ondemand.d/ondemand_default.yml @@ -0,0 +1,30 @@ + + + + + + + + +files_enable_shell_button: true +bc_dynamic_js: false +bc_clean_old_dirs: false +bc_clean_old_dirs_days: 30 +host_based_profiles: false +disable_bc_shell: false +cancel_session_enabled: false + + + + + +bc_simple_auto_accounts: false +remote_files_enabled: false +remote_files_validation: false +upload_enabled: true +download_enabled: true +hide_app_version: false + + + +motd_render_html: false diff --git a/molecule/default/tasks/verify_custom.yml b/molecule/default/tasks/verify_custom.yml index a269032..a51bccc 100644 --- a/molecule/default/tasks/verify_custom.yml +++ b/molecule/default/tasks/verify_custom.yml @@ -10,7 +10,7 @@ - { src: "fixtures/apps/files.env", dest: "files.env" } - { src: "fixtures/apps/bc_desktop/", dest: "bc_desktop/" } - { src: "fixtures/config/auth_openidc.conf", dest: "auth_openidc.conf" } - - { src: "fixtures/ondemand.d/ondemand.yml", dest: "ondemand.yml" } + - { src: "fixtures/ondemand.d/ondemand_custom.yml", dest: "ondemand.yml" } - name: Verify config files ansible.builtin.command: "diff /tmp/{{ item.left }} {{ item.right }}" diff --git a/molecule/default/tasks/verify_default.yml b/molecule/default/tasks/verify_default.yml index c17644b..9c92f48 100644 --- a/molecule/default/tasks/verify_default.yml +++ b/molecule/default/tasks/verify_default.yml @@ -1,8 +1,13 @@ -- name: Verify ondemand.d/ondemand.yml file is empty - ansible.builtin.shell: | - if [[ -n $(grep '[^[:space:]]' /etc/ood/config/ondemand.d/ondemand.yml) ]]; then - false - fi - args: - executable: /bin/bash - changed_when: false +- name: Copy custom cluster files to container + ansible.builtin.copy: + src: "{{ item.src }}" + dest: "/tmp/{{ item.dest }}" + mode: 'u=rw,g=r,o=r' + with_items: + - { src: "fixtures/ondemand.d/ondemand_default.yml", dest: "ondemand.yml" } + +- name: Verify config files + ansible.builtin.command: "diff /tmp/{{ item.left }} {{ item.right }}" + with_items: + - { left: "ondemand.yml", right: "{{ ood_base_conf_dir }}/ondemand.d/ondemand.yml" } + changed_when: false \ No newline at end of file diff --git a/molecule/default/vars/ondemand.yml b/molecule/default/vars/ondemand.yml index bfff88c..cec82e8 100644 --- a/molecule/default/vars/ondemand.yml +++ b/molecule/default/vars/ondemand.yml @@ -32,3 +32,37 @@ support_ticket: email: from: config@example.com to: support@example.com + +files_enable_shell_button: false +bc_dynamic_js: true +bc_clean_old_dirs: true +bc_clean_old_dirs_days: 10 +host_based_profiles: true +disable_bc_shell: true +cancel_session_enabled: true + +module_file_dir: "/etc/modules.d" +user_settings_file: "<%= CurrentUser.home %>/.local/config/ondemand/settings.yml" +facl_domain: "osu.edu" +auto_groups_filter: "P.+" + + +bc_simple_auto_accounts: true +remote_files_enabled: true +remote_files_validation: true +upload_enabled: false +download_enabled: false +hide_app_version: true + +globus_endpoints: + - path: "<%= CurrentUser.home %>" + endpoint: "716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/" + + - path: "/project" + endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/" + +google_analytics_tag_id: 'abc123' + +motd_render_html: true diff --git a/templates/ondemand.yml.j2 b/templates/ondemand.yml.j2 index 86da4c0..0972efb 100644 --- a/templates/ondemand.yml.j2 +++ b/templates/ondemand.yml.j2 @@ -26,3 +26,46 @@ support_ticket: help_menu: {{ help_menu | to_nice_yaml(indent=2) | indent(2) }} {% endif %} + + +files_enable_shell_button: {{ files_enable_shell_button | bool | lower }} +bc_dynamic_js: {{ bc_dynamic_js | bool | lower }} +bc_clean_old_dirs: {{ bc_clean_old_dirs | bool | lower }} +bc_clean_old_dirs_days: {{ bc_clean_old_dirs_days | int }} +host_based_profiles: {{ host_based_profiles | bool | lower }} +disable_bc_shell: {{ disable_bc_shell | bool | lower }} +cancel_session_enabled: {{ cancel_session_enabled | bool | lower }} + +{% if module_file_dir is defined %} +module_file_dir: {{ module_file_dir }} +{% endif %} + +{% if user_settings_file is defined %} +user_settings_file: {{ user_settings_file }} +{% endif %} + +{% if facl_domain is defined %} +facl_domain: {{ facl_domain }} +{% endif %} + +{% if auto_groups_filter is defined %} +auto_groups_filter: {{ auto_groups_filter }} +{% endif %} + +bc_simple_auto_accounts: {{ bc_simple_auto_accounts | bool | lower }} +remote_files_enabled: {{ remote_files_enabled | bool | lower }} +remote_files_validation: {{ remote_files_validation | bool | lower }} +upload_enabled: {{ upload_enabled | bool | lower }} +download_enabled: {{ download_enabled | bool | lower }} +hide_app_version: {{ hide_app_version | bool | lower }} + +{% if globus_endpoints is defined %} +globus_endpoints: + {{ globus_endpoints | to_nice_yaml(indent=2) | indent(2) }} +{% endif %} + +{% if google_analytics_tag_id is defined %} +google_analytics_tag_id: {{ google_analytics_tag_id }} +{% endif %} + +motd_render_html: {{ motd_render_html | bool | lower }}