mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-25 02:38:42 +08:00
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
- name: Delete discuzq dir for sec_installation
|
|
shell: rm -rf {{discuzq_root_directory}}
|
|
|
|
- name: Clone DiscuzQ in Websoft9
|
|
git:
|
|
repo: "{{discuzq_git_url}}"
|
|
dest: "{{discuzq_root_directory}}"
|
|
|
|
- name: Rename and Run docker-compose
|
|
shell: |
|
|
docker-compose up -d
|
|
sleep 30
|
|
args:
|
|
chdir: "{{discuzq_root_directory}}"
|
|
|
|
- name: Recursively create directory for DiscuzQ
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
recurse: yes
|
|
with_items:
|
|
- "{{discuzq_root_directory}}/volumes"
|
|
- "/data/db/mysql"
|
|
|
|
- name: Create docker self volumes to DiscuzQ
|
|
file:
|
|
src: "{{item.src}}"
|
|
dest: "{{item.dest}}"
|
|
state: link
|
|
force: yes
|
|
with_items:
|
|
- {src: "/var/lib/docker/volumes/discuzq_discuzq/_data", dest: "{{discuzq_root_directory}}/volumes/discuzq"}
|
|
- {src: "/var/lib/docker/volumes/discuzq-mysql/_data",dest: "{{discuzq_root_directory}}/volumes/mysql"}
|
|
- {src: "/var/lib/docker/volumes/discuzq-mysql/_data",dest: "/data/db/mysql/data"}
|
|
|
|
- block:
|
|
- name: Check Discuzq Version
|
|
shell: sudo echo "DiscuzQ version $(docker exec -it discuzq bash -c 'grep -rn "const VERSION =" /var/www/discuz/vendor/discuz/core/src/Foundation/Application.php | awk "{print \$5}" | tr -d ";"')" 1>> /data/logs/install_version.txt
|
|
|
|
- name: Check DiscuzQ Service
|
|
shell: docker ps
|
|
register: check_discuzq_service
|
|
notify: check_discuzq_service
|