Your setup
Formula commit hash / release tag
Current commit hash: 3c21740ba52fa5c2b5cf39cddce6a42d13d17988
Versions reports (master & minion)
Salt Version:
Salt: 3003
Dependency Versions:
cffi: 1.14.2
cherrypy: unknown
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
Jinja2: 2.10
libgit2: 0.27.7
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.5.6
msgpack-pure: Not Installed
mysql-python: 1.3.10
pycparser: 2.20
pycrypto: 2.6.1
pycryptodome: 3.6.1
pygit2: 0.27.4
Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10 buster
locale: UTF-8
machine: x86_64
release: 4.19.0-16-amd64
system: Linux
version: Debian GNU/Linux 10 buster
Pillar / config used
apache:
sites:
test.example.com-80:
ServerName: test.example.com
enabled: false
template_file: salt://apache/vhosts/redirect.tmpl
port: '80'
interface: '*'
RedirectMatch: true
RedirectSource: '/'
RedirectTarget: 'https://test.example.com'
ErrorLog: ${APACHE_LOG_DIR}/error.log
CustomLog: ${APACHE_LOG_DIR}/access.log
DocumentRoot: false
Bug details
Describe the bug
When a site configuration is to be deactivated (enabled: false), the state apache.config.vhosts.standard throws the following error:
failed: mapping values are not allowed in this context
When I change the value to enabled: true , the state will run without any errors.
Log at salt-master:
pillar.get: Default () is of type 'str', must be a dict or list to merge. Merge will be skipped.