blob: 2b8ae01a624b3c90642c102c9b887586ca2bd432 [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
Lee Yarwoode11d3672020-09-30 13:06:39 +010021 - name: Sync controller ceph.conf and key rings to subnode
22 include_role:
23 name: sync-controller-ceph-conf-and-keys
24 when: devstack_plugins is defined and 'devstack-plugin-ceph' in devstack_plugins
25
Andrea Frittoli5e714d32018-02-17 22:21:26 +000026 - name: Run devstack on the sub-nodes
27 include_role:
28 name: run-devstack
29 when: inventory_hostname in groups['subnode']
30
31 - name: Discover hosts
32 # Discovers compute nodes (subnodes) and maps them to cells. Only run
33 # on the controller node.
34 # NOTE(mriedem): We want to remove this if/when nova supports
35 # auto-registration of computes with cells, but that's not happening in
36 # Ocata.
37 # NOTE(andreaf) This is taken (NOTE included) from the discover_hosts
38 # function in devstack gate. Since this is now in devstack, which is
39 # branched, we know that the discover_hosts tool exists.
40 become: true
41 become_user: stack
42 shell: ./tools/discover_hosts.sh
43 args:
44 chdir: "{{ devstack_base_dir }}/devstack"
45 when: inventory_hostname == 'controller'
46
47 when:
48 - '"controller" in hostvars'
49 - '"subnode" in groups'