22
22
type:
23
23
required: true
24
24
aliases: [ "storagetype" ]
25
- choices: [ "dir", "nfs", "rbd", "lvm", "lvmthin", "cephfs", "zfspool" ]
25
+ choices: [ "dir", "nfs", "rbd", "lvm", "lvmthin", "cephfs", "zfspool", "btrfs" ]
26
26
description:
27
27
- Type of storage, must be supported by Proxmox.
28
28
disable:
98
98
required: false
99
99
description:
100
100
- Use ZFS thin-provisioning.
101
+ is_mountpoint:
102
+ required: false
103
+ description:
104
+ - Specifies whether or not the given path is an externally managed
105
+ mountpoint.
101
106
102
107
author:
103
108
- Fabien Brachere (@fbrachere)
@@ -192,6 +197,7 @@ def __init__(self, module):
192
197
self .vgname = module .params ['vgname' ]
193
198
self .thinpool = module .params ['thinpool' ]
194
199
self .sparse = module .params ['sparse' ]
200
+ self .is_mountpoint = module .params ['is_mountpoint' ]
195
201
196
202
try :
197
203
self .existing_storages = pvesh .get ("storage" )
@@ -251,6 +257,8 @@ def prepare_storage_args(self):
251
257
args ['thinpool' ] = self .thinpool
252
258
if self .sparse is not None :
253
259
args ['sparse' ] = 1 if self .sparse else 0
260
+ if self .is_mountpoint is not None :
261
+ args ['is_mountpoint' ] = 1 if self .is_mountpoint else 0
254
262
255
263
if self .maxfiles is not None and 'backup' not in self .content :
256
264
self .module .fail_json (msg = "maxfiles is not allowed when there is no 'backup' in content" )
@@ -325,7 +333,7 @@ def main():
325
333
nodes = dict (type = 'list' , required = False , default = None ),
326
334
type = dict (default = None , type = 'str' , required = True ,
327
335
choices = ["dir" , "nfs" , "rbd" , "lvm" , "lvmthin" , "cephfs" ,
328
- "zfspool" ]),
336
+ "zfspool" , "btrfs" ]),
329
337
disable = dict (required = False , type = 'bool' , default = False ),
330
338
state = dict (default = 'present' , choices = ['present' , 'absent' ], type = 'str' ),
331
339
path = dict (default = None , required = False , type = 'str' ),
@@ -340,6 +348,7 @@ def main():
340
348
vgname = dict (default = None , type = 'str' , required = False ),
341
349
thinpool = dict (default = None , type = 'str' , required = False ),
342
350
sparse = dict (default = None , type = 'bool' , required = False ),
351
+ is_mountpoint = dict (default = None , type = 'bool' , required = False ),
343
352
)
344
353
345
354
module = AnsibleModule (
@@ -353,6 +362,7 @@ def main():
353
362
["type" , "lvm" , ["vgname" , "content" ]],
354
363
["type" , "lvmthin" , ["vgname" , "thinpool" , "content" ]],
355
364
["type" , "zfspool" , ["pool" , "content" ]],
365
+ ["type" , "btrfs" , ["path" , "content" ]],
356
366
]
357
367
)
358
368
storage = ProxmoxStorage (module )
0 commit comments