5 name: "{{ host.name }}"
6 image: "{{ host.image }}"
7 flavor: "{{ host.flavor }}"
8 key_name: "{{ host.keypair }}"
9 network: "{{ host.network }}"
11 - "{{ host.securitygroup }}"
12 auto_ip: "{{ host.auto_ip | default(true) }}"
13 boot_from_volume: true
14 terminate_volume: true
15 volume_size: "{{ host.volume_size | default(10) }}"
19 - "{{ operator_key }}"
22 - name: Add host to inventory
24 hostname: "{{ new_host.server.name }}"
25 groups: "{{ cluster.name }}"
26 ansible_ssh_host: "{{ new_host.server.public_v4 }}"
27 ansible_ssh_user: "{{ image.user }}"
28 ansible_ssh_extra_args: "-o StrictHostKeyChecking=no"
29 ansible_ssh_private_key_file: "~/.ssh/{{ keypair.key.name }}"
31 - name: Add host to hosts dict
33 hosts_dict: "{{ hosts_dict|default({}) | combine( {new_host.server.name: new_host.server.private_v4} ) }}"