Recipe Compile Error with LDAP configuration
Hi,
I'm configuring GitLab with LDAP on a Linux VM (Fedora) and I've this error when I run 'gitlab-ctl reconfigure' :
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.1.0)
- registry (0.1.0)
- consul (0.0.0)
- runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
Psych::SyntaxError
------------------
(<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 1
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:125:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:28:in `auto_vivify'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:125:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:23:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:
118: 'geo_primary',
119: 'geo_secondary',
120: ].freeze
121:
122: class << self
123: def from_file(_file_path)
124: # Allow auto mash creation during from_file call
125>> ConfigMash.auto_vivify { super }
126: end
127:
128: def method_missing(method_name, *arguments)
129: # Give better message for NilClass errors
130: # If there are no arguements passed, this is a 'GET' call, and if
131: # there is no matching key in the configuration, then it has not been set (not even to nil)
132: # and we will output a nicer error above the exception
133: if arguments.length == 0 && !configuration.has_key?(method_name)
134: message = "Encountered unsupported config key '#{method_name}' in /etc/gitlab/gitlab.rb."
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 02 seconds
My gitlab.rb :
gitlab_rails['ldap_enabled'] = true
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'hostname'
port: 389
uid: 'sAMAccountName'
bind_dn: 'cn=aaaa,dc=bbbbbb,dc=fr'
password: 'password'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
# verify_certificates: true
# ca_file: ''
# ssl_version: ''
# active_directory: true
# allow_username_or_email_login: false
# block_auto_created_users: false
base: 'ou=people,dc=bbbbb,dc=fr'
attributes:
username: 'uid'
email: 'mails'
# name: 'sn'
first_name: 'givenName'
last_name: 'sn'
# ## EE only
# group_base: ''
# admin_group: ''
# sync_ssh_keys: false
EOS
I really don't know where is the problem. Anyone could help me ?
Thanks in advance :-)
Nicolas
Edited by Jason Plum