Created
February 6, 2015 14:47
-
-
Save janschumann/e9bb6a0298101a465d94 to your computer and use it in GitHub Desktop.
Install omniout_crowd with gitlab via puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] ] | |
} |
One thing to note:
Line 10 doesn't work for me until I change it to this:
match => "^.*provider_arguments << provider\[\'args\'\]",
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
This was hugely helpful. Thanks for putting this out there.