ansible / ansible.builtin / v2.4.4.0-1 / module / profitbricks Create, destroy, start, stop, and reboot a ProfitBricks virtual machine. | "added in version" 2.0 of ansible.builtin" Authors: Matt Baldwin (baldwin@stackpointcloud.com) preview | supported by communityansible.builtin.profitbricks (v2.4.4.0-1) — module
pip
Install with pip install ansible==2.4.4.0.post1
Create, destroy, update, start, stop, and reboot a ProfitBricks virtual machine. When the virtual machine is created it can optionally wait for it to be 'running' before returning. This module has a dependency on profitbricks >= 1.0.0
# Note: These examples do not set authentication details, see the AWS Guide for details. # Provisioning example. This will create three servers and enumerate their names. - profitbricks: datacenter: Tardis One name: web%02d.stackpointcloud.com cores: 4 ram: 2048 volume_size: 50 cpu_family: INTEL_XEON image: a3eae284-a2fe-11e4-b187-5f1f641608c8 location: us/las count: 3 assign_public_ip: true
# Removing Virtual machines - profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' - 'web002.stackpointcloud.com' - 'web003.stackpointcloud.com' wait_timeout: 500 state: absent
# Starting Virtual Machines. - profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' - 'web002.stackpointcloud.com' - 'web003.stackpointcloud.com' wait_timeout: 500 state: running
# Stopping Virtual Machines - profitbricks: datacenter: Tardis One instance_ids: - 'web001.stackpointcloud.com' - 'web002.stackpointcloud.com' - 'web003.stackpointcloud.com' wait_timeout: 500 state: stopped
bus: choices: - IDE - VIRTIO default: VIRTIO description: - The bus type for the volume. required: false lan: default: 1 description: - The ID of the LAN you wish to add the servers to. required: false ram: default: 2048 description: - The amount of memory to allocate to the virtual machine. required: false name: description: - The name of the virtual machine. required: true wait: choices: - 'yes' - 'no' default: 'yes' description: - wait for the instance to be in state 'running' before returning required: false cores: default: 2 description: - The number of CPU cores to allocate to the virtual machine. required: false count: default: 1 description: - The number of virtual machines to create. required: false image: description: - The system image ID for creating the virtual machine, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. required: true state: choices: - running - stopped - absent - present default: present description: - create or terminate instances required: false location: choices: - us/las - de/fra - de/fkb default: us/las description: - The datacenter location. Use only if you want to create the Datacenter or else this value is ignored. required: false ssh_keys: description: - Public SSH keys allowing access to the virtual machine. required: false version_added: '2.2' version_added_collection: ansible.builtin cpu_family: choices: - AMD_OPTERON - INTEL_XEON default: AMD_OPTERON description: - The CPU family type to allocate to the virtual machine. required: false version_added: '2.2' version_added_collection: ansible.builtin datacenter: default: null description: - The datacenter to provision this virtual machine. required: false volume_size: default: 10 description: - The size in GB of the boot volume. required: false instance_ids: description: - list of instance ids, currently only used when state='absent' to remove instances. required: false wait_timeout: default: 600 description: - how long before wait gives up, in seconds auto_increment: choices: - 'yes' - 'no' default: true description: - Whether or not to increment a single number in the name for created virtual machines. image_password: description: - Password set for the administrative user. required: false version_added: '2.2' version_added_collection: ansible.builtin assign_public_ip: default: false description: - This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created. required: false subscription_user: default: null description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. required: false remove_boot_volume: choices: - 'yes' - 'no' default: 'yes' description: - remove the bootVolume of the virtual machine you're destroying. required: false subscription_password: default: null description: - THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. required: false