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

instructions to use file{'/etc/rvmrc'} fail as duplicate #51

Closed
mczepiel opened this issue Aug 12, 2014 · 4 comments
Closed

instructions to use file{'/etc/rvmrc'} fail as duplicate #51

mczepiel opened this issue Aug 12, 2014 · 4 comments

Comments

@mczepiel
Copy link

There's already a File['/etc/rvmrc'] defined in Class['rvm::rvmrc'] such that the instructions in the readme do not work as it would be editing the same file. Is the intention to use class { 'rvm::rvmrc': … } ?

FWIW I ran into this when trying to set the rvm_silence_path_mismatch_check_flag=1 to ignore my path being configured with a relative binpath ahead of rvm in the $PATH

@carlossg
Copy link
Member

just define File['/etc/rvmrc'] before the rvm class

@mczepiel
Copy link
Author

Sorry new to puppet so I'm sure I've missed something:

Puppet:

file {"/etc/rvmrc":
  content => "rvm_silence_path_mismatch_check_flag=1";
}
->
class { 'rvm': version => '1.25.28' }

And the error that results:

Error: Duplicate declaration: File[/etc/rvmrc] is already declared in file /tmp/vagrant-puppet-2/manifests/app.pp:39; cannot redeclare at /tmp/vagrant-puppet-2/modules-0/rvm/manifests/rvmrc.pp:17 on node …

Whereas if I add the flag as an option to the Class['rvm::rvmrc'] and use it:

class{'rvm::rvmrc':
  silence_path_mismatch_check_flag => 1;
}

(Added to rvmrc.pp)

$silence_path_mismatch_check_flag = undef

I guess my question is, why prefer the file usage when there's a dedicated class for rvm::rvmrc?
Also, am I doing the ordering wrong such that your suggestion should work?

@carlossg carlossg reopened this Aug 13, 2014
@carlossg
Copy link
Member

sorry, my bad, the file is defined in rvm::rvmrc. Either the module is changed to add the flag or you pass a different template to your class{'rvm::rvmrc':} definition

@mczepiel
Copy link
Author

I'm closing this one out as the readme no longer instructs you to do something that won't work.

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