From 820fe6786f2431d6806d4481a8a4368a2674d035 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 23 Jul 2018 14:22:26 -0400 Subject: [PATCH] Setup oslo.messaging extra packages for optional drivers Change-Id: I23eecb8747dad03df32927697e4d01fbb9224770 --- defaults/main.yml | 7 +++++++ tasks/trove_install.yml | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 152e53d..c21fe66 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -145,6 +145,10 @@ trove_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}" trove_oslomsg_notify_userid: trove trove_oslomsg_notify_vhost: /trove +## Qdrouterd integration +# TODO(ansmith): Change structure when more backends will be supported +trove_oslomsg_amqp1_enabled: "{{ trove_oslomsg_rpc_transport == 'amqp' }}" + # Rabbit vars trove_control_exchange: trove trove_rabbit_notification_topic: notification @@ -220,6 +224,9 @@ trove_pip_packages: - python-memcached - trove +trove_optional_oslomsg_amqp1_pip_packages: + - oslo.messaging[amqp1] + # This variable is used by the repo_build process to determine # which host group to check for members of before building the # pip packages required by this role. The value is picked up diff --git a/tasks/trove_install.yml b/tasks/trove_install.yml index d060bc9..130aa14 100644 --- a/tasks/trove_install.yml +++ b/tasks/trove_install.yml @@ -128,6 +128,23 @@ tags: - skip_ansible_lint +- name: Install optional pip packages + pip: + name: "{{ trove_optional_oslomsg_amqp1_pip_packages }}" + state: "{{ trove_pip_package_state }}" + virtualenv: "{{ trove_bin | dirname }}" + virtualenv_site_packages: "no" + when: trove_oslomsg_amqp1_enabled + register: install_optional_packages + until: install_optional_packages is success + retries: 5 + delay: 2 + notify: + - Restart trove API services + - Restart trove conductor service + - Restart trove taskmanager service + - Restart Apache + - name: Record the venv tag deployed ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact"