2022-11-03 11:08:44 +08:00
|
|
|
- name: Install {{appname}}
|
|
|
|
include_tasks: tasks/install.yml
|
|
|
|
vars:
|
|
|
|
app: "wordpress"
|
|
|
|
|
2022-11-18 11:26:52 +08:00
|
|
|
- block:
|
2022-11-23 17:30:52 +08:00
|
|
|
- name: Create backup directory
|
|
|
|
shell: |
|
2022-11-23 22:22:16 +08:00
|
|
|
mkdir -p /data/apps/wordpress/data/backup/plugins
|
|
|
|
mkdir -p /data/apps/wordpress/data/backup/themes
|
2022-11-29 10:20:31 +08:00
|
|
|
- name: Download wp-cli
|
|
|
|
shell: |
|
|
|
|
cd /data/apps/wordpress/data/backup
|
|
|
|
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
|
|
chmod +x wp-cli.phar
|
2022-11-30 10:00:43 +08:00
|
|
|
mv wp-cli.phar wp
|
2022-12-06 10:49:14 +08:00
|
|
|
|
|
|
|
- block:
|
2022-12-07 08:45:39 +08:00
|
|
|
- name: Delete all config
|
2022-12-06 10:49:14 +08:00
|
|
|
shell: |
|
|
|
|
cd /data/apps/minio && docker compose down -v
|
2022-12-07 08:45:39 +08:00
|
|
|
cd /data/apps/matomo && docker compose down -v
|
|
|
|
rm -rf /data/apps/minio /data/apps/matomo
|
2022-12-06 10:49:14 +08:00
|
|
|
when: wordpress_solution == ""
|
2022-12-07 08:45:39 +08:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Delete minio config
|
|
|
|
shell: |
|
|
|
|
cd /data/apps/minio && docker compose down -v
|
|
|
|
rm -rf /data/apps/minio
|
|
|
|
when: wordpress_solution == "matomo"
|
|
|
|
|
|
|
|
- block:
|
2022-12-07 08:45:57 +08:00
|
|
|
- name: Delete matomo config
|
2022-12-07 08:45:39 +08:00
|
|
|
shell: |
|
|
|
|
cd /data/apps/matomo && docker compose down -v
|
|
|
|
rm -rf /data/apps/matomo
|
|
|
|
when: wordpress_solution == "minio"
|