I am trying to upgrade from Almalinux 8 to 9, before that I had upgraded from Centos 7 to Almalinux 8. I have automated the process using ansible. When I did the upgrades from Centos 7--> Almalinux 8 and then Almalinux 8 to 9 I did not face any issue with regards to the preupgrade check failing due to the repository-mapping actor. But when I upgrade using ansible I get this below error: 2023-02-28 12:11:08.180191 [ERROR] Actor: repository_mapping Message: The repository mapping file is invalid: the JSON does not match required schema (wrong field type/value): The value of "mapping" field is None, but this is not allowed Summary: Hint: Read documentation at the following link for more information about how to retrieve the valid file: https://access.redhat.com/articles/3664871
I disabled all the old CentOS repositories, I removed the tmp_leapp_py3 folder. When I rerun the playbook for upgrade from Almalinux 8 to 9 the second time, it passes without the repository mapping error. I figured out it might be due to the yum update running again, but I want to know why it fails the first time. The repomap.json looks valid with all the repositories that is required.