mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 14:44:22 -07:00
Blanks Errors
This commit is contained in:
parent
db1ac68cbf
commit
bccf55ba98
1 changed files with 7 additions and 13 deletions
|
@ -71,11 +71,9 @@ import hashlib
|
||||||
|
|
||||||
def get_exports(module, output_format, file_path="/etc/exports"):
|
def get_exports(module, output_format, file_path="/etc/exports"):
|
||||||
|
|
||||||
|
|
||||||
IP_ENTRY_PATTERN = re.compile(r'(\d+\.\d+\.\d+\.\d+)\(([^)]+)\)')
|
IP_ENTRY_PATTERN = re.compile(r'(\d+\.\d+\.\d+\.\d+)\(([^)]+)\)')
|
||||||
MAIN_LINE_PATTERN = re.compile(r'\s*(\S+)\s+(.+)')
|
MAIN_LINE_PATTERN = re.compile(r'\s*(\S+)\s+(.+)')
|
||||||
|
|
||||||
|
|
||||||
file_digests = {}
|
file_digests = {}
|
||||||
hash_algorithms = ['sha256', 'sha1', 'md5']
|
hash_algorithms = ['sha256', 'sha1', 'md5']
|
||||||
|
|
||||||
|
@ -105,7 +103,6 @@ def get_exports(module, output_format, file_path="/etc/exports"):
|
||||||
|
|
||||||
exports = {}
|
exports = {}
|
||||||
|
|
||||||
|
|
||||||
output_lines = []
|
output_lines = []
|
||||||
if file_content_bytes:
|
if file_content_bytes:
|
||||||
output_lines = file_content_bytes.decode('utf-8', errors='ignore').splitlines()
|
output_lines = file_content_bytes.decode('utf-8', errors='ignore').splitlines()
|
||||||
|
@ -147,9 +144,6 @@ def get_exports(module, output_format, file_path="/etc/exports"):
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg="Error while processing exports: {}".format(e))
|
module.fail_json(msg="Error while processing exports: {}".format(e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue