Merge "Use cinder_service_setup_host for qos and types creation"
This commit is contained in:
commit
dbb1aaf434
@ -301,7 +301,6 @@ cinder_pip_packages:
|
|||||||
- osprofiler
|
- osprofiler
|
||||||
- PyMySQL
|
- PyMySQL
|
||||||
- pymemcache
|
- pymemcache
|
||||||
- python-openstackclient
|
|
||||||
- python-memcached
|
- python-memcached
|
||||||
- systemd-python
|
- systemd-python
|
||||||
|
|
||||||
|
@ -40,12 +40,13 @@
|
|||||||
shell: |
|
shell: |
|
||||||
. {{ ansible_env.HOME }}/openrc
|
. {{ ansible_env.HOME }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
||||||
if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
|
if ! {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
|
||||||
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not (item.value.public | default(True)) | bool %} --private {% endif %} "{{ item.key }}"
|
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not (item.value.public | default(True)) | bool %} --private {% endif %} "{{ item.key }}"
|
||||||
fi
|
fi
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
with_dict: "{{ _cinder_backends|default({}) }}"
|
with_dict: "{{ _cinder_backends|default({}) }}"
|
||||||
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Add extra cinder volume types
|
- name: Add extra cinder volume types
|
||||||
@ -53,13 +54,14 @@
|
|||||||
. {{ ansible_env.HOME }}/openrc
|
. {{ ansible_env.HOME }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
||||||
{% for evtype in item.value.extra_volume_types %}
|
{% for evtype in item.value.extra_volume_types %}
|
||||||
if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then
|
if ! {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then
|
||||||
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not (item.value.public | default(True)) | bool %} --private {% endif %} "{{ evtype }}"
|
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not (item.value.public | default(True)) | bool %} --private {% endif %} "{{ evtype }}"
|
||||||
fi
|
fi
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
with_dict: "{{ _cinder_backends|default({}) }}"
|
with_dict: "{{ _cinder_backends|default({}) }}"
|
||||||
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
when: item.value.extra_volume_types is defined
|
when: item.value.extra_volume_types is defined
|
||||||
|
|
||||||
- import_tasks: cinder_qos.yml
|
- import_tasks: cinder_qos.yml
|
||||||
|
@ -17,13 +17,14 @@
|
|||||||
shell: |
|
shell: |
|
||||||
. {{ ansible_env.HOME }}/openrc
|
. {{ ansible_env.HOME }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
||||||
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume qos list --format value --column Name | grep -x {{ item.name }} || \
|
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume qos list --format value --column Name | grep -x {{ item.name }} || \
|
||||||
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume qos create {{ item.name }} \
|
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume qos create {{ item.name }} \
|
||||||
--consumer {{ item.options.consumer }}\
|
--consumer {{ item.options.consumer }}\
|
||||||
{% for k,v in item.options.items() %} --property {{ k }}={{ v }}{% endfor %}
|
{% for k,v in item.options.items() %} --property {{ k }}={{ v }}{% endfor %}
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
with_items: "{{ cinder_qos_specs }}"
|
with_items: "{{ cinder_qos_specs }}"
|
||||||
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags:
|
tags:
|
||||||
- cinder-qos
|
- cinder-qos
|
||||||
@ -33,13 +34,14 @@
|
|||||||
. {{ ansible_env.HOME }}/openrc
|
. {{ ansible_env.HOME }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
||||||
{% for vtype in item.cinder_volume_types %}
|
{% for vtype in item.cinder_volume_types %}
|
||||||
if {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ vtype }}"; then
|
if {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ vtype }}"; then
|
||||||
{{ cinder_bin }}/openstack ${CLI_OPTIONS} volume qos associate {{ item.name }} {{ vtype }}
|
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume qos associate {{ item.name }} {{ vtype }}
|
||||||
fi
|
fi
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
with_items: "{{ cinder_qos_specs }}"
|
with_items: "{{ cinder_qos_specs }}"
|
||||||
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
when:
|
when:
|
||||||
- item.cinder_volume_types is defined
|
- item.cinder_volume_types is defined
|
||||||
tags:
|
tags:
|
||||||
|
@ -31,8 +31,6 @@ cinder_distro_packages:
|
|||||||
|
|
||||||
cinder_service_distro_packages:
|
cinder_service_distro_packages:
|
||||||
- python3-cinder
|
- python3-cinder
|
||||||
- python3-openstackclient
|
|
||||||
- python3-shade
|
|
||||||
- python3-systemd
|
- python3-systemd
|
||||||
|
|
||||||
cinder_devel_distro_packages:
|
cinder_devel_distro_packages:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user