Remote_execution_ssh_user based on location rather than just content host

Problem:
Until now, I have only had one default location within my org (default). now I need to incorporate other locations due to an acquisition. These systems use a different admin user to do their tasks.

How do I set the remote_execution_ssh_user and effective_user at the per-location level? (or organization or hostgroup, etc ) Do I just define them in the parameters for the location in question?

Eventually I would like to use ssh key pairs to do this work: where would I put and define the key pairs to use? can this also be done at the location level?

Perhaps the more generic question is: can global settings be overridden at the relevent organization/location/hostgroup/content host levels?

Foreman and Proxy versions:
3.9.1

Foreman and Proxy plugin versions:
katello 4.11.1
foreman_remote_execution 12.0.5

Distribution and version:
Redhat 8.9

Hi

Yes, just define the parameters at whatever level you find appropriate. If a parameter is defined on multiple levels, then the one “closest to the host” will be used.

Not directly. A smart proxy has a single ssh key that it uses and that’s it. You could simulate one-key-per-location by only having a single smart proxy in that location

Iirc remote execution is somewhat special in this regard. So while you can define most remote execution-related settings as parameters, I wouldn’t rely on this approach being universally applicable.

1 Like