2022-05-11 12:01:49 +08:00
|
|
|
- name: Delete {{appname}} dir for sec_installation
|
|
|
|
shell: rm -rf /data/apps/{{appname}}
|
2022-05-11 11:56:59 +08:00
|
|
|
|
2022-05-11 12:01:49 +08:00
|
|
|
- name: Clone {{appname}} in Websoft9
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/Websoft9/docker-{{appname}}.git"
|
|
|
|
dest: /data/apps/{{appname}}
|
|
|
|
|
|
|
|
- name: Rename and Run docker-compose
|
|
|
|
shell: |
|
|
|
|
docker-compose up -d
|
|
|
|
sleep 30
|
|
|
|
args:
|
|
|
|
chdir: "/data/apps/{{appname}}"
|
|
|
|
|
|
|
|
- name: Recursively create directory for {{appname}}
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
recurse: yes
|
|
|
|
with_items:
|
|
|
|
- "/data/apps/{{appname}}/volumes"
|
|
|
|
|
2022-05-11 14:35:18 +08:00
|
|
|
- name: Create docker self volumes to DiscuzQ
|
2022-05-11 12:01:49 +08:00
|
|
|
file:
|
|
|
|
src: "{{item.src}}"
|
|
|
|
dest: "{{item.dest}}"
|
|
|
|
state: link
|
|
|
|
force: yes
|
|
|
|
with_items:
|
2022-05-11 14:35:18 +08:00
|
|
|
- {
|
|
|
|
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",
|
|
|
|
}
|
|
|
|
#- name: Check {{appname}} Service
|
|
|
|
# shell: docker ps
|
|
|
|
# register: check_discuzq_service
|
|
|
|
# notify: check_{{appname}}_service
|