Err : only one declaration of a proxy is allowed

Hello, i’m trying to add smart proxy to foreman because i need it to use remote execution plugin.
The problem is i follow the installation guide step by step but at moment to add proxy, an message appear :

“only one declaration of a proxy is allowed”

What does that mean ?

tuto smat proxy installation :

I genereted new certificates with the foreman manual.

Thks for help

You should see a smart proxy with the same name already available. If you do not see it, change to Any Organization and Any Location, select the smart proxy and set its Organization and Location.

To get a new feature displayed, running the Refresh action can be required.

Ok ok well seen thank you !

The smart proxy was just in other location.

there is a way to directly have the proxy in the default location and organization ?

It should be there if only one location and organization exists, but I think this is fixed in only 1.22. But @tbrisker will know it for sure!

There is an open issue for that - Feature #26092: When only one taxonomy of specific type is defined, api should default to that taxonomy - Foreman - but unfortunately I still haven’t gotten around to fixing it.

Thanks, that was what I was looking for.

We can do that with hammer cli :

hammer proxy update --id 1 --location “Default Location” --organization “Default Organization”

oops… Mistakes…

We should use the next command :

hammer location add-smart-proxy --id 1 --smart-proxy-id 1

But an error appear that connected to the errors spoken above :

Could not associate the smart proxy:
Environments expecting environments used by hosts or inherited (check mismatches report).
Domains expecting domains used by hosts or inherited (check mismatches report).