Skip to content

Commit 084e5ef

Browse files
committed
Merge branch 'andreasgerstmayr-permit-grafana-pcp-plugin-ids'
2 parents 4017e49 + e822530 commit 084e5ef

File tree

3 files changed

+1193
-11
lines changed

3 files changed

+1193
-11
lines changed

roles/grafana/tasks/main.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,29 @@
1717
name: "{{ __grafana_packages + __grafana_packages_extra }}"
1818
state: present
1919

20-
- name: Template Grafana configuration
20+
- name: Get package facts now that Grafana is installed
21+
package_facts:
22+
manager: "auto"
23+
24+
- name: Get Grafana version number from installed packages
25+
set_fact:
26+
grafana_version: "{{ ansible_facts.packages.grafana[0].version }}"
27+
28+
- name: Template Grafana v7 configuration
2129
template:
22-
src: grafana.ini.j2
30+
src: grafana_7.ini.j2
2331
dest: "{{ __grafana_conf }}"
2432
mode: 0640
2533
notify: restart grafana
34+
when: grafana_version is version('9.0.0', '<')
35+
36+
- name: Template Grafana v9 configuration
37+
template:
38+
src: grafana_9.ini.j2
39+
dest: "{{ __grafana_conf }}"
40+
mode: 0640
41+
notify: restart grafana
42+
when: grafana_version is version('9.0.0', '>=')
2643

2744
- name: Ensure Grafana configuration directory exists
2845
file:
@@ -46,14 +63,6 @@
4663
state: started
4764
enabled: yes
4865

49-
- name: Get package facts now that Grafana is installed
50-
package_facts:
51-
manager: "auto"
52-
53-
- name: Get Grafana version number from installed packages
54-
set_fact:
55-
grafana_version: "{{ ansible_facts.packages.grafana[0].version }}"
56-
5766
# yamllint disable rule:line-length
5867
- name: Ensure graphing service settings are configured by HTTP POST
5968
uri:

roles/grafana/templates/grafana.ini.j2 renamed to roles/grafana/templates/grafana_7.ini.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ disable_sanitize_html = false
770770
enable_alpha = false
771771
app_tls_skip_verify_insecure = false
772772
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
773-
allow_loading_unsigned_plugins = pcp-redis-datasource
773+
allow_loading_unsigned_plugins = performancecopilot-pcp-app,pcp-redis-datasource,pcp-vector-datasource,pcp-bpftrace-datasource,pcp-flamegraph-panel,pcp-breadcrumbs-panel,pcp-troubleshooting-panel,performancecopilot-redis-datasource,performancecopilot-vector-datasource,performancecopilot-bpftrace-datasource,performancecopilot-flamegraph-panel,performancecopilot-breadcrumbs-panel,performancecopilot-troubleshooting-panel
774774
marketplace_url = https://grafana.com/grafana/plugins/
775775

776776
#################################### Grafana Image Renderer Plugin ##########################

0 commit comments

Comments
 (0)