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

Unable to override module location from metadata source... #285

Closed
fatmcgav opened this issue Feb 24, 2015 · 5 comments
Closed

Unable to override module location from metadata source... #285

fatmcgav opened this issue Feb 24, 2015 · 5 comments

Comments

@fatmcgav
Copy link

I'm trying to use Librarian-Puppet to handle module dependencies for testing etc, by using a combination of metadata and Git sourced modules...

However when I try and run librarian-puppet, I get:

librarian-puppet install --path spec/fixtures/modules/
Puppetfile and Puppetfile.lock are out of sync!

I've got a module with a defined dependencies section in 'metadata.json'.

    "dependencies": [{
            "name": "fatmcgav/glassfish",
            "version_requirement": ">= 0.3.0"
        },{
            "name": "saz/ssh",
            "version_requirement": ">= 2.3.6"
        },{
            "name": "puppetlabs/stdlib",
            "version_requirement": ">= 3.2.0"
        },{
            "name": "saz/timezone",
            "version_requirement": ">= 3.0.0"
        },{
            "name": "saz/resolv_conf",
            "version_requirement": ">= 3.0.0"
        },{
            "name": "saz/sudo",
            "version_requirement": ">= 3.0.0"
        },{
            "name": "saz/limits",
            "version_requirement": ">= 2.1.0"
        },{
            "name": "puppetlabs/ntp",
            "version_requirement": ">= 3.0.0"
        },{
            "name": "puppetlabs/concat",
            "version_requirement": ">= 1.0.0"
        },{
            "name": "cescoffier/nexus",
            "version_requirement": ">= 0.0.1"
        },{
            "name": "datacentred/ldap",
            "version_requirement": ">= 0.2.3"
        },{
            "name": "ripienaar/module_data",
            "version_requirement": ">= 0.0.4"
        },{
            "name": "razorsedge/hp_mcp",
            "version_requirement": ">=0.1.2"
        },{
            "name": "deric/accounts",
            "version_requirement": ">=1.0.1"
        }
    ]

I've also defined a Puppetfile, with the following contents:

#!/usr/bin/env ruby

forge 'http://forge.puppetlabs.com'

# Use develop branch for latest changes
mod 'fatmcgav-glassfish', '>=0.3.0',
  :git => 'https://github.com/fatmcgav/fatmcgav-glassfish.git',
  :ref => 'develop'

# Pull Nexus repo from Git
mod 'cescoffier-nexus', '>=0.0.1',
  :git => 'https://github.com/cescoffier/puppet-nexus.git'

mod 'ripienaar-module_data', '>=0.0.4',
  :git => 'https://github.com/ripienaar/puppet-module-data.git'

metadata

A verbose run looks like: https://gist.github.com/fatmcgav/aa76c69edc495e84b91a#file-librarian-puppet-verbose
And the resultant Puppetfile.lock looks like: https://gist.github.com/fatmcgav/aa76c69edc495e84b91a#file-puppetfile-lock

Any ideas?

Cheers
Gavin

@fatmcgav
Copy link
Author

Also, if I put the metadata line above the modules in Puppetfile, then Librarian-puppet fails with an 'Unable to find module on Forge' error.

Full verbose log is: https://gist.github.com/fatmcgav/aa76c69edc495e84b91a#file-librarian-puppet-metadata-first

@carlossg
Copy link
Collaborator

You shouldn't put modules in the metadata.json if they are not in the forge. Try removing the ones you want from git

@fatmcgav
Copy link
Author

Hmm, doesn't feel like the correct process to me...

Surely the metadata.json file should contain all the dependencies that my module has, no matter where they're coming from?!

@carlossg
Copy link
Collaborator

That is how it works now.
metadata.json is only useful for forge modules, as the puppet module tool will only check there.

@fatmcgav
Copy link
Author

fatmcgav commented Mar 6, 2015

Ah, cool, cheers :)

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