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

Move _grafana_agent_base_download_url from /vars to /defaults #77

Merged
merged 1 commit into from
Aug 10, 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
1 change: 1 addition & 0 deletions roles/grafana_agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All variables which can be overridden are stored in [./defaults/main.yaml](./def
| Variable | Default | Description |
| :------ | :------ | :--------- |
| `grafana_agent_version` | `latest` | version of the agent to install |
| `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 |
| `grafana_agent_install_dir` | `/opt/grafana-agent/bin` | directory to install the binary to |
| `grafana_agent_binary` | `grafana-agent` | name to use for the binary |
| `grafana_agent_config_dir` | `/etc/grafana-agent` | directory to store the configuration files in |
Expand Down
3 changes: 3 additions & 0 deletions roles/grafana_agent/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# version of the agent to install
grafana_agent_version: latest

# base download url. Github or mirror to download from
grafana_agent_base_download_url: "https://github.com/{{ _grafana_agent_github_org }}/{{ _grafana_agent_github_repo }}/releases/download"

# directory to install the binary to
grafana_agent_install_dir: /opt/grafana-agent/bin

Expand Down
2 changes: 1 addition & 1 deletion roles/grafana_agent/tasks/preflight/download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: Set the Grafana Agent download URL
ansible.builtin.set_fact:
_grafana_agent_download_url: |-
{{ _grafana_agent_base_download_url }}/v{{ grafana_agent_version }}/{{ _grafana_agent_download_archive_file }}
{{ grafana_agent_base_download_url }}/v{{ grafana_agent_version }}/{{ _grafana_agent_download_archive_file }}

- name: Grafana Agent download URL
ansible.builtin.debug:
Expand Down
1 change: 0 additions & 1 deletion roles/grafana_agent/vars/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
_grafana_agent_github_org: grafana
_grafana_agent_github_repo: agent
_grafana_agent_base_download_url: "https://github.com/{{ _grafana_agent_github_org }}/{{ _grafana_agent_github_repo }}/releases/download"

# set the go cpu arch
_download_cpu_arch_map:
Expand Down
Loading