maxhoesel.proxmox.pbs_directory module – Manage the mountpoint for a physical disk on a PBS node
Note
This module is part of the maxhoesel.proxmox collection (version 5.1.1).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install maxhoesel.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: maxhoesel.proxmox.pbs_directory.
New in maxhoesel.proxmox 4.0.0
Synopsis
Initialize a disk, create a FS and mount it on a path on a PBS node, or delete such a path mount. This module can only create mounts on unused disks and will not perform potentially destructive tasks.
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >=1.2
requests
Parameters
Parameter |
Comments |
|---|---|
Specify the target host of the Proxmox VE cluster. |
|
Specify the password to authenticate with. You can also use the |
|
Specify the user to authenticate with. |
|
Disk identifier, such as sda or nvme0n1. Ignored if |
|
Type of filesystem to use. Choices:
|
|
Whether to first initialize the disk with GPT before adding it as a directory. Choices:
|
|
Name of the path under which the disk should be mounted. For example, if mount_name=disk1, then the mount will be under /mnt/datastore/disk1. Note that once a disk is mounted that mount path cannot be moved. If |
|
Node on which the disk resides. Default: hostname section of api_host. |
|
The state that the disk should be in. Choices:
|
|
Validate SSL certificate of the PVE host upon connecting Choices:
|
Notes
Note
This module will not add the directory as a datastore, use the maxhoesel.proxmox.pbs_datastore module to do so
Check mode is supported.
Examples
- name: Create a mount
maxhoesel.proxmox.pbs_directory:
api_user: root@pam
api_password: secret
api_host: helldorado
disk: sda
mount_name: disk1
node: hellodorado
filesystem: ext4