Diff result between AAP / ansible cmdline dnf

Using the ansible.builtin.ansible module I try to update remote servers. Running my playbook from ansible cmdline it all works fine. Using the same playbook in AAP I get an error:
“Failed to download metadata … Cannot download reponsd.xml All mirrors where tried”

The repo server is avaiable, no firewall obstructions (running playbook from cmdline works) Also running dnf update as root on a failing server works.

Any suggestions?

Code:

- name: Upgrade all packages using DNF
  block:
    - name: Executing DNF clean cache and update packages
      ansible.builtin.dnf:
        name: '*'
        update_cache: true
        state: latest
      register: updated_packages

    - name: List of updated packages
      ansible.builtin.debug:
        var: updated_packages.results|d()
      when: updated_packages