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

add option to populate google_analytics_4_id value #249

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

copolycube
Copy link

@copolycube copolycube commented Jul 24, 2024

google_analytics_4_id isn't populated in the current j2 grafana.ini template

cf. https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#google_analytics_4_id
(note: other values might be needed)

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2024

CLA assistant check
All committers have signed the CLA.

@ishanjainn
Copy link
Member

cc @gardar

@copolycube
Copy link
Author

copolycube commented Aug 9, 2024

A way to bypass is to manually add a task after the role to edit the file with community.general.ini_file

    - name: Grafana.ini google_analytics_4_id setup
      become: true
      community.general.ini_file: 
        path: /etc/grafana/grafana.ini 
        section: analytics 
        option: google_analytics_4_id 
        value: "{{ lookup('ansible.builtin.env', 'VAR_google_analytics_4_id') }}" 
        backup: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants