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

Problem with zypper_repository when using .repos #1791

Closed
JensHeinrich opened this issue Feb 11, 2021 · 4 comments · Fixed by #3474
Closed

Problem with zypper_repository when using .repos #1791

JensHeinrich opened this issue Feb 11, 2021 · 4 comments · Fixed by #3474
Labels
bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type)

Comments

@JensHeinrich
Copy link

Summary

When using the zypper_repository module with a repo like http://download.opensuse.org/repositories/server:/monitoring/SLE_15_SP1/server:monitoring.repo will fail after the second run.

I have no idea, how this might be fixed other than the option to provide a name attribute to the task an prefer it when the repo is an URL

Issue Type

Bug Report

Component Name

zypper_repository

Ansible Version

ansible 2.10.4
...
  python version = 3.7.9 (default, Jan  5 2021, 01:21:20) [Clang 8.0.1 (tags/RELEASE_801/final 366581)]

Configuration


OS / Environment

No response

Steps To Reproduce

---
- hosts: all
  become: true
  tasks:

    - community.general.zypper_repository:
        name: server_monitoring
        state: absent

    - community.general.zypper_repository:
        repo: "http://download.opensuse.org/repositories/server:/monitoring/SLE_15_SP1/server:monitoring.repo"
        state: present
 
    - community.general.zypper_repository:
        repo: "http://download.opensuse.org/repositories/server:/monitoring/SLE_15_SP1/server:monitoring.repo"
        state: present

Expected Results

Expected result for first task is undefined
Second should add the repo
Third should register as ok

Actual Results

FAILED! => {"changed": false, "msg": "Zypper failed with rc 4", "rc": 4, "repodata": {"alias": null, "autorefresh": "1", "enabled": "1", "gpgcheck": "1", "name": null, "priority": null, "url": "http://download.opensuse.org/repositories/server:/monitoring/SLE_15_SP1/server:monitoring.repo"}, "state": "present", "stderr": "Ein Repository namens 'server_monitoring' ist bereits vorhanden. Verwenden Sie einen anderen Alias.\n", "stderr_lines": ["Ein Repository namens 'server_monitoring' ist bereits vorhanden. Verwenden Sie einen anderen Alias."], "stdout": "", "stdout_lines": []}

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

cc @matze
click here for bot help

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type) labels Feb 11, 2021
@wombelix
Copy link
Contributor

As far I can see, no one is working on this Issues already, so I will give it a try during the ongoing Ansible Summit / Hackathon

@ansibullbot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type)
Projects
None yet
3 participants