websoft9/apps/roles/gitlab/tasks/pre.yml

29 lines
687 B
YAML
Raw Normal View History

2022-07-22 11:56:13 +08:00
- pause:
prompt: |
Choice Gitlab version:
0: Gitlabce
1: Gitlabee
2022-12-07 11:01:39 +08:00
2: Gitlab with Jenkins
2022-12-13 16:21:47 +08:00
3: 极狐中文
2022-07-22 11:56:13 +08:00
private: no
Default:0
register: gitlab_version_options
2022-07-15 08:56:27 +08:00
2022-07-22 11:56:13 +08:00
- set_fact:
gitlab_version_meta:
2022-12-13 16:21:47 +08:00
"0": "CE"
"1": "EE"
2022-12-07 11:01:39 +08:00
"2": "jenkins"
2022-12-13 16:21:47 +08:00
"3": "JH"
2022-07-22 11:56:13 +08:00
- set_fact:
gitlab_version: "{{gitlab_version_meta[gitlab_version_options.user_input]}}"
- debug:
msg: "gitlab_version is {{gitlab_version}}"
- name: Config .env for start containers
shell: |
2022-12-13 16:21:47 +08:00
sed -i 's/\$APP_CE_IMAGEURL/\$APP_{{gitlab_version}}_IMAGEURL/g' {{installpath}}/{{appname}}/.env
2022-12-08 14:34:36 +08:00
when: gitlab_version != "jenkins"