mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 14:14:22 -07:00
space Error
This commit is contained in:
parent
c80e76f21b
commit
da148f6235
1 changed files with 2 additions and 9 deletions
|
@ -60,10 +60,7 @@ import re
|
|||
|
||||
|
||||
def get_exports(module, output_format, file_path="/etc/exports"):
|
||||
|
||||
IP_ENTRY_PATTERN = re.compile(r'(\d+\.\d+\.\d+\.\d+)\(([^)]+)\)')
|
||||
|
||||
|
||||
try:
|
||||
exports_file_digest = module.digest_from_file(file_path, 'sha1')
|
||||
if exports_file_digest is None:
|
||||
|
@ -87,14 +84,10 @@ def get_exports(module, output_format, file_path="/etc/exports"):
|
|||
match = pattern.match(line)
|
||||
if not match:
|
||||
continue
|
||||
|
||||
folder = match.group(1)
|
||||
rest = match.group(2)
|
||||
|
||||
|
||||
entries = IP_ENTRY_PATTERN.findall(rest)
|
||||
|
||||
|
||||
for ip, options_str in entries:
|
||||
options = options_str.split(',')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue