aboutsummaryrefslogtreecommitdiff
path: root/roles/proxmox/proxmox_backup_server/tasks
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-06-25 09:52:36 -0400
committerSam Chudnick <sam@chudnick.com>2023-06-25 09:52:36 -0400
commit95b73daa36b23565a8566f71f9b202d3459b685f (patch)
treecb17b021be70e7868d0ec235a761f0ecdc80f3f2 /roles/proxmox/proxmox_backup_server/tasks
Initial CommitHEADmaster
Diffstat (limited to 'roles/proxmox/proxmox_backup_server/tasks')
-rw-r--r--roles/proxmox/proxmox_backup_server/tasks/main.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/roles/proxmox/proxmox_backup_server/tasks/main.yml b/roles/proxmox/proxmox_backup_server/tasks/main.yml
new file mode 100644
index 0000000..3e91a19
--- /dev/null
+++ b/roles/proxmox/proxmox_backup_server/tasks/main.yml
@@ -0,0 +1,42 @@
1- name: add proxmox backup repo
2 apt_repository:
3 repo: deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
4 state: present
5 update_cache: yes
6
7- name: install proxmox backup server and client
8 package:
9 name:
10 - proxmox-backup-server
11 - proxmox-backup-client
12
13- name: create datastore
14 command:
15 cmd: "proxmox-backup-manager datastore create {{ pbs_datastore }} {{ pbs_datastore_path }} --keep-last {{ pbs_keep_last }} --keep-daily {{ pbs_keep_daily }} --keep-weekly {{ pbs_keep_weekly }} --keep-monthly {{ pbs_keep_monthly }} --keep-yearly {{ pbs_keep_yearly }}"
16 register: result
17 changed_when: false
18 failed_when: result.rc not in [255]
19
20- name: create backup admin
21 command:
22 cmd: "proxmox-backup-manager user create {{ pbs_admin }} --password {{ pbs_admin_password }}"
23 register: result
24 changed_when: false
25 failed_when: result.rc not in [255]
26
27- name: assign permissions for backup admin
28 changed_when: false
29 command:
30 cmd: "proxmox-backup-manager acl update / Admin --auth-id {{ pbs_admin }}"
31
32- name: create backup user
33 command:
34 cmd: "proxmox-backup-manager user create {{ pbs_user }} --password {{ pbs_password }}"
35 register: result
36 failed_when: result.rc not in [255]
37 changed_when: false
38
39- name: assign permissions for backup user
40 changed_when: false
41 command:
42 cmd: "proxmox-backup-manager acl update / DatastoreBackup --auth-id {{ pbs_user }}"