6adcf5f65f2c6103a6d228dd09dad26919a6e77d
[integration.git] / deployment / noheat / infra-openstack / ansible / create.yml
1 ---
2 - name: Prepare infrastructure and create operation instances
3   hosts: localhost
4   connection: local
5   gather_facts: False
6   roles:
7     - openstack/create_devstack_network
8     - openstack/create_devstack_securitygroup
9     - openstack/create_devstack_keypair
10     - role: openstack/create_devstack_hosts
11       hosts: "{{ operation.hosts }}"
12       operator_key: "dummy"
13 - name: Create cluster operator access keypair
14   hosts: "operator0"
15   gather_facts: False
16   tasks:
17     - name: Wait for system to become reachable
18       wait_for_connection:
19     - name: Generate an OpenSSH keypair with the default values (4096 bits, rsa)
20       community.crypto.openssh_keypair:
21         path: "~/.ssh/{{ keypair.name }}"
22       register: key
23 - name: Create cluster instances
24   hosts: localhost
25   connection: local
26   gather_facts: False
27   roles:
28     - role: openstack/create_devstack_hosts
29       hosts: "{{ cluster.hosts }}"
30       operator_key: "{{ hostvars['operator0']['key']['public_key'] }}"