community / community.general / 1.3.11 / module / profitbricks_volume Create or destroy a volume. Authors: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>community.general.profitbricks_volume (1.3.11) — module
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.11
Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0
- name: Create multiple volumes community.general.profitbricks_volume: datacenter: Tardis One name: vol%02d count: 5 auto_increment: yes wait_timeout: 500 state: present
- name: Remove Volumes community.general.profitbricks_volume: datacenter: Tardis One instance_ids: - 'vol01' - 'vol02' wait_timeout: 500 state: absent
bus: choices: - IDE - VIRTIO default: VIRTIO description: - The bus type. required: false type: str name: description: - The name of the volumes. You can enumerate the names using auto_increment. type: str size: default: 10 description: - The size of the volume. required: false type: int wait: default: 'yes' description: - wait for the datacenter to be created before returning required: false type: bool count: default: 1 description: - The number of volumes you wish to create. required: false type: int image: description: - The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID. type: str state: default: present description: - create or terminate datacenters - 'The available choices are: C(present), C(absent).' required: false type: str server: description: - Server name to attach the volume to. type: str ssh_keys: description: - Public SSH keys allowing access to the virtual machine. elements: str required: false type: list disk_type: choices: - HDD - SSD default: HDD description: - The disk type of the volume. required: false type: str datacenter: description: - The datacenter in which to create the volumes. type: str instance_ids: description: - list of instance ids, currently only used when state='absent' to remove instances. elements: str required: false type: list licence_type: default: UNKNOWN description: - The licence type for the volume. This is used when the image is non-standard. - 'The available choices are: C(LINUX), C(WINDOWS), C(UNKNOWN), C(OTHER).' required: false type: str wait_timeout: default: 600 description: - how long before wait gives up, in seconds type: int auto_increment: default: true description: - Whether or not to increment a single number in the name for created virtual machines. type: bool image_password: description: - Password set for the administrative user. required: false type: str subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. required: false type: str subscription_password: description: - THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. required: false type: str