websoft9/apps/roles/gitlab/tasks/pre.yml
2022-12-07 11:01:39 +08:00

26 lines
604 B
YAML

- pause:
prompt: |
Choice Gitlab version:
0: Gitlabce
1: Gitlabee
2: Gitlab with Jenkins
private: no
Default:0
register: gitlab_version_options
- set_fact:
gitlab_version_meta:
"0": "ce"
"1": "ee"
"2": "jenkins"
- 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: |
sed -i 's/APP_EDITION=.*/APP_EDITION={{gitlab_version}}/g' {{installpath}}/{{appname}}/.env