4 changed files with 46 additions and 12 deletions
@ -0,0 +1,30 @@ |
|||||||
|
--- |
||||||
|
#- 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 |
||||||
|
|
||||||
Loading…
Reference in new issue