Andrea Frittoli | 5e714d3 | 2018-02-17 22:21:26 +0000 | [diff] [blame^] | 1 | - 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 | |
| 9 | - name: Sync CA data to subnodes (when any) |
| 10 | # Only do this if the tls-proxy service is defined and enabled |
| 11 | include_role: |
| 12 | name: sync-devstack-data |
| 13 | when: devstack_services['tls-proxy']|default(false) |
| 14 | |
| 15 | - name: Run devstack on the sub-nodes |
| 16 | include_role: |
| 17 | name: run-devstack |
| 18 | when: inventory_hostname in groups['subnode'] |
| 19 | |
| 20 | - name: Discover hosts |
| 21 | # Discovers compute nodes (subnodes) and maps them to cells. Only run |
| 22 | # on the controller node. |
| 23 | # NOTE(mriedem): We want to remove this if/when nova supports |
| 24 | # auto-registration of computes with cells, but that's not happening in |
| 25 | # Ocata. |
| 26 | # NOTE(andreaf) This is taken (NOTE included) from the discover_hosts |
| 27 | # function in devstack gate. Since this is now in devstack, which is |
| 28 | # branched, we know that the discover_hosts tool exists. |
| 29 | become: true |
| 30 | become_user: stack |
| 31 | shell: ./tools/discover_hosts.sh |
| 32 | args: |
| 33 | chdir: "{{ devstack_base_dir }}/devstack" |
| 34 | when: inventory_hostname == 'controller' |
| 35 | |
| 36 | when: |
| 37 | - '"controller" in hostvars' |
| 38 | - '"subnode" in groups' |