restic-profile-cli 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/CHANGELOG.md +8 -0
  2. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/PKG-INFO +1 -1
  3. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/config.yaml +12 -19
  4. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.ansible-lint +0 -0
  5. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.copier-answers.yaml +0 -0
  6. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.devcontainer/devcontainer.json +0 -0
  7. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.dockerignore +0 -0
  8. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.editorconfig +0 -0
  9. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.github/workflows/docs.yaml +0 -0
  10. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.github/workflows/publish-to-pypi.yaml +0 -0
  11. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.github/workflows/publish-to-test-pypi.yaml +0 -0
  12. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.gitignore +0 -0
  13. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.pre-commit-config.yaml +0 -0
  14. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.prettierignore +0 -0
  15. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/.yamlfmt.yaml +0 -0
  16. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/AGENTS.md +0 -0
  17. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/Dockerfile +0 -0
  18. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/LICENSE +0 -0
  19. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/README.md +0 -0
  20. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/ansible.cfg +0 -0
  21. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/docs/index.md +0 -0
  22. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/docs/restic-profile/cli.md +0 -0
  23. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/docs/restic-profile/examples.md +0 -0
  24. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/docs/restic-profile/toml-config.md +0 -0
  25. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/docs/restic-rest-server/index.md +0 -0
  26. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/galaxy.yml +0 -0
  27. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/justfile +0 -0
  28. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/meta/runtime.yml +0 -0
  29. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/playbooks/go_build/restic-rest-server.yaml +0 -0
  30. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/playbooks/go_build/restic.yaml +0 -0
  31. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/playbooks/restic-profile.yaml +0 -0
  32. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/playbooks/restic-rest-server.yaml +0 -0
  33. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/pyproject.toml +0 -0
  34. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/requirements.yml +0 -0
  35. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/defaults/main.yaml +0 -0
  36. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/handlers/main.yaml +0 -0
  37. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/meta/main.yaml +0 -0
  38. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/molecule/default/converge.yaml +0 -0
  39. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/molecule/default/molecule.yaml +0 -0
  40. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/molecule/default/prepare.yaml +0 -0
  41. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/molecule/default/verify.yaml +0 -0
  42. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/hooks.yaml +0 -0
  43. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/hooks_phase.yaml +0 -0
  44. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/install.yaml +0 -0
  45. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/main.yaml +0 -0
  46. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/preflight.yaml +0 -0
  47. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/remove.yaml +0 -0
  48. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/tasks/service.yaml +0 -0
  49. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/templates/etc/restic-profile/restic-profile.env.j2 +0 -0
  50. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/templates/etc/restic-profile/restic-profile.toml.j2 +0 -0
  51. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/templates/etc/systemd/system/restic-profile.service.j2 +0 -0
  52. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/templates/etc/systemd/system/restic-profile.timer.j2 +0 -0
  53. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/templates/usr/local/bin/restic-profile-scope.j2 +0 -0
  54. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_profile/vars/main.yaml +0 -0
  55. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/defaults/main.yaml +0 -0
  56. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/files/users.htpasswd +0 -0
  57. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/handlers/main.yaml +0 -0
  58. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/meta/main.yaml +0 -0
  59. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/tasks/install.yaml +0 -0
  60. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/tasks/main.yaml +0 -0
  61. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/tasks/service.yaml +0 -0
  62. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/tasks/validation.yaml +0 -0
  63. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/templates/restic-rest-server.default.j2 +0 -0
  64. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/roles/restic_rest_server/templates/restic-rest-server.service.j2 +0 -0
  65. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/ruff.toml +0 -0
  66. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/__init__.py +0 -0
  67. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/__main__.py +0 -0
  68. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/cli.py +0 -0
  69. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/config.py +0 -0
  70. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/notify.py +0 -0
  71. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/runner.py +0 -0
  72. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/templates/notify_failure.md.j2 +0 -0
  73. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/src/restic_profile/templates/notify_success.md.j2 +0 -0
  74. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/tests/restic_profile/conftest.py +0 -0
  75. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/tests/restic_profile/test_cli.py +0 -0
  76. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/tests/restic_profile/test_config.py +0 -0
  77. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/tests/restic_profile/test_notify.py +0 -0
  78. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/tests/restic_profile/test_runner.py +0 -0
  79. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/uv.lock +0 -0
  80. {restic_profile_cli-0.2.0 → restic_profile_cli-0.2.1}/zensical.toml +0 -0
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.1] - 2026-07-07
9
+
10
+ ### Fixed
11
+
12
+ - Orphaned `.exclude` and `.env` file cleanup could incorrectly delete all
13
+ managed files due to intermediate `regex_replace` path construction.
14
+ Rewritten to build absolute paths directly in the Jinja2 template.
15
+
8
16
  ## [0.2.0] - 2026-07-07
9
17
 
10
18
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: restic-profile-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Profile-based restic wrapper with Ansible deployment support
5
5
  Project-URL: Homepage, https://github.com/ak1ra-lab/restic-profile
6
6
  Project-URL: Repository, https://github.com/ak1ra-lab/restic-profile
@@ -51,25 +51,18 @@
51
51
 
52
52
  - name: construct expected .exclude file paths
53
53
  vars:
54
- restic_profile_exclude_names_json: >-
55
- {% set names = [] %}
54
+ restic_profile_exclude_file_paths_json: >-
55
+ {% set paths = [] %}
56
56
  {% for pname, pval in restic_profile_profiles.items() %}
57
57
  {% if pval.enabled | default(true) | ansible.builtin.bool
58
58
  and pval.backup is defined
59
59
  and pval.backup.exclude_file_content | default('') | length > 0 %}
60
- {% set _ = names.append(pname) %}
60
+ {% set _ = paths.append(restic_profile_config_dir ~ '/restic-profile-' ~ pname ~ '.exclude') %}
61
61
  {% endif %}
62
62
  {% endfor %}
63
- {{ names | to_json }}
64
- restic_profile_exclude_names_data: >-
65
- {{ restic_profile_exclude_names_json | from_json }}
63
+ {{ paths | to_json }}
66
64
  ansible.builtin.set_fact:
67
- restic_profile_exclude_file_paths: >-
68
- {{
69
- restic_profile_exclude_names_data
70
- | map('ansible.builtin.regex_replace', '^(.*)$', restic_profile_config_dir ~ '/restic-profile-\\1.exclude')
71
- | list
72
- }}
65
+ restic_profile_exclude_file_paths: "{{ restic_profile_exclude_file_paths_json | from_json }}"
73
66
  no_log: true
74
67
 
75
68
  - name: find managed .exclude files in config directory
@@ -109,15 +102,15 @@
109
102
  {{ env_repositories | to_json }}
110
103
  restic_profile_env_repositories_data: >-
111
104
  {{ restic_profile_env_repositories_json | from_json }}
105
+ restic_profile_env_file_paths_json: >-
106
+ {% set paths = [] %}
107
+ {% for r in restic_profile_env_repositories_data %}
108
+ {% set _ = paths.append(restic_profile_config_dir ~ '/restic-profile-' ~ r.key ~ '.env') %}
109
+ {% endfor %}
110
+ {{ paths | to_json }}
112
111
  ansible.builtin.set_fact:
113
112
  restic_profile_env_repositories: "{{ restic_profile_env_repositories_data }}"
114
- restic_profile_env_file_paths: >-
115
- {{
116
- restic_profile_env_repositories_data
117
- | map(attribute='key')
118
- | map('ansible.builtin.regex_replace', '^(.*)$', restic_profile_config_dir ~ '/restic-profile-\\1.env')
119
- | list
120
- }}
113
+ restic_profile_env_file_paths: "{{ restic_profile_env_file_paths_json | from_json }}"
121
114
  no_log: true
122
115
 
123
116
  - name: find managed repository .env files