fix container name numbering

add var container_number_start
This commit is contained in:
2023-10-14 12:39:33 +00:00
parent 43abe12bbd
commit 206b9f7659
3 changed files with 7 additions and 3 deletions

View File

@@ -1,15 +1,17 @@
---
- community.general.scaleway_compute:
- name: "{{ container_prefix }} : {{ container_action }}"
community.general.scaleway_compute:
commercial_type: "{{ item.host_type|default( scw_type )}}"
region: par1
name: "{{ container_prefix+'%02x' | format(item) }}"
name: "{{ container_prefix+'%d' | format(item) }}.{{container_domain }}"
state: "{{ (container_action == 'delete' ) | ternary( 'absent', 'running' ) }}"
api_token: "{{ scw_api_secret_key }}"
image: "{{ container_image}}"
project: "{{ scw_api_default_project_id }}"
public_ip: dynamic
wait: true
loop: "{{ range(0, container_number , 1)|list }}"
loop: "{{ range( container_number_start, container_number +1, 1)|list }}"
register: "container_info"
- name: "generate host list"