Initial Lab Setup
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
---
|
||||
- name: Install matching kernel headers and ZFS tools
|
||||
apt:
|
||||
name:
|
||||
- "linux-headers-{{ ansible_kernel }}"
|
||||
- zfs-dkms
|
||||
- zfsutils-linux
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: yes
|
||||
|
||||
- name: Check if ZFS pool already exists
|
||||
command: zpool list pbs_pool
|
||||
register: zpool_check
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
#- name: Create ZFS RAID10 Pool
|
||||
# shell: |
|
||||
# zpool create -f pbs_pool \
|
||||
# mirror \
|
||||
# ata-TOSHIBA_MG08ACA14TE_61K0A1N5FVJG \
|
||||
# ata-TOSHIBA_MG08ACA14TE_61K0A1TKFVJG \
|
||||
# mirror \
|
||||
# ata-TOSHIBA_MG08ACA14TE_71X0A01QFVJG \
|
||||
# ata-TOSHIBA_MG08ACA14TE_71X0A02VFVJG
|
||||
# args:
|
||||
# chdir: /dev/disk/by-id
|
||||
# become: yes
|
||||
# when: zpool_check.rc != 0
|
||||
|
||||
#- name: Set ZFS properties for the pool
|
||||
# zfs:
|
||||
# name: pbs_pool
|
||||
# state: present
|
||||
# extra_zfs_properties:
|
||||
# compression: lz4
|
||||
# atime: off
|
||||
# xattr: sa
|
||||
# become: yes
|
||||
#
|
||||
#- name: Create dedicated PBS dataset
|
||||
# zfs:
|
||||
# name: pbs_pool/datastore1
|
||||
# state: present
|
||||
# become: yes
|
||||
|
||||
#- name: Limit ZFS ARC cache to 2GB
|
||||
# copy:
|
||||
# dest: /etc/modprobe.d/zfs.conf
|
||||
# content: "options zfs zfs_arc_max=2147483648"
|
||||
# become: yes
|
||||
# notify: Update Initramfs
|
||||
|
||||
|
||||
#### PBS [ProxMoxBackupServer] Starts here
|
||||
|
||||
#### PBS [ProxMoxBackupServer] Starts here
|
||||
|
||||
#### PBS [ProxMoxBackupServer] Starts here
|
||||
#
|
||||
|
||||
#### PBS [ProxMoxBackupServer] Starts here
|
||||
#### PBS [ProxMoxBackupServer] for Trixie ARM64
|
||||
|
||||
- name: Create keyring directory
|
||||
file:
|
||||
path: /etc/apt/keyrings
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
|
||||
- name: Add PiPBS GPG key (Trixie compatible)
|
||||
get_url:
|
||||
url: https://dexogen.github.io/pipbs/gpg.key
|
||||
dest: /etc/apt/keyrings/pipbs.asc
|
||||
mode: '0644'
|
||||
become: yes
|
||||
|
||||
- name: Add PiPBS Trixie Repository
|
||||
copy:
|
||||
dest: /etc/apt/sources.list.d/pipbs.list
|
||||
content: "deb [arch=arm64 signed-by=/etc/apt/keyrings/pipbs.asc] https://dexogen.github.io/pipbs/ trixie main"
|
||||
become: yes
|
||||
|
||||
- name: Install Proxmox Backup Server and ZFS tools
|
||||
apt:
|
||||
name:
|
||||
- zfs-initramfs
|
||||
- proxmox-backup-server
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: yes
|
||||
|
||||
- name: Ensure PBS has ownership of the datastore
|
||||
file:
|
||||
path: /pbs_pool/datastore1
|
||||
owner: backup
|
||||
group: backup
|
||||
mode: '0770'
|
||||
state: directory
|
||||
become: yes
|
||||
Reference in New Issue
Block a user