Prevent auto re-registration when the client is already registered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
New
|
Undecided
|
Unassigned |
Bug Description
When doing landscape-config using a registration key and --silent the computer automatically
registers itself. If you want to modify an option using the landscape-config automatically, for example to push a change to all clients you get a duplicate computer.
Example:
1) Register a computer to On-Prem that has a registration key set up.
2) Try to automatically change a setting like:
landscape-config --apt-update-
Restarting landscape-client (via systemctl): landscape-
Please wait...
System successfully registered.
You'll get a duplicate computer every time you do that because it registers itself again every time. This should be prevented by not automatically registering a client for subsequent landscape-config runs.
The use case here is an admin that wants to push changes to client.conf to hundreds of clients that are already registered, using something like Ansible for example.
A workaround is to do the change to /etc/landscape/ client. conf directly and just restart the landscape client. Doing it this way will not register a new copy of the client if it already exists.