You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
saltclass list override '^' is literal for single list #50755
When using the override marker (^) at the start of a list, this is translated as a literal ^ if there are no other lists to override.
Setup/Steps to Reproduce Issue
For example, with a state set up to install all packages in a list:
states/pkg.yml
{% for pkg in pillar.get('pkgs', []) %}
pkg_{{pkg}}:
pkg.installed:
- name: {{pkg}}
{% endfor %}
nodes/foo.yml
classes:
- a
- b
states:
- pkgs
classes/a.yml
pillars:
pkgs:
- one
- two
classes/b.yml
pillars:
pkgs:
- ^
- three
Works as expected:
$ salt 'foo' state.apply | grep updated
Comment: The following packages would be installed/updated: three
However, if only the the 'override list' is used:
nodes/foo.yml
classes:
- b
states:
- pkgs
We get:
$ salt 'foo' state.apply | grep updated
Comment: The following packages would be installed/updated: ^
Comment: The following packages would be installed/updated: three
Versions Report
Salt Version:
Salt: 2018.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.8
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: Ubuntu 18.04 bionic
locale: UTF-8
machine: x86_64
release: 4.15.0-39-generic
system: Linux
version: Ubuntu 18.04 bionic
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.
BTW: This does NOT work at all, if other pillar sources than saltclass exist (let's say Gitpillar). It always leaves the caret in pillar lists, only the position differs, depending on the order the different ext_pillar modules are listed in the Salt master configuration.
IMHO this caret thing should be removed altogether and Saltclass should simply follow the configured pillar merge rules.
Activity
[-]saltclass list merge '^' is literal in first list[/-][+]saltclass list override '^' is literal for single list[/+]dwoz commentedon Dec 7, 2018
@mrichar1 Thank you for reporting this.
Fix saltstack#50755 - saltclass list override '^' is literal for sing…
Fix saltstack#50755 - saltclass list override '^' is literal for sing…
stale commentedon Jan 9, 2020
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.
mrichar1 commentedon Jan 9, 2020
Still needs fixing.
stale commentedon Jan 9, 2020
Thank you for updating this issue. It is no longer marked as stale.
Fix saltclass literal '^' list-override marker for single class
dhs-rec commentedon Oct 13, 2026
BTW: This does NOT work at all, if other pillar sources than saltclass exist (let's say Gitpillar). It always leaves the caret in pillar lists, only the position differs, depending on the order the different ext_pillar modules are listed in the Salt master configuration.
IMHO this caret thing should be removed altogether and Saltclass should simply follow the configured pillar merge rules.
dhs-rec commentedon Oct 14, 2026
Looks like this PR also fixes that problem.
Fix saltclass literal '^' list-override marker for single class