[CentOS-devel] [CentOS] ansible upgrade

Mon Apr 4 15:31:58 UTC 2022
Leon Fauster <leonfauster at googlemail.com>

Am 23.02.22 um 13:47 schrieb Fabian Arrotin:
> On 22/02/2022 22:37, Leon Fauster via CentOS wrote:
>> Am 21.02.22 um 16:24 schrieb Fabian Arrotin:
>>> On 21/02/2022 15:49, Leon Fauster via CentOS wrote:
>>>> Hey all, back from vacation and seeing ansible 2.12 in the repos now.
>>>> Anything to be aware of when upgrading from 2.9 to 2.12 in CS8?
>>>>
>>>
>>> You'd be lucky if it works directly , as there were some semantic 
>>> changes in ansible, so you'll probably have to review all the 
>>> changes, and if ansible-core just has the modules (it's a stripped 
>>> down version of ansible, as you're supposed to download the 
>>> collections yourself) , and use FQCN (Fully Qualified Collection 
>>> Names) for  modules ...
>>>
>>> FWIW, CentOS Infra still on ansible 2.9.27 from our own configuration 
>>> management SIG and ansible-core excluded in yum/dnf to ensure that 
>>> our automation still runs fine (until we have time to test/convert 
>>> all our roles/tasks/playbooks to run on ansible 5 - aka ansible-core 
>>> 2.12.x)
>>>
>>
>> Thanks Fabian for the insights. I was planning such tests for May but 
>> that seems to be to late now.
>>
>> I remember that someone wanted to provide a meta package that pull
>> additional ansible collections to give a similar experience like 2.9?
>> Maybe more an EPEL question ...
>>
>> -- 
>> Leon
> 
> There is indeed a an effort to have an ansible meta-package that would 
> pull both ansible-core and would contain collections (see 
> https://fedoraproject.org/wiki/Changes/Ansible5)
> 
> I already had a look myself to see how to rebuild/provide it through 
> configmanagement SIG eventually, as we now have ansible-core availble
> Some packages for ansible 5.x are already built on 
> koji.fedoraproject.org (see 
> https://koji.fedoraproject.org/koji/packageinfo?packageID=13842) but not 
> yet available for epel8, due to lack of ansible-core in RHEL 8 (for now, 
> but coming as it's in 8-stream, so in advance)
> 
> Other introduced problem with ansible-core is the dep  on python 3.8, 
> meaning that while we had ara (Ansible Records Ansible dashboard) 
> available in configmanagement SIG, it needs to be using same python 
> interpreter version for the callback, and previous one was built 
> against/for python 3.6 (like ansible 2.9.x) , so quite some changes ...
> 


Moved this from #centos to #centos-devel:

I am using an "ansible community package" (5.5.0) for testing
internally now and noticed following behaviour:

"yum update" obsoletes "ansible-2.9.27-1.el8.noarch" and installs
ansible-core-2.12.2-2.el8.x86_64. A second "yum update" updates
to ansible-core-2.12.3-1.el8.x86_64.


We have the "ansible community package" as "ansible" in the repos.
When doing a "yum install ansible" then dnf downgrades ansible-core to
2.12.2-2.el8. That is caused by the "Obsoletes: ansible" statement in 
that version but it is changed now to a "Conflicts: ansible < 2.10.0"
in the newer version of ansible-core "2.12.3-1.el8.x86_64".

IMO - the cs8 compose should remove the intermediate package
ansible-core-2.12.2-2.el8.x86_64 to allow installing newer
"ansible community package" rpms ... if it comes from the
internal or in the future from the EPEL repo is irrelevant.



test # rpm -q ansible-core
ansible-core-2.12.3-1.el8.x86_64



test # yum install ansible
Last metadata expiration check: 0:27:35 ago on Mon Apr  4 16:54:41 2022.
Dependencies resolved.
==================================================================================================================
Package       Architecture        Version      Repository          Size
==================================================================================================================
Downgrading:
  ansible-core    x86_64          2.12.2-2.el8   appstream     2.4 M

Transaction Summary
==================================================================================================================
Downgrade  1 Package

Total download size: 2.4 M
Is this ok [y/N]: ^COperation aborted.



test # yum --exclude ansible-core-2.12.2-2.el8.x86_64  install ansible
Last metadata expiration check: 0:27:49 ago on Mon Apr  4 16:54:41 2022.
Dependencies resolved.
==================================================================================================================
Package       Architecture        Version      Repository          Size
==================================================================================================================
Installing:
  ansible      noarch       5.5.0-1.el8    is-ws-tools    42 M

Transaction Summary
==================================================================================================================
Install  1 Package

Total download size: 42 M
Installed size: 305 M
Is this ok [y/N]:
Operation aborted.


--
Leon