hcloud_volume – Create and manage block volumes on the Hetzner Cloud¶
New in version 2.8.
Requirements¶
The below requirements are needed on the host that executes this module.
- hcloud-python >= 1.0.0
Parameters¶
See Also¶
See also
- Documentation for Hetzner Cloud API
- Complete reference for the Hetzner Cloud API.
Examples¶
- name: Create a volume
  hcloud_volume:
    name: my-volume
    location: fsn1
    size: 100
    state: present
- name: Create a volume and format it with ext4
  hcloud_volume:
    name: my-volume
    location: fsn
    format: ext4
    size: 100
    state: present
- name: Mount a existing volume and automount
  hcloud_volume:
    name: my-volume
    server: my-server
    automount: yes
    state: present
- name: Mount a existing volume and automount
  hcloud_volume:
    name: my-volume
    server: my-server
    automount: yes
    state: present
- name: Ensure the volume is absent (remove if needed)
  hcloud_volume:
    name: my-volume
    state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Christopher Schmitt (@cschmitt-hcloud)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
