diff --git a/defaults/main.yml b/defaults/main.yml index e8ae6401..30cab296 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -48,6 +48,7 @@ cinder_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups # Time period for which to generate volume usages. The options are hour, day, # month, or year. (string value) cinder_volume_usage_audit: hour +cinder_volume_usage_audit_send_actions_enabled: True cinder_storage_availability_zone: nova cinder_default_availability_zone: "{{ cinder_storage_availability_zone }}" diff --git a/releasenotes/notes/optional_cinder_audit_send_actions-76bf53ee0df68383.yaml b/releasenotes/notes/optional_cinder_audit_send_actions-76bf53ee0df68383.yaml new file mode 100644 index 00000000..33978668 --- /dev/null +++ b/releasenotes/notes/optional_cinder_audit_send_actions-76bf53ee0df68383.yaml @@ -0,0 +1,7 @@ +--- +features: + - Introduced new variable ``cinder_volume_usage_audit_send_actions_enabled`` + to allow the deployer to disable the send actions option in + cinder-volume-usage-audit service unit. To have lowest possible + footprint, the default value would be true to not change the behaviour + of the cinder-volume-usage-audit in existing deployments. diff --git a/tasks/main.yml b/tasks/main.yml index 94adcd99..700f8226 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -130,7 +130,7 @@ systemd_services: - service_name: "cinder-volume-usage-audit" 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)\" --send_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: state: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary('started', 'stopped') }}" options: