diff --git a/salt_sproxy/_runners/proxy.py b/salt_sproxy/_runners/proxy.py index 899e7b4f..469634ec 100644 --- a/salt_sproxy/_runners/proxy.py +++ b/salt_sproxy/_runners/proxy.py @@ -1354,6 +1354,15 @@ def execute( # indefinitely. timeout = None + if tgt_type == 'pillar_target': + # When using the -I option on the CLI, the tgt_type passed on is called + # `pillar_target`: + # https://github.com/saltstack/salt/blob/e9e48b7fb6a688f4f22d74a849d58c1c156563d1/salt/utils/parsers.py#L1266 + # While if we want to use this against existing Minions, the option + # needs to be just `pillar`: + # https://github.com/saltstack/salt/blob/99385b50718d70d93fd5b83e61c0f4b3a402490c/salt/utils/minions.py#L359 + tgt_type = 'pillar' + if preload_targeting or invasive_targeting: _tgt = '*' _tgt_type = 'glob' diff --git a/salt_sproxy/cli.py b/salt_sproxy/cli.py index e7907abe..fab2f06c 100644 --- a/salt_sproxy/cli.py +++ b/salt_sproxy/cli.py @@ -334,6 +334,7 @@ def run(self): 'grain', 'pcre', 'grain_pcre', + 'pillar', 'pillar_pcre', 'pillar_target', 'nodegroup',