geerlingguy / ansible-role-gitlab

Ansible Role - GitLab

Home Page:https://galaxy.ansible.com/geerlingguy/gitlab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitlab install fails - special symbols in smtp password

ussrlongbow opened this issue · comments

commented

Hello,
recently tried to make a fresh install of Gitlab CE with SMTP enabled.
content of corresponding group_vars/gitlab.yml:

gitlab_external_url: "https://git.example.com"
gitlab_redirect_http_to_https: "true"
gitlab_create_self_signed_cert: "false"
gitlab_smtp_enable: "true"
gitlab_smtp_address: "smtp.example.com"
gitlab_smtp_user_name: "gitlab@example.com"
gitlab_smtp_password: "g)^fJZ<^kE$HAAh<3:$'KBVbt=Zcwv{>"
gitlab_smtp_domain: "example.com"
gitlab_email_enabled: "true"
gitlab_email_from: "gitlab@example"
gitlab_email_display_name: "Gitlab Example"
gitlab_email_reply_to: "gitlab@example.com"

Restart Gitlab step failed with this error message:

RUNNING HANDLER [geerlingguy.gitlab : restart gitlab] ***************************************************************************************
fatal: [git.example.com]: FAILED! => {
	"changed": true, 
	"cmd": ["gitlab-ctl", "reconfigure"], 
	"delta": "0:00:05.049413", 
	"end": "2019-11-28 04:46:59.717962", 
	"failed_when_result": true, 
	"msg": "non-zero return code", 
	"rc": 1, 
	"start": "2019-11-28 04:46:54.668549", 
	"stderr": "There was an error running gitlab-ctl reconfigure:\n\n/etc/gitlab/gitlab.rb:48: 
			syntax error, unexpected tCONSTANT, expecting end-of-input\n...'] 
			= 'g)^fJZ<^kE$HAAh<3:$'KBVbt=Zcwv{>'\n...                          ^~~~~", 
	"stderr_lines": [
		"There was an error running gitlab-ctl reconfigure:", 
		"", 
		"/etc/gitlab/gitlab.rb:48: syntax error, unexpected tCONSTANT, expecting end-of-input", 
		"...'] = 'g)^fJZ<^kE$HAAh<3:$'KBVbt=Zcwv{>'", 
		"...                          ^~~~~"
	], 
commented

Found answer myself at https://docs.gitlab.com/omnibus/settings/smtp.html

Warning: Your smtp_password should not contain any String delimiters used in Ruby or YAML (f.e. ') to avoid unexpected behavior during the processing of config settings.