websoft9/apps/roles/gitlab/tasks/pre.yml
2022-12-08 14:34:36 +08:00

27 lines
641 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
when: gitlab_version != "jenkins"