name: openstack/cinder/cinder-backup
enabled: {{ enable_cinder | bool }}
container:
  image: "{{ cinder_backup_image }}:{{ cinder_backup_tag }}"
  parameters:
    - key: volume
      value: "kolla_logs_{{ deployment_id }}_{{ timestamp }}:/var/log/kolla"
service:
  daemon:
    dependencies:
     - path: cinder_ansible_tasks/create_user
     - path: keystone_ansible_tasks/running
     - path: rabbitmq/daemon
    command: /usr/bin/cinder-backup
    files:
      cinder.conf.j2:
        source: ["config/cinder/templates/cinder.conf.j2",
                 "config/cinder/templates/cinder-{{ cinder_volume_driver }}.conf.j2",
{% if cinder_volume_driver == "ceph" %}
                 "config/cinder/templates/cinder-backup-{{ cinder_volume_driver }}.conf.j2",
{% endif %}
                 "/etc/kolla-mesos/config/global.conf",
                 "/etc/kolla-mesos/config/database.conf",
                 "/etc/kolla-mesos/config/messaging.conf",
                 "/etc/kolla-mesos/config/cinder.conf",
                 "/etc/kolla-mesos/config/cinder/cinder-backup.conf"]
        dest: /etc/cinder/cinder.conf
        owner: cinder
        perm: "0600"
  mem: {{ cinder_backup_mem }}
  cpus: {{ cinder_backup_cpus }}
  instances: {{ storage_nodes }}
  constraints: {{ storage_constraints }}
commands:
  extend_start:
    command: kolla_extend_start
