Browse Source

updated create working now with*

master
erin sims 2 years ago
parent
commit
0b3f1810a7
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      playbooks/create_droplet.yml

+ 6
- 8
playbooks/create_droplet.yml View File

@@ -5,9 +5,7 @@
vars: vars:
mpdf: mpdf:
- 'nyc3-mpdf' - 'nyc3-mpdf'
number:
- '1'
- '2'
number: 5
mpdb: mpdb:
- 'nyc3-mpdb' - 'nyc3-mpdb'
tasks: tasks:
@@ -17,7 +15,7 @@
region: nyc3 region: nyc3
image: debian-11-x64 image: debian-11-x64
wait_timeout: 100 wait_timeout: 100
name: "{{ item.0 }}{{item.1 }}"
name: "mpdb{{ item }}"
size_id: s-1vcpu-1gb size_id: s-1vcpu-1gb
state: present state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
@@ -26,15 +24,15 @@
- 'ansible' - 'ansible'
- 'mpdf' - 'mpdf'
register: created_droplets register: created_droplets
loop: "{{ mpdf | product(number) }}"
with_sequence: count="{{ number }}"
- name: create backend droplets - name: create backend droplets
digital_ocean_droplet: digital_ocean_droplet:
unique_name: yes unique_name: yes
region: nyc3 region: nyc3
image: debian-11-x64 image: debian-11-x64
wait_timeout: 100 wait_timeout: 100
name: "{{ item.0 }}{{item.1 }}"
name: "mpdf{{item }}"
size_id: s-1vcpu-1gb size_id: s-1vcpu-1gb
state: present state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
@@ -43,5 +41,5 @@
- 'ansible' - 'ansible'
- 'mpdb' - 'mpdb'
register: created_droplets register: created_droplets
loop: "{{ mpdb | product(number) }}"
with_sequence: count="{{ number }}"

Loading…
Cancel
Save