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

Bolt installed from package on linux fails to install modules from git #3306

Open
h0tw1r3 opened this issue May 3, 2024 · 3 comments
Open
Labels
Bug Bug reports and fixes. Jira

Comments

@h0tw1r3
Copy link
Contributor

h0tw1r3 commented May 3, 2024

Describe the Bug

bolt fails to module install when modules are sourced from git on Linux because the bolt packages (rpm, deb) do not require the git package.

Installing project modules

  → Syncing modules from /root/project/Puppetfile to /root/project/.modules

No Git providers are functional.
Failed to sync modules from /root/project/Puppetfile to /root/project/.modules

Expected Behavior

No error, all modules install.

Steps to Reproduce

docker exec -it litmusimage/ubuntu:22.04 /bin/bash -l
wget https://apt.puppet.com/puppet-tools-release-jammy.deb
dpkg -i puppet-tools-release-jammy.deb
apt-get update 
apt-get install puppet-bolt
mkdir /root/project && cd /root/project
bolt project init project
/opt/puppetlabs/bolt/bin/ruby <<EOF
require 'yaml'
x = YAML.load_file('bolt-project.yaml')
x['modules'] = [{ git: 'https://github.com/puppetlabs/provision', ref: 'main' }]
File.write('bolt-project.yaml', x.to_yaml)
EOF
bolt module install

Environment

  • Anything that runs docker
  • I used Ubuntu 20.04, doesn't matter

Additional Context

https://www.puppet.com/docs/bolt/latest/bolt_installing_modules.html#git-modules

Also fails with the puppet-bolt docker container. Somewhat defeats the point of using a container if it needs to be extended to add git support.

@donoghuc
Copy link
Member

donoghuc commented May 6, 2024

Thanks for filing this. We are not keen on vendoring git, maybe its time to add it as a package dependency. We can at least document this for now.

@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented May 6, 2024

Agreed. I think it would take just as much effort to document "install this package for X" as it does to just add the dependency to the package. Actually more, as I've already done the linked PR :)

@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented May 6, 2024

For visibility, sourcing modules from git is a common use case, just as common as with a control-repo Puppetfile. Every professional engagement I've been on, internal modules are sourced from git.

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

No branches or pull requests

3 participants