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

Use new standard to configure Grafana APT source #90

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions roles/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `grafana_yum_key` | https://packages.grafana.com/gpg.key | Yum repository gpg key |
| `grafana_rhsm_subscription` | | rhsm subscription name (redhat subscription-manager) |
| `grafana_rhsm_repo` | | rhsm repository name (redhat subscription-manager) |
| `grafana_apt_repo` | deb https://packages.grafana.com/oss/deb stable main | Apt repository string |
| `grafana_apt_key` | https://packages.grafana.com/gpg.key | Apt repository gpg key |
| `grafana_apt_release_channel` | stable | Apt release chanel (stable or beta) |
| `grafana_apt_arch` | {{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }} | Apt architecture |
| `grafana_apt_repo` | deb [arch={{ grafana_apt_arch }} signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com/ {{ grafana_apt_release_channel }} main | Apt repository string |
| `grafana_apt_key` | https://apt.grafana.com/gpg.key | Apt repository gpg key |
| `grafana_instance` | {{ ansible_fqdn \| default(ansible_host) \| default(inventory_hostname) }} | Grafana instance name |
| `grafana_logs_dir` | /var/log/grafana | Path to logs directory |
| `grafana_data_dir` | /var/lib/grafana | Path to database directory |
Expand Down
6 changes: 4 additions & 2 deletions roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
grafana_rhsm_subscription: ""
grafana_rhsm_repo: ""

grafana_apt_repo: "deb https://packages.grafana.com/oss/deb stable main"
grafana_apt_key: "https://packages.grafana.com/gpg.key"
grafana_apt_release_channel: stable
grafana_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
grafana_apt_repo: "deb [arch={{ grafana_apt_arch }} signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com/ {{ grafana_apt_release_channel }} main"

Check warning on line 13 in roles/grafana/defaults/main.yml

View workflow job for this annotation

GitHub Actions / Perform Linting

13:151 [line-length] line too long (159 > 150 characters)
grafana_apt_key: "https://apt.grafana.com/gpg.key"

# Should we use the provisioning capability when possible (provisioning require grafana >= 5.0)
grafana_use_provisioning: true
Expand Down
6 changes: 3 additions & 3 deletions roles/grafana/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
environment: "{{ grafana_environment }}"
block:
- name: "Import Grafana apt gpg key"
ansible.builtin.apt_key:
ansible.builtin.get_url:
url: "{{ grafana_apt_key }}"
state: present
validate_certs: false
dest: /usr/share/keyrings/grafana.key
mode: "0644"

- name: "Add Grafana apt repository"
ansible.builtin.apt_repository:
Expand Down
Loading