---
# tasks file for linux-zfs
-- name: install "ZFS on Linux" repository GnuPG key
+- name: remove outdated "ZFS on Linux" repository configuration
tags:
- zfs
- packages
- copy: >
- dest=/etc/apt/trusted.gpg.d/
- group=root
- mode=644
- owner=root
- src=zfsonlinux.gpg
- notify:
- - update APT repositories
-
-- name: install "ZFS on Linux" repository configuration
- tags:
- - zfs
- - packages
- template: >
- dest=/etc/apt/sources.list.d/zfsonlinux.list
- group=root
- mode=644
- owner=root
- src=zfsonlinux.list.j2
+ file: >
+ name={{ item }}
+ state=absent
+ with_items:
+ - /etc/apt/trusted.gpg.d/zfsonlinux.gpg
+ - /etc/apt/sources.list.d/zfsonlinux.list
notify:
- update APT repositories
- meta: flush_handlers
tags:
- - zfs
- - packages
+ - apt
-- name: install "ZFS on Linux" packages
+- name: install ZFS packages
tags:
+ - apt
- packages
- zfs
apt: >
- state=installed
- name=debian-zfs
+ state=present
+ name=zfsutils
-- name: setup /usr/local/sbin/zpool-scrub.sh file
+- name: remove outdated zpool-scrub configuration
tags:
- zfs
- template: >
- dest=/usr/local/sbin/zpool-scrub.sh
- group=root
- mode=644
- owner=root
- src=zpool-scrub.sh.j2
-
-- name: setup /etc/cton.d/zpool-scrub file
- tags:
- cron
- - zfs
- template: >
- dest=/etc/cron.d/zpool-scrub
- group=root
- mode=644
- owner=root
- src=cron.d_zpool-scrub.j2
+ file:
+ state: absent
+ path: "{{ item }}"
+ with_items:
+ - /usr/local/sbin/zpool-scrub.sh
+ - /etc/cron.d/zpool-scrub