Can grains contains the ip of minion connection to the master? #67606
Replies: 6 comments
-
I do not see a specific grain for the IP address used to connect to the master. But if your objective is to just target a minion based on its ip address you can use ip address matching: https://docs.saltstack.com/en/latest/topics/targeting/ipcidr.html
|
Beta Was this translation helpful? Give feedback.
-
-S can not use * or list to match several targets,like
|
Beta Was this translation helpful? Give feedback.
-
Another scenario like:
If I want to just let minion-2 to do test.ping, |
Beta Was this translation helpful? Give feedback.
-
i'll go ahead and approve as a feature request. Seems it might be good to add targeting for connected minions. Looks like the |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
-
Then we can use the minion connection ip,like:
salt -G 'connection_ip:x.x.x.x' test.ping
Perhaps it is useful.
When the minion has multiple ips,we must use the right one.
Beta Was this translation helpful? Give feedback.
All reactions