Skip to content

Conversation

@bcoca
Copy link
Member

@bcoca bcoca commented Jul 5, 2024

Introduces a new config to allow user to modify the file name template

TODO:

  • Examine user defined template for shenanigans
  • Tests
  • clog

fixes #82408

ISSUE TYPE
  • Feature Pull Request

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. has_issue labels Jul 5, 2024
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 5, 2024
@ansible ansible deleted a comment from ansibot Jul 5, 2024
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Jul 9, 2024
@bcoca
Copy link
Member Author

bcoca commented Jul 9, 2024

notes: core convo, try to make the setting template 'jinja' so we can do most processing on controller side and allow for more flexible naming, reserve the current set of variables as tags as the final expression should still be a 'python format' template' to be resolved at target.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Jul 16, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 23, 2024
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 4, 2025
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Feb 4, 2025
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 4, 2025
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Feb 4, 2025
@webknjaz webknjaz changed the title make backup file names confiugrable Make backup file names configurable Feb 4, 2025
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Feb 4, 2025
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Feb 5, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 19, 2025
@Hipska
Copy link

Hipska commented Mar 26, 2025

Would love to use configurable backup name as well. What's the state for this PR?

@bcoca
Copy link
Member Author

bcoca commented Mar 26, 2025

it is 'paused', i need to have the time to fix it up and pass tests to make it ready for review

@bcoca bcoca force-pushed the backup_template branch from 420bdee to 71c19c1 Compare April 2, 2025 14:15
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 2, 2025
@bcoca bcoca marked this pull request as ready for review April 2, 2025 22:26
@bcoca bcoca force-pushed the backup_template branch from 71c19c1 to 7e3b42f Compare April 2, 2025 22:28
@mattclay
Copy link
Member

mattclay commented Apr 3, 2025

I haven't had a chance to review this, or think through the impact of the changes, so I can't comment on the implementation yet. However, there should be full test coverage for changes like this, but there are currently no tests in the PR.

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. ci_verified Changes made in this PR are causing tests to fail. labels Apr 3, 2025
@ansible ansible deleted a comment from ansibot Apr 3, 2025
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 15, 2025
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Nov 12, 2025
@ansibot
Copy link
Contributor

ansibot commented Nov 12, 2025

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/plugins/action/__init__.py:1008:1: W293: blank line contains whitespace

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/action/__init__.py:1008:0: trailing-whitespace: Trailing whitespace

click here for bot help

- Available variables are basename (includes extension), extension, stripname (no extension), timestamp and pid (process ID)
- This only affects modules that implement the Ansible provided backup functions in Python or duplicate such functions.
Powershell module_utils does not currently support this.
version_added: '2.19'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version_added: '2.19'
version_added: '2.21'

{ "tmpdir", "tmpdir" },
{ "verbosity", "Verbosity" },
{ "version", "AnsibleVersion" },
{ "backup_file_name_template", null }, // here for parity, but not implemented
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{ "backup_file_name_template", null }, // here for parity, but not implemented
{ "backup_file_name_template", null }, // here for parity, but not implemented

@webknjaz
Copy link
Member

#86187 will fix RHEL 10

bcoca and others added 3 commits November 17, 2025 10:24
 fixes ansible#82408

 let windows/powershell modules know about backup, but not implemented

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
 - testing orig feature
 - new backup template
 - bad template detection
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Nov 18, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci_verified Changes made in this PR are causing tests to fail. data_tagging feature This issue/PR relates to a feature request. has_issue needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backup option: implement custom naming for files ( ansible_managed like )

8 participants