salt: [BUG] file.managed and file.symlink both run in test mode by default
Description
During a basic file.managed or file.symlink, running salt state.apply results in “symlink is set for creation” or “The file is set to be changed. Note: No changes have been applied.”
Even explicitly setting “test” in the minion configuration to False did not fix the issue. The only fix is to manually intervene and hope that the files line up as expected.
Setup
/opt/netbox:
file.symlink:
- target: /opt/netbox-{{ netboxversion }}
- force: True
- test: False
- require:
- archive: /opt
/opt/netbox/local_requirements.txt:
file.managed:
- source: salt://filesets/netbox/local_requirements.txt
- require:
- file: /opt/netbox
Please be as specific as possible and give set-up details.
- VM (ProxMox)
- onedir packaging
Steps to Reproduce the behavior
With the given symlink and managed examples above, simply running salt state.apply fails. The same is true of a managed file
Expected behavior
Prior to 3006, when running salt state.apply the file would be changed or updated as per the SLS definition.
Screenshots

Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3006.0
Python Version:
Python: 3.10.11 (main, Apr 14 2023, 05:57:16) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: 4.0.10
gitpython: 3.1.31
Jinja2: 3.1.2
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: 0.38.0
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
relenv: 0.11.2
smmap: 5.0.0
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: almalinux 8.7 Stone Smilodon
locale: utf-8
machine: x86_64
release: 4.18.0-425.19.2.el8_7.x86_64
system: Linux
version: AlmaLinux 8.7 Stone Smilodon
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 36 (23 by maintainers)
@danielbakken 3006.2 was a cve only release. we are working on getting 3006.3 out with this and other fixes.
@lkubb your patch work. no worries for the delay. thanks
@lkubb That is plausible. I use the new x509_v2 module as well. I can try it without the x509_v2 module relatively easily when I get time.