The sudoversion is populated in first instance by rpm provider.
If rpm command is found, other check are not performed.
This is not correct in example in debian with rpm exec installed, because it will reply in facts:
"package sudo is not installed"
way out suggested:
a) check osfamily before, and perform rpm command only if this is osfamily redhat, ...
b) check the fact after setting the variable, if the value is not correct move to exec sudo.
Second is more robust in case of package manually installed.
The sudoversion is populated in first instance by rpm provider. If rpm command is found, other check are not performed.
This is not correct in example in debian with rpm exec installed, because it will reply in facts: "package sudo is not installed"
way out suggested: a) check osfamily before, and perform rpm command only if this is osfamily redhat, ... b) check the fact after setting the variable, if the value is not correct move to exec sudo.
Second is more robust in case of package manually installed.