2022-07-25 15:12:44 +08:00
|
|
|
- pause:
|
|
|
|
prompt: |
|
|
|
|
Choice Seafile version:
|
|
|
|
0: Seafile Community
|
|
|
|
1: Seafile Enterprise
|
|
|
|
private: no
|
|
|
|
Default:0
|
|
|
|
register: seafile_version_options
|
2022-07-15 08:56:27 +08:00
|
|
|
|
2022-07-25 15:12:44 +08:00
|
|
|
- set_fact:
|
|
|
|
seafile_version_meta:
|
2022-07-28 09:58:36 +08:00
|
|
|
"0": "ce"
|
|
|
|
"1": "pro"
|
2022-07-25 15:12:44 +08:00
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
seafile_version: "{{seafile_version_meta[seafile_version_options.user_input]}}"
|
|
|
|
|
|
|
|
- debug:
|
|
|
|
msg: "seafile_version is {{seafile_version}}"
|
|
|
|
|
2022-07-28 09:58:36 +08:00
|
|
|
- name: Config .env and docker-compose for start containers
|
2022-07-25 15:12:44 +08:00
|
|
|
shell: |
|
2022-07-28 09:58:36 +08:00
|
|
|
cat {{installpath}}/{{appname}}/docker-compose.yml |yq eval 'del(.services.seafile-ce.profiles)' > /tmp/tmp.yml
|
|
|
|
cat /tmp/tmp.yml > {{installpath}}/{{appname}}/docker-compose.yml
|
|
|
|
rm -f /tmp/tmp.yml
|
|
|
|
when: seafile_version == "ce"
|
|
|
|
|
|
|
|
- name: Config .env and docker-compose for start containers
|
|
|
|
shell: |
|
|
|
|
cat {{installpath}}/{{appname}}/docker-compose.yml |yq eval 'del(.services.seafile-pro.profiles)' |yq eval 'del(.services.elasticsearch.profiles)' > /tmp/tmp.yml
|
|
|
|
cat /tmp/tmp.yml > {{installpath}}/{{appname}}/docker-compose.yml
|
|
|
|
rm -f /tmp/tmp.yml
|
|
|
|
when: seafile_version == "pro"
|