Commit d05879a4 authored by rjshrjndrn's avatar rjshrjndrn Committed by S M Y
Browse files

Issue #000 feat: fix linting error

Showing with 10 additions and 10 deletions
+10 -10
- hosts: cassandra
become: yes
vars_files:
- ['{{inventory_dir}}/secrets.yml']
- ['{{ inventory_dir }}/secrets.yml']
roles:
- cassandra-backup
run_once: true
- name: Create the directory
become: yes
file: path=/data/cassandra/backup state=directory recurse=yes
- name: copy the backup script
- name: copy the backup script
become: yes
template: src=cassandra_backup.j2 dest=/data/cassandra/backup/cassandra_backup.py mode=0755
template: src=cassandra_backup.j2 dest=/data/cassandra/backup/cassandra_backup.py mode=0755
- set_fact:
cassandra_backup_gzip_file_name: "cassandra-backup-{{ lookup('pipe', 'date +%Y%m%d') }}"
- set_fact:
cassandra_backup_gzip_file_path: "{{ cassandra_backup_dir }}/{{ cassandra_backup_gzip_file_name }}.tar.gz"
......@@ -19,22 +19,22 @@
chdir: /data/cassandra/backup
async: 7200
poll: 30
- name: Check doc_root path
shell: ls -all /data/cassandra/backup/
register: doc_data
- name: print doc_root to console
debug:
var: doc_data
var: doc_data
- name: Ensure azure blob storage container exists
command: az storage container create --name {{ cassandra_backup_azure_container_name }}
ignore_errors: true
environment:
AZURE_STORAGE_ACCOUNT: "{{ backup_azure_storage_account_name }}"
AZURE_STORAGE_KEY: "{{ backup_azure_storage_access_key }}"
- name: Upload to azure blob storage
command: az storage blob upload --name "{{ cassandra_backup_gzip_file_name }}".tar.gz --file {{ cassandra_backup_gzip_file_path }} --container-name {{ cassandra_backup_azure_container_name }}
environment:
......@@ -42,6 +42,6 @@
AZURE_STORAGE_KEY: "{{ backup_azure_storage_access_key }}"
async: 3600
poll: 10
- name: clean up backup dir after upload
file: path="{{ cassandra_backup_dir }}" state=absent
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment