Skip to content

Commit df05fce

Browse files
authored
Move _grafana_agent_base_download_url from /vars to /defaults (#77)
1 parent b312623 commit df05fce

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

roles/grafana_agent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All variables which can be overridden are stored in [./defaults/main.yaml](./def
1414
| Variable | Default | Description |
1515
| :------ | :------ | :--------- |
1616
| `grafana_agent_version` | `latest` | version of the agent to install |
17+
| `grafana_agent_base_download_url` | `https://github.com/{{ _grafana_agent_github_org }}/{{ _grafana_agent_github_repo }}/releases/download` | base download url. Github or mirror to download from |
1718
| `grafana_agent_install_dir` | `/opt/grafana-agent/bin` | directory to install the binary to |
1819
| `grafana_agent_binary` | `grafana-agent` | name to use for the binary |
1920
| `grafana_agent_config_dir` | `/etc/grafana-agent` | directory to store the configuration files in |

roles/grafana_agent/defaults/main.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# version of the agent to install
33
grafana_agent_version: latest
44

5+
# base download url. Github or mirror to download from
6+
grafana_agent_base_download_url: "https://github.com/{{ _grafana_agent_github_org }}/{{ _grafana_agent_github_repo }}/releases/download"
7+
58
# directory to install the binary to
69
grafana_agent_install_dir: /opt/grafana-agent/bin
710

roles/grafana_agent/tasks/preflight/download.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
- name: Set the Grafana Agent download URL
2525
ansible.builtin.set_fact:
2626
_grafana_agent_download_url: |-
27-
{{ _grafana_agent_base_download_url }}/v{{ grafana_agent_version }}/{{ _grafana_agent_download_archive_file }}
27+
{{ grafana_agent_base_download_url }}/v{{ grafana_agent_version }}/{{ _grafana_agent_download_archive_file }}
2828
2929
- name: Grafana Agent download URL
3030
ansible.builtin.debug:

roles/grafana_agent/vars/main.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
_grafana_agent_github_org: grafana
33
_grafana_agent_github_repo: agent
4-
_grafana_agent_base_download_url: "https://github.com/{{ _grafana_agent_github_org }}/{{ _grafana_agent_github_repo }}/releases/download"
54

65
# set the go cpu arch
76
_download_cpu_arch_map:

0 commit comments

Comments
 (0)