Skip to content
This repository was archived by the owner on May 31, 2023. It is now read-only.

Commit 420e079

Browse files
committed
simplify installation; use official ARM builds; remove http_proxy
1 parent 7c09f80 commit 420e079

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

tasks/install.yml

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
package:
1313
name: grafana-data
1414
state: absent
15-
register: old_grafana_pkgs
15+
register: _old_grafana_pkgs
1616

1717
- name: Clean apt cache
1818
command: apt clean
1919
when:
20-
- old_grafana_pkgs is changed
20+
- _old_grafana_pkgs is changed
2121
- ansible_pkg_mgr == "apt"
2222

2323
- name: Add Grafana repository file [RHEL/CentOS]
@@ -34,50 +34,16 @@
3434
url: "https://packagecloud.io/gpg.key"
3535
state: present
3636
validate_certs: false
37-
register: _add_apt_key_x86
38-
until: _add_apt_key_x86 is succeeded
37+
register: _add_apt_key
38+
until: _add_apt_key is succeeded
3939
retries: 5
4040
delay: 2
41-
environment:
42-
http_proxy: "{{ http_proxy | default('') }}"
43-
https_proxy: "{{ https_proxy | default('') }}"
44-
when: ansible_architecture == "x86_64"
4541

4642
- name: Add Grafana repository [Debian/Ubuntu]
4743
apt_repository:
48-
repo: deb https://packagecloud.io/grafana/stable/debian/ jessie main
44+
repo: deb https://packagecloud.io/grafana/stable/debian/ stretch main
4945
state: present
50-
update_cache: false
51-
register: _apt_add_repo_x86
52-
when: ansible_architecture == "x86_64"
53-
54-
- name: Import Grafana GPG signing key [Raspbian]
55-
apt_key:
56-
url: "https://bintray.com/user/downloadSubjectPublicKey?username=bintray"
57-
state: present
58-
validate_certs: false
59-
register: _add_apt_key_arm
60-
until: _add_apt_key_arm is succeeded
61-
retries: 5
62-
delay: 2
63-
when: ansible_architecture == "armv6l" or ansible_architecture == "armv7l"
64-
65-
- name: Add Grafana repository [Raspbian]
66-
apt_repository:
67-
repo: "deb {% if ansible_architecture == 'armv6l' %}https://dl.bintray.com/fg2it/deb-rpi-1b{% else %}https://dl.bintray.com/fg2it/deb{% endif %} {{ ansible_distribution_release }} main"
68-
state: present
69-
update_cache: false
70-
register: _apt_add_repo_arm
71-
when: ansible_architecture == "armv6l" or ansible_architecture == "armv7l"
72-
73-
- name: Update Apt cache
74-
apt:
7546
update_cache: true
76-
when:
77-
- ( _apt_add_repo_x86 is changed ) or
78-
( _apt_add_repo_arm is changed ) or
79-
( _add_apt_key_x86 is changed ) or
80-
( _add_apt_key_arm is changed )
8147
register: _update_apt_cache
8248
until: _update_apt_cache is succeeded
8349
retries: 5

0 commit comments

Comments
 (0)