- name: Check trusted gpg keys command: pacman-key -l register: pacmankeys changed_when: false check_mode: no no_log: true - name: Trust archzfs signing key command: pacman-key -a - args: stdin: "{{ lookup('file', 'archzfs.gpg') }}" when: '"DDF7DB817396A49B2A2723F7403BD972F75D9D76" not in pacmankeys.stdout' register: archzfs_key_imported - name: Sign archzfs signing key command: pacman-key --lsign-key "DDF7DB817396A49B2A2723F7403BD972F75D9D76" when: archzfs_key_imported.changed - name: Additional pacman configs register: updatepacman copy: src: "files/{{ item }}" dest: /etc/pacman.d/conf.d/ mode: 0644 owner: root group: root loop: - archzfs.conf - name: Update cache when: updatepacman.changed pacman: name: [] state: present update_cache: true - name: Install packages package: name: - archzfs-linux state: present - name: Enable services systemd: enabled: yes name: "{{ item }}" daemon_reload: yes loop: - zfs-import-cache.service - zfs-mount.service - zfs.target - zfs-import.target