From fa018036e494ce4c5c1c0c5f4d18a41e64aa9e89 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 23 Jul 2018 11:50:45 -0400 Subject: [PATCH] Setup oslo.messaging extra packages for optional drivers Change-Id: I3793994eaf59c7ac98aebb82a17884d7d34332a1 --- defaults/main.yml | 7 +++++++ tasks/ironic_install.yml | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 0a2a1f71..ba138e19 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -238,6 +238,13 @@ ironic_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}" ironic_oslomsg_notify_userid: ironic ironic_oslomsg_notify_vhost: /ironic +## (Qdrouterd) integration +# TODO(ansmith): Change structure when more backends will be supported +ironic_oslomsg_amqp1_enabled: "{{ ironic_oslomsg_rpc_transport == 'amqp' }}" + +ironic_optional_oslomsg_amqp1_pip_packages: + - oslo.messaging[amqp1] + # Auth ironic_service_user_name: "ironic" diff --git a/tasks/ironic_install.yml b/tasks/ironic_install.yml index dda08874..68abee84 100644 --- a/tasks/ironic_install.yml +++ b/tasks/ironic_install.yml @@ -115,6 +115,19 @@ tags: - skip_ansible_lint +- name: Install optional pip packages + pip: + name: "{{ ironic_optional_oslomsg_amqp1_pip_packages }}" + state: "{{ ironic_pip_package_state }}" + virtualenv: "{{ ironic_bin | dirname }}" + virtualenv_site_packages: "no" + when: ironic_oslomsg_amqp1_enabled + register: install_optional_packages + until: install_optional_packages is success + retries: 5 + delay: 2 + notify: Restart ironic services + - name: Record the venv tag deployed ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact"