puppet-rbenv icon indicating copy to clipboard operation
puppet-rbenv copied to clipboard

rbenv fails when owner is not root and parent directory is not owned by the same user

Open alexander-komarov-ibm opened this issue 4 weeks ago • 0 comments

Giving the user write permissions on the parent directory is not always desirable.


  file {'/data': 
      ensure => directory, 
      #owner => 'jekyll'  # <--- Will not work without this
  }


  user {'jekyll':
    ensure => present,
    managehome => true,
  }

  # rbenv build seems to need this
  package{'libssl-dev': ensure => installed}

  #rbenv:
  class { 'rbenv':
    # manage_deps => false, # no deps, conflicts with gcc
    install_dir => '/data/rbenv',
    owner => 'jekyll',
  }
  -> rbenv::plugin { 'rbenv/ruby-build': }
  -> rbenv::build { '3.0.2': global => true }
Notice: /Stage[main]/Tc_legacyjira/File[/data]/ensure: created
Notice: /Stage[main]/Rbenv::Deps::Debian/Package[libncurses5-dev]/ensure: created (corrective)
Notice: /Stage[main]/Rbenv::Deps::Debian/Package[libgdbm6]/ensure: created (corrective)
Notice: /Stage[main]/Rbenv/Exec[git-clone-rbenv]/returns: fatal: could not create work tree dir '/data/rbenv': Permission denied
Error: '/usr/bin/git clone https://github.com/rbenv/rbenv.git /data/rbenv' returned 128 instead of one of [0]
Error: /Stage[main]/Rbenv/Exec[git-clone-rbenv]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/git clone https://github.com/rbenv/rbenv.git /data/rbenv' returned 128 instead of one of [0] (corrective)
Notice: /Stage[main]/Rbenv/File[/data/rbenv]: Dependency Exec[git-clone-rbenv] has failures: true
Warning: /Stage[main]/Rbenv/File[/data/rbenv]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/plugins]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/shims]: Skipping because of failed dependencies
Warning: /Stage[main]/Rbenv/File[/data/rbenv/versions]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Plugin[rbenv/ruby-build]/Exec[install-rbenv/ruby-build]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Plugin[rbenv/ruby-build]/Exec[rbenv-permissions-rbenv/ruby-build]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[own-plugins-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[git-pull-rubybuild-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-install-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-ownit-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Exec[rbenv-global-3.0.2]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-gem-install-bundler-_0]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-rbenv-rehash-bundler-_0]: Skipping because of failed dependencies
Warning: /Stage[main]/Tc_legacyjira/Rbenv::Build[3.0.2]/Rbenv::Gem[bundler-3.0.2]/Exec[ruby-3.0.2-rbenv-permissions-bundler-_0]: Skipping because of failed dependencies
Info: Class[Tc_legacyjira]: Unscheduling all events on Class[Tc_legacyjira]

alexander-komarov-ibm avatar Jan 31 '25 15:01 alexander-komarov-ibm