From c13d20362f4f0073bb960ae006ecb47cf389bb0a Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 28 Nov 2023 10:42:50 +0200 Subject: [PATCH] add more parts to install to script --- manifests/init.pp | 7 ------- templates/install_ruby.sh.erb | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index a937dc8..51665b3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -185,13 +185,6 @@ class mastodon ( timeout => 0, require => File['/usr/local/bin/install_ruby.sh'], } - exec { 'set_global_ruby_version': - command => "${mastodon_home}/.rbenv/libexec/rbenv global 3.2.2", - user => $mastodon_user, - cwd => "${mastodon_home}/.rbenv/", - # creates => '', - require => Exec['install_ruby'], - } # exec { 'install_bundler': # command => 'gem install bundler --no-document', # user => $mastodon_user, diff --git a/templates/install_ruby.sh.erb b/templates/install_ruby.sh.erb index 94f8057..3935c34 100644 --- a/templates/install_ruby.sh.erb +++ b/templates/install_ruby.sh.erb @@ -4,4 +4,6 @@ set -euo pipefail if [ ! -e '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/ruby' ]; then cd '<%= @mastodon_home %>' sudo -u <%= @mastodon_user %> RUBY_CONFIGURE_OPTS=--with-jemalloc '<%= @mastodon_home %>/.rbenv/bin/rbenv' install '<%= @ruby_version %>' + sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/bin/rbenv' global '<%= @ruby_version %>' + sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/gem install bundler --no-document fi