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.
 
 

30 lines
717 B

---
#- name: include dokuwiki install task
# include_tasks: dokuwiki.yml
- name: backup block
when: "'backup' in ansible_run_tags"
vars:
output: /tmp/
archive: /tmp/dokuwiki_backup.tgz
doku_path: /var/www/localhost/htdocs/dokuwiki/
block:
- name: make dokuwiki archive
community.general.archive:
dest: "{{ archive }}"
path:
- "{{ doku_path }} + conf"
- "{{ doku_path }} + data"
- "{{ doku_path }} + lib/plugins"
- name: copy archive to controller
fetch:
src: "{{ archive }}"
dest: "{{ output }}"
flat: yes
- name: remove remote archive
file:
path: "{{ archive }}"
state: absent