|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- ---
- - hosts: localhost
- connection: local
- gather_facts: false
- vars:
- mpdf:
- - 'nyc3-mpdf'
- number:
- - '1'
- - '2'
- mpdb:
- - 'nyc3-mpdb'
- tasks:
- - name: create frontend droplets
- digital_ocean_droplet:
- unique_name: yes
- region: nyc3
- image: debian-11-x64
- wait_timeout: 100
- name: "{{ item.0 }}{{item.1 }}"
- size_id: s-1vcpu-1gb
- state: present
- 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
- tags:
- - 'ansible'
- - 'mpdf'
- register: created_droplets
- loop: "{{ mpdf | product(number) }}"
-
- - name: create backend droplets
- digital_ocean_droplet:
- unique_name: yes
- region: nyc3
- image: debian-11-x64
- wait_timeout: 100
- name: "{{ item.0 }}{{item.1 }}"
- size_id: s-1vcpu-1gb
- state: present
- 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
- tags:
- - 'ansible'
- - 'mpdb'
- register: created_droplets
- loop: "{{ mpdb | product(number) }}"
-
|