mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 06:34:23 -07:00
trailing Error
This commit is contained in:
parent
da148f6235
commit
e6b5d52c83
1 changed files with 0 additions and 6 deletions
|
@ -57,8 +57,6 @@ file_digest:
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
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+)\(([^)]+)\)')
|
||||||
try:
|
try:
|
||||||
|
@ -80,7 +78,6 @@ def get_exports(module, output_format, file_path="/etc/exports"):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if not line or line.startswith('#'):
|
if not line or line.startswith('#'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
match = pattern.match(line)
|
match = pattern.match(line)
|
||||||
if not match:
|
if not match:
|
||||||
continue
|
continue
|
||||||
|
@ -129,9 +126,6 @@ def main():
|
||||||
exports_info=result['exports_info'],
|
exports_info=result['exports_info'],
|
||||||
file_digest=result['file_digest']
|
file_digest=result['file_digest']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
__all__ = ['get_exports']
|
__all__ = ['get_exports']
|
Loading…
Add table
Add a link
Reference in a new issue