forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for facts distribution.py (ansible#31110)
'distribution' facts were being set after checking the existence of the dist file, and then being set again with more detail after they were succesfully parsed. But if the dist file was not succesfully parsed and matched the required names, the loop continues without resetting the earlier set facts. This is how 'Mandriva' would end up being the 'distribution' file for unrelated cases (it would find /etc/lsb-release, set distro to 'Mandriva', then fail to parse/match and continue the loop. If no other checks worked, 'Mandriva' would stick). * parse_dist_file_NA should check 'name' not distro for NA parse_distribution_file_NA was checking the incoming 'distribution' fact to be 'NA', but the fact itself can be specific at that point ('KDE Neon', for ex) but the check is really if the 'name' it was passed is NA. * for matches on OS_RELEASE_ALIAS (ie, 'Archlinux') do not continue if the dist file content doesn't match. Previously it had to because of the 'Mandriva' bug mentioned above. This is a more general fix for ansible#30693 than ansible#30723 Fixes ansible#30693 Related to ansible#30600
- Loading branch information
Showing
1 changed file
with
12 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters