diff options
author | yanzhangi <51999930+yanzhangi@users.noreply.github.com> | 2019-10-15 07:58:12 +0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-10-14 16:58:12 -0700 |
commit | 715ff9d2c1d96426a3db84b8b369e75f39cf0057 (patch) | |
tree | ca2228ca0c477f5ae7aa9dc8cbd50d9804bc2e0b | |
parent | 37bf2b4d79330c2ad34f82fb95388a65cca1d1cd (diff) | |
download | ansible-715ff9d2c1d96426a3db84b8b369e75f39cf0057.tar.gz |
[Backport/2.9/63331]Update ce_facts to fix bugs (#63457)
* Update ce_facts to fix bugs
(cherry picked from commit 73e7da40ff9ba81e4f185c3d743b314f6c2b56b7)
* Update ce_facts modified information
-rw-r--r-- | changelogs/fragments/63331-ce_facts-to-fix-bugs.yml | 2 | ||||
-rw-r--r-- | lib/ansible/modules/network/cloudengine/ce_facts.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/63331-ce_facts-to-fix-bugs.yml b/changelogs/fragments/63331-ce_facts-to-fix-bugs.yml new file mode 100644 index 0000000000..e116235d84 --- /dev/null +++ b/changelogs/fragments/63331-ce_facts-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_facts - update to fix some bugs - Modifying regular expression errors. (https://github.com/ansible/ansible/pull/63331) diff --git a/lib/ansible/modules/network/cloudengine/ce_facts.py b/lib/ansible/modules/network/cloudengine/ce_facts.py index ceff023820..5abe585b0f 100644 --- a/lib/ansible/modules/network/cloudengine/ce_facts.py +++ b/lib/ansible/modules/network/cloudengine/ce_facts.py @@ -253,7 +253,7 @@ class Hardware(FactsBase): data = self.responses[0] if data: - self.facts['filesystems'] = re.findall(r'^Directory of (.*)/', data)[0] + self.facts['filesystems'] = re.findall(r'Directory of (.*)/', data)[0] self.facts['flash_total'] = re.findall(r'(.*) total', data)[0].replace(",", "") self.facts['flash_free'] = re.findall(r'total \((.*) free\)', data)[0].replace(",", "") |