Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install omniout_crowd with gitlab via puppet
file_line { 'omniauth_crowd-gem':
path => '/opt/gitlab/embedded/service/gitlab-rails/Gemfile',
line => 'gem "omniauth_crowd", "2.2.2"',
require => Package['gitlab']
}
file_line { 'patch-devise-rb':
path => '/opt/gitlab/embedded/service/gitlab-rails/config/initializers/devise.rb',
line => " provider_arguments << provider['args'].symbolize_keys",
match => "^ provider_arguments << provider\\['args'\\]\$",
require => Package['gitlab']
}
exec { "install-omniouth-crowd-gem":
unless => '/bin/sh -c "test -d /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/omniauth_crowd-2.2.2"',
cwd => '/opt/gitlab/embedded/service/gitlab-rails',
command => '/opt/gitlab/embedded/bin/bundle install',
require => [ File_Line['omniauth_crowd-gem'], File_Line['patch-devise-rb'] ],
before => [ Exec['/usr/bin/gitlab-ctl reconfigure'], Exec['start gitlab'] ]
}
@tthayer

This comment has been minimized.

Show comment
Hide comment
@tthayer

tthayer Mar 27, 2015

This was hugely helpful. Thanks for putting this out there.

tthayer commented Mar 27, 2015

This was hugely helpful. Thanks for putting this out there.

@tthayer

This comment has been minimized.

Show comment
Hide comment
@tthayer

tthayer May 18, 2015

One thing to note:
Line 10 doesn't work for me until I change it to this:

    match   => "^.*provider_arguments << provider\[\'args\'\]",

tthayer commented May 18, 2015

One thing to note:
Line 10 doesn't work for me until I change it to this:

    match   => "^.*provider_arguments << provider\[\'args\'\]",
@hudecof

This comment has been minimized.

Show comment
Hide comment
@hudecof

hudecof Jul 1, 2015

please update the gem version to 2.2.3. For the new installation 7.11 and newer the 2.2.2 will not work.

hudecof commented Jul 1, 2015

please update the gem version to 2.2.3. For the new installation 7.11 and newer the 2.2.2 will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment