diff --git a/defaults/main.yml b/defaults/main.yml index 9eff58a..b48d870 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -80,6 +80,10 @@ sahara_oslomsg_notify_userid: "{{ sahara_oslomsg_rpc_userid }}" sahara_oslomsg_notify_password: "{{ sahara_oslomsg_rpc_password }}" sahara_oslomsg_notify_vhost: "{{ sahara_oslomsg_rpc_vhost }}" +## (Qdrouterd) info +# TODO(ansmith): Change structure when more backends will be supported +sahara_oslomsg_amqp1_enabled: "{{ sahara_oslomsg_rpc_transport == 'amqp' }}" + ## Database info sahara_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}" sahara_galera_address: "{{ galera_address | default('127.0.0.1') }}" @@ -175,6 +179,9 @@ sahara_pip_packages: - warlock - uwsgi +sahara_optional_oslomsg_amqp1_pip_packages: + - oslo.messaging[amqp1] + sahara_engine_init_overrides: {} sahara_api_init_overrides: {} diff --git a/tasks/sahara_install.yml b/tasks/sahara_install.yml index 8a1bb68..90b7c5a 100644 --- a/tasks/sahara_install.yml +++ b/tasks/sahara_install.yml @@ -117,6 +117,20 @@ tags: - skip_ansible_lint +- name: Install optional pip packages + pip: + name: "{{ sahara_optional_oslomsg_amqp1_pip_packages }}" + state: "{{ sahara_pip_package_state }}" + virtualenv: "{{ sahara_bin | dirname }}" + virtualenv_site_packages: "no" + when: sahara_oslomsg_amqp1_enabled + register: install_optional_packages + until: install_optional_packages is success + retries: 5 + delay: 2 + notify: + - Restart sahara services + - name: Record the venv tag deployed ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact"