Skip to content

Commit

Permalink
[#267] Add environment variable that indicates whether Google analyti…
Browse files Browse the repository at this point in the history
…cs is enabled or not (#31)

* [#267] Remove duplicate become key.

* [#267] Add new environment variable that allows users to detect  whether Google analytics is enabled or not.

* [#267] Pedantry...

* Integrate feedback from Craig Cooper: reduce nesting of ansible conditionals and pass the value of 'ckan_googleanalytics_enable' as the value of the environment variable CKAN_GOOGLEANALYTICS_ENABLED.

* Enable or disable Google analytics when not running locally.
  • Loading branch information
ntwalibas committed Sep 17, 2024
1 parent 2f89ee4 commit 7239986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions roles/ckan/templates/kubernetes/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ spec:
value: "/usr/lib/ckan/.minikubevenv"
- name: XDG_CACHE_HOME
value: "/usr/lib/ckan/.minikubevenv/cache"
- name: CKAN_GOOGLEANALYTICS_ENABLED
value: "{{ ckan_googleanalytics_enable }}"

image: {{ ckan_image }}:{{ ckan_image_tag }}
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -145,6 +147,8 @@ spec:
value: "{{ ckan_postgres_password }}"
- name: PIPENV_DONT_LOAD_ENV
value: "1"
- name: CKAN_GOOGLEANALYTICS_ENABLED
value: "{{ ckan_googleanalytics_enable }}"
{% if fjelltopp_cloud_provider != 'azure' %}
- name: AWS_DEFAULT_REGION
value: "{{ aws_region }}"
Expand Down
1 change: 0 additions & 1 deletion roles/minikube-setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@
line: "{{ cluster_ip }} {{ app_fqdn }}"
state: present
backup: yes
become: true

0 comments on commit 7239986

Please sign in to comment.