Foreman1.18/puppet5 update to foreman2.1/puppet6

I am currently looking into replacement of F1.18/p5 with latest foreman and puppet6.

A few things I have found that may assist others. When assigning puppet classes to hostgroups, I have the follow issue.

this is a fragment extract when calling
hammer --output json hostgroup list --order

They changed the element name
{
“Id”: 3,
“Name”: “Ambari-Client-2.5.1”,
“Title”: “network/Ambari-Client-2.5.1”,
“Puppet Environment”: {
“environment_name”: “dev”,

It is now called just Name
{
“Id”: 3,
“Name”: "Ambari-Client-2.5.1,
“Title”: "network/Ambari-Client-2.5.1,
“Puppet Environment”: {
“Name”: “dev”,
“Id”: 1

The element Name has changed from environment_name to just Name. These could help others so I post this.

Been a few other API changes main one was puppet-environment instead of just environment.( this one at least gives you a warning and tells you what to change)

Also seems to be a bug again with hammer not updating webconsole values for location and organization.
I have detailed this here. No location / Organization if host added by default from puppet run

1 Like

Thank you for this information.
If you complete the move to the latest Foreman, you are very welcome to submit a blog with all of your tips and tricks. From the questions raised here, it seems there are a number of people who need to move off older systems. This helps a lot. Thanks again!

Perhaps someone from @cli can answer the hammer changes. It may be this:

I generally script up the builds so I can use them in CI platform. my build new script works great and dev is on puppet6/foreman2, the same code is working with puppet 5 bar a few changes we make to the api to cope with names around puppet-environment and element names changing. we just have two stand alone python scripts that push hammer hostgroups and class overrides in. Due to the changes in API, I recommend freezing the p5/f1 version and just make new version. keepin the same script working with more than one version is a total messy method. Next step for me is working out a migration/upgrade