Skip to content

Commit

Permalink
proxmox-backup: Passage à syncoid
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj committed Jul 25, 2024
1 parent fd47c5e commit 613baaa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
3 changes: 3 additions & 0 deletions hosts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ osm26.openstreetmap.fr proxmox_backup_exclude="118 144 186 999" proxmox_backup_t
osm27.openstreetmap.fr proxmox_backup_exclude="118 144 186 999" proxmox_backup_target="osm32.openstreetmap.fr:rpool/backups"
osm28.openstreetmap.fr proxmox_backup_exclude="118 144 186 999" proxmox_backup_target="osm32.openstreetmap.fr:rpool/backups"
osm32.openstreetmap.fr proxmox_backup_host=true
osm43.openstreetmap.fr proxmox_backup_exclude="101 118 144 186 209 400 999 9000" proxmox_backup_target="osm32.openstreetmap.fr:backups/cluster-moji"
osm40.openstreetmap.fr proxmox_backup_exclude="101 118 144 186 209 400 999 9000" proxmox_backup_target="osm32.openstreetmap.fr:backups/cluster-moji"
osm43.openstreetmap.fr proxmox_backup_exclude="101 118 144 186 209 400 999 9000" proxmox_backup_target="osm32.openstreetmap.fr:backups/cluster-moji"

[renderd]
osm13.openstreetmap.fr renderd_layers=true
Expand Down
26 changes: 18 additions & 8 deletions roles/proxmox-backup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apt:
pkg:
- python3
- sanoid

- name: add user proxmox-backup
user:
Expand Down Expand Up @@ -32,27 +33,36 @@
key_options: "no-port-forwarding"
with_items:
"{{ groups['proxmox-backup'] }}"
when:
proxmox_backup_host is defined

- name: configure sudoers to launch pct commands
community.general.sudoers:
name: proxmox-backup
user: proxmox-backup
commands:
- /usr/bin/cat /etc/pve/.vmlist
- /usr/bin/cat /etc/pve/lxc/*.conf
- /usr/sbin/pct snapshot *
- /usr/sbin/pct listsnapshot *
- /usr/sbin/pct delsnapshot *
- /usr/sbin/zfs send *
- /usr/sbin/pct config *
- /usr/sbin/pvesm path *
when:
proxmox_backup_host is not defined

- name: configure sudoers to launch zfs commands
community.general.sudoers:
name: proxmox-backup-host
user: proxmox-backup
commands:
- /usr/sbin/zfs recv *
- name: Allow zfs commands to send
community.general.zfs_delegate_admin:
name: local-zfs
users: proxmox-backup
permissions: send,hold,mount,snapshot,destroy
when:
proxmox_backup_host is not defined

- name: Allow zfs commands to receive
community.general.zfs_delegate_admin:
name: backups
users: proxmox-backup
permissions: compression,mountpoint,create,mount,receive,rollback,destroy
when:
proxmox_backup_host is defined

Expand Down

0 comments on commit 613baaa

Please sign in to comment.