diff --git a/defaults/main.yml b/defaults/main.yml index 6ece6f96..6dc13625 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -89,6 +89,8 @@ cinder_keystone_auth_plugin: password ## In order to enable the cinder backup you MUST set ``cinder_service_backup_program_enabled`` to "true" cinder_service_backup_program_enabled: false cinder_service_backup_program_name: cinder-backup +# cinder_service_backup_driver: Options include 'cinder.backup.drivers.swift' or +# 'cinder.backup.drivers.ceph' cinder_service_backup_driver: cinder.backup.drivers.swift # cinder_service_backup_swift_auth: Options include 'per_user' or 'single_user', we default to # 'per_user' so that backups are saved to a user's swift account. @@ -106,6 +108,8 @@ cinder_service_backup_swift_container: volumebackups cinder_service_backup_swift_object_size: 52428800 cinder_service_backup_swift_retry_attempts: 3 cinder_service_backup_swift_retry_backoff: 2 +cinder_service_backup_ceph_user: cinder-backup +cinder_service_backup_ceph_pool: backups cinder_service_backup_compression_algorithm: zlib cinder_service_backup_metadata_version: 2 diff --git a/tasks/cinder_upstart_init.yml b/tasks/cinder_upstart_init.yml index 04877112..5c50c86c 100644 --- a/tasks/cinder_upstart_init.yml +++ b/tasks/cinder_upstart_init.yml @@ -57,7 +57,7 @@ system_group: "{{ cinder_system_group_name }}" service_home: "{{ cinder_system_home_folder }}" when: > - inventory_hostname in groups['cinder_volume'] and + inventory_hostname in groups['cinder_backup'] and cinder_service_backup_program_enabled == true tags: - upstart-init diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 0e59d17e..bcef1437 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -23,6 +23,8 @@ enable_v2_api = {{ cinder_enable_v2_api }} {% if cinder_service_backup_program_enabled == true %} ## Cinder Backup backup_driver = {{ cinder_service_backup_driver }} +backup_metadata_version = {{ cinder_service_backup_metadata_version }} +backup_compression_algorithm = {{ cinder_service_backup_compression_algorithm }} {% if cinder_service_backup_driver == 'cinder.backup.drivers.swift' %} backup_swift_auth = {{ cinder_service_backup_swift_auth }} {% if cinder_service_backup_swift_auth == 'single_user' %} @@ -36,9 +38,10 @@ backup_swift_container = {{ cinder_service_backup_swift_container }} backup_swift_object_size = {{ cinder_service_backup_swift_object_size }} backup_swift_retry_attempts = {{ cinder_service_backup_swift_retry_attempts }} backup_swift_retry_backoff = {{ cinder_service_backup_swift_retry_backoff }} +{% elif cinder_service_backup_driver == 'cinder.backup.drivers.ceph' %} +backup_ceph_user = {{ cinder_service_backup_ceph_user }} +backup_ceph_pool = {{ cinder_service_backup_ceph_pool }} {% endif %} -backup_compression_algorithm = {{ cinder_service_backup_compression_algorithm }} -backup_metadata_version = {{ cinder_service_backup_metadata_version }} {% endif %} {% endif %}