Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
585 B

---
- name: Create archive dir
file: path={{ graylog_root_dir }}/archives/{{ graylog_current_version }}/mongo state=directory
tags: graylog
- name: Archive current version
synchronize:
src: "{{ graylog_root_dir }}/app"
dest: "{{ graylog_root_dir }}/archives/{{ graylog_current_version }}/"
recursive: True
delete: True
delegate_to: "{{ inventory_hostname }}"
tags: graylog
- name: Archive mongo database
command: mongodump --quiet --out {{ graylog_root_dir }}/archives/{{ graylog_current_version }}/mongo --uri {{ graylog_mongo_url[0] }}
tags: graylog