4 changed files with 139 additions and 188 deletions
@ -0,0 +1,23 @@
|
||||
--- |
||||
- debug: |
||||
var: doku_path |
||||
|
||||
- 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 |
||||
|
||||
@ -1,30 +1,24 @@
|
||||
--- |
||||
#- name: include dokuwiki install task |
||||
# include_tasks: dokuwiki.yml |
||||
- name: include dokuwiki install task |
||||
vars: |
||||
lighttpd_user: lighttpd |
||||
lighttpd_group: lighttpd |
||||
docroot: /var/www/localhost/htdocs |
||||
|
||||
doku_url: https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz |
||||
doku_tar: /tmp/dokuwiki-stable.tgz |
||||
doku_dir: "{{ docroot }}/dokuwiki" |
||||
|
||||
use_backup: True |
||||
doku_backup_archive: data/dokuwiki_backup.tgz |
||||
backup_guard: ANSIBLE_BACKUP_GUARD |
||||
import_tasks: dokuwiki.yml |
||||
|
||||
- name: backup block |
||||
when: "'backup' in ansible_run_tags" |
||||
include_tasks: backup.yml |
||||
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 |
||||
when: "'backup' in ansible_run_tags" |
||||
|
||||
|
||||
Loading…
Reference in new issue