mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-25 02:38:42 +08:00
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
- name: Install {{appname}}
|
|
include_tasks: tasks/install.yml
|
|
vars:
|
|
app: "wordpress"
|
|
|
|
- block:
|
|
- name: Copy wp-cli
|
|
copy:
|
|
src: wp-cli.phar
|
|
dest: wp-cli.phar
|
|
|
|
- name: Install wp-cli
|
|
shell: |
|
|
docker cp wp-cli.phar wordpress:/tmp
|
|
docker exec -it wordpress chmod +x /tmp/wp-cli.phar
|
|
docker exec -it mv /tmp/wp-cli.phar /usr/local/bin/wp
|
|
|
|
- block:
|
|
- name: Download {{wordpress_theme}} theme
|
|
unarchive:
|
|
src: "{{wordpress_theme_download_url}}/{{wordpress_theme}}/{{wordpress_theme}}.zip"
|
|
dest: /var/lib/docker/volumes/wordpress_wordpress/_data/wp-content/themes
|
|
owner: www-data
|
|
group: www-data
|
|
remote_src: yes
|
|
|
|
- name: Download plugin
|
|
unarchive:
|
|
src: "{{wordpress_theme_download_url}}/{{wordpress_theme}}/{{item}}.zip"
|
|
dest: /var/lib/docker/volumes/wordpress_wordpress/_data/wp-content/plugins
|
|
owner: www-data
|
|
group: www-data
|
|
remote_src: yes
|
|
with_items:
|
|
- "{{wordpress_theme_meta[wordpress_theme].plugin}}"
|
|
when: wordpress_theme_meta[wordpress_theme].plugin !=""
|
|
|
|
- name: Override the WordPress default theme
|
|
shell: |
|
|
pwd
|
|
|
|
when: wordpress_theme != ""
|