dnf via ansible fails if baseurl is used on CentOS 8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,


I ran into an odd issue on CentOS 8, anyone seen this?


When repos are configured to use baseurl instead of mirrorlist, the ansible dnf module fails.

It is as if it is ignoring the baseurl configuration.


#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://my.local.repo.server/$contentdir/$releasever/BaseOS/$basearch/os/


If trying to use the dnf module in ansible, dnf is still trying to find a mirror to use and fails.

ansible  test-build-0  -m dnf  -a "name=zsh state=present"
test-build-0 | FAILED! => {
    "changed": false,

    "msg": "Failed to download metadata for repo 'BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried",

    "rc": 1,
    "results": []
}

Using dnf locally from the command line works fine with baseurl


If I re-configure with repos using mirrorlist again, ansible dnf works as expected.

Just looking for ideas...


/Thomas
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux