add tags for backup related tasks for RC, backup seems to be working
This commit is contained in:
parent
88ece285d1
commit
ba275fa976
|
@ -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: ssh_port_fallback.yml
|
||||||
|
|
||||||
- include: harden.yml
|
- include: harden.yml
|
||||||
# become: true
|
# become: true
|
||||||
when: harden_os
|
when: harden_os
|
||||||
tags: harden
|
tags: harden
|
||||||
|
|
||||||
- include: docker.yml
|
- include: docker.yml
|
||||||
# become: true
|
|
||||||
# apply tags,become
|
|
||||||
# when: harden_os
|
|
||||||
tags: install-docker
|
tags: install-docker
|
||||||
|
|
||||||
- include: rocketchat.yml
|
- include: rocketchat.yml
|
||||||
# become: true
|
|
||||||
# apply tags,become
|
|
||||||
# when: harden_os
|
|
||||||
# tags: harden
|
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
# chdir: /home/{{ main_user }}/rocketchat
|
# chdir: /home/{{ main_user }}/rocketchat
|
||||||
# chdir: /
|
# chdir: /
|
||||||
register: __backup_result
|
register: __backup_result
|
||||||
|
tags: mongodump
|
||||||
|
|
||||||
- name: Copy backup we just took to home/{{ main_user }}/backups
|
- name: Copy backup we just took to home/{{ main_user }}/backups
|
||||||
when: backup_db and not __backup_result.failed
|
when: backup_db and not __backup_result.failed
|
||||||
|
@ -112,12 +113,14 @@
|
||||||
src: /home/{{ main_user }}/rocketchat/data/dump/{{ ansible_date_time.iso8601 }}
|
src: /home/{{ main_user }}/rocketchat/data/dump/{{ ansible_date_time.iso8601 }}
|
||||||
dest: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
|
dest: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
tags: mongodump
|
||||||
|
|
||||||
- name: Pull newly created mongodump into local backups directory
|
- name: Pull newly created mongodump into local backups directory
|
||||||
when: backup_db and not __backup_result.failed
|
when: backup_db and not __backup_result.failed
|
||||||
ansible.builtin.fetch:
|
ansible.builtin.fetch:
|
||||||
src: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
|
src: /home/{{ main_user }}/backups/{{ ansible_date_time.iso8601 }}.gzip
|
||||||
dest: "{{ local_backup_dir }}"
|
dest: "{{ local_backup_dir }}"
|
||||||
|
tags: mongodump
|
||||||
|
|
||||||
- name: debug docker compose down
|
- name: debug docker compose down
|
||||||
debug:
|
debug:
|
||||||
|
@ -130,4 +133,5 @@
|
||||||
- name: debug mongo backup
|
- name: debug mongo backup
|
||||||
when: backup_db
|
when: backup_db
|
||||||
debug:
|
debug:
|
||||||
var: __backup_result
|
var: __backup_result
|
||||||
|
tags: mongodump
|
||||||
|
|
Loading…
Reference in New Issue