Auto Assigning Smart Proxies to ALL Locations and Organizations

Is there a way to have all proxies auto assign themselves to all Orgs and Locs? We have over 1200 Locations in Foreman (and some 300 Orgs) - We’ve noticed that the proxies dont get assigned to them automatically, so we cant run jobs. I can automate it of course, but would rather not.

Thanks.

Anyone have any ideas? This is very concerning, because we now have some 300+ Orgs and over 1200 Locations. I see no easy way to automate this, due to the current api options:

| smart_proxy[location_ids]

optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

| smart_proxy[organization_ids]

optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type

There is no way to simply add a smart proxy to a new Org/Loc. And the options here mean you have to pull ALL the current id’s and do a REPLACE. With over 1200 locations that does not seem like a very simple process to automate.

I believe there should be an option for proxies to always get added to Orgs/Locs. Right now, with other selection boxes, if you uncheck them all then all of them become available, along with new ones. Or for other selection boxes there is just a checkbox for All (eg; All users).

maybe via foreman ansible modules?

Ya, certainly it can be automated, unfortunately it’ll be messy.
I’ll just add it to the ever growing functions that our foreman-node script. Specifically the salt one, which you yourself may have written? You should see what we’ve done with it!