Foreman | Salt remote execution

Hello,

I am trying to use the Salt with REX using salt provider but this method fails. Using the SSH provider does work.

The Foreman and the Saltmaster run on different hosts and I am not sure if that is supported.

Triggering a remote execution using the Salt provider yields to the log as follows in /var/log/foreman-proxy/salt.log

2021-04-08 15:57:18,061 [salt.config      :1913][DEBUG   ][549507] Reading configuration from /etc/salt/master
2021-04-08 15:57:18,062 [salt.config      :3504][DEBUG   ][549507] Using cached minion ID from /etc/salt/minion_id: foreman.localdomain
2021-04-08 15:57:18,064 [salt.config      :2035][DEBUG   ][549507] Missing configuration file: /usr/share/foreman-proxy/.saltrc
2021-04-08 15:57:18,066 [salt.utils.event :311 ][DEBUG   ][549507] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
2021-04-08 15:57:18,066 [salt.utils.event :312 ][DEBUG   ][549507] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
2021-04-08 15:57:18,066 [salt.utils.entrypoints:56  ][DEBUG   ][549507] Using pkg_resources to load entry points
2021-04-08 15:57:18,075 [salt.utils.entrypoints:56  ][DEBUG   ][549507] Using pkg_resources to load entry points
2021-04-08 15:57:18,102 [salt.utils.entrypoints:56  ][DEBUG   ][549507] Using pkg_resources to load entry points
2021-04-08 15:57:18,128 [salt.transport.zeromq:162 ][DEBUG   ][549507] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'foreman.localdomain_master', 'tcp://127.0.0.1:4506', 'clear')
2021-04-08 15:57:18,128 [salt.transport.zeromq:261 ][DEBUG   ][549507] Connecting the Minion to the Master URI (for the return server): tcp://127.0.0.1:4506
2021-04-08 15:57:18,129 [salt.transport.zeromq:1305][DEBUG   ][549507] Trying to connect to: tcp://127.0.0.1:4506
2021-04-08 15:57:23,136 [salt.transport.zeromq:1366][DEBUG   ][549507] SaltReqTimeoutError, retrying. (1/3)
2021-04-08 15:57:28,141 [salt.transport.zeromq:1366][DEBUG   ][549507] SaltReqTimeoutError, retrying. (2/3)
2021-04-08 15:57:33,147 [salt.transport.zeromq:1366][DEBUG   ][549507] SaltReqTimeoutError, retrying. (3/3)
2021-04-08 15:57:38,152 [salt.transport.zeromq:1333][DEBUG   ][549507] Re-init ZMQ socket: Message timed out
2021-04-08 15:57:38,153 [salt.transport.zeromq:1305][DEBUG   ][549507] Trying to connect to: tcp://127.0.0.1:4506
2021-04-08 15:57:38,154 [salt.client      :1837][ERROR   ][549507] Message timed out
2021-04-08 15:57:38,154 [salt.transport.zeromq:288 ][DEBUG   ][549507] Closing AsyncZeroMQReqChannel instance
2021-04-08 15:57:38,154 [salt.transport.ipc:365 ][DEBUG   ][549507] Closing IPCMessageSubscriber instance
2021-04-08 15:57:38,155 [salt.utils.entrypoints:56  ][DEBUG   ][549507] Using pkg_resources to load entry points
2021-04-08 15:57:38,158 [salt.utils.lazy  :102 ][DEBUG   ][549507] LazyLoaded nested.output

The Saltmaster is running at saltmaster.localdomain.
Maybe there is a setting needed to not connect to 127.0.0.1:4506 but rather to saltmaster.localdomain:4506?

Thanks
Thomas