netdata / netdata/ansible

Unused var: netdata_repoconfig_url

Open Beginner friendly
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jinja
Stars
21
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I noticed while working on my most recent PR that netdata_repoconfig_url does not appear to be used.

I suspect it's intended to be used at the very least in install-opensuse.yml in this task:

    - name: Add repository configuration
      community.general.zypper_repository:
        name: "netdata-repoconfig"
        repo: "{{ netdata_repository_url }}{{ netdata_release_channel_normalized }}/opensuse/{{ netdata_opensuse_releasever }}/$basearch"
        state: present
        auto_import_keys: true

Note the repo line refers to netdata_repository_url. It should probably be this:

    - name: Add repository configuration
      community.general.zypper_repository:
        name: "netdata-repoconfig"
        repo: "{{ netdata_repoconfig_url }}{{ netdata_release_channel_normalized }}/opensuse/{{ netdata_opensuse_releasever }}/$basearch"
        state: present
        auto_import_keys: true

This appears to be evidence that netdata_repository_url and netdata_repoconfig_url are easy to confuse. Probably for cleanliness we could ditch netdata_repoconfig_url altogether and bring netdata_repository_url back to its root location i.e. https://repo.netdata.cloud

The above task would then look like this:

    - name: Add repository configuration
      community.general.zypper_repository:
        name: "netdata-repoconfig"
        repo: "{{ netdata_repository_url }}/repoconfig/{{ netdata_release_channel_normalized }}/opensuse/{{ netdata_opensuse_releasever }}/$basearch"
        state: present
        auto_import_keys: true

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in install-opensuse.yml at the “Add repository configuration” task, then trace the definitions and other references to netdata_repository_url and netdata_repoconfig_url. Compare the repository and repoconfig URL construction with the variable names and intended paths described in the issue. Done means the unused or confusing variable arrangement is resolved and the openSUSE repository task uses the correct configuration URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.