diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index b5da67e7dd..8b158246d5 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -103,6 +103,9 @@ - role: "ceph_client" openstack_service_system_user: "{{ cinder_system_user_name }}" openstack_service_venv_bin: "{{ cinder_bin }}" + when: + - inventory_hostname in groups['cinder_volume'] + - cinder_backend_rbd_inuse | default(false) | bool tags: - ceph - role: "rsyslog_client" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 678969d50b..6a3a6476f2 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -70,14 +70,17 @@ - include: common-tasks/package-cache-proxy.yml roles: - role: "os_glance" - - role: "openstack_openrc" - tags: - - openrc - role: "ceph_client" openstack_service_system_user: "{{ glance_system_user_name }}" openstack_service_venv_bin: "{{ glance_bin }}" + when: + - inventory_hostname in groups['glance_api'] + - (glance_default_store | default('none') | lower == 'rbd') tags: - ceph + - role: "openstack_openrc" + tags: + - openrc - role: "rsyslog_client" rsyslog_client_log_rotate_file: glance_log_rotate rsyslog_client_log_dir: "/var/log/glance" diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index 010eaa7503..9c48186d09 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -46,6 +46,9 @@ - role: "ceph_client" openstack_service_system_user: "{{ gnocchi_system_user_name }}" openstack_service_venv_bin: "" + when: + - inventory_hostname in groups['gnocchi_api'] + - (gnocchi_storage_driver | default('none') | lower == 'ceph') tags: - ceph - role: "os_gnocchi" diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 7f59da439d..63e90e0dff 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -147,6 +147,10 @@ - role: "ceph_client" openstack_service_system_user: "{{ nova_system_user_name }}" openstack_service_venv_bin: "{{ nova_bin }}" + when: + - inventory_hostname in groups['nova_compute'] + - nova_libvirt_images_rbd_pool is defined or + cinder_backends_rbd_inuse | default(false) | bool tags: - ceph - role: "openstack_openrc"