]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/linux-zfs/tasks/main.yml
Streamline tag usage, make sure "apt" is set on every apt task
[AnsibleRoles.git] / roles / linux-zfs / tasks / main.yml
index d4d3578f11545397b759d8c2419be35870db601e..cf4b83492dd05632db3be853ecb7b80fdd60fb1e 100644 (file)
@@ -1,52 +1,31 @@
 ---
 # 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
-
-- name: install "build-essential" package
-  tags:
-    - packages
-    - zfs
-  apt: >
-    state=installed
-    name=build-essential
+    - 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
   tags:
@@ -54,7 +33,7 @@
   template: >
     dest=/usr/local/sbin/zpool-scrub.sh
     group=root
-    mode=755
+    mode=0755
     owner=root
     src=zpool-scrub.sh.j2
 
@@ -65,6 +44,6 @@
   template: >
     dest=/etc/cron.d/zpool-scrub
     group=root
-    mode=644
+    mode=0644
     owner=root
     src=cron.d_zpool-scrub.j2