Skip to content

Commit

Permalink
ensure tar and gzip are present
Browse files Browse the repository at this point in the history
  • Loading branch information
swapdisk committed Oct 4, 2023
1 parent fbecaf9 commit a5e73ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/tar-present.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Add task to ensure tar package is present
7 changes: 7 additions & 0 deletions roles/lvm_snapshots/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
size: "{{ item.size | default(omit) }}"
loop: "{{ lvm_snapshots_volumes }}"

- name: Required packages are present
ansible.builtin.package:
name:
- gzip
- tar
state: present

- name: Create boot backup
community.general.archive:
format: gz
Expand Down
7 changes: 7 additions & 0 deletions roles/lvm_snapshots/tasks/revert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
ansible.builtin.include_tasks: verify_snapshot_active.yml
loop: "{{ lvm_snapshots_snapshots }}"

- name: Required packages are present
ansible.builtin.package:
name:
- gzip
- tar
state: present

- name: Restore boot backup
ansible.builtin.unarchive:
remote_src: true
Expand Down

0 comments on commit a5e73ca

Please sign in to comment.