# Module failed: dnf repolist parse failure: parsed another repo id before next status

**URL:** <https://forum.ansible.com/t/module-failed-dnf-repolist-parse-failure-parsed-another-repo-id-before-next-status/44570>\
**Category:** Get Help\
**Created:** [September 27, 2025, 10:06am UTC](https://forum.ansible.com/t/module-failed-dnf-repolist-parse-failure-parsed-another-repo-id-before-next-status/44570 "2025-09-27T10:06:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dulux-Oz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulux-oz/32/9047_2.png) [@Dulux-Oz](https://forum.ansible.com/u/Dulux-Oz)\
**Post date:** [September 27, 2025, 10:06am UTC](https://forum.ansible.com/t/module-failed-dnf-repolist-parse-failure-parsed-another-repo-id-before-next-status/44570/1 "2025-09-27T10:06:57Z")

</div>

Hi All,

Could some please explain to me the following error message - I don’t understand it (or, more accurately, I don’t understand it well enough to fix it):

```auto
[ERROR]: Task failed: Module failed: dnf repolist parse failure: parsed another repo id before next status

```

This was caused by the following task (which, you’ll note, is a direct copy from the module’s webpage, apart from the actual task name):

```auto
- name: Enable CRB Repo
  community.general.dnf_config_manager:
    name: crb
    state: enabled

```

Thanks in advance

Cheers  
Dulux-Oz

---

<div class="post-metadata">

**Author:** ![flowerysong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/flowerysong/32/2305_2.png) [@flowerysong](https://forum.ansible.com/u/flowerysong)\
**Post date:** [September 27, 2025, 4:48pm UTC](https://forum.ansible.com/t/module-failed-dnf-repolist-parse-failure-parsed-another-repo-id-before-next-status/44570/2 "2025-09-27T16:48:29Z")

</div>

Well, what output do you get from `dnf repolist --all --verbose`? [This line](https://github.com/ansible-collections/community.general/blob/e9b1788bb9390f7d27852bc6c8da213d71d581d8/plugins/modules/dnf_config_manager.py#L136) runs that, then the following code steps through the output and matches it against the regexes. Look for two lines in the output that match `^Repo-id\s*:\s*(\S+)$` without a line matching `^Repo-status\s*:\s*(disabled|enabled)$` in between.

---

<div class="post-metadata">

**Author:** ![Dulux-Oz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulux-oz/32/9047_2.png) [@Dulux-Oz](https://forum.ansible.com/u/Dulux-Oz)\
**Post date:** [September 29, 2025, 9:24am UTC](https://forum.ansible.com/t/module-failed-dnf-repolist-parse-failure-parsed-another-repo-id-before-next-status/44570/3 "2025-09-29T09:24:10Z")

</div>

Hi @flowerysong, and thanks for getting back to me.

So, I got rid of all of the `*.repo` files except for `rocky.repo` (in an effort to minimise the resulting data) and ran the `dnf repolist --all --verbose` command. Results are as follows:

```auto
Loaded plugins: builddep, changelog, config-manager, copr, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, system-upgrade
DNF version: 4.20.0
cachedir: /var/cache/dnf
Last metadata expiration check: 0:59:03 ago on Mon 29 Sep 2025 16:32:14.
Repo-id : appstream
Repo-name : Rocky Linux 10 - AppStream
Repo-status : enabled
Repo-revision : 10
Repo-distro-tags : [cpe:/o:rocky:rocky:10]: , , 0, 1, L, R, c, i, k, n, o, u, x, y
Repo-updated : Sat 27 Sep 2025 20:15:21
Repo-pkgs : 5,453
Repo-available-pkgs: 5,453
Repo-size : 12 G
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-10
Repo-baseurl : https://rockylinux.mirror.digitalpacific.com.au/10.0/AppStream/x86_64/os/ (5 more)
Repo-expire : 21,600 second(s) (last: Mon 29 Sep 2025 16:32:14)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : appstream-debuginfo
Repo-name : Rocky Linux 10 - AppStream - Debug
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-10-debug
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : appstream-source
Repo-name : Rocky Linux 10 - AppStream - Source
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=AppStream-10-source
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : baseos
Repo-name : Rocky Linux 10 - BaseOS
Repo-status : enabled
Repo-revision : 10
Repo-distro-tags : [cpe:/o:rocky:rocky:10]: , , 0, 1, L, R, c, i, k, n, o, u, x, y
Repo-updated : Sat 27 Sep 2025 20:14:28
Repo-pkgs : 1,858
Repo-available-pkgs: 1,858
Repo-size : 8.9 G
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=BaseOS-10
Repo-baseurl : https://ftp.swin.edu.au/rocky/10.0/BaseOS/x86_64/os/ (5 more)
Repo-expire : 21,600 second(s) (last: Mon 29 Sep 2025 16:32:13)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : baseos-debuginfo
Repo-name : Rocky Linux 10 - BaseOS - Debug
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=BaseOS-10-debug
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : baseos-source
Repo-name : Rocky Linux 10 - BaseOS - Source
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=BaseOS-10-source
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : crb
Repo-name : Rocky Linux 10 - CRB
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=CRB-10
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : crb-debuginfo
Repo-name : Rocky Linux 10 - CRB - Debug
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=CRB-10-debug
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo

Repo-id : crb-source
Repo-name : Rocky Linux 10 - CRB - Source
Repo-status : disabled
Repo-mirrors : https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=CRB-10-source
Repo-expire : 21,600 second(s) (last: unknown)
Repo-filename : /etc/yum.repos.d/rocky.repo
Total packages: 7,311

```

I can’t see (in the above) anywhere where there is two `^Repo-id\s*:\s*(\S+)$` lines without a `` line between them (but then again, my eyesight isn’t good), and yet I’m still getting the original error.

Have I missed something (includeing not understanding the Regex properly) or is there something else happening - what do you think?

And thanks heaps for the help

Cheers
