devstack/roles/orchestrate-devstack/tasks/main.yaml
Andrea Frittoli afe1414019 Ensure passwordless ssh with stack between nodes
For compute migration to work, the stack user needs to be configured
with passwordless ssh between all hosts involved in the migration.

Reuse the build ssh-key for this, which is already distributed for
user root.

Depends-on: https://review.openstack.org/563584

Change-Id: Id07f55fea06509466add35315c135dbfba6aa714
2018-04-23 11:44:33 +00:00

45 lines
1.4 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: 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'