From 7f1572350c6fabc30c6fa5bce5f1ae80fecfee7a Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 17 Oct 2023 22:09:47 +0800 Subject: [PATCH 1/2] Drops remote curl check. Curl is required on localhost, not target host. This check could fail the playbook, if curl is missing on remote host (where it is actually not needed). Decided not to reimplement this check on ansible controller, as it may be not that easy (if you run ansible controller on MacOS or in containers). --- roles/grafana_agent/tasks/preflight/download.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/roles/grafana_agent/tasks/preflight/download.yaml b/roles/grafana_agent/tasks/preflight/download.yaml index bcedc4fd..d885c9b6 100644 --- a/roles/grafana_agent/tasks/preflight/download.yaml +++ b/roles/grafana_agent/tasks/preflight/download.yaml @@ -1,14 +1,4 @@ --- -- name: Gather the package facts - ansible.builtin.package_facts: - manager: auto - -- name: Fail if Curl is not installed - ansible.builtin.fail: - msg: "curl is not installed!" - when: "'curl' not in ansible_facts.packages" - - - name: Get Grafana Agent version from Github when: grafana_agent_version == 'latest' and not __grafana_agent_local_install block: From 45df916f22fc0246b18fe02fffeb9c92c384cf3b Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 17 Oct 2023 22:11:42 +0800 Subject: [PATCH 2/2] Update role readme --- roles/grafana_agent/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/grafana_agent/README.md b/roles/grafana_agent/README.md index 04edadfc..6e7eaa94 100644 --- a/roles/grafana_agent/README.md +++ b/roles/grafana_agent/README.md @@ -5,7 +5,9 @@ and Fedora linux distributions. ## Requirements -To use this role, You need a YAML file having the Grafana Agent configuration +Please ensure that `curl` is intalled on Ansible controller. + +To use this role, You need a YAML file having the Grafana Agent configuration. ## Role Variables