Add ansible_distribution_major_version to macOS (#31708)
This commit is contained in:
parent
c4af03118b
commit
4dce9dc796
1 changed files with 3 additions and 1 deletions
|
@ -487,7 +487,9 @@ class Distribution(object):
|
|||
darwin_facts['distribution'] = 'MacOSX'
|
||||
rc, out, err = self.module.run_command("/usr/bin/sw_vers -productVersion")
|
||||
data = out.split()[-1]
|
||||
darwin_facts['distribution_version'] = data
|
||||
if data:
|
||||
darwin_facts['distribution_major_version'] = data.split('.')[0]
|
||||
darwin_facts['distribution_version'] = data
|
||||
return darwin_facts
|
||||
|
||||
def get_distribution_FreeBSD(self):
|
||||
|
|
Loading…
Reference in a new issue