Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiera not parsing gitlab.rb and ::gitlab_rails: #344

Open
hktyper opened this issue May 21, 2020 · 0 comments
Open

Hiera not parsing gitlab.rb and ::gitlab_rails: #344

hktyper opened this issue May 21, 2020 · 0 comments

Comments

@hktyper
Copy link

hktyper commented May 21, 2020

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.14
  • Ruby:
  • Gitlab: 12.10.6 CE
  • Module version: 5.0.0
  • OS: RHEL 7.6

How to reproduce (e.g Puppet code you use)

Hiera

gitlab::gitlab_rails:
  ldap_servers:
    main:
      label: 'LDAP'
      host: 'adserver-01'
      port: 389
      uid: 'gitlabuser'
      method: 'plain' # "tls" or "ssl" or "plain"
      bind_dn: 'DC=uk'
      password: '$password'
      active_directory: true
      allow_username_or_email_login: true
      block_auto_created_users: false
      base: 'DC=uk'

What are you seeing

Hiera isn't parsing correctly and returning as a json block instead

############################
# gitlab.yml configuration #
############################

gitlab_rails['ldap_servers'] = {"main"=>{"active_directory"=>true, "allow_username_or_email_login"=>true, "base"=>"DC=uk", "bind_dn"=>"DC=uk", "block_auto_created_users"=>false, "host"=>"adserver-01", "label"=>"LDAP", "method"=>"plain", "password"=>"$password", "port"=>389, "uid"=>"gitlabuser"}}

What behaviour did you expect instead

############################
# gitlab.yml configuration #
############################

gitlab_rails['ldap_enabled'] = true

gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
  main:
    active_directory: true
    allow_username_or_email_login: true
    base: "DC=uk"
    bind_dn: "DC=uk"
    block_auto_created_users: false
    host: "adserver-01"
    label: "LDAP"
    method: "plain"
    password: "$password"
    port: 389
    uid: "gitlabuser"
EOS

Output log

Any additional information you'd like to impart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant