diff --git a/defaults/debian-debian.yml b/defaults/debian-debian.yml index 06d8710..671bfdb 100644 --- a/defaults/debian-debian.yml +++ b/defaults/debian-debian.yml @@ -6,5 +6,3 @@ grafana_apt_dependencies: - apt-transport-https - -grafana_apt_distribution: "{{ ansible_distribution_release | lower }}" diff --git a/defaults/debian-ubuntu.yml b/defaults/debian-ubuntu.yml index 4869e97..5a9e1e2 100644 --- a/defaults/debian-ubuntu.yml +++ b/defaults/debian-ubuntu.yml @@ -5,5 +5,3 @@ # grafana_apt_dependencies: [] - -grafana_apt_distribution: wheezy diff --git a/defaults/main.yml b/defaults/main.yml index d0e791b..4e13067 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,8 @@ # defaults file # +grafana_version: 5.4.3 +grafana_gpg_key_id: 24098CB6 grafana_admin_password: admin grafana_admin_user: admin grafana_conf_file: /etc/grafana/grafana.ini diff --git a/tasks/debug.yml b/tasks/debug.yml index 2a4f440..ed847d4 100644 --- a/tasks/debug.yml +++ b/tasks/debug.yml @@ -11,7 +11,6 @@ - grafana_admin_password - grafana_admin_user - grafana_apt_dependencies - - grafana_apt_distribution - grafana_conf_data - grafana_conf_file - grafana_default diff --git a/tasks/main.yml b/tasks/main.yml index a5aa7e3..6d3d186 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,15 +28,15 @@ - name: ensure grafana apt key is present apt_key: - url=https://packagecloud.io/gpg.key - id=D59097AB + url=https://packages.grafana.com/gpg.key + id="{{ grafana_gpg_key_id }}" state=present become: yes tags: [ apt ] - name: ensure grafana apt repository is present apt_repository: - repo="deb https://packagecloud.io/grafana/stable/{{ ansible_os_family | lower }}/ {{ grafana_apt_distribution }} main" + repo="deb https://packages.grafana.com/oss/deb stable main" update_cache=yes state=present become: yes @@ -44,7 +44,7 @@ - name: ensure grafana is installed apt: - name=grafana + name="grafana={{ grafana_version }}" state=present become: yes tags: installation @@ -79,7 +79,7 @@ mode=0755 state=directory become: yes - + - name: ensure grafana directories ownership and permissions file: path="{{ item }}" diff --git a/tasks/validation.yml b/tasks/validation.yml index b850511..893d4ff 100644 --- a/tasks/validation.yml +++ b/tasks/validation.yml @@ -12,7 +12,6 @@ - grafana_admin_password - grafana_admin_user - grafana_apt_dependencies - - grafana_apt_distribution - grafana_conf_data - grafana_conf_file - grafana_default