Skip to content

Commit

Permalink
Merge pull request #12 from towster/master
Browse files Browse the repository at this point in the history
Make ignore_domain function for AIX hosts
  • Loading branch information
cscaglioned42 authored Sep 21, 2019
2 parents c1d18e8 + a3c3edd commit de055a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion module_aix.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ def get_sys(self):
# self.sysdata.update({'hddsize':hddsize})
if 'Host Name' in x:
devicename = x.split()[-1].strip()
self.name = devicename
if self.ignore_domain:
if '.' in devicename:
self.name = devicename.split('.')[0]
else:
self.name = devicename
else:
self.name = devicename
self.sysdata.update({'name': self.name})

self.sysdata.update({'hddcount': disknum})
Expand Down

0 comments on commit de055a6

Please sign in to comment.