|
@@ -5,9 +5,7 @@ |
|
|
vars: |
|
|
vars: |
|
|
mpdf: |
|
|
mpdf: |
|
|
- 'nyc3-mpdf' |
|
|
- 'nyc3-mpdf' |
|
|
number: |
|
|
|
|
|
- '1' |
|
|
|
|
|
- '2' |
|
|
|
|
|
|
|
|
count: 5 |
|
|
mpdb: |
|
|
mpdb: |
|
|
- 'nyc3-mpdb' |
|
|
- 'nyc3-mpdb' |
|
|
tasks: |
|
|
tasks: |
|
@@ -17,25 +15,31 @@ |
|
|
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: absent |
|
|
state: absent |
|
|
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" |
|
|
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" |
|
|
ssh_keys: [ '94:5e:bc:d4:fe:5a:b0:74:7f:06:fc:4e:3d:f7:3e:ea' ] # <---- put your numeric ssh key in here |
|
|
ssh_keys: [ '94:5e:bc:d4:fe:5a:b0:74:7f:06:fc:4e:3d:f7:3e:ea' ] # <---- put your numeric ssh key in here |
|
|
|
|
|
tags: |
|
|
|
|
|
- 'ansible' |
|
|
|
|
|
- 'mpdf' |
|
|
register: deleted_droplets |
|
|
register: deleted_droplets |
|
|
loop: "{{ mpdf | product(number) }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: delete backend droplets |
|
|
|
|
|
|
|
|
loop: "{{ range(1,count+1)|list }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: delete 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: absent |
|
|
state: absent |
|
|
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" |
|
|
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" |
|
|
ssh_keys: [ '94:5e:bc:d4:fe:5a:b0:74:7f:06:fc:4e:3d:f7:3e:ea' ] # <---- put your numeric ssh key in here |
|
|
ssh_keys: [ '94:5e:bc:d4:fe:5a:b0:74:7f:06:fc:4e:3d:f7:3e:ea' ] # <---- put your numeric ssh key in here |
|
|
|
|
|
tags: |
|
|
|
|
|
- 'ansible' |
|
|
|
|
|
- 'mpdb' |
|
|
register: deleted_droplets |
|
|
register: deleted_droplets |
|
|
loop: "{{ mpdb | product(number) }}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loop: "{{ range(1,count+1)|list }}" |
|
|
|
|
|
|