Skip to content

Instantly share code, notes, and snippets.

@tthayer
Forked from janschumann/gist:e9bb6a0298101a465d94
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tthayer/f07b060b4bf106542b79 to your computer and use it in GitHub Desktop.
Save tthayer/f07b060b4bf106542b79 to your computer and use it in GitHub Desktop.
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'] ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment