From fafc2c0a641c25c4ccbd93ec6d570368ada1b4dd Mon Sep 17 00:00:00 2001 From: Yousefnezhad Date: Sat, 17 May 2025 10:24:44 +0330 Subject: [PATCH] NOX Errors --- plugins/modules/nfs_exports_info.py | 22 ++++++++++++------- .../plugins/modules/test_nfs_exports_info.py | 5 +++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/plugins/modules/nfs_exports_info.py b/plugins/modules/nfs_exports_info.py index 9c7a1fe021..aa69c2f9c2 100644 --- a/plugins/modules/nfs_exports_info.py +++ b/plugins/modules/nfs_exports_info.py @@ -1,7 +1,10 @@ -# SPDX-License-Identifier: GPL-3.0-or-later +#!/usr/bin/python + # Copyright: (c) 2025, Samaneh Yousefnezhad -# GNU General Public License v3.0+ -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type @@ -10,11 +13,11 @@ DOCUMENTATION = r""" --- module: nfs_exports_info -short_description: Extract folders, IPs, and options from /etc/exports +short_description: Extract folders, IPs, and options from (/etc/exports) -description: > - This module retrieves and processes the contents of the /etc/exports file from a remote server, - mapping folders to their corresponding IP addresses and access options. +description: + - This module retrieves and processes the contents of the /etc/exports file from a remote server, + mapping folders to their corresponding IP addresses and access options. author: - Samaneh Yousefnezhad (@yousefenzhad) @@ -34,6 +37,7 @@ EXAMPLES = r""" - name: Get IPs and options per shared folder fava.infra.nfs_exports_info: output_format: 'ips_per_share' + register: result - name: Get shared folders and options per IP fava.infra.nfs_exports_info: @@ -42,7 +46,9 @@ EXAMPLES = r""" RETURN = r""" exports_info: - description: A mapping of shared folders to IPs and their options, or the reverse. + description: + - A mapping of shared folders to IPs and their options, or the reverse. + - What it is depends on O(output_format). type: dict returned: always diff --git a/tests/unit/plugins/modules/test_nfs_exports_info.py b/tests/unit/plugins/modules/test_nfs_exports_info.py index 57c4eb7ac5..2cc59daed8 100644 --- a/tests/unit/plugins/modules/test_nfs_exports_info.py +++ b/tests/unit/plugins/modules/test_nfs_exports_info.py @@ -1,4 +1,9 @@ +# Copyright (c) 2025, Samaneh Yousefnezhad + +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) + # SPDX-License-Identifier: GPL-3.0-or-later + from __future__ import absolute_import, division, print_function __metaclass__ = type