Skip to content

Conversation

yousefenzhad
Copy link

SUMMARY

This pull request introduces a new Ansible module that parses the /etc/exports file
to 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
  • New Module/Plugin Pull Request
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:

  • path
  • clients and their export options

@ansibullbot ansibullbot added module module new_contributor Help guide this first time contributor new_plugin New plugin plugins plugin (any type) tests tests unit tests/unit labels May 12, 2025
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label May 12, 2025
@ansibullbot

This comment was marked as outdated.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels May 12, 2025
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI label May 13, 2025
@ansibullbot ansibullbot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI label May 13, 2025
@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Jun 16, 2025
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 16, 2025
@felixfontein felixfontein added the backport-11 Automatically create a backport for the stable-10 branch label Jun 16, 2025
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 17, 2025
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 17, 2025
@ansibullbot
Copy link
Collaborator

@yousefenzhad This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 commits.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on Libera.chat IRC

click here for bot help

@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 17, 2025
Comment on lines +48 to +53
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
Copy link
Collaborator

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.

Comment on lines 60 to 61
- 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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.

Copy link
Author

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.

@felixfontein
Copy link
Collaborator

Also could you please squash some of the commits to reduce the number of commits?

@felixfontein
Copy link
Collaborator

Ping @yousefenzhad

needs_info

@ansibullbot ansibullbot added the needs_info This issue requires further information. Please answer any outstanding questions label Jul 13, 2025
@ansibullbot
Copy link
Collaborator

@yousefenzhad This pullrequest is waiting for your response. Please respond or the pullrequest will be closed.

click here for bot help

@yousefenzhad
Copy link
Author

Thanks for the heads-up. I'm currently working on addressing the feedback and will push the changes soon."

@ansibullbot ansibullbot removed the needs_info This issue requires further information. Please answer any outstanding questions label Aug 17, 2025
@yousefenzhad
Copy link
Author

Also could you please squash some of the commits to reduce the number of commits?

Yes I do it.

@felixfontein felixfontein removed the backport-11 Automatically create a backport for the stable-10 branch label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

check-before-release PR will be looked at again shortly before release and merged if possible. module module needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor new_plugin New plugin plugins plugin (any type) tests tests unit tests/unit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants