add tags for backup related tasks for RC, backup seems to be working

This commit is contained in:
BSounder 2022-07-07 21:09:19 -07:00
parent 88ece285d1
commit ba275fa976
2 changed files with 7 additions and 9 deletions

View File

@ -1,19 +1,13 @@
---
# tasks file for setting up an assetto server on ubuntu20.04
# tasks file for setting up a rocketchat server on ubuntu20.04
- include: ssh_port_fallback.yml
- include: harden.yml
# become: true
when: harden_os
tags: harden
- include: docker.yml
# become: true
# apply tags,become
# when: harden_os
tags: install-docker
- include: rocketchat.yml
# become: true
# apply tags,become
# when: harden_os
# tags: harden

View File

@ -105,6 +105,7 @@
# chdir: /home/{{ main_user }}/rocketchat
# chdir: /
register: __backup_result
tags: mongodump
- name: Copy backup we just took to home/{{ main_user }}/backups
when: backup_db and not __backup_result.failed
@ -112,12 +113,14 @@
src: /home/{{ main_user }}/rocketchat/data/dump/{{ ansible_date_time.iso8601 }}
dest: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
remote_src: yes
tags: mongodump
- name: Pull newly created mongodump into local backups directory
when: backup_db and not __backup_result.failed
ansible.builtin.fetch:
src: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
dest: "{{ local_backup_dir }}"
tags: mongodump
- name: debug docker compose down
debug:
@ -131,3 +134,4 @@
when: backup_db
debug:
var: __backup_result
tags: mongodump