There was an error while loading. Please reload this page.
1 parent bec68c0 commit 275ce15Copy full SHA for 275ce15
2 files changed
changelog/69895.fixed.md
@@ -0,0 +1 @@
1
+Fixed `x509_v2.certificate_managed` deleting symlinks in test mode if `follow_symlinks` was explicitly set to `false`
salt/states/x509_v2.py
@@ -466,8 +466,9 @@ def certificate_managed(
466
if file_args.get("follow_symlinks", True):
467
real_name = os.path.realpath(name)
468
else:
469
- # workaround https://github.com/saltstack/salt/issues/31802
470
- __salt__["file.remove"](name)
+ if not __opts__["test"]:
+ # workaround https://github.com/saltstack/salt/issues/31802
471
+ __salt__["file.remove"](name)
472
replace = True
473
474
if __salt__["file.file_exists"](real_name):
0 commit comments