diff --git a/playbooks/create_droplet.yml b/playbooks/create_droplet.yml index d50593f..fc7ece1 100644 --- a/playbooks/create_droplet.yml +++ b/playbooks/create_droplet.yml @@ -5,9 +5,7 @@ vars: mpdf: - 'nyc3-mpdf' - number: - - '1' - - '2' + number: 5 mpdb: - 'nyc3-mpdb' tasks: @@ -17,7 +15,7 @@ region: nyc3 image: debian-11-x64 wait_timeout: 100 - name: "{{ item.0 }}{{item.1 }}" + name: "mpdb{{ item }}" size_id: s-1vcpu-1gb state: present oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" @@ -26,15 +24,15 @@ - 'ansible' - 'mpdf' register: created_droplets - loop: "{{ mpdf | product(number) }}" - + with_sequence: count="{{ 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 }}" + name: "mpdf{{item }}" size_id: s-1vcpu-1gb state: present oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" @@ -43,5 +41,5 @@ - 'ansible' - 'mpdb' register: created_droplets - loop: "{{ mpdb | product(number) }}" + with_sequence: count="{{ number }}"