Where do you create a chocolate package in foreman?

I’m new to foreman and pupppet. I understand how to create the puppet code to deploy a package, but I don’t know where or how to assign it to host groups in Foreman. I tried to create it as a smart class variable, but it didn’t work.

Simple install notepad++ via chocolatey & foreman

Proxy Version: 1.17.0

/etc/puppetlabs/code/environments/production/modules
└─┬ chocolatey-chocolatey (v1.2.6)
├── badgerious-windows_env (v2.2.2)
├── puppetlabs-powershell (v2.1.5)
└── puppetlabs-stdlib (v4.25.1)

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

Hi,
to apply your puppet module to hostgroups, you need to import it first. From your output I can see that it installed successfully, now head over to Config > Environments in Foreman UI and use button in the top right to import your ‘production’ environment with your modules. After that, you should see it in UI and be able to add to hosts and hostgroups what you have just imported.

I hope this helps,
O.

Thanks for the reply. I was 100% confused about how this thing works when I posted the question. I was under the impression that the chocolatey/chocolatey package would allow me to push any package I wanted, but later realized it only installed chocolatey on my hosts.

I was able to figure out how to deploy what I wanted by creating a new folder with a new manifest init.pp file that contains the packages that I wanted to install on the servers. Once I did this, I was able to import them as you suggested here and apply them to my host groups!

:blush:

1 Like