When executing a salt command using compound targeting specifying grains incorrect minions are selected if the value of the grain starts with a number.
search cancel

When executing a salt command using compound targeting specifying grains incorrect minions are selected if the value of the grain starts with a number.

book

Article ID: 394213

calendar_today

Updated On: 04-14-2025

Products

VMware Aria Suite

Issue/Introduction

When executing a salt command using compound targeting specifying grains there is an issue if the value of the grain starts with a number. For instance if there  are two grans that have a value of 7 and 75 and the compound statement is -C 'G@grain_name:7' then the state will be run against both the vm with a grain_name of 7 and of 75.

Environment

salt-master salt-minion 3006.9

Resolution

The recommendation is to use -G ' grain_name:7' instead to target the grain value of 7 only.