]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/linux-zfs/tasks/main.yml
check-mk-agent: "nagios-plugins-basic" is "monitoring-plugins-basic" since Debian...
[AnsibleRoles.git] / roles / linux-zfs / tasks / main.yml
index 0574b7fb46daf0d1f35dbcf9535fef7aa539eb1d..6e6e79d1aed6df2558e1a396e56ddc9ea070f93a 100644 (file)
@@ -1,62 +1,39 @@
 ---
 # 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