diff --git a/changelogs/fragments/tar-present.yml b/changelogs/fragments/tar-present.yml new file mode 100644 index 0000000..b8d0614 --- /dev/null +++ b/changelogs/fragments/tar-present.yml @@ -0,0 +1,2 @@ +bugfixes: + - Add task to ensure tar package is present diff --git a/roles/lvm_snapshots/tasks/create.yml b/roles/lvm_snapshots/tasks/create.yml index bd93b74..ba37d11 100644 --- a/roles/lvm_snapshots/tasks/create.yml +++ b/roles/lvm_snapshots/tasks/create.yml @@ -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 diff --git a/roles/lvm_snapshots/tasks/revert.yml b/roles/lvm_snapshots/tasks/revert.yml index 4b2c83b..8cdd8dd 100644 --- a/roles/lvm_snapshots/tasks/revert.yml +++ b/roles/lvm_snapshots/tasks/revert.yml @@ -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