[BUG] top.sls fail to render on empty targeting group
See original GitHub issueDescription an empty targeting group / section that has no config declaration will make salt fail to render the top.sls
Steps to Reproduce the behavior define any targeting in the top.sls with no config declaration like
'G@site_domain:ased':
#- csf.allow.ldap
#- csf.allow.tss
#- csf.allow.snmp.prob
the use case was that the configuration was commented
base:
'*':
- headers
- cis
- requirements
- sshd
- sshd.sssd
- csf
- chronyd
- sysctl
- snmpd
- sssd
- spacewalk
- grains
- journald
- postfix
'G@site:azure':
- csf.allow.azure
- csf.allow.nessus.external
- csf.allow.prtg.prob.mgm.external
- csf.allow.salt.master.external
- chronyd.site.azure
- sshd.site.azure
'G@site_domain:ased':
#- csf.allow.ldap
#- csf.allow.tss
#- csf.allow.snmp.prob
Expected behavior an empty dictionary should not make salt fail to render the top.sls file, it should just be ignored
Versions Report
Salt Version:
Salt: 3000.3
Dependency Versions:
cffi: 1.12.3
cherrypy: unknown
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.1
libgit2: 0.28.2
M2Crypto: 0.35.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.28.2
Python: 3.6.8 (default, Apr 2 2020, 13:34:55)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 15.3.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7.8.2003 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1127.10.1.el7.x86_64
system: Linux
version: CentOS Linux 7.8.2003 Core
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
The Top File - Salt Project Documentation
Top files have three components: Environment: A state tree directory containing a set of state files to configure systems. Target: A grouping of...
Read more >Security update for SUSE Manager Client Tools
An update that solves 11 vulnerabilities and has 251 fixes is now available. Description: This update fixes the following issues: salt:.
Read more >Ariane 5 - Wikipedia
ArianeGroup is the prime contractor for the manufacturing of the vehicles, leading a multi-country consortium of other European contractors.
Read more >Ubuntu Manpage: salt - Salt Documentation
Create the top.sls file: /srv/salt/top.sls: base: '*': - webserver 2. ... This option is useful to group minions into easy-to-target groups when using ......
Read more >SaltStack Config Documentation - VMware Docs
35.4 Reporting a bug . ... A target is the group of minions, across ... Make a copy of both a sample state...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Nerigal, I believe that is badly formed yaml as I had attempted to do the same thing.
Although you mentioned a dictionary is being used, it’s actually a list of items. If you want to have an empty targeting group, you’ll need to use an empty list like
[]
.However if you use an empty list like I mentioned, then you’ll encounter issue #54882.
Thanks @airzvisa for helping out with this issue.