2 - name: Prepare infrastructure and create operation instances
11 hosts: "{{ operation.hosts }}"
13 - name: Create cluster operator access keypair
17 - name: Wait for system to become reachable
19 - name: Generate an OpenSSH keypair with the default values (4096 bits, rsa)
20 community.crypto.openssh_keypair:
21 path: "~/.ssh/{{ keypair.name }}"
23 - name: Create cluster instances
29 hosts: "{{ cluster.hosts }}"
30 operator_key: "{{ hostvars['operator0']['key']['public_key'] }}"
31 - name: Create cluster operator access information
34 - role: geerlingguy.ansible
37 - name: Add cluster hostnames to /etc/hosts file
40 line: "{{ item.value + ' ' + item.key }}"
42 loop: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
43 - name: Create inventory for in-cluster deployment stage
45 src: templates/inventory.ini.j2
46 dest: "{{ operation.inventory }}"
48 hosts: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"