mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Support for amazon linux distribution facts.
This commit is contained in:
parent
0cd0a7fda3
commit
5646bc278b
2 changed files with 9 additions and 1 deletions
|
@ -97,6 +97,9 @@ def get_distribution():
|
|||
if platform.system() == 'Linux':
|
||||
try:
|
||||
distribution = platform.linux_distribution()[0].capitalize()
|
||||
if distribution == 'NA':
|
||||
if os.path.is_file('/etc/system-release'):
|
||||
distribution = 'Amazon'
|
||||
except:
|
||||
# FIXME: MethodMissing, I assume?
|
||||
distribution = platform.dist()[0].capitalize()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue