diff --git a/tasks/main.yml b/tasks/main.yml index 4f6351ac..6812c467 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -130,11 +130,11 @@ # the database connection string and therefore # cannot run nova-manage. - include: nova_db_post_setup.yml - delegate_to: "{{ random_conductor }}" + delegate_to: "{{ first_conductor }}" run_once: true when: - "nova_services['nova-compute']['group'] in group_names" vars: - random_conductor: "{{ groups[nova_services['nova-conductor']['group']] | random }}" + first_conductor: "{{ groups[nova_services['nova-conductor']['group']][0] }}" tags: - nova-config diff --git a/tasks/nova_db_post_setup.yml b/tasks/nova_db_post_setup.yml index 758b4a4c..152417f5 100644 --- a/tasks/nova_db_post_setup.yml +++ b/tasks/nova_db_post_setup.yml @@ -15,8 +15,8 @@ - name: Set the delegated task facts set_fact: - _db_nova_bin: "{{ hostvars[random_conductor]['nova_bin'] | default(nova_bin) }}" - _db_nova_system_user_name: "{{ hostvars[random_conductor]['nova_system_user_name'] | default(nova_system_user_name) }}" + _db_nova_bin: "{{ hostvars[first_conductor]['nova_bin'] | default(nova_bin) }}" + _db_nova_system_user_name: "{{ hostvars[first_conductor]['nova_system_user_name'] | default(nova_system_user_name) }}" # This needs to be done after Compute hosts are added. - name: Perform a cell_v2 discover