grafana: Change the repository URL. Fix the apt: tasks.

This commit is contained in:
Andrea Dell'Amico 2019-08-05 12:06:32 +02:00
parent bb1191d585
commit 2834abc140
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
--- ---
grafana_repo_key: https://packagecloud.io/gpg.key grafana_repo_key: https://packages.grafana.com/gpg.key
grafana_repo: 'deb https://packagecloud.io/grafana/testing/debian/ wheezy main' grafana_repo: 'deb https://packages.grafana.com/oss/deb stable main'
grafana_pkg_state: latest grafana_pkg_state: latest
grafana_packages: grafana_packages:
- grafana - grafana

View File

@ -4,8 +4,7 @@
service: name=grafana-server state=stopped enabled=no service: name=grafana-server state=stopped enabled=no
- name: Remove the grafana deb packages - name: Remove the grafana deb packages
apt: name='{{ item }}' state=absent apt: name={{ grafana_packages }} state=absent
with_items: '{{ grafana_packages }}'
- name: Install the grafana deb repository - name: Install the grafana deb repository
apt_repository: repo='{{ grafana_repo }}' state=absent update_cache=yes apt_repository: repo='{{ grafana_repo }}' state=absent update_cache=yes
@ -21,8 +20,7 @@
apt_repository: repo='{{ grafana_repo }}' state=present update_cache=yes apt_repository: repo='{{ grafana_repo }}' state=present update_cache=yes
- name: Install the grafana deb packages - name: Install the grafana deb packages
apt: name='{{ item }}' state={{ grafana_pkg_state }} update_cache=yes cache_valid_time=1800 apt: name={{ grafana_packages }} state={{ grafana_pkg_state }} update_cache=yes cache_valid_time=1800
with_items: '{{ grafana_packages }}'
- name: Install the grafana configuration files - name: Install the grafana configuration files
template: src={{ item }}.j2 dest=/etc/grafana/{{ item }} mode=0440 owner=root group=grafana template: src={{ item }}.j2 dest=/etc/grafana/{{ item }} mode=0440 owner=root group=grafana