wordpress

This commit is contained in:
chendelin1982 2022-11-03 11:08:44 +08:00
parent 3f17bab70e
commit d10cd4e7cf
7 changed files with 122 additions and 22 deletions

View File

@ -1,18 +1,11 @@
# CHANGELOG
## To do
1. 可视化管理工具
2. AmazonLinux支持
## Logs
### Bug Fixes
* 2020-02-14 redis-version版本输出
* 2020-02-13 redis-version版本输出
### Features
* 2020-02-14 增加GUI工具
* 2020-02-13 增加2.8版本
# CHANGELOG
## To do
## Logs
### Bug Fixes
### Features
* 2022-11-03 update wp-cli.phar

View File

@ -0,0 +1,4 @@
# WordPress
* add theme for selection
* use wp-cli to install theme and plugins

View File

@ -0,0 +1,40 @@
#商业主题的下载包包含官方源码和主题
#注意当无插件下载的时请写plugin: "" or plugin: False
# Accelerate download from OSS
wordpress_theme_download_url: "https://libs-websoft9-com.oss-accelerate.aliyuncs.com/apps/wordpress"
wordpress_theme_meta:
avada:
theme: "avada"
plugin:
- fusion-core
- fusion-builder
- LayerSlider
- revslider
porto:
theme: "porto"
plugin:
- Ultimate_VC_Addons
- dynamic-featured-image
- js_composer
- porto-functionality
- revslider
- sliderrevolution
- wpbakerybuilder
the7:
theme: "dt-the7"
plugin:
- Ultimate_VC_Addons
- dt-the7-core
- go_pricing
- js_composer
- revslider
divi:
theme: "Divi"
plugin:
- Divi-Builder-Layouts-147

Binary file not shown.

View File

@ -1,4 +1,41 @@
- name: Install {{appname}}
include_tasks: tasks/install.yml
vars:
app: "wordpress"
- 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: |
chmod +x wp-cli.phar
sudo mv 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 != ""

View File

@ -0,0 +1,25 @@
- pause:
prompt: |
Choice WordPress Theme:
0: default
1: avada
2: porto
3: the7
4: divi
private: no
Default:0
register: wordpress_theme_selected
- set_fact:
wordpress_theme_option:
"0": ""
"1": "avada"
"2": "porto"
"3": "the7"
"4": "divi"
- set_fact:
wordpress_theme: "{{wordpress_theme_option[wordpress_theme_selected.user_input]}}"
- debug:
msg: "WordPress Theme is {{wordpress_theme}}"

View File

@ -1 +1,2 @@
nginx_reverse_proxy_port: "9001"
wordpress_theme: ""