---
- hosts: kv
  vars:
    cassandra_home: /opt/apache-cassandra
  tasks:
  - name: creating a temporary directory
    tempfile:
      state: directory
    register: result

  - name: archiving the database logs
    archive:
      path: "{{ cassandra_home }}/logs"
      dest: "{{ result.path }}/{{ inventory_hostname }}.zip"
      format: zip

  - name: downloading the remote logs
    fetch:
      src: "{{ result.path }}/{{ inventory_hostname }}.zip"
      dest: ../
      flat: yes

  - name: removing temporary files
    file: path={{ result.path }} state=absent

Add a playbook for archiving Cassandra logs
Add a playbook for archiving Cassandra logs

Change-Id: Ide7f7de22131a1a1c8c1257b3807c4bea3c40d80
Reviewed-on: http://review.couchbase.org/76818
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
