Merge "Fix linters and metadata"
This commit is contained in:
commit
5f6e86a7da
|
@ -21,7 +21,11 @@ cinder_package_state: "{{ package_state | default('latest') }}"
|
||||||
# for the service setup. The host must already have
|
# for the service setup. The host must already have
|
||||||
# clouds.yaml properly configured.
|
# clouds.yaml properly configured.
|
||||||
cinder_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
cinder_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
cinder_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((cinder_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
cinder_service_setup_host_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_service_setup_host_python_interpreter | default(
|
||||||
|
(cinder_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
|
|
||||||
# Set installation method.
|
# Set installation method.
|
||||||
cinder_install_method: "{{ service_install_method | default('source') }}"
|
cinder_install_method: "{{ service_install_method | default('source') }}"
|
||||||
|
@ -29,7 +33,8 @@ cinder_venv_python_executable: "{{ openstack_venv_python_executable | default('p
|
||||||
|
|
||||||
cinder_git_repo: https://opendev.org/openstack/cinder
|
cinder_git_repo: https://opendev.org/openstack/cinder
|
||||||
cinder_git_install_branch: master
|
cinder_git_install_branch: master
|
||||||
cinder_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
|
cinder_upper_constraints_url: >-
|
||||||
|
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
|
||||||
cinder_git_constraints:
|
cinder_git_constraints:
|
||||||
- "--constraint {{ cinder_upper_constraints_url }}"
|
- "--constraint {{ cinder_upper_constraints_url }}"
|
||||||
|
|
||||||
|
@ -64,7 +69,11 @@ cinder_fatal_deprecations: False
|
||||||
|
|
||||||
## Database info
|
## Database info
|
||||||
cinder_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
cinder_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||||
cinder_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((cinder_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
cinder_db_setup_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_db_setup_python_interpreter | default(
|
||||||
|
(cinder_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
cinder_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
cinder_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||||
cinder_galera_user: cinder
|
cinder_galera_user: cinder
|
||||||
cinder_galera_database: cinder
|
cinder_galera_database: cinder
|
||||||
|
@ -230,7 +239,8 @@ cinder_swift_catalog_info: "object-store:swift:internalURL"
|
||||||
|
|
||||||
## Cap the maximun number of threads / workers when a user value is unspecified.
|
## Cap the maximun number of threads / workers when a user value is unspecified.
|
||||||
cinder_osapi_volume_workers_max: 16
|
cinder_osapi_volume_workers_max: 16
|
||||||
cinder_osapi_volume_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, cinder_osapi_volume_workers_max] | min }}"
|
cinder_osapi_volume_workers: >-
|
||||||
|
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, cinder_osapi_volume_workers_max] | min }}
|
||||||
|
|
||||||
## Cinder iscsi
|
## Cinder iscsi
|
||||||
cinder_target_helper_mapping:
|
cinder_target_helper_mapping:
|
||||||
|
@ -306,7 +316,14 @@ cinder_active_active_cluster_name: ceph
|
||||||
# "volume:delete": ""
|
# "volume:delete": ""
|
||||||
|
|
||||||
# Comma separated list of Glance API servers
|
# Comma separated list of Glance API servers
|
||||||
cinder_glance_api_servers: "{{ (glance_service_internalurl | default('http://localhost')) | urlsplit('scheme') ~ '://' ~ (glance_service_internalurl | default('http://localhost')) | urlsplit('netloc') }}"
|
cinder_glance_api_servers: >-
|
||||||
|
{{
|
||||||
|
(
|
||||||
|
glance_service_internalurl | default('http://localhost')
|
||||||
|
) | urlsplit('scheme') ~ '://' ~ (
|
||||||
|
glance_service_internalurl | default('http://localhost')
|
||||||
|
) | urlsplit('netloc')
|
||||||
|
}}
|
||||||
|
|
||||||
cinder_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
cinder_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
||||||
|
|
||||||
|
@ -416,8 +433,6 @@ cinder_environment_overrides:
|
||||||
Service:
|
Service:
|
||||||
Environment: "PATH={{ cinder_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
Environment: "PATH={{ cinder_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
|
||||||
_UUID_regex: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
|
|
||||||
|
|
||||||
cinder_memcached_servers: "{{ memcached_servers }}"
|
cinder_memcached_servers: "{{ memcached_servers }}"
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -18,19 +18,21 @@ galaxy_info:
|
||||||
description: Installation and setup of cinder
|
description: Installation and setup of cinder
|
||||||
company: Rackspace
|
company: Rackspace
|
||||||
license: Apache2
|
license: Apache2
|
||||||
min_ansible_version: 2.2
|
role_name: os_cinder
|
||||||
|
namespace: openstack
|
||||||
|
min_ansible_version: "2.10"
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- buster
|
- bullseye
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- bionic
|
|
||||||
- focal
|
- focal
|
||||||
|
- jammy
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 8
|
- "9"
|
||||||
categories:
|
galaxy_tags:
|
||||||
- cloud
|
- cloud
|
||||||
- python
|
- python
|
||||||
- cinder
|
- cinder
|
||||||
|
|
|
@ -40,11 +40,15 @@
|
||||||
shell: |
|
shell: |
|
||||||
. {{ ansible_facts['env']['HOME'] }}/openrc
|
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
||||||
if ! {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
|
if ! {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
|
||||||
{{ 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 }}"
|
{{ __cinder_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
|
||||||
|
vars:
|
||||||
|
__cinder_python_interpreter_dirname: "{{ cinder_service_setup_host_python_interpreter | dirname }}"
|
||||||
with_dict: "{{ _cinder_backends | default({}) }}"
|
with_dict: "{{ _cinder_backends | default({}) }}"
|
||||||
delegate_to: "{{ cinder_service_setup_host }}"
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -54,17 +58,23 @@
|
||||||
. {{ ansible_facts['env']['HOME'] }}/openrc
|
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
||||||
{% for evtype in item.value.extra_volume_types %}
|
{% for evtype in item.value.extra_volume_types %}
|
||||||
if ! {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then
|
if ! {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then
|
||||||
{{ 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 }}"
|
{{ __cinder_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
|
||||||
|
vars:
|
||||||
|
__cinder_python_interpreter_dirname: "{{ cinder_service_setup_host_python_interpreter | dirname }}"
|
||||||
|
changed_when: false
|
||||||
with_dict: "{{ _cinder_backends | default({}) }}"
|
with_dict: "{{ _cinder_backends | default({}) }}"
|
||||||
delegate_to: "{{ cinder_service_setup_host }}"
|
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
|
- name: Importing cinder_qos tasks
|
||||||
|
import_tasks: cinder_qos.yml
|
||||||
when: cinder_qos_specs is defined
|
when: cinder_qos_specs is defined
|
||||||
tags:
|
tags:
|
||||||
- cinder-qos
|
- cinder-qos
|
||||||
|
|
|
@ -22,8 +22,9 @@
|
||||||
section: cinder
|
section: cinder
|
||||||
option: "need_db_sync"
|
option: "need_db_sync"
|
||||||
state: absent
|
state: absent
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
- name: refresh local facts
|
- name: Refresh local facts
|
||||||
setup:
|
setup:
|
||||||
filter: ansible_local
|
filter: ansible_local
|
||||||
gather_subset: "!all"
|
gather_subset: "!all"
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
- name: Check if all cinder services are up
|
- name: Check if all cinder services are up
|
||||||
shell: "{{ cinder_bin }}/cinder-manage service list | /usr/bin/awk '{ if(NR>1) print $5 }' | /bin/egrep -vq ':-)'"
|
shell: "{{ cinder_bin }}/cinder-manage service list | /usr/bin/awk '{ if(NR>1) print $5 }' | /bin/egrep -vq ':-)'"
|
||||||
register: failed_cinder_services
|
register: failed_cinder_services
|
||||||
|
changed_when: false
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: Fail if any cinder service is down
|
- name: Fail if any cinder service is down
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
section: cinder
|
section: cinder
|
||||||
option: need_online_data_migrations
|
option: need_online_data_migrations
|
||||||
value: False
|
value: False
|
||||||
|
mode: "0644"
|
||||||
with_items: "{{ groups[cinder_services['cinder-api']['group']] }}"
|
with_items: "{{ groups[cinder_services['cinder-api']['group']] }}"
|
||||||
when:
|
when:
|
||||||
- not data_migrations is skipped
|
- not data_migrations is skipped
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
section: "cinder"
|
section: "cinder"
|
||||||
option: "install_method"
|
option: "install_method"
|
||||||
value: "{{ cinder_install_method }}"
|
value: "{{ cinder_install_method }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
- name: Refresh local facts to ensure the cinder section is present
|
- name: Refresh local facts to ensure the cinder section is present
|
||||||
setup:
|
setup:
|
||||||
|
@ -51,10 +52,10 @@
|
||||||
systemd_tempd_prefix: openstack
|
systemd_tempd_prefix: openstack
|
||||||
systemd_slice_name: "{{ cinder_system_slice_name }}"
|
systemd_slice_name: "{{ cinder_system_slice_name }}"
|
||||||
systemd_lock_dir: "{{ cinder_lock_dir }}"
|
systemd_lock_dir: "{{ cinder_lock_dir }}"
|
||||||
systemd_CPUAccounting: true
|
systemd_service_cpu_accounting: true
|
||||||
systemd_BlockIOAccounting: true
|
systemd_service_block_io_accounting: true
|
||||||
systemd_MemoryAccounting: true
|
systemd_service_memory_accounting: true
|
||||||
systemd_TasksAccounting: true
|
systemd_service_tasks_accounting: true
|
||||||
systemd_services: "{{ filtered_cinder_services }}"
|
systemd_services: "{{ filtered_cinder_services }}"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
@ -69,6 +70,7 @@
|
||||||
section: cinder
|
section: cinder
|
||||||
option: venv_tag
|
option: venv_tag
|
||||||
value: "{{ cinder_venv_tag }}"
|
value: "{{ cinder_venv_tag }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
- name: Set the upgrade facts
|
- name: Set the upgrade facts
|
||||||
ini_file:
|
ini_file:
|
||||||
|
@ -76,10 +78,11 @@
|
||||||
section: cinder
|
section: cinder
|
||||||
option: "{{ item }}"
|
option: "{{ item }}"
|
||||||
value: true
|
value: true
|
||||||
|
mode: "0644"
|
||||||
with_items:
|
with_items:
|
||||||
- "need_online_data_migrations"
|
- "need_online_data_migrations"
|
||||||
- "need_service_restart"
|
- "need_service_restart"
|
||||||
when:
|
when:
|
||||||
(install_packages is changed) or
|
- (install_packages is changed) or
|
||||||
('need_online_data_migrations' not in ansible_local['openstack_ansible']['cinder']) or
|
('need_online_data_migrations' not in ansible_local['openstack_ansible']['cinder']) or
|
||||||
('need_service_restart' not in ansible_local['openstack_ansible']['cinder'])
|
('need_service_restart' not in ansible_local['openstack_ansible']['cinder'])
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Discover lvm devices
|
- name: Discover lvm devices
|
||||||
shell: |
|
shell: >-
|
||||||
/sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g'
|
/sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g'
|
||||||
register: lvm_devices
|
register: lvm_devices
|
||||||
changed_when: lvm_devices.rc != 0
|
changed_when: lvm_devices.rc != 0
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
file:
|
file:
|
||||||
state: "directory"
|
state: "directory"
|
||||||
path: "/etc/lvm"
|
path: "/etc/lvm"
|
||||||
|
mode: "0755"
|
||||||
when: lvm_devices.rc == 0
|
when: lvm_devices.rc == 0
|
||||||
|
|
||||||
- name: Drop lvm Config
|
- name: Drop lvm Config
|
||||||
|
@ -33,4 +34,5 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
backup: "yes"
|
backup: "yes"
|
||||||
|
mode: "0644"
|
||||||
when: lvm_devices.rc == 0
|
when: lvm_devices.rc == 0
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
state: "directory"
|
state: "directory"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
|
mode: "0750"
|
||||||
|
|
||||||
- name: Generate cinder config
|
- name: Generate cinder config
|
||||||
openstack.config_template.config_template:
|
openstack.config_template.config_template:
|
||||||
|
@ -160,6 +161,7 @@
|
||||||
template:
|
template:
|
||||||
src: nfs_shares.j2
|
src: nfs_shares.j2
|
||||||
dest: "{{ item.value.nfs_shares_config }}"
|
dest: "{{ item.value.nfs_shares_config }}"
|
||||||
|
mode: "0644"
|
||||||
with_dict: "{{ cinder_backends | default({}) }}"
|
with_dict: "{{ cinder_backends | default({}) }}"
|
||||||
when:
|
when:
|
||||||
- "cinder_services['cinder-volume']['group'] in group_names"
|
- "cinder_services['cinder-volume']['group'] in group_names"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: create the system group
|
- name: Create the system group
|
||||||
group:
|
group:
|
||||||
name: "{{ cinder_system_group_name }}"
|
name: "{{ cinder_system_group_name }}"
|
||||||
gid: "{{ cinder_system_group_gid | default(omit) }}"
|
gid: "{{ cinder_system_group_gid | default(omit) }}"
|
||||||
|
|
|
@ -17,12 +17,14 @@
|
||||||
shell: |
|
shell: |
|
||||||
. {{ ansible_facts['env']['HOME'] }}/openrc
|
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
||||||
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume qos list --format value --column Name | grep -x {{ item.name }} || \
|
{{ __cinder_python_interpreter_dirname }}/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 create {{ item.name }} \
|
{{ __cinder_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
|
||||||
|
vars:
|
||||||
|
__cinder_python_interpreter_dirname: "{{ cinder_service_setup_host_python_interpreter | dirname }}"
|
||||||
with_items: "{{ cinder_qos_specs }}"
|
with_items: "{{ cinder_qos_specs }}"
|
||||||
delegate_to: "{{ cinder_service_setup_host }}"
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -34,13 +36,16 @@
|
||||||
. {{ ansible_facts['env']['HOME'] }}/openrc
|
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||||
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
|
||||||
{% for vtype in item.cinder_volume_types %}
|
{% for vtype in item.cinder_volume_types %}
|
||||||
if {{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ vtype }}"; then
|
if {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ vtype }}"; then
|
||||||
{{ cinder_service_setup_host_python_interpreter | dirname }}/openstack ${CLI_OPTIONS} volume qos associate {{ item.name }} {{ vtype }}
|
{{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume qos associate {{ item.name }} {{ vtype }}
|
||||||
fi
|
fi
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
vars:
|
||||||
|
__cinder_python_interpreter_dirname: "{{ cinder_service_setup_host_python_interpreter | dirname }}"
|
||||||
with_items: "{{ cinder_qos_specs }}"
|
with_items: "{{ cinder_qos_specs }}"
|
||||||
|
changed_when: false
|
||||||
delegate_to: "{{ cinder_service_setup_host }}"
|
delegate_to: "{{ cinder_service_setup_host }}"
|
||||||
when:
|
when:
|
||||||
- item.cinder_volume_types is defined
|
- item.cinder_volume_types is defined
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.db_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.db_setup
|
name: openstack.osa.db_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
@ -64,7 +65,8 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.mq_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.mq_setup
|
name: openstack.osa.mq_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
@ -86,18 +88,21 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- import_tasks: cinder_lvm_config.yml
|
- name: Importing cinder_lvm_config tasks
|
||||||
|
import_tasks: cinder_lvm_config.yml
|
||||||
when:
|
when:
|
||||||
- "cinder_services['cinder-volume']['group'] in group_names"
|
- "cinder_services['cinder-volume']['group'] in group_names"
|
||||||
- "cinder_backend_lvm_inuse | bool"
|
- "cinder_backend_lvm_inuse | bool"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
- import_tasks: cinder_pre_install.yml
|
- name: Importing cinder_pre_install tasks
|
||||||
|
import_tasks: cinder_pre_install.yml
|
||||||
tags:
|
tags:
|
||||||
- cinder-install
|
- cinder-install
|
||||||
|
|
||||||
- import_tasks: cinder_install.yml
|
- name: Importing cinder_install tasks
|
||||||
|
import_tasks: cinder_install.yml
|
||||||
tags:
|
tags:
|
||||||
- cinder-install
|
- cinder-install
|
||||||
|
|
||||||
|
@ -121,14 +126,15 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: refresh local facts
|
- name: Refresh local facts
|
||||||
setup:
|
setup:
|
||||||
filter: ansible_local
|
filter: ansible_local
|
||||||
gather_subset: "!all"
|
gather_subset: "!all"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
- include_tasks: cinder_cleanup_old_facts.yml
|
- name: Including cinder_cleanup_old_facts tasks
|
||||||
|
include_tasks: cinder_cleanup_old_facts.yml
|
||||||
args:
|
args:
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
@ -140,7 +146,8 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- import_tasks: cinder_post_install.yml
|
- name: Importing cinder_post_install tasks
|
||||||
|
import_tasks: cinder_post_install.yml
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
|
@ -155,7 +162,11 @@
|
||||||
systemd_services:
|
systemd_services:
|
||||||
- service_name: "cinder-volume-usage-audit"
|
- service_name: "cinder-volume-usage-audit"
|
||||||
execstarts:
|
execstarts:
|
||||||
- '/bin/bash -c "{{ cinder_bin }}/cinder-volume-usage-audit --start_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00\s-d\s-1{{ cinder_volume_usage_audit }})\" --end_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00)\" {{ (cinder_volume_usage_audit_send_actions_enabled | bool) | ternary( "--send_actions", "--nosend_actions" ) }}"'
|
- >-
|
||||||
|
/bin/bash -c "{{ cinder_bin }}/cinder-volume-usage-audit --start_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00\s-d\s-1{{ cinder_volume_usage_audit }})\"
|
||||||
|
--end_time \"$$(date\s+%%Y-%%m-%%d\\\s%%H:00:00)\" {{
|
||||||
|
(cinder_volume_usage_audit_send_actions_enabled | bool) | ternary('--send_actions', '--nosend_actions')
|
||||||
|
}}"
|
||||||
timer:
|
timer:
|
||||||
state: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary('started', 'stopped') }}"
|
state: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary('started', 'stopped') }}"
|
||||||
options:
|
options:
|
||||||
|
@ -165,7 +176,8 @@
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
- import_tasks: cinder_db_sync.yml
|
- name: Importing cinder_db_sync tasks
|
||||||
|
import_tasks: cinder_db_sync.yml
|
||||||
when:
|
when:
|
||||||
- _cinder_is_first_api_play_host
|
- _cinder_is_first_api_play_host
|
||||||
tags:
|
tags:
|
||||||
|
@ -181,7 +193,8 @@
|
||||||
- cinder-config
|
- cinder-config
|
||||||
- uwsgi
|
- uwsgi
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.service_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.service_setup
|
name: openstack.osa.service_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
@ -236,13 +249,15 @@
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- import_tasks: cinder_db_post_setup.yml
|
- name: Importing cinder_db_post_setup tasks
|
||||||
|
import_tasks: cinder_db_post_setup.yml
|
||||||
when:
|
when:
|
||||||
- "_cinder_is_last_play_host"
|
- "_cinder_is_last_play_host"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
- import_tasks: cinder_backends.yml
|
- name: Importing cinder_backends tasks
|
||||||
|
import_tasks: cinder_backends.yml
|
||||||
when:
|
when:
|
||||||
- "groups[cinder_services['cinder-volume']['group']] | length > 0"
|
- "groups[cinder_services['cinder-volume']['group']] | length > 0"
|
||||||
- "_cinder_is_last_play_host"
|
- "_cinder_is_last_play_host"
|
||||||
|
|
|
@ -13,9 +13,21 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
_cinder_is_first_api_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
_cinder_is_first_api_play_host: >-
|
||||||
_cinder_is_first_play_host: "{{ (cinder_services['cinder-scheduler']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
{{
|
||||||
_cinder_is_last_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | last) | bool }}"
|
(cinder_services['cinder-api']['group'] in group_names and
|
||||||
|
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||||
|
}}
|
||||||
|
_cinder_is_first_play_host: >-
|
||||||
|
{{
|
||||||
|
(cinder_services['cinder-scheduler']['group'] in group_names and
|
||||||
|
inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||||
|
}}
|
||||||
|
_cinder_is_last_play_host: >-
|
||||||
|
{{
|
||||||
|
(cinder_services['cinder-api']['group'] in group_names and
|
||||||
|
inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | last) | bool
|
||||||
|
}}
|
||||||
|
|
||||||
_cinder_rootwrap_conf_overrides:
|
_cinder_rootwrap_conf_overrides:
|
||||||
DEFAULT:
|
DEFAULT:
|
||||||
|
@ -136,4 +148,6 @@ _cinder_coordination_url: >-
|
||||||
groups[cinder_coordination_group]
|
groups[cinder_coordination_group]
|
||||||
| map('extract', hostvars, 'ansible_host')
|
| map('extract', hostvars, 'ansible_host')
|
||||||
| list | join(':' ~ cinder_coordination_port ~ ',')
|
| list | join(':' ~ cinder_coordination_port ~ ',')
|
||||||
}}:{{ cinder_coordination_port }}?namespace={{ cinder_coordination_namespace }}{% if cinder_coordination_client_ssl | bool %}&use_ssl=True&verify_certs={{ cinder_coordination_verify_cert | bool }}{% endif %}
|
}}:{{ cinder_coordination_port -}}
|
||||||
|
?namespace={{ cinder_coordination_namespace }}{% if cinder_coordination_client_ssl | bool -%}
|
||||||
|
&use_ssl=True&verify_certs={{ cinder_coordination_verify_cert | bool }}{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue