From 1f1cca42c5ade59aa73eaf30819ab76a0998c8b2 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Thu, 28 Mar 2019 18:25:16 -0400 Subject: [PATCH] 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 --- playbooks/common-playbooks/nova.yml | 30 +++++++---------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index 966af88b04..fd6bf6d4da 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -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