X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=AnsibleRoles.git;a=blobdiff_plain;f=roles%2Flinux-zfs%2Ftasks%2Fmain.yml;h=6e6e79d1aed6df2558e1a396e56ddc9ea070f93a;hp=0574b7fb46daf0d1f35dbcf9535fef7aa539eb1d;hb=HEAD;hpb=083109e91c2a9af446ae9afa07bc74e2143664a0 diff --git a/roles/linux-zfs/tasks/main.yml b/roles/linux-zfs/tasks/main.yml index 0574b7f..6e6e79d 100644 --- a/roles/linux-zfs/tasks/main.yml +++ b/roles/linux-zfs/tasks/main.yml @@ -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