e11d367d8e
This change introduces a basic role to copy the contents of /etc/ceph between the controller and subnodes during orchestrate-devstack allowing a multinode ceph job to be introduced by I9ffdff44a3ad42ebdf26ab72e24dfe3b12b1ef8b. Note that this role is only used when devstack-plugin-ceph is enabled. Change-Id: I324c0f35db34f8540ca164bf8c6e3dea67c5b1b4
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
- name: Run devstack on the controller
|
|
include_role:
|
|
name: run-devstack
|
|
when: inventory_hostname == 'controller'
|
|
|
|
- name: Setup devstack on sub-nodes
|
|
block:
|
|
|
|
- name: Distribute the build sshkey for the user "stack"
|
|
include_role:
|
|
name: copy-build-sshkey
|
|
vars:
|
|
copy_sshkey_target_user: 'stack'
|
|
|
|
- name: Sync CA data to subnodes (when any)
|
|
# Only do this if the tls-proxy service is defined and enabled
|
|
include_role:
|
|
name: sync-devstack-data
|
|
when: devstack_services['tls-proxy']|default(false)
|
|
|
|
- name: Sync controller ceph.conf and key rings to subnode
|
|
include_role:
|
|
name: sync-controller-ceph-conf-and-keys
|
|
when: devstack_plugins is defined and 'devstack-plugin-ceph' in devstack_plugins
|
|
|
|
- name: Run devstack on the sub-nodes
|
|
include_role:
|
|
name: run-devstack
|
|
when: inventory_hostname in groups['subnode']
|
|
|
|
- name: Discover hosts
|
|
# Discovers compute nodes (subnodes) and maps them to cells. Only run
|
|
# on the controller node.
|
|
# NOTE(mriedem): We want to remove this if/when nova supports
|
|
# auto-registration of computes with cells, but that's not happening in
|
|
# Ocata.
|
|
# NOTE(andreaf) This is taken (NOTE included) from the discover_hosts
|
|
# function in devstack gate. Since this is now in devstack, which is
|
|
# branched, we know that the discover_hosts tool exists.
|
|
become: true
|
|
become_user: stack
|
|
shell: ./tools/discover_hosts.sh
|
|
args:
|
|
chdir: "{{ devstack_base_dir }}/devstack"
|
|
when: inventory_hostname == 'controller'
|
|
|
|
when:
|
|
- '"controller" in hostvars'
|
|
- '"subnode" in groups'
|