Skip to content

Commit bdadfdb

Browse files
committed
Update storage creation task and README for PBS
1 parent 5449cfc commit bdadfdb

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ Refer to `library/proxmox_role.py` [link][user-module] and
545545

546546
You can use this role to manage storage within Proxmox VE (both in
547547
single server deployments and cluster deployments). For now, the only supported
548-
types are `dir`, `rbd`, `nfs`, `cephfs`, `lvm`,`lvmthin`, `zfspool` and `btrfs`.
549-
Here are some examples.
548+
types are `dir`, `rbd`, `nfs`, `cephfs`, `lvm`,`lvmthin`, `zfspool`, `btrfs`,
549+
and `pbs`. Here are some examples.
550550

551551
```
552552
pve_storages:
@@ -589,6 +589,13 @@ pve_storages:
589589
- 10.0.0.1
590590
- 10.0.0.2
591591
- 10.0.0.3
592+
- name: pbs1
593+
type: pbs
594+
content: [ "backup" ]
595+
server: 192.168.122.2
596+
username: user@pbs
597+
password: PBSPassword1
598+
datastore: main
592599
- name: zfs1
593600
type: zfspool
594601
content: [ "images", "rootdir" ]

tasks/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,23 @@
269269
- name: Configure Proxmox Storage
270270
proxmox_storage:
271271
name: "{{ item.name }}"
272-
type: "{{ item.type }}"
273-
disable: "{{ item.disable | default(False) }}"
274-
path: "{{ item.path | default(omit) }}"
272+
state: "{{ item.state | default('present') }}"
273+
# Globally applicable PVE API arguments
275274
content: "{{ item.content | default([]) }}"
275+
disable: "{{ item.disable | default(False) }}"
276276
nodes: "{{ item.nodes | default(omit) }}"
277+
type: "{{ item.type }}"
278+
# Remaining PVE API arguments (depending on type) past this point
279+
datastore: "{{ item.datastore | default(omit) }}"
280+
encryption_key: "{{ item.encryption_key | default(omit) }}"
281+
fingerprint: "{{ item.fingerprint | default(omit) }}"
282+
password: "{{ item.password | default(omit) }}"
283+
path: "{{ item.path | default(omit) }}"
277284
username: "{{ item.username | default(omit) }}"
278285
pool: "{{ item.pool | default(omit) }}"
279286
monhost: "{{ item.monhost | default(omit) }}"
280287
maxfiles: "{{ item.maxfiles | default(omit) }}"
281288
krbd: "{{ item.krbd | default(omit) }}"
282-
state: "{{ item.state | default('present') }}"
283289
server: "{{ item.server | default(omit) }}"
284290
export: "{{ item.export | default(omit) }}"
285291
options: "{{ item.options | default(omit) }}"

0 commit comments

Comments
 (0)