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

Feature Request: Update Repository Configuration to Use yum_repository Module #483

Open
Codehunter-py opened this issue Dec 10, 2024 · 0 comments

Comments

@Codehunter-py
Copy link

As a DevOps engineer, I want to configure the repository using the yum_repository module instead of the get_url module. This will ensure that the repository points to our internal Docker proxy server, rather than importing a file that references external mirrors.
Current Behavior:
The current implementation uses get_url to download a repository file and save it locally:

- name: Add Docker repository.
  get_url:
    url: "{{ docker_yum_repo_url }}"
    dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
    owner: root
    group: root
    mode: 0644
  when: docker_add_repo | bool

Requested Change:
Replace the get_url module with the yum_repository module to define the repository directly within the playbook.
Benefits:

  • Centralized Configuration: Enables dynamic and maintainable repository management without relying on pre-configured files.
  • Alignment with Proxy Server: Ensures repositories directly point to the internal proxy server, avoiding external dependencies.
  • Improved Readability: Simplifies understanding of the repository configuration, as it's explicitly defined in the playbook.

Suggested Implementation:

- name: Add Docker repository using yum_repository.
  yum_repository:
    name: "docker-{{ docker_edition }}"
    description: "Docker CE Repository"
    baseurl: "{{ docker_proxy_url }}"
    gpgkey: "{{ docker_yum_gpg_key }}"
    enabled: true
    gpgcheck: true
  when: docker_add_repo | bool

This change will align our repository management with best practices and internal infrastructure requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant