Files
ansible_role_package/tasks/repos/zfs.yml
Matthew Stobbs 9dc78f3b89 add new packages
- cockpit
- firewalld
- nfs client and server
- restic
- samba client and server
- targetcli
2025-03-26 21:31:13 -06:00

45 lines
1.3 KiB
YAML

# vim: set filetype=yaml.ansible :
---
- name: RedHat based configuration
when:
- ansible_os_family == 'RedHat'
block:
- name: Add openzfs gpg_key
become: "{{ sys_pkg_become }}"
ansible.builtin.rpm_key:
key: "{{ zfs.gpg_key }}"
fingerprint: "{{ zfs.gpg_fp }}"
state: present
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.dnf:
name: "{{ zfs.repo_pkg }}"
disable_gpg_check: "{{ zfs.skip_gpg_check }}"
state: present
- name: Debian configuration
when:
- ansible_os_family == 'Debian'
block:
- name: Enable openzfs repository
become: "{{ sys_pkg_become }}"
ansible.builtin.apt_repository:
repo: |
deb http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
deb-src http://deb.debian.org/debian {{ zfs.release }}-backports main contrib
filename: "{{ zfs.release }}-backports"
state: present
update_cache: false
- name: Pin zfs package to backports
become: "{{ sys_pkg_become }}"
ansible.builtin.copy:
dest: /etc/apt/preferences.d/90_zfs
state: file
mode: '0644'
content: |
Package: src:zfs-linux
Pin: release n={{ zfs.release }}-backports
Pin-Priority: 990