--- # # Tasks to get ceilometer facts # - name: Get ceilometer batch polled samples command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT batch_polled_samples register: batch_polled_samples ignore_errors: true - name: Set ceilometer batch polled samples set_fact: openstack_ceilometer_batch_polled_samples: "{{ batch_polled_samples.stdout }}" when: (batch_polled_samples.stdout != "") - name: Set ceilometer batch polled samples set_fact: openstack_ceilometer_batch_polled_samples: true when: (batch_polled_samples.stdout == "") - name: Get ceilometer shuffle time before polling task command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT shuffle_time_before_polling_task register: shuffle_time_before_polling_task ignore_errors: true - name: Set ceilometer shuffle time before polling task set_fact: openstack_ceilometer_shuffle_time_before_polling_task: "{{ shuffle_time_before_polling_task.stdout }}" when: shuffle_time_before_polling_task.stdout != "" - name: Set ceilometer shuffle time before polling task set_fact: openstack_ceilometer_shuffle_time_before_polling_task: 0 when: shuffle_time_before_polling_task.stdout == "" - name: Get ceilometer reserved metadata length command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT reserved_metadata_length register: reserved_metadata_length ignore_errors: true - name: Set ceilometer reserved metadata length set_fact: openstack_ceilometer_reserved_metadata_length: "{{ reserved_metadata_length.stdout }}" when: reserved_metadata_length.stdout != "" - name: Set ceilometer reserved metadata length set_fact: openstack_ceilometer_reserved_metadata_length: 255 when: reserved_metadata_length.stdout == "" - name: Get ceilometer meter_dispatchers command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT meter_dispatchers register: meter_dispatchers ignore_errors: true - name: Set ceilometer meter_dispatchers set_fact: openstack_ceilometer_meter_dispatchers: "{{ meter_dispatchers.stdout }}" when: meter_dispatchers.stdout != "" - name: Set ceilometer meter_dispatchers set_fact: openstack_ceilometer_meter_dispatchers: "database" when: reserved_metadata_length.stdout == "" - name: Get ceilometer pipeline polling interval command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT pipeline_polling_interval register: pipeline_polling_interval ignore_errors: true - name: Set ceilometer pipeline polling interval set_fact: openstack_ceilometer_pipeline_polling_interval: "{{ pipeline_polling_interval.stdout }}" when: pipeline_polling_interval.stdout != "" - name: Set ceilometer pipeline polling interval set_fact: openstack_ceilometer_pipeline_polling_interval: 20 when: pipeline_polling_interval.stdout == "" - name: Get ceilometer http timeout command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT http_timeout register: http_timeout ignore_errors: true - name: Set ceilometer http timeout set_fact: openstack_ceilometer_http_timeout: "{{ http_timeout.stdout }}" when: http_timeout.stdout != "" - name: Set ceilometer http timeout set_fact: openstack_ceilometer_http_timeout: 600 when: http_timeout.stdout == "" - name: Get ceilometer rpc conn pool size command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT rpc_conn_pool_size register: rpc_conn_pool_size ignore_errors: true - name: Set ceilometer rpc conn pool size set_fact: openstack_ceilometer_rpc_conn_pool_size: "{{ rpc_conn_pool_size.stdout }}" when: rpc_conn_pool_size.stdout != "" - name: Set ceilometer rpc conn pool size set_fact: openstack_ceilometer_rpc_conn_pool_size: 30 when: rpc_conn_pool_size.stdout == "" - name: Get ceilometer executor thread pool size command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT executor_thread_pool_size register: executor_thread_pool_size ignore_errors: true - name: Set ceilometer executor thread pool size set_fact: openstack_ceilometer_executor_thread_pool_size: "{{ executor_thread_pool_size.stdout }}" when: executor_thread_pool_size.stdout != "" - name: Set ceilometer executor thread pool size set_fact: openstack_ceilometer_executor_thread_pool_size: 64 when: executor_thread_pool_size.stdout == "" - name: Get ceilometer rpc response timeout command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT rpc_response_timeout register: rpc_response_timeout ignore_errors: true - name: Set ceilometer rpc response timeout set_fact: openstack_ceilometer_rpc_response_timeout: "{{ rpc_response_timeout.stdout }}" when: rpc_response_timeout.stdout != "" - name: Set ceilometer rpc response timeout set_fact: openstack_ceilometer_rpc_response_timeout: 60 when: rpc_response_timeout.stdout == "" - name: Get ceilometer rpc backend command: crudini --get /etc/ceilometer/ceilometer.conf DEFAULT rpc_backend register: rpc_backend ignore_errors: true - name: Set ceilometer rpc backend set_fact: openstack_ceilometer_rpc_backend: "{{ rpc_backend.stdout }}" when: rpc_backend.stdout != "" - name: Set ceilometer rpc backend set_fact: openstack_ceilometer_rpc_backend: rabbit when: rpc_backend.stdout == "" - name: Get ceilometer workers command: crudini --get /etc/ceilometer/ceilometer.conf api workers register: workers ignore_errors: true - name: Set ceilometer workers set_fact: openstack_ceilometer_workers: "{{ workers.stdout }}" when: workers.stdout != "" - name: Set ceilometer workers set_fact: openstack_ceilometer_workers: 1 when: workers.stdout == "" - name: Get ceilometer batch polled samples command: crudini --get /etc/ceilometer/ceilometer.conf central batch_polled_samples register: batch_polled_samples ignore_errors: true - name: Set ceilometer batch polled samples set_fact: openstack_ceilometer_batch_polled_samples: "{{ batch_polled_samples.stdout }}" when: (batch_polled_samples.stdout != "") - name: Set ceilometer batch polled samples set_fact: openstack_ceilometer_batch_polled_samples: true when: (batch_polled_samples.stdout == "") - name: Get ceilometer shuffle time before polling task command: crudini --get /etc/ceilometer/ceilometer.conf central shuffle_time_before_polling_task register: shuffle_time_before_polling_task ignore_errors: true - name: Set ceilometer shuffle time before polling task set_fact: openstack_ceilometer_shuffle_time_before_polling_task: "{{ shuffle_time_before_polling_task.stdout }}" when: shuffle_time_before_polling_task.stdout != "" - name: Set ceilometer shuffle time before polling task set_fact: openstack_ceilometer_shuffle_time_before_polling_task: 0 when: shuffle_time_before_polling_task.stdout == "" - name: Get ceilometer batch size command: crudini --get /etc/ceilometer/ceilometer.conf collector batch_size register: batch_size ignore_errors: true - name: Set ceilometer batch size set_fact: openstack_ceilometer_batch_size: "{{ batch_size.stdout }}" when: batch_size.stdout != "" - name: Set ceilometer batch size set_fact: openstack_ceilometer_batch_size: 1 when: batch_size.stdout == "" - name: Get ceilometer workers command: crudini --get /etc/ceilometer/ceilometer.conf collector workers register: workers ignore_errors: true - name: Set ceilometer workers set_fact: openstack_ceilometer_workers: "{{ workers.stdout }}" when: workers.stdout != "" - name: Set ceilometer workers set_fact: openstack_ceilometer_workers: 1 when: workers.stdout == "" - name: Get ceilometer workload partitioning command: crudini --get /etc/ceilometer/ceilometer.conf compute workload_partitioning register: workload_partitioning ignore_errors: true - name: Set ceilometer workload partitioning set_fact: openstack_ceilometer_workload_partitioning: "{{ workload_partitioning.stdout }}" when: (workload_partitioning.stdout != "") - name: Set ceilometer workload partitioning set_fact: openstack_ceilometer_workload_partitioning: false when: (workload_partitioning.stdout == "") - name: Get ceilometer resource update interval command: crudini --get /etc/ceilometer/ceilometer.conf compute resource_update_interval register: resource_update_interval ignore_errors: true - name: Set ceilometer resource update interval set_fact: openstack_ceilometer_resource_update_interval: "{{ resource_update_interval.stdout }}" when: resource_update_interval.stdout != "" - name: Set ceilometer resource update interval set_fact: openstack_ceilometer_resource_update_interval: 0 when: resource_update_interval.stdout == "" - name: Get ceilometer disable process locking command: crudini --get /etc/ceilometer/ceilometer.conf oslo_concurrency disable_process_locking register: disable_process_locking ignore_errors: true - name: Set ceilometer disable process locking set_fact: openstack_ceilometer_disable_process_locking: "{{ disable_process_locking.stdout }}" when: (disable_process_locking.stdout != "") - name: Set ceilometer disable process locking set_fact: openstack_ceilometer_disable_process_locking: false when: (disable_process_locking.stdout == "") - name: Get ceilometer rabbit use ssl command: crudini --get /etc/ceilometer/ceilometer.conf oslo_messaging_rabbit rabbit_use_ssl register: rabbit_use_ssl ignore_errors: true - name: Set ceilometer rabbit use ssl set_fact: openstack_ceilometer_rabbit_use_ssl: "{{ rabbit_use_ssl.stdout }}" when: (rabbit_use_ssl.stdout != "") - name: Set ceilometer rabbit use ssl set_fact: openstack_ceilometer_rabbit_use_ssl: false when: (rabbit_use_ssl.stdout == "")