Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module assumes there's a rvm group #20

Closed
ghost opened this issue Jan 30, 2014 · 4 comments
Closed

Module assumes there's a rvm group #20

ghost opened this issue Jan 30, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2014

Error: Could not set 'file' on ensure: Could not find group rvm at 8:/etc/puppet/modules/rvm/manifests/rvmrc.pp
Error: Could not set 'file' on ensure: Could not find group rvm at 8:/etc/puppet/modules/rvm/manifests/rvmrc.pp
Wrapped exception:
Could not find group rvm
Error: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]/ensure: change from absent to file failed: Could not set 'file' on ensure: Could not find group rvm at 8:/etc/puppet/modules/rvm/manifests/rvmrc.pp

@TJM
Copy link

TJM commented Jan 31, 2014

I second this, shouldn't the rvm-install create that group?

@TJM
Copy link

TJM commented Jan 31, 2014

OK, I think I have figured it out..

Here is the error:

Info: Class[Rvm::Rvmrc]: Starting to evaluate the resource
Info: Class[Rvm::Rvmrc]: Evaluated in 0.00 seconds
Info: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]: Starting to evaluate the resource
Error: Could not set 'file' on ensure: Could not find group rvm at 14:/vagrant/puppet/modules/rvm/manifests/rvmrc.pp
Error: Could not set 'file' on ensure: Could not find group rvm at 14:/vagrant/puppet/modules/rvm/manifests/rvmrc.pp
Wrapped exception:
Could not find group rvm
Error: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]/ensure: change from absent to file failed: Could not set 'file' on ensure: Could not find group rvm at 14:/vagrant/puppet/modules/rvm/manifests/rvmrc.pp
Info: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]: Evaluated in 0.01 seconds

The reason is relating to https://github.com/maestrodev/puppet-rvm/blob/maestrodev/manifests/init.pp#L24 ... It calls rvm_system_users with an empty array (if you just use include rvm). This doesn't actually create any resources, and thus https://github.com/maestrodev/puppet-rvm/blob/maestrodev/manifests/system_user.pp#L8 doesn't get a chance to create the "rvm" group. Since that rvmrc is before => Exec['system-rvm'], the "rvm-install" doesn't get a chance to run and create the rvm group like it used to.

I wonder if moving the ensure_resource('group', $group, {'ensure' => 'present' }) to init.pp would fix it?

TJM pushed a commit to TJM/puppet-rvm that referenced this issue Jan 31, 2014
 - Added a $group parameter, defaults to 'rvm'
 - Copied Line 8 from system_user.pp into init.pp

Tested and verified.
TJM pushed a commit to TJM/puppet-rvm that referenced this issue Jan 31, 2014
This is a fix for: voxpupuli#20

The following changes were made:
 - Added $group parameter, defaulted to 'rvm'
 - Copied Line 8 from system_user.pp to ensure rvm group is created.
@TJM
Copy link

TJM commented Jan 31, 2014

My pull request is above to fix this, but I also found a workaround...

Basically add a "rvm::system_users" parameter to your hiera data or call the class like this:

class { 'rvm':
  system_users => ['root'],
}

... this is only necessary till my pull request #21 is merged. Then you can go back to using include rvm

~tommy

TJM pushed a commit to LarkIT/puppet-rvm that referenced this issue Jan 31, 2014
Fix for maestrodev issue voxpupuli#20 - rvmrc / rvm group

Self Merge.
carlossg pushed a commit that referenced this issue Jan 31, 2014
This is a fix for: #20

The following changes were made:
 - Added $group parameter, defaulted to 'rvm'
 - Copied Line 8 from system_user.pp to ensure rvm group is created.
@carlossg
Copy link
Member

fixed in 1.4.1, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants