Open hunter86bg opened 2 years ago
It was idempotent earlier, but the commit https://github.com/gluster/gluster-ansible-infra/commit/0c1f454d98 changed that. But I do not see in the commit message why it was changed.
@sac , I was wondering if that was on purpose or not. I can open a PR, but most probavly we need a way to setup Molecule for the roles in this repo.
Currently, a lot of oVirt users report issues with this one (for example something failed later and when rerunning it complains the VG exists).
Also, I don't see peer review on that commit . How is that possible?
I don't think you should spend time on the PR. The committer should revert his changes unless he has a good reason. We can ask the maintainers to take a look.
@rchikatw @gobindadas can you please take a look at this issue? Also, why did a non-idempotent CLI replace the module?
@sac @hunter86bg Hello, ansible-core 2.12 introduced from RHV 4.4 SP1 release and ansible-core no longer uses the gluster.gluster and community.general ansible collection. Because of this change, I have posted the patches to remove these gluster modules to CLI.
Because ansible-core 2.12 is no longer used these packages (gluster.gluster and community.general ansible collection) that means they have been removed from RHV packages
@rchikatw we can't provide the modules with a separate rpm ? This role is used not only by RHV but also by other users I think it makes sense to include a task file for RHV separately while we keep the current task file with the modules for the rest of the world.
This is not the issue only for RHV, it's also issue for centos stream which has ansible-core. So it's a problem for both upstream and downstream.
So, the modules need to be updated for ansible-core ?
So basically there are two ways to deal with it. 1- Change all the modules to command/shell 2- Convert all the modules into ansile collection and use those (Which need lot of effort and process) So we decided to go with command line approach for quicker fix.
@gobindadas , I have never done an Ansible collection before but at least I can take a look if it's in my capabilities to do it.
For some reason vg_create is using a command that fails if you need to rerun the setup: https://github.com/gluster/gluster-ansible-infra/blob/6ce78857a1dc992364c8a5b564ca9b09c89bad9e/roles/backend_setup/tasks/vg_create.yml#L65
We need to use idempotent modules where possible