community.proxmox.proxmox_ceph_osd module – Manage osd.
Note
This module is part of the community.proxmox collection (version 1.6.0).
You might already have this collection installed if you are using the ansible package.
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 community.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.proxmox.proxmox_ceph_osd.
New in community.proxmox 1.5.0
Synopsis
This module allows you to add or delete an osd.
You can also in, out or scrub an osd.
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >= 2.0
requests
Parameters
Parameter |
Comments |
|---|---|
Specify the target host of the Proxmox VE cluster. Uses the |
|
Specify the password to authenticate with. Uses the |
|
Specify the target port of the Proxmox VE cluster. Uses the |
|
Time limit for requests towards the Proxmox VE API. Default: |
|
Specify the token ID. Uses the |
|
Specify the token secret. Uses the |
|
Specify the user to authenticate with. Uses the |
|
Path to a local certificate, which will be used to verify TLS connections. Ignored if |
|
Set the device class of the OSD in crush. Used with |
|
Block device name for block.db. Used with |
|
If a block.db is requested but the size is not given, will be automatically selected by bluestore_block_db_size from the ceph database (osd or global section) or config (osd or global section) in that order. If this is not available, it will be sized 10% of the size of the OSD device. Fails if the available size is not enough. Used with |
|
If set, instructs a deep scrub instead of a normal one. Used with Choices:
|
|
Block device name. Required when |
|
The cluster node name. |
|
Osd id. Required when |
|
OSD services per physical device. Used with |
|
create, delete, in, out or scrub Choices:
|
|
Validate the TLS certificates used for the connection to the Proxmox VE API. Currently defaults to Uses the Choices:
|
|
Block device name for block.wal. Used with |
|
If a block.wal is requested but the size is not given, will be automatically selected by bluestore_block_wal_size from the ceph database (osd or global section) or config (osd or global section) in that order. If this is not available, it will be sized 1% of the size of the OSD device. Fails if the available size is not enough. Used with |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Action group: community.proxmox.proxmox |
Use |
|
Support: full This action does not modify state. |
Can run in |
|
Support: none This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Add an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
dev: /dev/sdb
state: present
- name: Delete an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
cleanup: true
state: absent
- name: Scrub an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
deep: true
state: scrub
- name: Out an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
state: out
- name: In an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
state: in
- name: Start an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
state: start
- name: Stop an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
state: stop
- name: Restart an osd
community.proxmox.proxmox_ceph_osd:
api_host: proxmox-01.example.com
api_user: root@pam
api_password: secret
node: proxmox-01
osdid: 2
state: restart
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The output message that the module generates. Returned: always |