puppet-archive
puppet-archive copied to clipboard
archive not found with puppet apply
puppet-archive seems to ignore the --modulepath setting on execution (at least for me).
Debug: Caching environment 'production' (ttl = 0 sec)
Error: Could not autoload puppet/provider/archive/ruby: Unable to find archive module in modulepath /etc/puppet/modules:/opt/puppetlabs/puppet/modules
Error: Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/ruby: Unable to find archive module in modulepath /etc/puppet/modules:/opt/puppetlabs/puppet/modules
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/ruby: Unable to find archive module in modulepath /etc/puppet/modules:/opt/puppetlabs/puppet/modules at /home/matt/src/bitbucket/workstation/puppet/modules/terraform/manifests/init.pp:27:3 on node gamingpc.lan
The run command looks like this
puppet apply --hiera_config=/home/matt/src/bitbucket/workstation/puppet/hiera.yaml --modulepath=/home/matt/src/bitbucket/workstation/puppet/modules:/home/matt/src/bitbucket/workstation/puppet/localmodules /home/matt/src/bitbucket/workstation/puppet/manifests/site.pp --color=true --verbose --debug --show_diff --write-catalog-summary
~/src/bitbucket/workstation
After playing around with some different puppet installs it seems as though it defaults to the original search locations.
Hi, can you provide a simple reconstruction case?
Is archive behaving differently than other type/provider modules in this context?
#105 and #225 might be related, though they're in a master-server context, not using puppet apply.
Interesting, although those feel different.
What we'd really need here is a step-by-step how to create an environment that exhibits this specific issue.
Having the same issues here:
mkdir modules
git clone https://github.com/voxpupuli/puppet-archive modules/archive
cat >> test.pp >> EOF
archive { '/home/mbaur/g10k':
ensure => present,
source => 'https://github.com/xorpaul/g10k/releases/download/v0.3.14/g10k-linux-amd64.zip',
extract => true,
}
EOF
puppet apply --modulepath=modules/ test.pp
Leads to this error:
Error: Could not autoload puppet/provider/archive/curl: Could not find parent provider ruby of curl
Error: Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/curl: Could not find parent provider ruby of curl
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/curl: Could not find parent provider ruby of curl at /home/mbaur/test.pp:1:1 on node mbaur-gitdevelopment.restvlan4.syseleven
2019-11-08 11:45:50,353 ERROR [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/ruby: Unable to find archive module in modulepath /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules (file: /etc/puppetlabs/code/environments/dev/modules_forge/consul/manifests/install.pp, line: 40, column: 10) on node oomohchahwaiphee
2019-11-08 11:45:50,355 ERROR [puppetserver] Puppet Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/archive: Could not autoload puppet/provider/archive/ruby: Unable to find archive module in modulepath /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules (file: /etc/puppetlabs/code/environments/dev/modules_forge/consul/manifests/install.pp, line: 40, column: 10) on node oomohchahwaiphee
/etc/puppetlabs/code/environments/dev/modules_forge/archive/lib/puppet/provider/archive/ruby.rb:7:in `<main>'
org/jruby/RubyKernel.java:1022:in `load'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:66:in `load_file'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:1:in `block in (root)'
org/jruby/RubyArray.java:1800:in `each'
@ffrank Hey Felix! I'm having a similar error - using Puppet Server v6.7.1 in Docker (Kubernetes).
In another issue they're suggesting running puppet generate types.
Running puppet generate types works. To save yall the need to do the same exploration that I did, here's the resource you'll probably want to end up on: https://github.com/puppetlabs/r10k/blob/main/doc/faq.mkd#how-can-run-i-puppet-generate-types-for-each-changed-environment-during-deployment
And since postrun: is also supported by g10k, a config such as this works:
---
:cachedir: '/var/cache/g10k'
:sources:
:sccd:
remote: 'ssh://server/puppet.git'
branch: not_producton
basedir: '/etc/puppetlabs/code/environments'
postrun: ["/usr/local/bin/generate-puppet-types.sh", "$modifiedenvs"]