Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Trying to get my Ansible playbook to keep unique_names, but I can’t get this feature to work. Followed the tutorial on Ansible with DO 2.0 Api, but every time I run my playbook, totally new droplets are created with the SAME names!
Here’s my playbook, which otherwise works fine.
---
- hosts: digitalocean
vars:
do_token: xxxx
droplets:
- droplet-one
- droplet-two
tasks:
- name: ensure key exists at DigitalOcean
digital_ocean: >
state=present
command=ssh
name=demo
ssh_pub_key={{ lookup('file', '~/.ssh/id_rsa.pub') }}
api_token={{ do_token }}
register: demo
- name: ensure droplets exist
digital_ocean:
state: present
command: droplet
name: "{{item}}"
unique_name: yes
size_id: 512mb
region_id: sfo1
image_id: 15764687
private_networking: "yes"
ssh_key_ids: "{{ demo.ssh_key.id }}"
api_token: "{{ do_token }}"
with_items: "{{droplets}}"
register: droplet_details
- debug: msg="IP is {{ item.droplet.ip_address }}"
with_items: droplet_details.results
58a301358aa344a792e7b70f6a1ed5
Faisol Bello
Serhii Meleshchenko Miratechgroup
24230eeb31a542b58d79c0715000b8
biomechanico
eddiew
RhumSite
Daniel Olshansky
bb17b733a0984acfbc8d8b875c209d