mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Enos connection issue (#32895)
* Changes due to connection issues * Adding changes pertaining to connection issue of Ansible * Review comments of Kedar * Adding EOL PyLint issue * Fixing pep8 and yamlint issues
This commit is contained in:
parent
a1517234f6
commit
e5b3f60a74
3 changed files with 33 additions and 41 deletions
|
@ -235,7 +235,9 @@ class Hardware(FactsBase):
|
|||
|
||||
def populate(self):
|
||||
super(Hardware, self).populate()
|
||||
data = self.responses[0]
|
||||
data = self.run(['show system memory'])
|
||||
data = to_text(data, errors='surrogate_or_strict').strip()
|
||||
data = data.replace(r"\n", "\n")
|
||||
if data:
|
||||
self.facts['memtotal_mb'] = self.parse_memtotal(data)
|
||||
self.facts['memfree_mb'] = self.parse_memfree(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue