diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 0f15f3c585..a1593b5b88 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -670,7 +670,7 @@ class Distribution(object): self.facts['distribution'] = self.system self.facts['distribution_release'] = platform.release() self.facts['distribution_version'] = platform.version() - systems_implemented = ('AIX', 'HP-UX', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS', 'DragonFly') + systems_implemented = ('AIX', 'HP-UX', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS', 'DragonFly', 'NetBSD') self.facts['distribution'] = self.system @@ -777,6 +777,9 @@ class Distribution(object): def get_distribution_DragonFly(self): pass + def get_distribution_NetBSD(self): + self.facts['distribution_major_version'] = self.facts['distribution_release'].split('.')[0] + def get_distribution_Slackware(self, name, data, path): if 'Slackware' not in data: return False # TODO: remove