First commit, at K18-2 Control Center.
This commit is contained in:
20
uninstall/roles/backup_marsio_config/tasks/main.yml
Normal file
20
uninstall/roles/backup_marsio_config/tasks/main.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
- name: "create backup_dest_path"
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
ignore_errors: true
|
||||
|
||||
- name: "mrzcpd_{{ uninstall_version }}_{{ date }}.zip exist?"
|
||||
shell: "ls {{ backup_dest_path }}/mrzcpd_{{ uninstall_version }}_{{ date }}.zip"
|
||||
register: mrzcpd_directory
|
||||
ignore_errors: true
|
||||
|
||||
- name: "backup /opt/mrzcpd to destination path"
|
||||
archive:
|
||||
path: /opt/mrzcpd
|
||||
dest: "{{ backup_dest_path }}/mrzcpd_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when:
|
||||
- mrzcpd_directory.rc != 0
|
||||
- backup.marsio == 1
|
||||
ignore_errors: true
|
||||
Reference in New Issue
Block a user