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

duplicate resource #259

Closed
cblaupanda opened this issue Nov 9, 2015 · 2 comments
Closed

duplicate resource #259

cblaupanda opened this issue Nov 9, 2015 · 2 comments

Comments

@cblaupanda
Copy link

So far I managed python with the puppet's package manager until I have come across this module. It seems to do exactly what I need but I have failed to implement it correctly.

I keep on getting this error:

Error: Failed to apply catalog: Cannot alias Package[pip] to ["python-pip"] at /etc/puppet/modules/python/manifests/install.pp:61; resource ["Package", "python-pip"] already declared

I have gone through all my profiles and have initiated python and pip as per below.

ensure_resource('class', 'python', {
    version    => 'system',
    pip        => 'present',
  })
  ensure_resource('python::pip', 'blah', {
    pkgname  => 'blah'
    ensure   => installed,
    require  => Class['python']
  })

But yet I still get the duplicate resource error.

I want to confirm if anyone else has had this issue before I start chasing windmills in my puppet code 😏

Your advise will be appreciated.

@cblaupanda
Copy link
Author

as a workaround stdlib's ensure_resource or ensure_package would come in quite handy (https://forge.puppetlabs.com/puppetlabs/stdlib#ensure_packages)

@cblaupanda
Copy link
Author

  ensure_resource('package', 'pip', {
    ensure  => $pip_ensure,
    require => Package['python'],
  })

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

1 participant