blob: f747943f3cbe62c133019466bf930cf846f86a94 [file] [log] [blame]
Andrea Frittoli5e714d32018-02-17 22:21:26 +00001- name: Run devstack on the controller
2 include_role:
3 name: run-devstack
4 when: inventory_hostname == 'controller'
5
6- name: Setup devstack on sub-nodes
7 block:
8
Andrea Frittoliafe14142018-04-20 13:36:22 +01009 - name: Distribute the build sshkey for the user "stack"
10 include_role:
11 name: copy-build-sshkey
12 vars:
13 copy_sshkey_target_user: 'stack'
14
Andrea Frittoli5e714d32018-02-17 22:21:26 +000015 - name: Sync CA data to subnodes (when any)
16 # Only do this if the tls-proxy service is defined and enabled
17 include_role:
18 name: sync-devstack-data
19 when: devstack_services['tls-proxy']|default(false)
20
21 - name: Run devstack on the sub-nodes
22 include_role:
23 name: run-devstack
24 when: inventory_hostname in groups['subnode']
25
26 - name: Discover hosts
27 # Discovers compute nodes (subnodes) and maps them to cells. Only run
28 # on the controller node.
29 # NOTE(mriedem): We want to remove this if/when nova supports
30 # auto-registration of computes with cells, but that's not happening in
31 # Ocata.
32 # NOTE(andreaf) This is taken (NOTE included) from the discover_hosts
33 # function in devstack gate. Since this is now in devstack, which is
34 # branched, we know that the discover_hosts tool exists.
35 become: true
36 become_user: stack
37 shell: ./tools/discover_hosts.sh
38 args:
39 chdir: "{{ devstack_base_dir }}/devstack"
40 when: inventory_hostname == 'controller'
41
42 when:
43 - '"controller" in hostvars'
44 - '"subnode" in groups'