kolla-ansible/ansible/roles/murano/tasks/import_library_packages.yml
xiaojueguan 1f3cb24aeb make murano work with endpoints with non-public CA
Change-Id: Ic0d0543b6ad93743eae2a144e8a3b07de54e6d96
Closes-Bug: #1878344
2020-05-17 10:28:47 +08:00

62 lines
2.4 KiB
YAML

---
- name: Waiting for Murano API service to be ready on first node
wait_for:
host: "{{ api_interface_address }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
timeout: 60
run_once: True
register: check_murano_port
until: check_murano_port is success
retries: 10
delay: 6
delegate_to: "{{ groups['murano-api'][0] }}"
- name: Checking if Murano core and applications library packages exist
become: true
command: >
docker exec murano_api murano
--os-username {{ openstack_auth.username }}
--os-password {{ keystone_admin_password }}
--os-project-name {{ openstack_auth.project_name }}
{% if openstack_cacert != '' %}--os-cacert {{ openstack_cacert }}{% endif %}
--os-auth-url {{ keystone_admin_url }}
--murano-url {{ admin_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ murano_api_port }}
package-list
register: status
changed_when: False
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
- name: Importing Murano core library package
become: true
command: >
docker exec murano_api murano
--os-username {{ openstack_auth.username }}
--os-password {{ keystone_admin_password }}
--os-project-name {{ openstack_auth.project_name }}
{% if openstack_cacert != '' %}--os-cacert {{ openstack_cacert }}{% endif %}
--os-auth-url {{ keystone_admin_url }}
--murano-url {{ admin_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ murano_api_port }}
package-import --exists-action u --is-public /io.murano.zip
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
when:
- status.stdout.find("io.murano") == -1 or kolla_action == "upgrade"
- name: Importing Murano applications library package
become: true
command: >
docker exec murano_api murano
--os-username {{ openstack_auth.username }}
--os-password {{ keystone_admin_password }}
--os-project-name {{ openstack_auth.project_name }}
{% if openstack_cacert != '' %}--os-cacert {{ openstack_cacert }}{% endif %}
--os-auth-url {{ keystone_admin_url }}
--murano-url {{ admin_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ murano_api_port }}
package-import --exists-action u --is-public /io.murano.applications.zip
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
when:
- status.stdout.find("io.murano.applications") == -1 or kolla_action == "upgrade"