Problem:
Trying to import puppet forge module “powershell”
Installed fine
(import environments from theforeman) doesn’t show installed module
tried ** foreman-rake puppet:import:puppet_classes** doesn’t show installed module
conf module shows “/opt/puppetlabs/puppet/modules” which has module installed Expected outcome:
able to import an shows in classes
Foreman and Proxy versions:
1.24 Foreman and Proxy plugin versions:
1.24 Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
The foreman-rake puppet:import:puppet_classes task is deprecated and the current way is to call it via the smart proxy. There’s actually a PR to drop the code:
One common thing is that people clone a puppet-$module without renaming the directory to $module. Does /opt/puppetlabs/puppet/modules/powershell actually exist?
If you simply do git clone .../puppet-powershell, it ends up as /opt/puppetlabs/puppet/modules/puppet-powershell which Puppet refuses to load.
In general I’d recommend tools like r10k or librarian-puppet to deploy modules because they’re much more aware of how things are supposed to be deployed.
Another problem might be that you simply don’t have any environments (like production) so it doesn’t find any classes either.
i used :
puppet module install puppetlabs-powershell --version 2.3.0
which installed it into:
> /home/dptc/.puppetlabs/etc/code/modules
> └── puppetlabs-powershell (v2.3.0)
then i coped it to
/opt/puppetlabs/puppet/modules
└── puppetlabs-powershell (v2.3.0)
environments are set-up
also puppet version is
Puppet v5.5.16
What does ls -l opt/puppetlabs/puppet/modules show? I’m also surprised that your basemodulepath includes /home/dpc which suggests it wasn’t ran as root. That does influence the result and why I included sudo in the command.