--- - include: generate_keypair.yml when: generate_keypair|bool - name: "Processing server {{ item_server.name }} for {{ item_cloud.oscc_cloud|default(item_cloud.name) }} {{ item_cloud.region_name|default('') }}" os_server: cloud: "{{ item_cloud.oscc_cloud|default(item_cloud.name) }}" state: "{{ item_server.state|default(omit) }}" name: "{{ item_server.name.partition('.')[0] }}{{ '' if item_server.node_count is not defined else item }}{{ item_server.name.partition('.')[1] + item_server.name.partition('.')[2] }}" image: "{{ item_server.image }}" auto_ip: "{{ item_server.auto_ip|default(omit) }}" boot_from_volume: "{{ item_server.boot_from_volume|default(omit) }}" boot_volume: "{{ item_server.boot_volume|default(omit) }}" config_drive: "{{ item_server.config_drive|default(omit) }}" flavor: "{{ item_server.flavor|default(omit) }}" flavor_include: "{{ item_server.flavor_include|default(omit) }}" flavor_ram: "{{ item_server.flavor_ram|default(omit) }}" floating_ip_pools: "{{ item_server.floating_ip_pools|default(omit) }}" floating_ips: "{{ item_server.floating_ips|default(omit) }}" image_exclude: "{{ item_server.image_exclude|default(omit) }}" key: "{{ item_server.key|default(omit) }}" key_name: "{{ cl_generated_keypair_name|default(item_server.key_name)|default(omit) }}" meta: "{{ item_server.meta|default(omit) }}" network: "{{ item_server.network|default(omit) }}" nics: "{{ item_server.nics|default(omit) }}" scheduler_hints: "{{ item_server.scheduler_hints|default(omit) }}" security_groups: "{{ item_server.security_groups|default(omit) }}" terminate_volume: "{{ item_server.terminate_volume|default(omit) }}" userdata: "{{ item_server.userdata|default(omit) }}" volume_size: "{{ item_server.volume_size|default(omit) }}" volumes: "{{ item_server.volumes|default(omit) }}" region_name: "{{ item_cloud.region_name|default(omit) }}" with_sequence: start=1 end={{ item_server.node_count|default(1) }} format=%02x register: os_server_result - add_host: name={{ item.server.name }} groups=cl_servers_just_created ansible_ssh_host={{ item.server.public_v4 }} with_items: "{{ os_server_result.results|default([]) }}"