From 76e16f9ff8362441c506eb298ef26439c219d813 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 23 Jul 2018 12:07:47 -0400 Subject: [PATCH] Setup oslo.messaging extra packages for optional drivers Change-Id: Idd1866b0527e8594b8e06df66a8d170cf40a317a --- defaults/main.yml | 7 +++++++ tasks/magnum_install.yml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 6a2b99d..0746bc3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -95,6 +95,10 @@ magnum_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}" magnum_oslomsg_notify_userid: magnum magnum_oslomsg_notify_vhost: /magnum +## (Qdrouterd) integration +# TODO(ansmith): Change structure when more backends will be supported +magnum_oslomsg_amqp1_enabled: "{{ magnum_oslomsg_rpc_transport == 'amqp' }}" + # Keystone AuthToken/Middleware magnum_keystone_auth_plugin: password magnum_service_project_domain_name: Default @@ -133,6 +137,9 @@ magnum_pip_packages: - osprofiler - uwsgi +magnum_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/magnum_install.yml b/tasks/magnum_install.yml index ca1715c..5f2dd10 100644 --- a/tasks/magnum_install.yml +++ b/tasks/magnum_install.yml @@ -128,6 +128,18 @@ tags: - skip_ansible_lint +- name: Install optional pip packages + pip: + name: "{{ magnum_optional_oslomsg_amqp1_pip_packages }}" + state: "{{ magnum_pip_package_state }}" + virtualenv: "{{ magnum_bin | dirname }}" + virtualenv_site_packages: "no" + when: magnum_oslomsg_amqp1_enabled + register: install_optional_packages + until: install_optional_packages is success + retries: 5 + delay: 2 + - name: Record the venv tag deployed ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact"