Skip to content

kopia_policy: Add module - #12358

Open
munchtoast wants to merge 5 commits into
ansible-collections:mainfrom
munchtoast:add-kopia-policy-module
Open

kopia_policy: Add module#12358
munchtoast wants to merge 5 commits into
ansible-collections:mainfrom
munchtoast:add-kopia-policy-module

Conversation

@munchtoast

Copy link
Copy Markdown
Contributor
SUMMARY

Add kopia_policy ansible module. Split from #12187

ISSUE TYPE
  • New Module/Plugin Pull Request
COMPONENT NAME

kopia_policy

ADDITIONAL INFORMATION

@ansibullbot ansibullbot added WIP Work in progress module module module_utils module_utils new_plugin New plugin plugins plugin (any type) tests tests unit tests/unit labels Jun 25, 2026
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-13 Automatically create a backport for the stable-13 branch labels Jun 28, 2026
@munchtoast
munchtoast marked this pull request as ready for review June 29, 2026 14:28
@ansibullbot ansibullbot removed the WIP Work in progress label Jun 29, 2026
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Jul 7, 2026
@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 Jul 23, 2026
- Manage Kopia snapshot policies (set, delete, list, show) via the
  Kopia CLI.
- Extend REPOSITORY_STATE_MAP with policy state entries (set, shown).
- Extends community.general._kopia doc fragment for shared password
  and config options.
- Uses fixed args for read-only _get() list_policies method.
@munchtoast
munchtoast force-pushed the add-kopia-policy-module branch from df94041 to 4ca2405 Compare July 23, 2026 16:52
@ansibullbot ansibullbot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci CI is older than 7 days, rerun before merging needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 23, 2026
Comment thread plugins/modules/kopia_policy.py Outdated
short_description: Manage Kopia snapshot policies
author:
- Dexter Le (@munchtoast)
version_added: "13.1.0"

@felixfontein felixfontein Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
version_added: "13.1.0"
version_added: "13.4.0"

update by @russoz : bump up verison to 13.4.0

Comment thread plugins/modules/kopia_policy.py Outdated
Comment on lines +17 to +18
- Supports setting, deleting, showing, and listing policies.
- Policies control retention, scheduling, file exclusions, and compression for snapshots.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think it makes sense to split this up into two paragraphs.

Suggested change
- Supports setting, deleting, showing, and listing policies.
- Policies control retention, scheduling, file exclusions, and compression for snapshots.
- Supports setting, deleting, showing, and listing policies.
Policies control retention, scheduling, file exclusions, and compression for snapshots.

Comment thread plugins/modules/kopia_policy.py Outdated
Comment on lines +35 to +36
listed: Lists all defined policies.
shown: Displays the effective policy for O(target), including inherited values.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

listed and shown are not allowed states. These should be implemented in an _info module.

@munchtoast munchtoast Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm going to create a separate PR for kopia_info, thank you

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Aug 4, 2026
@ansibullbot ansibullbot removed the stale_ci CI is older than 7 days, rerun before merging label Aug 11, 2026
@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 Aug 11, 2026
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Aug 11, 2026

@russoz russoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hi @munchtoast

Thanks for your continued work on this! A couple of comments

Comment thread plugins/modules/kopia_policy.py Outdated
Comment thread plugins/modules/kopia_policy.py Outdated
Comment thread plugins/modules/kopia_policy.py Outdated
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
@munchtoast

Copy link
Copy Markdown
Contributor Author

hi @munchtoast

Thanks for your continued work on this! A couple of comments

Thanks for your feedback!

@ansibullbot

Copy link
Copy Markdown
Collaborator

Failures in nox session formatters, part ruff format.

Run 'nox -e formatters' to fix these issues.

click here for bot help

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Aug 16, 2026
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Aug 16, 2026
keep_latest:
description:
- Number of most-recent snapshots to keep.
- Pass C(inherit) to remove this override.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You missed other occurrences.

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-13 Automatically create a backport for the stable-13 branch check-before-release PR will be looked at again shortly before release and merged if possible. module_utils module_utils module module new_plugin New plugin plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests unit tests/unit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants