Problem: we used to do /usr/sbin/foreman-rake puppet:import:environments_only[true] in order to import just the existing environments from our puppetmaster (v5), but since foreman version 1.24 it has been removed.
Failed to update the environments and Puppet classes from the on-disk puppet installation: Validation failed: Puppetclass lookup key has already been taken
Our environments are created on the puppetserver in the /etc/puppetlabs/code/environments/ directory.
With GET /api/environments, I still only see older environments from the time while working with foreman 1.21, but not after.
The new environments do not show up.
I was meant to say: we create our environments on the puppetserver in the /etc/puppetlabs/code/environments/ directory not with foreman, rather during our work process via git branches.