nova: refactor common playbook to use role instead of include_role

Since introducing distro. installs, we have two different role
inclusions, one for distro and one for source.  It seems that this
was done to send a different set of variables to each run.

With the recent build changes, all the branch variables are already
included using from openstack_services.yml so there's no need to
redefine them.

This means we can bring the two includes back to a normal role
reference, which resolves a few issues around using import_role and
brings back the ability to use tags only with this playbook.

Change-Id: I6c6651ce923530b1d2395cd387faf6e74c9b17d8
This commit is contained in:
Mohammed Naser 2019-03-28 18:25:16 -04:00
parent fbe90845ff
commit 1f1cca42c5
1 changed files with 7 additions and 23 deletions

View File

@ -25,7 +25,7 @@
- "../defaults/{{ install_method }}_install.yml"
tags:
- nova
tasks:
pre_tasks:
# Enable execution of ceph_client on the nova compute hosts if cinder RBD
# backends are used. This is necessary to ensure that volume-backed Nova
# instances can function when RBD is the volume backend.
@ -139,32 +139,16 @@
tags:
- always
- name: Installing the Nova service (source)
include_role:
name: "os_nova"
vars:
nova_novncproxy_git_repo: "{{ openstack_repo_git_url }}/novnc"
nova_novncproxy_git_install_branch: "{{ novncproxy_git_install_branch }}"
nova_spicehtml5_git_repo: "{{ openstack_repo_git_url }}/spice-html5"
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch }}"
nova_management_address: "{{ management_address }}"
nova_cinder_rbd_inuse: "{{ hostvars['localhost']['nova_cinder_rbd_inuse'] }}"
when: install_method == "source"
roles:
- role: "os_nova"
nova_management_address: "{{ management_address }}"
nova_cinder_rbd_inuse: "{{ hostvars['localhost']['nova_cinder_rbd_inuse'] }}"
- name: Installing the Nova service (distro)
include_role:
name: "os_nova"
vars:
nova_management_address: "{{ management_address }}"
nova_cinder_rbd_inuse: "{{ hostvars['localhost']['nova_cinder_rbd_inuse'] }}"
when: install_method == "distro"
- name: Configuring system crontab
include_role:
name: "system_crontab_coordination"
- role: "system_crontab_coordination"
tags:
- crontab
post_tasks:
- include_tasks: "../common-tasks/rsyslog-client.yml"
vars:
rsyslog_client_log_rotate_file: nova_log_rotate