
This commit corrects an oversight in the original Cinder metadata playbook where the entire JSON object from the crudini request was stored istead of just the standard output. Change-Id: Icb49e4a0d93ef6c5970091fe96f1c9087d6cb258
306 lines
10 KiB
YAML
306 lines
10 KiB
YAML
---
|
|
#
|
|
# Tasks to get cinder facts
|
|
#
|
|
|
|
- name: Get cinder osapi max limit
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT osapi_max_limit
|
|
register: osapi_max_limit
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder osapi max limit
|
|
set_fact:
|
|
openstack_cinder_osapi_max_limit: "{{ osapi_max_limit.stdout }}"
|
|
when: osapi_max_limit.stdout != ""
|
|
|
|
- name: Set cinder osapi max limit
|
|
set_fact:
|
|
openstack_cinder_osapi_max_limit: 1000
|
|
when: osapi_max_limit.stdout == ""
|
|
|
|
- name: Get cinder backup ceph chunk size
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_ceph_chunk_size
|
|
register: backup_ceph_chunk_size
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup ceph chunk size
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_chunk_size: "{{ backup_ceph_chunk_size.stdout }}"
|
|
when: backup_ceph_chunk_size.stdout != ""
|
|
|
|
- name: Set cinder backup ceph chunk size
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_chunk_size: 134217728
|
|
when: backup_ceph_chunk_size.stdout == ""
|
|
|
|
- name: Get cinder backup ceph stripe unit
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_ceph_stripe_unit
|
|
register: backup_ceph_stripe_unit
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup ceph stripe unit
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_stripe_unit: "{{ backup_ceph_stripe_unit.stdout }}"
|
|
when: backup_ceph_stripe_unit.stdout != ""
|
|
|
|
- name: Set cinder backup ceph stripe unit
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_stripe_unit: 0
|
|
when: backup_ceph_stripe_unit.stdout == ""
|
|
|
|
- name: Get cinder backup ceph stripe count
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_ceph_stripe_count
|
|
register: backup_ceph_stripe_count
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup ceph stripe count
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_stripe_count: "{{ backup_ceph_stripe_count.stdout }}"
|
|
when: backup_ceph_stripe_count.stdout != ""
|
|
|
|
- name: Set cinder backup ceph stripe count
|
|
set_fact:
|
|
openstack_cinder_backup_ceph_stripe_count: 0
|
|
when: backup_ceph_stripe_count.stdout == ""
|
|
|
|
- name: Get cinder restore discarded excess bytes
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT restore_discarded_excess_bytes
|
|
register: restore_discarded_excess_bytes
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder restore discarded excess bytes
|
|
set_fact:
|
|
openstack_cinder_restore_discarded_excess_bytes: "{{ restore_discarded_excess_bytes.stdout }}"
|
|
when: (restore_discarded_excess_bytes.stdout != "")
|
|
|
|
- name: Set cinder restore discarded excess bytes
|
|
set_fact:
|
|
openstack_cinder_restore_discarded_excess_bytes: true
|
|
when: (restore_discarded_excess_bytes.stdout == "")
|
|
|
|
- name: Get cinder expiry thres minutes
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT expiry_thres_minutes
|
|
register: expiry_thres_minutes
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder expiry thres minutes
|
|
set_fact:
|
|
openstack_cinder_expiry_thres_minutes: "{{ expiry_thres_minutes.stdout }}"
|
|
when: expiry_thres_minutes.stdout != ""
|
|
|
|
- name: Set cinder expiry thres minutes
|
|
set_fact:
|
|
openstack_cinder_expiry_thres_minutes: 720
|
|
when: expiry_thres_minutes.stdout == ""
|
|
|
|
- name: Get cinder netapp enable multiattach
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT netapp_enable_multiattach
|
|
register: netapp_enable_multiattach
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder netapp enable multiattach
|
|
set_fact:
|
|
openstack_cinder_netapp_enable_multiattach: "{{ netapp_enable_multiattach.stdout }}"
|
|
when: (netapp_enable_multiattach.stdout != "")
|
|
|
|
- name: Set cinder netapp enable multiattach
|
|
set_fact:
|
|
openstack_cinder_netapp_enable_multiattach: false
|
|
when: (netapp_enable_multiattach.stdout == "")
|
|
|
|
- name: Get cinder backup tsm compression
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_tsm_compression
|
|
register: backup_tsm_compression
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup tsm compression
|
|
set_fact:
|
|
openstack_cinder_backup_tsm_compression: "{{ backup_tsm_compression.stdout }}"
|
|
when: (backup_tsm_compression.stdout != "")
|
|
|
|
- name: Set cinder backup tsm compression
|
|
set_fact:
|
|
openstack_cinder_backup_tsm_compression: true
|
|
when: (backup_tsm_compression.stdout == "")
|
|
|
|
- name: Get cinder gpfs max clone depth
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT gpfs_max_clone_depth
|
|
register: gpfs_max_clone_depth
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder gpfs max clone depth
|
|
set_fact:
|
|
openstack_cinder_gpfs_max_clone_depth: "{{ gpfs_max_clone_depth.stdout }}"
|
|
when: gpfs_max_clone_depth.stdout != ""
|
|
|
|
- name: Set cinder gpfs max clone depth
|
|
set_fact:
|
|
openstack_cinder_gpfs_max_clone_depth: -1
|
|
when: gpfs_max_clone_depth.stdout == ""
|
|
|
|
- name: Get cinder violin request timeout
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT violin_request_timeout
|
|
register: violin_request_timeout
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder violin request timeout
|
|
set_fact:
|
|
openstack_cinder_violin_request_timeout: "{{ violin_request_timeout.stdout }}"
|
|
when: violin_request_timeout.stdout != ""
|
|
|
|
- name: Set cinder violin request timeout
|
|
set_fact:
|
|
openstack_cinder_violin_request_timeout: 300
|
|
when: violin_request_timeout.stdout == ""
|
|
|
|
- name: Get cinder nexenta blocksize
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT nexenta_blocksize
|
|
register: nexenta_blocksize
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder nexenta blocksize
|
|
set_fact:
|
|
openstack_cinder_nexenta_blocksize: "{{ nexenta_blocksize.stdout }}"
|
|
when: nexenta_blocksize.stdout != ""
|
|
|
|
- name: Set cinder nexenta blocksize
|
|
set_fact:
|
|
openstack_cinder_nexenta_blocksize: 4096
|
|
when: nexenta_blocksize.stdout == ""
|
|
|
|
- name: Get cinder nexenta rrmgr tcp buf size
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT nexenta_rrmgr_tcp_buf_size
|
|
register: nexenta_rrmgr_tcp_buf_size
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder nexenta rrmgr tcp buf size
|
|
set_fact:
|
|
openstack_cinder_nexenta_rrmgr_tcp_buf_size: "{{ nexenta_rrmgr_tcp_buf_size.stdout }}"
|
|
when: nexenta_rrmgr_tcp_buf_size.stdout != ""
|
|
|
|
- name: Set cinder nexenta rrmgr tcp buf size
|
|
set_fact:
|
|
openstack_cinder_nexenta_rrmgr_tcp_buf_size: 4096
|
|
when: nexenta_rrmgr_tcp_buf_size.stdout == ""
|
|
|
|
- name: Get cinder nexenta chunksize
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT nexenta_chunksize
|
|
register: nexenta_chunksize
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder nexenta chunksize
|
|
set_fact:
|
|
openstack_cinder_nexenta_chunksize: "{{ nexenta_chunksize.stdout }}"
|
|
when: nexenta_chunksize.stdout != ""
|
|
|
|
- name: Set cinder nexenta chunksize
|
|
set_fact:
|
|
openstack_cinder_nexenta_chunksize: 16384
|
|
when: nexenta_chunksize.stdout == ""
|
|
|
|
- name: Get cinder sf emulate 512
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT sf_emulate_512
|
|
register: sf_emulate_512
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder sf emulate 512
|
|
set_fact:
|
|
openstack_cinder_sf_emulate_512: "{{ sf_emulate_512.stdout }}"
|
|
when: (sf_emulate_512.stdout != "")
|
|
|
|
- name: Set cinder sf emulate 512
|
|
set_fact:
|
|
openstack_cinder_sf_emulate_512: true
|
|
when: (sf_emulate_512.stdout == "")
|
|
|
|
- name: Get cinder sf allow tenant qos
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT sf_allow_tenant_qos
|
|
register: sf_allow_tenant_qos
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder sf allow tenant qos
|
|
set_fact:
|
|
openstack_cinder_sf_allow_tenant_qos: "{{ sf_allow_tenant_qos.stdout }}"
|
|
when: (sf_allow_tenant_qos.stdout != "")
|
|
|
|
- name: Set cinder sf allow tenant qos
|
|
set_fact:
|
|
openstack_cinder_sf_allow_tenant_qos: false
|
|
when: (sf_allow_tenant_qos.stdout == "")
|
|
|
|
- name: Get cinder sf allow template caching
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT sf_allow_template_caching
|
|
register: sf_allow_template_caching
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder sf allow template caching
|
|
set_fact:
|
|
openstack_cinder_sf_allow_template_caching: "{{ sf_allow_template_caching.stdout }}"
|
|
when: (sf_allow_template_caching.stdout != "")
|
|
|
|
- name: Set cinder sf allow template caching
|
|
set_fact:
|
|
openstack_cinder_sf_allow_template_caching: true
|
|
when: (sf_allow_template_caching.stdout == "")
|
|
|
|
- name: Get cinder backup swift object size
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_swift_object_size
|
|
register: backup_swift_object_size
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup swift object size
|
|
set_fact:
|
|
openstack_cinder_backup_swift_object_size: "{{ backup_swift_object_size.stdout }}"
|
|
when: backup_swift_object_size.stdout != ""
|
|
|
|
- name: Set cinder backup swift object size
|
|
set_fact:
|
|
openstack_cinder_backup_swift_object_size: 52428800
|
|
when: backup_swift_object_size.stdout == ""
|
|
|
|
- name: Get cinder backup swift block size
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_swift_block_size
|
|
register: backup_swift_block_size
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup swift block size
|
|
set_fact:
|
|
openstack_cinder_backup_swift_block_size: "{{ backup_swift_block_size.stdout }}"
|
|
when: backup_swift_block_size.stdout != ""
|
|
|
|
- name: Set cinder backup swift block size
|
|
set_fact:
|
|
openstack_cinder_backup_swift_block_size: 32768
|
|
when: backup_swift_block_size.stdout == ""
|
|
|
|
- name: Get cinder backup file size
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_file_size
|
|
register: backup_file_size
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup file size
|
|
set_fact:
|
|
openstack_cinder_backup_file_size: "{{ backup_file_size.stdout }}"
|
|
when: backup_file_size.stdout != ""
|
|
|
|
- name: Set cinder backup file size
|
|
set_fact:
|
|
openstack_cinder_backup_file_size: 1999994880
|
|
when: backup_file_size.stdout == ""
|
|
|
|
- name: Get cinder backup sha block size bytes
|
|
command: crudini --get /etc/cinder/cinder.conf DEFAULT backup_sha_block_size_bytes
|
|
register: backup_sha_block_size_bytes
|
|
ignore_errors: true
|
|
|
|
- name: Set cinder backup sha block size bytes
|
|
set_fact:
|
|
openstack_cinder_backup_sha_block_size_bytes: "{{ backup_sha_block_size_bytes.stdout }}"
|
|
when: backup_sha_block_size_bytes.stdout != ""
|
|
|
|
- name: Set cinder backup sha block size bytes
|
|
set_fact:
|
|
openstack_cinder_backup_sha_block_size_bytes: 32768
|
|
when: backup_sha_block_size_bytes.stdout == ""
|
|
|