WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[ERROR]: Task failed: Module failed: No package(s) matching '['python3-apt'' available #667

@kuba-orlik

Description

@kuba-orlik

I've added the prometheus.prometheus.prometheus role to my playbook. I've been using it multiple times, but suddenly it started throwing an error:

TASK [prometheus.prometheus._common : Install dependencies] ******************************************************************************************************************************************************************************************************************************
[ERROR]: Task failed: Module failed: No package(s) matching '['python3-apt'' available
Origin: /home/kuba/.ansible/collections/ansible_collections/prometheus/prometheus/roles/_common/tasks/preflight.yml:55:3

53     - "{{ ansible_parent_role_names | first | regex_replace(ansible_collection_name ~ '.', '') }}_install"
54
55 - name: Install dependencies
     ^ column 3

fatal: [czynna2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3.13"}, "changed": false, "msg": "No package(s) matching '['python3-apt'' available"}

I'm using ansible [core 2.19.3]

My target is Debian 13 and it has python3-apt installed

I also see some inconsistencies — sometimes when I run it the _common_dependencies variable contains one, sometimes two dependencies:

TASK [prometheus.prometheus._common : Print a variable] **********************************************************************************************************************************************************************************************************************************
ok: [czynna2] => {
    "_common_dependencies": "['python3-apt', 'libcap2-bin'] "
}


TASK [prometheus.prometheus._common : Print a variable] **********************************************************************************************************************************************************************************************************************************
ok: [czynna2] => {
    "_common_dependencies": "python3-apt "
}

At one time it's a string, in another — a list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions