-
Notifications
You must be signed in to change notification settings - Fork 1.7k
nfs_exports_info: new module #10122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
nfs_exports_info: new module #10122
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@yousefenzhad This PR was evaluated as a potentially problematic PR for the following reasons:
Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: |
exports_info: | ||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yousefenzhad this is still open, and something that really should be changed. Using the same name for two very different things is a bad idea and prevents this to be documented correctly.
plugins/modules/nfs_exports_info.py
Outdated
- A dictionary containing various hash values of the /etc/exports file for integrity verification. | ||
- Keys are the hash algorithm names (e.g., 'sha256', 'sha1', 'md5'), and values are their corresponding hexadecimal digests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A dictionary containing various hash values of the /etc/exports file for integrity verification. | |
- Keys are the hash algorithm names (e.g., 'sha256', 'sha1', 'md5'), and values are their corresponding hexadecimal digests. | |
- A dictionary containing various hash values of the C(/etc/exports) file for integrity verification. | |
- Keys are the hash algorithm names (for example C(sha256), C(sha1), C(md5)), and values are their corresponding hexadecimal digests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I've made the change and pushed it.
Also could you please squash some of the commits to reduce the number of commits? |
Ping @yousefenzhad needs_info |
@yousefenzhad This pullrequest is waiting for your response. Please respond or the pullrequest will be closed. |
Thanks for the heads-up. I'm currently working on addressing the feedback and will push the changes soon." |
Yes I do it. |
SUMMARY
This pull request introduces a new Ansible module that parses the
/etc/exports
fileto extract NFS shared folder information, including export paths and associated options.
This is useful for automation tasks that require visibility into NFS export configurations.
ISSUE TYPE
COMPONENT NAME
nfs_exports_info
ADDITIONAL INFORMATION
This module reads and parses the
/etc/exports
file line by line, ignoring comments and blank lines,and returns a structured list of dictionaries with the following information for each export: