The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
assign_public_ip boolean |
| This will assign the machine to the public LAN. If no LAN exists with public Internet access it is created. |
auto_increment boolean |
| Whether or not to increment a single number in the name for created virtual machines. |
bus - |
| The bus type for the volume. |
cores - | Default: 2 | The number of CPU cores to allocate to the virtual machine. |
count - | Default: 1 | The number of virtual machines to create. |
cpu_family - |
| The CPU family type to allocate to the virtual machine. |
datacenter - | The datacenter to provision this virtual machine. | |
image - / required | The system image ID for creating the virtual machine, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. | |
image_password - | Password set for the administrative user. | |
instance_ids - | list of instance ids, currently only used when state='absent' to remove instances. | |
lan - | Default: 1 | The ID of the LAN you wish to add the servers to. |
location - |
| The datacenter location. Use only if you want to create the Datacenter or else this value is ignored. |
name - / required | The name of the virtual machine. | |
ram - | Default: 2048 | The amount of memory to allocate to the virtual machine. |
remove_boot_volume boolean |
| remove the bootVolume of the virtual machine you're destroying. |
ssh_keys - | Public SSH keys allowing access to the virtual machine. | |
state - |
| create or terminate instances |
subscription_password - | THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. | |
subscription_user - | The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. | |
volume_size - | Default: 10 | The size in GB of the boot volume. |
wait boolean |
| wait for the instance to be in state 'running' before returning |
wait_timeout - | Default: 600 | how long before wait gives up, in seconds |
# 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
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/profitbricks_module.html